diff --git a/build/com.liferay.ide-repository/deployToS3.sh b/build/com.liferay.ide-repository/deployToS3.sh index 6b085b2eb0..1721ba5629 100644 --- a/build/com.liferay.ide-repository/deployToS3.sh +++ b/build/com.liferay.ide-repository/deployToS3.sh @@ -16,5 +16,5 @@ PACKAGE=$3 VERSION=$4 echo "uploading to version $VERSION ..." -s3cmd --no-mime-magic --acl-public --delete-removed --delete-after sync $REPO_PATH/ s3://devtools-s3.liferay.com/$REPO/$PACKAGE/$VERSION/ +gcloud storage rsync --recursive --delete-unmatched-destination-objects $REPO_PATH/ gs://liferay-devtools/$REPO/$PACKAGE/$VERSION/ echo \ No newline at end of file diff --git a/build/com.liferay.ide-repository/hidden.features.product b/build/com.liferay.ide-repository/hidden.features.product index 343826880c..2cb6009465 100644 --- a/build/com.liferay.ide-repository/hidden.features.product +++ b/build/com.liferay.ide-repository/hidden.features.product @@ -40,7 +40,6 @@ - diff --git a/build/com.liferay.ide.build.source.formatter/README.markdown b/build/com.liferay.ide.build.source.formatter/README.markdown index 3dd30d7980..6aed5743ab 100644 --- a/build/com.liferay.ide.build.source.formatter/README.markdown +++ b/build/com.liferay.ide.build.source.formatter/README.markdown @@ -21,7 +21,6 @@ The following folders are already applied to portal code style: 8. /enterprise/plugins/com.liferay.ide.studio.ui 9. /tools/plugins/com.liferay.ide.theme.core 10. /tools/plugins/com.liferay.ide.ui.snippets -11. /tools/plugins/com.liferay.ide.xml.search.ui 12. /tools/plugins/com.liferay.ide.ui 14. /maven/plugins/com.liferay.ide.maven.core 15. /maven/plugins/com.liferay.ide.maven.ui @@ -85,4 +84,4 @@ public static final String ACTION = "action"; 3. Private static property, like this( please refer to link [Poratl Code](https://github.com/liferay/liferay-portal/search?utf8=%E2%9C%93&q=private+static+final&type=) ): ```java private static final String _CODE_NAME = "Judson"; -``` \ No newline at end of file +``` diff --git a/build/com.liferay.ide.testing-repository/category.xml b/build/com.liferay.ide.testing-repository/category.xml index 4518d303ed..c2d8bf4902 100644 --- a/build/com.liferay.ide.testing-repository/category.xml +++ b/build/com.liferay.ide.testing-repository/category.xml @@ -5,5 +5,4 @@ - - \ No newline at end of file + diff --git a/build/com.liferay.ide.upgrade.planner-repository/.gitignore b/build/com.liferay.ide.upgrade.planner-repository/.gitignore deleted file mode 100644 index 2e80d9b0b5..0000000000 --- a/build/com.liferay.ide.upgrade.planner-repository/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.gradle/ -.settings/ \ No newline at end of file diff --git a/build/com.liferay.ide.upgrade.planner-repository/.project b/build/com.liferay.ide.upgrade.planner-repository/.project deleted file mode 100644 index 37429528e4..0000000000 --- a/build/com.liferay.ide.upgrade.planner-repository/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - com.liferay.ide.tools-repository - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - - - 1700017525027 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/build/com.liferay.ide.upgrade.planner-repository/category.xml b/build/com.liferay.ide.upgrade.planner-repository/category.xml deleted file mode 100644 index c11c6cb125..0000000000 --- a/build/com.liferay.ide.upgrade.planner-repository/category.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - Liferay Upgrade Planner - - - diff --git a/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner.icns b/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner.icns deleted file mode 100644 index 20dc36d913..0000000000 Binary files a/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner.icns and /dev/null differ diff --git a/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner.ico b/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner.ico deleted file mode 100644 index 48f629e51d..0000000000 Binary files a/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner.ico and /dev/null differ diff --git a/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner.xpm b/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner.xpm deleted file mode 100644 index d4290b0190..0000000000 --- a/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner.xpm +++ /dev/null @@ -1,506 +0,0 @@ -/* XPM */ -static char * DeveloperStudio_xpm[] = { -"256 256 247 2", -" c None", -". c #C2DBF0", -"+ c #BCD3E5", -"@ c #C0DBF3", -"# c #C1DDF4", -"$ c #BED7EC", -"% c #C2DAEC", -"& c #C4DCEE", -"* c #B3CADC", -"= c #A7BDCF", -"- c #BDD9F1", -"; c #C0D8EA", -"> c #8194A0", -", c #B8D4EB", -"' c #BAD1E3", -") c #ACC3D6", -"! c #C1DBF0", -"~ c #A0B8C9", -"{ c #BCD8F0", -"] c #BCD5E9", -"^ c #B5CDE0", -"/ c #B4CCDE", -"( c #A5BDCE", -"_ c #8397A2", -": c #B1C9DA", -"< c #A6BECF", -"[ c #C1DAEF", -"} c #BFD7E9", -"| c #B1C8DB", -"1 c #C2DCF1", -"2 c #ACC4D5", -"3 c #BFD8ED", -"4 c #7D94A4", -"5 c #B5CDDF", -"6 c #A8BED0", -"7 c #98AFC0", -"8 c #B9CDE6", -"9 c #92A2CE", -"0 c #A7BFDD", -"a c #3B4248", -"b c #7587BE", -"c c #7183BA", -"d c #B0C7E6", -"e c #9EB2D7", -"f c #7A8CC3", -"g c #7385BC", -"h c #8FA7D2", -"i c #BED7EB", -"j c #7E92C3", -"k c #657CB8", -"l c #B8D1E5", -"m c #839BC5", -"n c #AAC2E1", -"o c #95ADD7", -"p c #7486BD", -"q c #889DCE", -"r c #A0B5C7", -"s c #9CB3C4", -"t c #A2B6DC", -"u c #80939F", -"v c #A7C7E4", -"w c #8397C8", -"x c #B9D5ED", -"y c #B7D3EA", -"z c #A4BCDA", -"A c #BCD5EA", -"B c #B5D0E8", -"C c #BBD7EF", -"D c #A2BEE2", -"E c #C0DAEF", -"F c #8BA2B3", -"G c #9FB6C8", -"H c #A7BED0", -"I c #A2B9CB", -"J c #B6D2E9", -"K c #B4CFE7", -"L c #95BED9", -"M c #97B7D3", -"N c #8BB3CE", -"O c #ABC7DE", -"P c #B1CDE5", -"Q c #9DB4C6", -"R c #94B4D0", -"S c #88B1CC", -"T c #92BBD6", -"U c #86AFC9", -"V c #AECAE1", -"W c #8FB7D2", -"X c #8DB5D0", -"Y c #A4C4E1", -"Z c #B8D0E2", -"` c #ACC8DF", -" . c #A1BDD4", -".. c #8FAECB", -"+. c #A6C1D9", -"@. c #96ADBF", -"#. c #7489B9", -"$. c #87B0CB", -"%. c #4F5A8F", -"&. c #5666A1", -"*. c #5E6EAA", -"=. c #93AFD3", -"-. c #47518B", -";. c #2D306F", -">. c #3C4484", -",. c #5F77B2", -"'. c #6776B2", -"). c #54649F", -"!. c #606AA1", -"~. c #2F3271", -"{. c #48518D", -"]. c #545C98", -"^. c #333474", -"/. c #343575", -"(. c #465286", -"_. c #343D7C", -":. c #6474B0", -"<. c #51619C", -"[. c #475387", -"}. c #3F4787", -"|. c #5969A4", -"1. c #5B6BA7", -"2. c #2F3A78", -"3. c #53639E", -"4. c #2E3170", -"5. c #6E80B6", -"6. c #5767A2", -"7. c #37407F", -"8. c #A1B8D7", -"9. c #5D6DA9", -"0. c #38437C", -"a. c #9EB5C7", -"b. c #404A84", -"c. c #39447D", -"d. c #6B7DB3", -"e. c #6173A8", -"f. c #505995", -"g. c #4D5692", -"h. c #4C5591", -"i. c #85A8BD", -"j. c #556392", -"k. c #6F7BAC", -"l. c #7793B5", -"m. c #8A9EC2", -"n. c #6979A3", -"o. c #323B7A", -"p. c #7D8DB8", -"q. c #89A9C5", -"r. c #5B6999", -"s. c #90ACCF", -"t. c #7189B3", -"u. c #3E407B", -"v. c #8292BD", -"w. c #5E73A2", -"x. c #313B79", -"y. c #ADC9E0", -"z. c #6476AC", -"A. c #9EB5D3", -"B. c #636DA4", -"C. c #90A4C9", -"D. c #6B83AC", -"E. c #8098C2", -"F. c #8DA9CC", -"G. c #5D72A1", -"H. c #7186B6", -"I. c #7EA3C4", -"J. c #727EB0", -"K. c #84ADC7", -"L. c #6E7F8D", -"M. c #7D98AE", -"N. c #7A97AB", -"O. c #80A4B9", -"P. c #4F616C", -"Q. c #597080", -"R. c #6D808B", -"S. c #6B8192", -"T. c #A9C4DC", -"U. c #859CAD", -"V. c #7590A6", -"W. c #87A7C3", -"X. c #9BB2D0", -"Y. c #5B6E7C", -"Z. c #7C98AC", -"`. c #8AAAC6", -" + c #9CB5C9", -".+ c #89A5BB", -"++ c #6779AF", -"@+ c #6A7D88", -"#+ c #617788", -"$+ c #7692B4", -"%+ c #46508A", -"&+ c #7C93A3", -"*+ c #708CA0", -"=+ c #373A74", -"-+ c #53606A", -";+ c #516777", -">+ c #688091", -",+ c #869BAC", -"'+ c #7F9FB6", -")+ c #8DA1C6", -"!+ c #768995", -"~+ c #698499", -"{+ c #7F8FBA", -"]+ c #546291", -"^+ c #373878", -"/+ c #586F7F", -"(+ c #6F899C", -"_+ c #A8C3DB", -":+ c #8EA5B6", -"<+ c #809BB2", -"[+ c #465863", -"}+ c #85A5BC", -"|+ c #849FB6", -"1+ c #A8C3D9", -"2+ c #61737E", -"3+ c #536775", -"4+ c #768897", -"5+ c #6A8091", -"6+ c #7490A3", -"7+ c #829DB4", -"8+ c #56636D", -"9+ c #576E7E", -"0+ c #7E919D", -"a+ c #6B8698", -"b+ c #8FA6B8", -"c+ c #7A95AC", -"d+ c #47525A", -"e+ c #48525E", -"f+ c #87A2B9", -"g+ c #617482", -"h+ c #8094A3", -"i+ c #718CA2", -"j+ c #51636D", -"k+ c #82A6BB", -"l+ c #748FA5", -"m+ c #546771", -"n+ c #708697", -"o+ c #698192", -"p+ c #889DAE", -"q+ c #7F9EB5", -"r+ c #5F717C", -"s+ c #4D545B", -"t+ c #6D7D8A", -"u+ c #718CA0", -"v+ c #8FA6B7", -"w+ c #8198A9", -"x+ c #454F56", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" . + ", -" @ # # # @ ", -" $ # % & # & & # + ", -" + # & # # # # # & # # # * ", -" # # & # & # & # & # # # & # @ = ", -" - & # # # # & # & # # # & # & % # # ; > ", -" , # & # # # & # # # # # & & # # # # & & # # ' ", -" & & # # & & # & # & # & # # # & # & # # # # # # # ) ", -" ! # # # & & # # # # & # & # # # & # & # # # & & # & & # @ ~ ", -" { # & # # # # # # & # # # # # & & # # # # & & # # & # # & % # # + ", -" ] # & & # & & # # & & # & # & # & # # # & # & # # # # # # # # # & & # # ^ ", -" / # & # # # # # & & # # # # & # & # # # & # & # # # & & # & & # & # # # & # # # ( ", -" @ # & # & # & # # # # # # & # # # # # & & # # # # & & # # & # # & # # # # # & & & # @ ", -" { % # # # # & # & & # # & & # & # & # & # # # & # & # # # # # # # # # & & & # # # # # % # # ' _ ", -" + # & # & # & # # # # # & & # # # # & # & # # # & # & # # # & & # & & # & # # # & # # # & # & & # # : ", -" # # # & # & # & # & # # # # # # & # # # # # & & # # # # & & # # & # # & # # # # # & & & # & # # # # # # @ < ", -" [ # # # & # # # # # & # & & # # & & # & # & # & # # # & # & # # # # # # # # # & & & # # # # # # # # & # # & % # $ ", -" } # & # & # # & # & # # # # # & & # # # # & # & # # # & # & # # # & & # & & # & # # # & # # # & # & & # & & # # # # # # ' ", -" # # & # & # # & # & # & # & # # # # # # & # # # # # & & # # # # & & # # & # # & # # # # # & & & # & # # # # # # & & & & & # # | ", -" * @ & # # # # # & # # # # # & # & & # # & & # & # & # & # # # & # & # # # # # # # # # & & & # # # # # # # # & # # & # # # # # # & # # @ ~ ", -" % # & # & # & # & # # & # & # # # # # & & # # # # & # & # # # & # & # # # & & # & & # & # # # & # # # & # & & # & & # # # # # # & # & & % # ; ", -" ] # # # # # & # & # # & # & # & # & # # # # # # & # # # # # & & # # # # & & # # & # # & # # # # # & & & # & # # # # # # & & & & & # # # # # & # # # ' ", -" ' 1 # # & & & # # # # # & # # # # # & # & & # # & & # & # & # & # # # & # & # # # # # # # # # & & & # # # # # # # # & # # & # # # # # # & # # & # # & & # & 2 ", -" - # & & # # # & # & # & # # & # & # # # # # & & # # # # & # & # # # & # & # # # & & # & & # & # # # & # # # & # & & # & & # # # # # # & # & & # # & # # # # @ # @ ", -" 3 # & & # # # # # # & # & # # & # & # & # & # # # # # # & # # # # # & & # # # # & & # # & # # & # # # # # & & & # & # # # # # # & & & & & # # # # # & # # # & # & & % # , 4 ", -" , # & # # # # & & & # # # # # & # # # # # & # & & # # & & # & # & # & # # # & # & # # # # # # # # # & & & # # # # # # # # & # # & # # # # # # & # # & # # & & # & # # # & & & # 5 ", -" # & & # # # & & # # # & # & # & # # & # & # # # # # & & # # # # & # & # # # & # & # # # & & # & & # & # # # & # # # & # & & # & & # # # # # # & # & & # # & # # # # # # & # # # & # # 6 ", -" @ & # # # & & # # # # # # & # & # # & # & # & # & # # # # # # & # # # # # & & # # # # & & # # & # # & # # # # # & & & # & # # # # # # & & & & & # # # # # & # # # & # & & # # # # # & & # # ; 7 ", -" ; # % # # # & # # # # & & & # # # # # & # # # # # & # & & # # & & # & # & # & # # # & # & # # # # # # # # # & & & # # # # # # # # & # # & # # # # # # & # # & # # & & # & # # # & & & # # # & & # @ ' ", -" # & # # & & # # # & & # # # & # & # & # # & # & # # # # # & & # # # # & # & # # # & # & # # # & & 8 9 0 # & # # # & # # # & # & & # & & # # # # # # & # & & # # & # # # # # # & # # # & # # # # # & @ # # : a ", -" # # # # & & # # # & & # # # # # # & # & # # & # & # & # & # # # # # # & # # # # # & & # # # # & & - 9 b b c 9 d # # # # & & & # & # # # # # # & & & & & # # # # # & # # # & # & & # # # # # & & # # & # & & & # @ < ", -" @ & & & # # # # # & # # # # & & & # # # # # & # # # # # & # & & # # & & # & # & # & # # # & # & # # e f b b b g b b h , # # # # # # # # & # # & # # # # # # & # # & # # & & # & # # # & & & # # # & & # & # # # # % # # ; ", -" i # % # # # & # # & & # # # & & # # # & # & # & # # & # & # # # # # & & # # # # & # & # # # & # & # d j b f k b b b b b b f e { # # & # & & # & & # # # # # # & # & & # # & # # # # # # & # # # & # # # # # # # # # & # # & # # l ", -" ' & & # # # # # & & # # # & & # # # # # # & # & # # & # & # & # & # # # # # # & # # # # # & & # # # , m b b b b f f k f b b b b b j n # & # # # # # # & & & & & # # # # # & # # # & # & & # # # # # & & # # & # & & & # & & # # & # # # 2 ", -" @ # # # & & & & # # # # # & # # # # & & & # # # # # & # # # # # & # & & # # & & # & # & # & # # # { o b b f k b f k b b p b b b b b b b q d # # & # # & # # # # # # & # # & # # & & # & # # # & & & # # # & & # & # # # # # # # & # & & & # @ r ", -" s - & # # # # # # # & # # & & # # # & & # # # & # & # & # # & # & # # # # # & & # # # # & # & # # # & t f b b b b f f b f f k f b k f b b b b b b h { & & # # # # # # & # & & # # & # # # # # # & # # # & # # # # # # # # # & # # & # # # # # # % # # ; u ", -" + # & # & & & # # # # # & & # # # & & # # # # # # & # & # # & # & # & # & # # # # # # & # # # # # & v w b f k f k b f k f k b b b f b p b b b b b b b f o # # & & & & & # # # # # & # # # & # & & # # # # # & & # # & # & & & # & & # # & # # # & # & & # # ' ", -" # & # & # # # & & & & # # # # # & # # # # & & & # # # # # & # # # # # & # & & # # & & # & # & # & x 9 b b b b f f f k f f f f f b k f k f b k f b b b b b b j d # # # # # & # # & # # & & # & # # # & & & # # # & & # & # # # # # # # & # & & & # & # # # # # # # < ", -" [ # # # & # # # # # # # # & # # & & # # # & & # # # & # & # & # # & # & # # # # # & & # # # # & # @ o p b b b b b f k f b b b k f k f f f b b f b b b b b b b b b b q y # # & # & & # # & # # # # # # & # # # & # # # # # # # # # & # # & # # # # # # # # # & & # & & # @ 7 ", -" { # & # # # # & & & # # # # # & & # # # & & # # # # # # & # & # # & # & # & # & # # # # # # & # # # z f b b b b b b k f b f b b f b f b b k f k f b k f b b b b b b b b b b e , # # # # & # # # & # & & # # # # # & & # # & # & & & # & & # # & # # # & # & & # # & # # # % & # , ", -" A # & & # & & # & # # # & & & & # # # # # & # # # # & & & # # # # # & # # # # # & # & & # # & & # & d m b b b b b f k f b b f k b f k f k f f f f f k f b f k b b b b b b b b p g f t # # & # # & & # & # # # & & & # # # & & # & # # # # # # # & # & & & # & # # # # # # # & # # & & # ^ ", -" 5 # & # # # # # & # # # # # # # # & # # & & # # # & & # # # & # & # & # # & # & # # # # # & & # # # x h b b b b b k f b f f b k f f b f b f k f k b k f f f b b f f b k f b b b k f b b b w d # & # # # # # # & # # # & # # # # # # # # # & # # & # # # # # # # # # & & # & & # & # # # & # # @ < ", -" @ # & # & # & # # # # & & & # # # # # & & # # # & & # # # # # # & # & # # & # & # & # & # # # # # { e f b f k b f f f k f k b f b f k f k f b f b f f b b b k b f k b f f k b b f b p b b b b b 9 B # # & # & & # # # # # & & # # & # & & & # & & # # & # # # & # & & # # & # # # # & # # # & & % # C ", -" i % # # # # & # & & # & # # # & & & & # # # # # & # # # # & & & # # # # # & # # # # # & # & & # # & n j p b b b f b k f b f f f k f k f b f k f k f k f b b b b f b b f k f b f f k f k f b b b b b b b e { & # # # & & & # # # & & # & # # # # # # # & # & & & # & # # # # # # # & # # & & # # # # # & # # ' ", -" + # # # & # & # # # # # & # # # # # # # # & # # & & # # # & & # # # & # & # & # # & # & # # # # # & 8 q b b b b b b b f f k b f k b f f b b f f f f f f f k b b b f k b f b f k f k b f f b b b b b b b b b b f D # # & # # # & # # # # # # # # # & # # & # # # # # # # # # & & # & & # & # # # & # # & & # & & # # : ", -" # & & & # & # & # & # # # # & & & # # # # # & & # # # & & # # # # # # & # & # # & # & # & # & # # { h b b b b k f b b k f b f k f f b k f b k b k f k b b b f f b b b f k f b b f f f b k f k f b k f b b b b b b b 9 d # # # # & & # # & # & & & # & & # # & # # # & # & & # # & # # # # & # # # & & # # & # # # # # # @ = ", -" E # # # # # # # # # & # & & # & # # # & & & & # # # # # & # # # # & & & # # # # # & # # # # # & # & e f b f k b f b b f f f k f f b f k f b b f f f f k f b b f k f k b f f b b b f k f k f f f b b f b f k b b b b b p g p h 8 & # # # & & # & # # # # # # # & # & & & # & # # # # # # # & # # & & # # # # # # # # & # # & % # C F ", -" + # & # # # # & # & # # # # # & # # # # # # # # & # # & & # # # & & # # # & # & # & # # & # & # # # d j b b p b f b b b k b b b b k f k f b f b k b k f b b f b b b b f f b k f b b k f b f b b k f b k f k f f b k f b b b b b b f e { # # # # # # # # & # # & # # # # # # # # # & & # & & # & # # # & # # & & # & & # & & # # & & & # ' ", -" # # & # & & & & # & # & # & # # # # & & & # # # # # & & # # # & & # # # # # # & # & # # & # & # & B 9 b b b f k b f k f f f b b f f f f b b f k f f f b b b b f k f k f k b f f k f f b b f k f f f b f f f b b b f f k b b b b b b b b j n # # & # & & & # & & # # & # # # & # & & # # & # # # # & # # # & & # # & # # # # # # & # # # & # # ) ", -" : @ & # # # # # # # # # # # & # & & # & # # # & & & & # # # # # & # # # # & & & # # # # # & # # # # { o g b b b p b f k f b k f b k f k f k f b b b f b k f b b k f b f f f f f k f b b b b b k f k f g b k f k f b b k f b f k f b k f b b b b b 9 d & # # # # # # # & # & & & # & # # # # # # # & # # & & # # # # # # # # & # # & # # & & # # & # # @ G ", -" { # & # # # & # # # # & # & # # # # # & # # # # # # # # & # # & & # # # & & # # # & # & # & # # & # 0 f b f k b f k f f b f f f k f f b f b b f k f k b f b b f f b f k f k f k b b f k f k f f f f f k b f f k f k f f f k f b b b f b b b b b b p g f 9 { # # & # # & # # # # # # # # # & & # & & # & # # # & # # & & # & & # & & # # & # # # & # & & % & ; ", -" _ A & # # # & & # & & & & # & # & # & # # # # & & & # # # # # & & # # # & & # # # # # # & # & # # & # d w b b p b f b b b k f k f k f f k f k f b b b f f f b k f k f k f b b f b f f f b b f f b b k f b b f k f b f f b b k f b f b b k f b b k f b b b p b b f t # & & # # & # # # & # & & # # & # # # # & # # # & & # # & # # # # # # & # # # & # # # # # # # # # 5 ", -" # # # & & & # # # # # # # # # # # & # & & # & # # # & & & & # # # # # & # # # # & & & # # # # # & x 9 b p b f k b f k f f f f f b b f b f f f f k f k f k b f f f f b b f k f k f k f k f k f k f f f k b f b b b b f k f f b b f k f f f k f f f k b b b b b b b b j d # # & # & & & # & # # # # # # # & # # & & # # # # # # # # & # # & # # & & # # & # # & # # & & # & ( ", -" @ # & & # # # # # & # # # # & # & # # # # # & # # # # # # # # & # # & & # # # & & # # # & # & # & { o b b b b p b f k f b b k b k f b k f k b k b b f f b f f b k b b b k f b f f b f b f f f f f b b b b f k f b b b k f b k f b k f k f b b b b k f f k f b b b b b b b b 9 B # # # # # # # # & & # & & # & # # # & # # & & # & & # & & # # & # # # & # & & # & & # # # # # # @ ", -" 3 # % # # # # # # & & # & & & & # & # & # & # # # # & & & # # # # # & & # # # & & # # # # # # & # & t j b b b b f k f f f k f f f f b b f f f f f f f k f k f k b f f k b f b f k f k f k f k b k f k b b b f b b b b b f b f f b f f f f f k b b f f b f b b f k b b b b b b p g g e { # # & # & & # # & # # # # & # # # & & # # & # # # # # # & # # # & # # # # # # # # # & # # & % # ] ", -" + # & # & # # & & & # # # # # # # # # # # & # & & # & # # # & & & & # # # # # & # # # # & & & # # # v 9 b f b b k f b b k f b b b k f b b k b k b k b b b f f f f f b b b f f k f b f f f f b f f f k f f b k f b b k f k f b k b b k f k f b b f f k f b k f b k f f f k f b b b b b g p f 0 # & # # # # # # # & # # & & # # # # # # # # & # # & # # & & # # & # # & # # & & # & & # # & # # # : ", -" # # & # & # & & # # # # # & # # # # & # & # # # # # & # # # # # # # # & # # & & # # # & & # # # & y h b p f k f f f k f f f k b b f f k f f f f f f f k b f k f k b k b f k b b b f k b k b k f k b b b b b f f k f f f f b b f f f f f b f k f k b b f k f f k f b b b b b f k b f k b b b b p w d # # & & # & & # & # # # & # # & & # & & # & & # # & # # # & # & & # & & # # # # # # & # & & & # @ H ", -" I % & # # # # # # # # # # & & # & & & & # & # & # & # # # # & & & # # # # # & & # # # & & # # # # # # o f f b b f b p k f b b b b f f k f b b k b k f k f b f b f b f f f b f b f f k f b f f f f f f f f k f k f b b b b k f k f k b k f k f b b f f f f b b f f b f f b b k f k f f b b f b k f b b b b 9 B # & # # # # & # # # & & # # & # # # # # # & # # # & # # # # # # # # # & # # & # # # # # # % # # ; 7 ", -" ; # # # # # & # & # # & & & # # # # # # # # # # # & # & & # & # # # & & & & # # # # # & # # # # & & n j f f k b f k b f b f k b b b b b f k f f f f f b b b f k f k b b k f k f k f f b f k f k f k b k b b f f f k f k f f f f f f f f f k f k b f k b k f k b b k b b k f f f f f k f k b b f b p b b b b b b e { # # & # # & & # # # # # # # # & # # & # # & & # # & # # & # # & & # & & # # & # # # & # & & # # ' ", -" J & # # & & # & # & & # # # # # & # # # # & # & # # # # # & # # # # # # # # & # # & & # # # & & # K q b g b f b p f f k f b b f f b b b b b b b k f k f k f k f f f b f b b f b f b b k f b f f b f f f f f k f b b f f b b k f k b k f b b f f f f b f f b f f f b f f b b b k b b b b f f b k f k f b b b b b b b j 0 # & # # # & # # & & # & & # & & # # & # # # & # & & # & & # # # # # # & # & & & # & # # # & # # @ ", -" L M y & # # # # # # # # # # & & # & & & & # & # & # & # # # # & & & # # # # # & & # # # & & # { h p b b b f k b f k b b b b f k f k b b f k f f f b f f f f b f k f k f k f k f k f f b f k f k b b k f k b f k f k f k f f f b f f f f k f k f k f k f k f k f k b f k b b f f b b b f k b f f f b f k b f k b b b b p q d & # # # & & # # & # # # # # # & # # # & # # # # # # # # # & # # & # # # # # # # # # & # # C ' ", -" L N N O C & # & # # & & & # # # # # # # # # # # & # & & # & # # # & & & & # # # # # & # # # t f b b b b g f f b b f f b k f b b f f f b b b b k f k f k f k f f b f b f f f f f b b k f b b f f f b b f f b b f f b f b b k f k f k b b f f b f b f b f b f b f f k f f f k b b b b b b f k f k f g b f k f f b k f b b b b h 8 # # # # # # # # & # # & # # & & # # & # # & # # & & # & & # # & # # # & # & & # # ; ' P K ", -" z Q R S Q v % # & & # # # # # & # # # # & # & # # # # # & # # # # # # # # & # # & & # # d j b b b f k b f k f k b f k f b f k f k f k f k f f f f f b f b b f k f k b f k b b k f f b f k b f k f k b b k f k b k f k b b f b f k f f k f k f k f k f k f k f k f b b f k f f k b b b f f f b b f k f b b b b f b p b b b b b f e # # & & # & & # & & # # & # # # & # & & # & & # # # # # # & # & & & # & # # @ y K K K K ", -" T U N N N N M V # # # # & & # & & & & # & # & # & # # # # & & & # # # # # & & # # # y m b b b b b b f k f b f f k f f f b b f f b f f f b b k b k f k f k f f b f f k f f b f b b k f b f b b b f f f b f f f f f f f f k f b b b f b f f f f b f f f f f f f b f b k f b f b f f k f k k f b k f b f b b b k f k f b b b b b b b j D # & # # # # # # & # # # & # # # # # # # # # & # # & # # # # # # # # # + K J P J K K ", -" L R N N U R R W M J & & # # # # # # # # # # # & # & & # & # # # & & & & # # # # { e b b b b b f k f b b b f k f b b b k f k f k f k b k f f f f f b f f b b k b b b b f k f k f f f k f k f k f k b f k b f k b b k b b f k b f k f k b k b k f k b k b k b k f k f b f k f k f b f f f b f f f k f k b f f f f b f k b b b b b b b f q d # # & # # & # # & & # # & # # & # # & & # & & # # & # # # & # C B J ' P J P J K ", -" L R N Q N U N X R N Y @ # & # # # # & # & # # # # # & # # # # # # # # & # # & 0 f b b b b k f b b f b b k f b f b b b f f b f b f f f k f k b k f k f k f f f b k f p f b f b b b b f f f f f f f b b f b b f f f f b b b f f b b f f f f f f f f f f f f f b f f f b b b f b f k b b b k f b b f f f k f k f b k f f b k f b b b g b f b h { & & # # & # # # & # & & # & & # # # # # # & # & & & # % ' ' P P J P Z P 5 J ", -" M U R N N R R U N N U Q ` # & & & & # & # & # & # # # # & & & # # # # # & d w p f k b f f f k b f k f f b b b f k f k b k f k f k b b f b f f f f f f b f k b f f k b f k f k f k f k b k f k b k b f k f k b k b k f k f k f k f k f k f k b k f k b k f k f k b k f k f k f b f b b f f k b f k b f f b f k f f k b f b b b b b b b g b b f t # # & # # # & # # # # # # # # # & # # & # # # # @ y B J P J K P Z P Z B P ", -" Y U N R N N Q N R X N N N W K # # # # # # & # & & # & # # # & & & & # x h b b p b f b k f f f k f k f b b b k f f f f f f f f f f f k f k f k b k b k f f f b b b f b b b f f f f f f f b f f f b b b f f f f f f f f f f b f f f f f b f f f b f f f b f f f f f f f f f b b k f b k f b f b b f k b b k f b f b f b b b k f k f b b b b b b b j d # & & # # & # # & # # & & # & & # # & # # C K K P J P K Z J J P J Z K ", -" .R N U N N N R U N N N R R N L , & # & # # # # # & # # # # # # # { e f g f k b f k b f b k b f f b b b b f b b f k f k b k b k b b f b f b f f f f b p b k f k f k f k b b k f k p p b f k b p f k f k b k b b k b k f k f k f k b k f k f k f k f k b b k b b k b k f k b f f b f f k f k b f b b f f b b f k f k b f f f f b b b b b b b b b b b q 8 # # & # & & # & & # # # # # # & # ; B ' K J J P J Z P P P J P P Z ", -" L ..R Q ..N U R Q U N U N N Q N R +.@ & # & # # # # & & & # # # D j g b p b f f b f k f b f k f b k f k f k f k f f f f f f f b b k f k f k f k f k f k f f f f f f f f f f b f f b k b f b b k f f f f f f f b f f b f f f b f f f b f b f b f b f f b f b f b f f k f f k b b k f b f f f k f b k f b b k f f f f k f k b b k f b b b b b b b b b b b e , # # # # # # # # & # # & # @ y ' P ' P P J P P J J J P J J P K ", -" L Q N U N ..R N U R R R N N U N U N N v & # & & # & # # # & d 9 b b b f k b b k f f f k f f b b f f f f f f f b f k b k b f k f f f f f b f b f f f f b b p b k b k f k b k f k b f b f k f f b f k b p b k f k f k f k b k f k f k f k f k f k b b k b f k f k b b b f f b f f f k f k b f b b f f k f f b b b k f f b b f f b b f k b f k b b b b b b g f 0 # # & # # & & # & & @ , 5 K P K P Z J P J J P P P J P P J Z ", -" L N X N X N N X N U N @.R R R R N U Q N M y # & # # # # - h g p b b k f f f b b k f b b k f b k f b k b k f k f f f f f k f b b k b k f k f p p p k f k f b b f f b f f f b f b b k f f b b k f b f b b f b f f f b f f f b f b f f f b f b f f b f f k f b f f f b k b k f k f b f f f k f b k f b b b b b b b k f b b k f b k f b f k f f b b b b k f b p b w d & & # # # # # C y B K J J J P P Z P P J J Z P Z J P P K ", -" L N N Q U N Q R R R N X N N N X U R N N N X M { # & & e f g b b b f f k f k f f b b f f b f f f k f f f f b b b k f k b b b b f f f f b f f k b b f f f k #.k b b f k b b b p f f b f k f f b b f k f k f k b k f k p f k b p f k b k f k b b k f k b b b f k b b f f f f b b f k f k b b f f b f k f k b b f f f k f f f k f f k f b b f k b b f f b p b b b b f q B # # & - J ' K J J P P P J Z P Z J P P J Z P P J J J ", -" .R N R R U U U N Q N N N N N Q N N R N N X N N Y D j b b b b k f b b b f k f b b k f b k f b b b k f k f k f f b f f f k f k b k b b k b b f f b k f b f f f b k #.f b k f k f k #.k f b k f k f f f b f f f b f f b b f b k f f f b f f f b f f f f k f b f b k f b k f k f b b f f f k f k f b f f f f k f k f b b b b f f b b f b k f f b k f b k f k f b g b f b e , + K P K P P J Z J P P J P P Z Z P J J Z P P P K ", -" L U N N U X R R N S N @.R @.R N R N $.Q R U N Q U %.&.b b b f f k b b f b f k f f f k f f k b f f f b f f b f k f k b b f f f f f f f f b f k b f b f k f k b f f b b f f f f k f f b f f f f b f k f k p p b b b k f k b f f f k p b b k f k b k b b b f k b f f k f f f b f k f k b b f b b f k f k b b f b b b b b b f k k b f k f b f k f f k f f f b p b b b g c *.D P K K Z J Z P P P J J P J Z J P J P P J Z J Z J ", -" z N U R R N N Q N =.S N X U N N R R U N Q R N X Q -.;.>.,.g k f f f k f b b k f b b b f f f k f k f k f k f f b f f b k b k f k b p k f k f f p k f b f f f b k f k f k #.k f f f k f k f k f b f b f f b k f b f b f f b k b f b f b b b f f f f b k f b f b b b b b k f b b f f f b b b k f b f f f f k f b k f b b b b f f b b f f k f b f b f k f b k f b b g '.).!.D 5 J P P P Z J Z P P J P J P J P J J P J P P P J ", -" L N Q N U N N S N Q X N N R ..N U U X N N N N R N -.~.;.;.{.k b f k b b f f b b f k b b k b f b f f f f b f k b f k f f f f b f b b f f b b b f b f k p p b f f f f k f f b b b b f b f b f k f k f k b f f k f k f k b b f f k f k f k f k b b b f b b f k b f k b f f k f k f k f k b f f k f k f k b b f f b f k f k b b b b f k b b b f k f b f k f b p b k &.&.].].M J P J Z J P P P Z J P J P J P J P P J P Z J Z P ", -" L N N R R R N N N N R N N X @.R R R ..N N N U N N -.~.~.^.^./.].k f f k f b k f b f f b f k f k b k b k f f b k f b b k b b k f k f k f k f k f b b f b k #.k f b b f b k #.k f b b k #.k f b f b f b b b b b f b f b f k f f b f f f f f f b k f k f k f f b b f b b b f f f f b f f f b b f f b f f f k f k f b f f f f k f k f f f b b b b b b b f f k c *.).].!.&.&.D Z P P P J J J J P Z P J P J P J Z P J J P P J J ", -" .N Q N U U R N N N U R N N X N N S Q ..R ..R N U (.;.;.;.;.^.^._.*.b b b f b f k f k f b f f f f f f b b k f b b f f b f b f f f b f f f f f k #.k f f k f f k f k b f f f b b f k f f b f k b b f k f k f k f k p f b f k f k p b k p p b f f f f f b f k b f k b f k b k b k f k f k f k f k b b k b f f b f k f k f b f f b b f k f k b b b b b b b :.).&.&.).<.).&.M P J J J P P P P Z J Z P J P Z P J J P P J J P P ", -" M N N R R U ..N R R U R U N N N N N X U Q N N Q R [.~.;.;.;.;.;.;.^.}.,.k f b b f f b f k b k f k f k f b f f b k b k f k f p k f b k #.k f b f f k f f f f b f f f f k f k f b b f f k f b f b p b f f f f f f f b k f f b f f f f b b k f p k f k f b b f f b f f b f f f f f f b f f f b f f f b f b k f b b f f b b k f k f k f f f f f b b b k :.|.).].&.).).!.!.].Y P P P J Z J J J P J J P Z P Z P P J J P P Z J K ", -" L N R N N R X ..U N R N Q N R R N N N X N N R N N -.;.;.;.;.;.~.~.;.^./.{.k f k f k b b f f f b f f b b f k p f f f f b b b b f f k f f f #.k f f f f k b f k #.k b b f f b f #.k b b b f #.k f k f k #.k p p p b f b b b k b k b k f f b b f f b f k f k f k f k f k f k b b k f k b k f k f k f k b f f k f k f k b f f f f f b f k b k f k f g 1.&.).&.&.].!.&.].].).D Z J Z P J P P P J P P Z J J P J Z P P Z J P P J ", -" L U N N N U Q X N N N N R N U R N U R N N U N N N -.~.~.;.;.;.;.;.;.;.^.^.2.<.b f f b k b k f k f k f k f b b p b p b k f b k #.k f b k f k f b k f b f p b f f k f b p k #.k f f f k #.k f f f f f f f k f k #.k f k f b f f f f b b k f k b b b b f f b f f f b f f f f b f b f f f b f b f b f f b b b f f b f f b k b k f b k f f f b f k ,.).).).].&.!.].!.].|.!.%.D P J Z P Z J J P J Z P P P J P P Z J J P J Z P J ", -" .R ..Q N X N N R U ..N N U R U R Q N N U R N R U [.;.;.~.~.~.~.;.;.~.;.;.;.;.2.|.b f f f f f f b f f b b f k f k b f b b f f f b f f f f b f f f p f k #.k f f b b b f f f f k f f f f f f k #.k p b f f f f f f f f #.k b f k p f f f f f b f k f k f k f k f k b k b k f k f k b b f k f k b b k b f k f k f k b f f f f k f b b f k b ,.&.].).&.].!.!.<.&.].&.&.].&.z Z P J J J P P J P P J J J P J J P P P Z P P Z P ", -" L X U R Q N R N Q X ..N Q N R U N N R Q N ..U Q N -.~.;.;.;.;.~.;.;.;.;.;.;.^.~.~.}.,.b k b k f p k f k f b f f f f k f k f b k #.k f b k f k b k #.k f f b b k f k f k f b b f b k f k f b f f k f k f k f b p k #.k f f b b f b k b k b k f b f f b f b f b f f f f f b f b f b b k f f f f f b f f b b f f f f k b k f b f f b k f k 1.&.&.&.&.!.<.].].&.&.!.!.3.&.).D J P P P Z J P J J P P P J P P J Z J J J J P J J ", -" .U X N U N U N N N X R N N N R N @.U N N Q R N R [.;.~.~.~.~.;.~.~.;.;.;.~.;.4.4.4.2.<.k f b f f f f f k f k p b b f f b b f f f b b f f b f f f f f f k f f f f f b b b f k p f f b f f k b f f f f b f k f k f f b f k #.k p f f f f f f k f k p f k b b f k b p f k f k f k f f f b b k b k f k f k f k f k b f f b b b b k f 5.*.&.).).&.].).].&.&.<.!.<.3.].&.].&.M P J J J P P Z P P J J Z P Z J P P P P P P J P P ", -" .R N X ..R @.N U Q U N R N N N X R N N N N N N N -.;.;.;.;.~.;.;.~.~.~.;.;.;.;.;.;.;.4.2.6.k b p k f b f f b f k f b k f k f b k f k #.k f k f b k #.k f f p k #.k f k f b f b k f k b b f b p b p b b b f f f f k f b f f f b k b b k f b f f f b f f b k f f b p b f f f f b k b k f f f f f f b f f f b f f b k f k f b b k k ).).].&.).&.!.).&.&.!.].!.].&.!.!.!.].Y P P P J Z P Z J P P J Z P P J J J J Z J P Z J K ", -" L N ..R X N X R R N X ..U Q N R N N ..N N N ..N R [.~.~.~.~.;.~.~.;.;.;.~.;.~.;.;.;.;.;.4.2.7.,.f b b f k b f b b b f f f b b f f f f f f b b b f f f b b f k f f f f f #.k b b f f #.k f k #.k b f k #.k f k b b b f k f k b b f f f b b f k b k f k b f f b f k f k b k b k f f f b f k f k b k f k f k f k b f f f b b f k |.<.&.&.).&.%.!.].&.%.!.<.&.].&.3.].).].).8.J Z J P P J P P Z Z P J J Z P P P P J P J P P J ", -" L Q S N N N N N N R X R U R U N N X R N N X ..U N -.;.;.;.~.;.;.~.~.~.;.~.;.;.;.;.;.;.;.;.;.4.4.}.k b f b b k #.k f p k #.k f k #.k f p b k #.k f b k f b b f f p k f b k f f p k f f f f f f k f f f f b f b f k f b f f f f k #.k f k f b f f b f b p k f k f f f f f f f b b k f k f b f f f b f b f b f f k f k f k k 9.).).].&.).!.].&.&.!.].&.].&.&.!.!.3.].&.!.).M J P J J P J Z J P J P P J Z J Z J P Z P J Z P K ", -" .N N N Q N N U N N U N X U R R R U N ..R N Q R R (.~.~.~.;.~.~.;.;.;.~.;.~.~.~.;.;.;.;.4.4.4.4.2.2.<.k f f f f b f k f f f k f f f k b f f f b b f b f k f k b f b b f f k f f b b f k p b f f #.k b f k b f f #.k f k p f k f b f f f #.k b p b p f b f b f f k p b b b k f f f f b b f k f k f k f k b b b f b f b ,.).3.).&.&.].!.].&.].&.].&.&.<.!.<.<.].&.).).<.&.D P Z P P J P J P J P J J P J P P P J J Z P P Z J ", -" L N ..U R R Q R N Q N R R N U N Q N Q U N N N U R -.;.;.~.;.;.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.4.4.;.4.4.2.<.b b k f b f f b b b b b f f b k f k f k f k #.f f b p k #.f b b b b k #.k f f f k b b f k f b f b k f k f f b b b b f b k b b k f f k f k f p k f k f b b k f f b p k b k f k f b f f f b f f b b k f k k <.).).).).&.!.].&.&.&.!.).&.).!.].!.].&.!.!.%.&.].!.M J Z J P J P J P J P P J P Z J Z P P J J J P P K ", -" .N Q X U U N U ..N R U N N R N N N N X U N N R U (.~.~.;.~.~.;.;.;.~.;.~.~.~.~.~.~.;.;.;.;.;.;.4.4.4.4.2.0.,.b b f k p f k f k #.k b f f f f f f f k f k b f f k f k f k f f f f b b b b f k f f f #.k b f f f f f #.k b f k b b f f f f f f f b f b f f b f b f f b f k b b f f f f f f k b k f k f k b f f k |.3.).&.].&.%.!.].&.].!.!.].&.%.!.].&.].).).].).&.&.!.].D P J P Z P J P J P J Z P J J P P J J P P P J Z J ", -" L N N R R N R Q N U R N R N @.N R N N Q N U N R R -.;.~.;.;.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.4.4.4.4.~.{.k b f f b f f f f k f p k b k f k f f f f f k f f f f f f b k f k f k f b b f b k f k f f p b k b b k f f b f f k #.k f k b k #.k f k b k b k f k f p f f f b k f k b b b f f b f b f f b k ,.<.).).).).&.&.].|.&.!.].].&.!.].&.&.).).!.!.3.&.).!.<.).).Y V Z J Z P J P Z P J J P P J J P P J Z J P P P K ", -" .N R N N ..N N N R N Q U N X N U N R S =.a.U N U (.~.;.~.~.;.;.;.~.;.~.~.~.~.~.~.~.~.;.;.;.;.;.;.;.;.;.4.4.2.4.2.<.k k f k p b f b f b f f f f f b b p b b b b f k #.k b f f f f f f k #.k p f f f f #.k b f f f f f f #.k f k f f f b f f f f f f f f f f f b f k b b k b f f b f k f k p b f k f k 5.,.3.<.&.].&.].!.!.&.).<.!.).&.&.&.].&.&.].!.).].&.].).].).].<.!.D J J P J J P Z P Z P P J J P P Z J P J P J J Z J ", -" L U N N X N N N N N U R Q N R R ..N N Q S R N R R -.~.;.;.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.4.4.2.2.|.f f f k f k #.k f p p k #.k f k #.f k #.k f f k f p k b k #.f f f f b p b k f f k f k #.k f k f k f f f b k f k b k f k b b p p k f k f b f f b f p k f b b f f f b k f f f k 6.3.).).).&.&.].].).).!.].3.).).!.].&.).!.].!.<.].!.!.!.].1.!.].%.D P J P P Z J J P J Z P P Z J P P J P Z P P P P J ", -" .=.Q R U N N N N ..X N U N U N Q N N N X N Q N U (.;.~.~.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.;.;.;.;.;.;.;.;.;.;.4.4.4.2.2.2.,.f f k f f b b f k f f f f f f k f f f f f b b b f f k f k f k f k b f b f f f b f f f b f f f b b p f f b f f f b f f k b f f b b b f k f k p b f f k f k p b f f b k 6.3.3.).&.].3.!.!.&.1.%.!.].&.&.%.!.].3.!.!.].&.].&.).<.).].<.!.].&.&.M J P J Z P P P J P P Z J J P J Z P J J Z J J Z P ", -" .U N Q R ....R X R N X ..R N N N N N N R U N R R -.;.;.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.4.4.2.b.k f b k f b b f f p k f b f f f k b k f b k #.f f f f f f b f f b k f k b k f b k f p b k f k #.k f k #.k f b k #.k f b p b k #.k f b f f f k b b f f f b k b k ,.<.).).].1.!.!.].].).].&.].|.].!.).].&.!.].].).&.).!.!.].&.).!.3.).&.&.&.M J P P J J J P J J P P P Z P P Z P P J P P P J K ", -" L X N N N S Q U N U R R X N N N @.R N R U X R N U [.~.~.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.;.;.;.;.;.;.;.;.4.4.4.4.2.2.<.f k #.k f k p f f k f k b b f f b f f k b b k b b k #.k p b f f b f f b b b f k b b f f f f f b f f b f k f f f #.k b f f f f k #.k b b f b f k p p f b ,.6.<.).).&.&.%.<.].&.).!.!.&.&.).!.].&.).&.].&.&.<.!.).].].&.&.].).].3.!.].).D J J J P P P J P P J Z J J J J P J J P Z J J P J ", -" L ..N N X N X U R U U N N U N X N ..U R R U N R N -.;.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.4.4.4.2.2.,.b f f f b b b f f b b b b k #.k f f f f f f f f f f f k b b b b k f k f b f f b k b b p k f b k #.k f f k f k f f k f b b f f b b k #.k f f b p k |.<.).).).].!.).&.&.&.).].].&.].!.<.).&.&.!.).&.).!.].!.<.&.!.!.%.1.&.!.].!.!.].z P P J J Z P Z J P P P P P P J P P J J P P Z P J ", -" L Q N R U N R Q N R R U R Q R N N Q R N U R Q N R (.~.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.;.;.;.;.;.;.;.;.;.;.;.4.4.4.2.c.,.#.k f k #.k f k b b f f f f f f k #.k b k b k b b f #.k b f f f b b f k p f f k b f b b f f f f f f f f f f f f k #.k f k f f f f b b b k |.6.).).).&.).!.].&.].<.!.!.&.).!.!.).].&.%.!.].&.%.!.].&.].).).].).&.].!.].&.].].!.D Z J P P J Z P P J J J J Z J P Z J P P Z J P Z P ", -" L N N Q N N N N N N Q N N N N N N N N R N U N U R -.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.4.;.4.4.{.k f f f b f f f k f b k b k f f f f f f f f b k f k f f p k #.f k #.f p b b f b k #.k f b k b k b b k f k #.f f f f f b b k f k f k ,.6.<.).).).].!.<.).&.!.!.].].).).].].).).!.).].|.!.].&.&.).&.!.!.3.&.).!.].&.).&.&.).%.D P Z Z P J J Z P P P P J P J P P J J J P J P J J ", -" L ..N N R N N R U N N N N N R N N N R N N X R R U (.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.;.;.;.;.;.;.;.;.4.4.4.4.2.2.<.b k #.k b b b b f f f b f k f k p p p p f f f f k b f k f f k b f k #.k f f f f b b f f f f f f f f k f k b f k p f f f f f k 6.).).).).).!.!.].&.].!.].].&.3.!.!.&.&.].!.].1.].&.].|.].<.!.).].].&.].&.].&.<.!.).&.&.).z Z J P J P P J Z J Z J P Z P J Z P P P Z P J P P ", -" .U N N ....N Q R N R ....U @.N N U N ..R U N R R -.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.;.;.;.;.;.;.;.;.4.4.;.4.4.7.,.b f f k #.k f k #.k f b f b b k f k #.k f b f f f f f f f b b f f k f k f k f k b p k #.k f k f f f f b b f b k f b k 6.6.6.).).).!.].<.).).!.].&.&.&.).].].).).!.].&.].|.!.).).&.!.].!.3.&.!.!.!.).).!.].!.%.&.).).D P J P J J P J P P P J J Z P P Z J J J J P Z J J ", -" L Q R N X X N N N ..U X X R S =.Q R N Q U R U N U [.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.;.;.;.;.;.;.;.;.4.4.4.2.c.k k f f f b f f f #.k p f f f k f f b f #.k b k f k f k #.k f f f f f f f f f f k f f f f b b b f k f k p f b d.,.6.).<.<.).<.!.].&.&.].!.3.&.).<.!.!.&.|.%.!.3.1.].!.!.].].!.!.].&.].).).].].].].!.].).).].!.).).M J P J P P J P Z J Z P P J J J P P P P P J P P P ", -" L U ..U U R N N X R U U X X U N N N N X N Q N R N -.~.;.~.;.;.;.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.;.;.;.;.;.4.;.4.;.4.2.[.k b k f b k f k f f k #.f f f k #.k f f f b f b f f f f b p b p p k b k #.f f b p k #.k f k f f f f b b ,.6.<.6.).).).].&.).).).!.].).3.!.%.).].).].1.).].).!.].].).!.].].&.).&.!.%.|.&.&.!.].&.&.).&.].!.!.].z J P J Z P J J P P J J P P P J Z J J Z P J Z J J ", -" M X Q R Q N ..R U N R Q N N Q N N R N R N N R N R [.;.~.;.~.~.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.;.;.;.;.;.;.;.;.4.2.2.6.b b f f f f f f k f k b b f f f f k b f k f k f k f k f k b b f f k b b k f k f f f f f f k b k k 6.<.<.<.<.).).!.!.].&.%.!.3.&.].!.).).).).!.!.].&.<.!.).&.&.&.3.&.&.<.!.&.].1.].).).3.&.<.!.&.&.).].].&.D P Z P J J P P J J P P J Z J P P P P J Z P P P P ", -" L N N N N X N Q X N N R N N N Q U N U Q N N N U N -.;.~.;.;.;.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.;.;.;.;.;.4.4.7.|.p b k b k f f f f f k f k f b f b f b f b f b f b f f f b k f f f f f f f f k #.k b b f k ,.6.6.3.).).].&.].3.).!.).).].&.!.].].&.).).].3.].&.!.].].&.).!.].&.).!.].!.<.].!.!.!.<.).!.].!.%.&.&.&.!.<.z P Z P P J J P P Z J P J P J J Z J P J J J Z J J ", -" z N N N Q U N N R N N N R N N U R ..R U ..U Q R R [.~.;.~.~.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.;.;.~.;.;.;.;.4.4.4.2.2.c.,.f f b b b p p b f b f #.k b k #.k p b f k #.k f k b f b f k b k #.k b b f b f f k ,.6.<.<.<.).).).!.!.&.<.!.].&.&.3.!.3.&.&.].!.!.&.3.!.!.].&.|.%.!.].&.%.!.].&.].&.).3.].].].!.].&.].).!.].).<.!.z J P J Z P P Z J P P J P Z P P P P J P P P P P P ", -" L N N U R R N U Q N U N N R X N Q N X X R U N U N -.~.;.;.;.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.;.;.;.;.4.;.4.~.2.{.k f k #.k f k f k f k f f f f f f k f f f b f f b k #.f f f b f k f k f k f k 6.<.6.3.).).).!.<.].3.).].&.].&.!.].].&.!.!.].].].&.3.].).&.!.].&.).!.&.].&.).).!.!.<.).&.!.].&.).&.&.].!.!.<.<.).M J P P Z J J P J Z P J J Z J J Z P J Z J J Z J K ", -" M Q ..X N U N R U =.Q N ..U R N N N R N N X N R R (.;.~.~.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.;.;.;.;.;.4.4.2.2.2.,.k f f f f f f f f k b f k b b f b b f k p b f f k #.k b f f f f f f 5.6.<.6.).<.).&.%.!.).].|.%.!.&.1.%.!.].&.3.!.].].&.).!.!.].&.<.!.].|.].&.].&.).).!.).].&.].).&.).&.].!.).&.].3.].).).).D J J J P P P Z P P Z P P J P P P J P J P P P P J ", -" L X R U R ..N X U N R Q X U N N N U N R R Q N U R -.;.;.;.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.;.;.;.;.4.;.4.0.,.k b k #.k f f f b b f b k #.k f b f f k f f f f k f k b b k k ,.6.<.<.).).).).&.].&.).).&.].&.!.].&.&.).!.].&.&.&.&.3.].).&.!.].&.).&.!.).).&.!.].!.<.].!.!.!.<.&.!.].!.!.<.&.&.!.].&.).M P P J Z J J J J P J J P Z J J P J P Z J J Z P K ", -" L N N Q N Q N N Q N U N N R ..N N =.Q U U U N R U [.~.~.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.;.;.;.;.;.;.;.;.4.4.4.4.2.{.k f f f k #.k f k p f f f k #.k b b b f k f f f f f b b k 6.<.<.).).).!.%.!.).&.].!.!.&.3.!.].|.].<.!.<.&.).].!.!.].3.!.!.].&.<.!.!.].&.%.!.].&.].&.).<.].].].!.3.&.].].!.].&.].!.].!.D Z J P P P P P P J P P J J P P Z P J J P P P Z J ", -" .N N N N N N N N X N R N Q N N X U R R X ..N R N -.;.;.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.4.4.4.2.[.k f f f f f f b k f f f f f f k #.f b p k #.k f k 6.<.6.).).).!.].&.].&.).!.].].].&.].&.).&.!.].).3.!.!.].].).&.3.].).).!.].].).!.].&.).].|.!.!.<.&.&.!.].).3.&.&.].!.!.).3.!.].).D P J J J J Z J P Z J P P Z J P Z P P Z J J P P J ", -" L ..N N N R R N R R N U N N N U U X N N N Q U N R (.~.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.;.;.;.;.;.;.;.;.4.4.4.2.2.6.b f k p b f b f k f k f f k f k f k f f k e.6.<.).<.).<.!.].&.&.].!.!.].&.).!.!.&.&.%.!.].&.].!.].).&.3.!.!.].&.<.!.].&.&.&.].&.&.&.!.].].].).).).3.&.].!.).&.).3.].&.].3.).!.M Z P P P P J P J P P J J J P J P J J J P P J Z P ", -" L ..N N U N N U U ..R N N R Q R N N N N N R N U R -.;.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.4.4.2.,.b b k #.k f f f b f f f f f f f k ,.6.<.6.).).).).].&.).&.&.].].&.&.).].].).!.].&.&.).!.].&.3.).].).].).&.!.].).).).!.).).).!.<.!.&.&.!.!.%.&.).!.].!.%.&.).&.!.).).).].&.D Z J Z J P Z P J Z P P P Z P J P P P Z J P P J J ", -" .X Q ..R N ..R X Q N R N N N N R R R R N N Q R U (.~.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.4.4.4.2.2.{.k f f b f k #.k b k b p p p ,.6.6.<.<.<.).&.%.!.&.<.!.!.!.&.&.<.!.!.&.).!.].).&.].!.3.&.&.].!.!.).|.%.!.].&.&.%.!.].&.%.!.].].<.).&.].].&.].!.<.|.].).!.].).].!.].!.&.&.M J P P P J J Z P P Z J J J J P Z J J J P J J P P ", -" L U X N ..Q N N N N U ..N N N N U U U N N U N R R -.;.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.;.;.;.;.;.;.;.;.4.;.;.4.4.2.<.k f b f f f f b b b k |.6.<.).).).).!.].&.).!.].].].3.].!.].].).).].&.&.).!.].].&.!.!.].3.].).).].|.).!.].&.&.!.].&.&.&.&.!.%.&.&.&.!.].).].&.&.].!.!.).<.!.].).!.].D Z J Z P P J J J P P P P P J P P P P Z P P Z J J ", -" .X U N X N N R N N R X @...Q N R R R R R X N N U (.~.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.;.;.;.;.;.;.4.4.4.2.2.,.k b b k b f k 9.6.6.<.).).).).!.].&.].!.].&.&.).!.!.].&.3.!.!.&.&.%.!.).&.&.%.].<.&.<.!.!.&.&.].!.].).).&.].).&.].!.].).&.&.).&.].1.].!.&.1.].3.].&.].3.).!.].&.M J P P J J P P P J Z J J Z P J Z J J J Z J P P P ", -" z Q N U N N U N Q N N X X U ..N N N U U R Q N R R -.;.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.;.;.;.;.;.4.;.4.4.7.,.b f p ,.6.6.<.).).).).!.].).&.&.].&.).).].&.<.).&.).].].].!.).).].&.!.].1.&.).).].].).).!.].&.&.&.!.].1.&.!.<.!.].&.!.%.!.&.).!.<.!.%.&.&.&.!.3.&.).].&.!.&.D J J P P J Z J P P P P J Z P P P P P J P J Z J J ", -" L N X Q N N R ..U N U N N X Q U N N R R U U ..N U (.~.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.;.;.;.;.;.;.;.4.4.4.4.2.2.{.,.6.6.<.<.).).!.%.!.].&.<.!.!.&.].!.!.!.&.].&.%.!.&.&.!.].&.&.3.!.).).&.].!.!.&.|.%.!.3.&.&.%.!.].&.%.!.].].).&.].).&.].<.!.<.&.].).!.].).].!.].!.&.&.].).M P P Z J P J P J J Z J P J J J Z J J P Z P P P P ", -" L R N R Q N X X R Q N N N N R Q R N N R X X N R R -.;.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.;.;.;.;.;.;.;.;.4.4.;.;.4.-.6.3.).).!.].&.].|.).!.].].).!.].].<.].&.!.).].|.).<.).).].!.].].&.!.!.].].).].1.).].).!.].&.&.!.&.].&.&.&.!.!.].1.&.!.].3.].&.&.].!.!.).<.!.].).!.3.!.].Y J P P J P Z P P P P J P P P P P P J J J J Z J K ", -" .U N U U N U R N N R R N N N U N U U N R N Q N U (.~.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.;.;.;.;.;.;.;.;.;.4.4.f.<.).<.!.].&.&.&.].!.].&.3.!.3.&.&.].!.!.].&.&.%.!.&.].!.!.].&.<.!.].3.&.).!.!.].&.).!.].).).).].).&.).!.].].).&.].).].|.].!.&.&.).3.].&.].3.<.!.].&.].).8.P J Z P J J Z J J Z P J Z J J Z J P P P P P P J ", -" z N R X R Q N N N N U R N N X N Q R N U N U N R R -.;.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.;.;.;.;.;.;.g.).].&.).).).].!.].&.).).].).).&.&.).<.).&.&.).).).!.].].&.&.!.].).].&.).].3.].&.!.].&.&.&.!.].1.).!.].!.&.&.!.!.!.3.).!.].!.%.&.].|.!.3.&.&.].&.!.).!.).z P P Z P P J P P P J P J P P P P J J Z J J Z P J ", -" .N N R U N N @...N R U ..Q R R N N X =.@.X R N U (.~.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.;.;.;.;.;.;.;.;.;.f.!.!.].<.!.!.!.3.&.<.!.!.&.].!.%.!.&.].!.].!.&.].!.).&.&.<.!.<.&.&.<.!.!.|.].!.!.].&.].!.!.].&.%.!.].).<.&.].].].].].!.<.|.].&.!.).).].!.].!.).).].).].).z J J P J J P Z J J P J P Z J J Z P P J P P P Z P ", -" .N U R N R X X ..N R X U U U N R N Q T =.U N R R -.;.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.;.;.;.;.;.;.;.h.<.).!.].].<.<.).!.].].).!.].&.).].&.].!.].).).].).].&.!.].].&.!.!.].].3.&.3.].).&.!.].].).!.&.].&.).).!.%.1.&.&.!.].&.3.).&.].!.!.3.<.!.].&.!.3.!.).!.3.M J J P P J J P P Z P J J P P P Z J P Z J J P J K ", -" T N R N N U N N Q N N N X R R ..N N U N U N Q N U (.~.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.;.h.<.!.].&.&.&.].!.].&.3.!.3.&.&.].!.!.).).].!.!.&.1.%.!.].&.<.!.].<.&.|.%.!.).&.<.!.3.&.&.).].).&.).!.].).&.).&.&.).&.].!.&.&.].<.].&.].3.<.!.].).].).].).D P P Z J P P Z J P Z P P Z J J P P J J P P J P J ", -" .N N ..R N N N N N U R N N X U Q X N Q X U N R R -.;.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.g.].&.).).).!.].&.).).].).].&.).).<.3.).&.].].&.!.].&.).&.!.].).].&.].&.).].&.!.].].&.].!.).&.).!.].!.].&.!.%.!.].&.!.].!.%.&.&.&.!.3.&.&.].&.!.).!.).&.!.M J P P J J J P J P J J J P P J Z P P Z J P Z P K ", -" L N Q X N R N S Q R Q N N N U R U R N N N X R N U (.~.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.g.|.].!.%.!.3.&.<.!.!.|.].!.!.!.&.].!.).!.|.].!.].&.&.].!.3.&.&.).!.!.&.1.%.!.].&.).!.!.&.].%.!.].).).).).).&.].3.!.<.).).&.!.].).].!.].!.).).].&.].3.).].D J J Z P P P Z P J P P P Z J P P J J J P J P Z J ", -" M N N N U U R U N N N R Q R N X U ..N R R U N R R -.;.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.^.g.!.].1.).].).!.].].].!.<.].].].&.].!.].].&.].&.).).!.].].&.!.%.).].).].&.].|.).!.].<.].!.&.&.&.).).!.%.&.].|.!.].].&.).].).!.!.).<.!.].&.!.3.!.).!.!.<.!.M J P Z J J J J P Z J J J P J J P P P Z P J P P K ", -" L N U R R Q N X N N ..U U N Q R R X N U U R Q N U (.~.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.;.h.3.&.].&.3.!.].&.).!.<.&.&.).!.!.&.].).!.!.&.&.%.!.).&.3.!.].&.&.).!.!.&.&.].!.3.&.).&.].).&.].!.].).&.&.&.].).&.3.!.1.].).].].&.].3.<.!.].).].).].].&.].D P J P P P P P J P P P P Z P P Z J J J Z P J Z J ", -" L Q N N N N R ....X R X N U U N N ..R R N U N R R -.;.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.g.&.&.).!.].&.&.&.<.).].&.).<.].).&.&.3.].].!.).).].&.!.].).&.).].).].).].!.].].&.).!.].1.].!.].!.&.&.].!.!.].|.!.].%.!.&.&.&.!.).&.&.].&.!.3.!.).&.!.).!.M J J Z J J Z P J Z J J J Z J P P P P J J P P P K ", -" .N N N N ..S Q X U N R R X R N N Q N N N X R N U (.~.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.;.~.h.!.%.!.].&.&.%.!.&.1.%.!.!.&.).!.].!.&.&.!.].&.&.<.!.3.&.&.].!.!.&.).!.!.).&.&.%.!.].|.%.!.3.&.].).).!.].3.3.!.].&.&.].!.).).].!.].!.).).].).].3.).].).].D P P P P P J Z P P P P P J P J Z J J P P J J Z J ", -" L ..R ..X N N N Q N U U R N R N N N N ..R U N R R -.~.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.g.].&.&.).!.].&.].!.].&.].].).].!.].].&.<.).).].!.].].).!.!.].3.].&.].3.<.&.!.].&.&.!.).].&.).&.!.!.].&.).!.].).&.).&.].!.%.|.<.!.].&.!.3.!.).!.!.3.!.).!.M y J Z J P J J J Z J J P Z P P P P J Z P P P P K ", -" .X N X N N N N N R R R U N N U N N N Q U R Q N U (.;.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.^.].).&.].!.].1.].!.].&.&.).!.!.).).).!.!.&.].!.!.].&.3.!.].].&.].!.!.&.&.].!.].).).).].&.&.].!.].].].].!.).].&.].!.1.].|.].&.&.].3.<.!.].).].).].].).].).].D J P P P J P P P P P P J J J J Z J P J Z J J Z J ", -" .U U Q N N U N N N N R R N Q N Q N N X N U N R R -.;.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.].1.!.].&.).&.).&.).&.].&.].).).).<.].).!.].].&.&.!.].&.&.&.&.].].].&.!.].&.&.&.!.].1.&.!.].!.&.&.|.].!.).&.!.].!.%.1.&.&.!.3.&.&.].&.!.3.!.).&.!.).!.).!.M J J Z P J Z J J Z J P P P P P P J P J P P P P K ", -" L Q R N R R Q N N N N N U ..N R U ..N R N X R N U [.~.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.^.^.<.!.].&.&.%.!.).].!.!.!.].).!.].!.).<.!.).&.&.<.!.<.&.).<.!.!.&.1.%.!.3.&.<.!.!.].&.%.!.].&.<.&.].!.&.].<.!.<.&.].&.%.&.].].!.].!.).).].).].3.&.].).].).].D J P P J P J P P P P J J Z J J Z P J P Z J J Z J ", -" L N N U U N R ..R Q N R Q N U X X N U ..R U N R N -.;.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.].).).!.].&.].!.].].<.).&.].!.].&.).].).].&.!.].].&.!.%.).].).).).).].).!.].].).!.&.].&.).&.!.!.].).&.!.].].&.).&.&.!.!.).].!.].&.!.3.!.).!.%.|.!.).!.).!.M J J P J P Z J J Z P P J P P P Z P J J P P P P K ", -" L N N R R N N Q U U ..N N N R R N ..X Q U R Q N R (.~.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.;.;.;.3.<.!.].&.).!.3.&.&.].!.!.).3.|.%.!.&.1.%.!.].&.<.!.).&.&.|.%.!.&.&.3.!.].&.&.).].).&.).!.].].3.3.!.&.].&.3.!.).&.).].].&.).3.3.!.].).].&.].).).].).].).].D P P Z P J J P P P Z J P Z J J P J P P Z J J Z J ", -" ...N N ..N N X X X N N N N U U Q N N X N U N U R -.~.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.<.].&.&.&.<.3.).&.&.3.].).3.].1.].&.%.|.].&.&.!.].].&.].&.&.).].).!.].).&.].!.).&.).!.].!.).).).].!.<.&.!.].!.%.&.&.&.!.).].&.].&.!.3.!.3.&.!.).!.).!.).!.M y P Z P P Z J J P P J J P P J P J J J P P P P K ", -" L Q N N X N N R R N N N ..N R R N N N R N X R R U (.;.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.;.~.].&.&.%.!.).&.%.!.!.].).!.&.!.].).!.&.&.).).!.].&.&.].!.!.&.].!.!.].&.).!.!.].&.%.!.].).<.&.].!.&.].<.!.].|.].&.!.].).].!.3.!.).).].3.).].).].).].).].).].0 J J P J J J P P J Z P P Z J P Z P P P Z J J Z J ", -" L N R U N N U U U Q ..X R N N N N N U ..R U N R R -.;.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.~.<.!.].&.].!.).].).3.&.].!.].).&.].&.].&.!.].).&.!.!.].].).).].].&.).!.].<.].!.).].|.).).!.!.].).).!.].&.).).&.].!.!.).].!.].).!.).!.].!.!.).!.).!.).!.).).M J J P P P Z J P P J J J P J P Z J J J P P P P K ", -" L R N R Q ..R R R U X U U X U N R ..X Q U R U N U [.~.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.;.).].&.&.!.].&.).&.%.!.&.].3.!.!.&.1.%.!.].&.3.!.].].&.).!.!.&.&.<.!.].&.&.&.].&.&.].!.].].).3.!.&.].).!.].&.).).3.].).).<.3.!.].&.].).3.].).].).].).].).).D P P Z J J J P J J P P P Z P J P P P P Z J J Z J ", -" .i.X U X N N N X N Q R R Q R U X N N X N Q N R N -.~.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.<.&.).].&.&.&.).&.).).).).].].).!.].&.&.).!.].&.&.&.).].].).).!.].).).).!.].1.&.!.].!.&.).).].!.<.&.3.!.!.!.].&.&.!.).).).].&.!.3.!.).&.!.).!.).!.).!.].!.M y P P P P Z P P Z J J J Z P J Z J J J P P P P K ", -" L X N X U N N Q R N N N U N N R U R N R N N R N R (.;.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.;.).%.!.|.].!.%.!.&.].!.).!.|.].!.].|.].<.!.].&.).<.!.!.&.|.%.!.].&.].!.!.3.&.%.!.].).<.&.].!.&.].3.!.].].].].!.].).].!.].!.).&.].3.).].).].).].).].&.].&.].D J J Z J J J Z J P P P P J J P P P P P Z J J Z J ", -" M Q =.Q N R U U Q N N R N N N Q N N U Q N N N U R -.;.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.~.;.].&.].!.].&.].&.).].!.].].&.].&.).&.!.].&.).!.%.&.].).].&.).).&.!.].].].!.).].&.).&.!.!.].3.).!.].&.&.&.&.].!.!.).].!.].&.!.3.!.].!.!.).!.).!.).!.).!.).!.M J P P P P J P J Z J J P P J J Z J J J P P P P K ", -" L N X N R U X =.U N R N ....N N N ..R U ..U Q R U [.~.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.^.].).!.].&.1.].!.!.&.].).!.!.&.].!.!.].&.<.!.).&.].).!.!.&.).<.!.3.&.&.&.].&.&.).!.].].3.3.!.&.].).!.].&.&.).3.].&.).3.<.!.].&.].).3.].).].).].).].).].&.].D P J Z J J P Z P P P P J Z P P P P P P Z J J Z J ", -" L U N N R N Q X ..N N X Q N N ..Q N X X R U N R N -.;.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.].&.&.&.].|.].].).&.&.3.<.).!.].].&.).!.].].&.).&.].].].&.!.].3.).&.!.).).).!.].!.).).).].!.<.&.3.!.!.!.].&.&.!.3.].&.].&.!.3.!.3.&.!.).!.).!.).!.).!.).!.M J P P P J J J J Z J P J Z J J Z J J J P P P P K ", -" L Q N U N N N N X U Q N N N N X N N R N N X N N R (.~.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.^.^.<.&.].!.!.!.&.3.!.<.!.).].!.3.&.&.<.!.].&.&.].!.!.&.1.%.!.].&.&.%.!.].&.%.!.].).<.&.].!.&.].<.!.].<.].].!.].).].!.).!.).).].3.).].).].).].).].).].).].).].D P J Z J P P P P P P J P J P P P P P P Z J J Z J ", -" L R Q N N N N N R U N N R ..N N N U N R R Q N U R -.;.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.].!.].].].).).].!.].].&.].).).).!.].).&.!.!.].].).).&.].|.).!.].&.&.!.].&.&.).).!.!.].3.).!.].&.).&.&.).!.!.).].!.].).!.3.!.].!.!.).!.).!.).!.).!.).!.).!.M J P P J J Z J J Z P J P Z J J Z J J J P P P P K ", -" L N N R R N N N N X U N N Q N N N =.Q U U U ..R U (.~.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.;.;.~.3.3.&.&.|.%.!.&.].).!.!.).&.%.!.].&.<.!.].).&.3.!.!.&.&.].!.].&.].&.].).&.].!.].].).3.!.&.].3.!.).).).<.<.].).).<.3.!.].&.].).3.].&.].].].).].).].).].).].D P J Z P P J P P P Z P J J P P P P P P Z J J Z J ", -" L N U N ..R Q ..R Q R N N N ..N X U R R X X N R R -.;.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.<.).).].1.).].&.&.3.<.].!.).].&.).!.].).].&.].).].].&.!.].&.&.&.!.).&.&.!.].!.&.).).].!.<.).).!.%.!.].&.&.!.).).).].&.!.3.!.3.&.!.3.!.&.!.).!.).!.).!.).!.z P P Z J P Z J J P J P P Z J J Z J J J P P P P J ", -" ...R N Q U U X N N U N X i. .U U X N N R U U N U (.~.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.;.].!.!.!.].).!.3.!.).).!.].&.).3.!.].&.&.).!.!.&.).!.!.3.&.].!.!.].].!.!.].).<.&.].!.&.].<.!.).].&.].!.&.).].!.].!.).&.].3.).].).].3.<.&.].).].).].).].3.<.D J J P P J J P P J P J J J P P P P P P Z J J Z P ", -" .N N N X X N N N R U N N N Q R N N N N Q R N R R -.;.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.].].<.).&.3.!.].].&.<.).&.&.!.].).).!.%.).].].&.].].].&.!.].].).!.].].&.).&.!.!.].).).!.].).).&.&.].!.%.|.].!.].&.!.3.!.].!.!.).!.3.!.).!.).!.).!.).!.].!.M P J Z P P Z J P Z P P P Z J J Z J J J P P P J K ", -" L N U N R R N ....N Q R R N U N R R R N N N Q N U (.~.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.).&.].!.!.].].).!.!.).&.%.!.].&.).!.].&.&.).!.!.&.&.3.!.3.&.&.&.].&.&.<.!.].].3.3.!.&.].).!.).&.).|.].).).).3.<.!.].&.].).<.].&.].].].).].).].).].&.].).3.D J P P J J J P J P Z J J J P P P P P P Z J J P J ", -" .Q N U U Q N X N N N N N X N N U U R N R U N R R -.;.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.;.<.&.].].).&.&.3.].].!.).].&.].!.].&.&.&.).].].&.).!.].<.).).!.).&.).!.].!.).).).].!.<.).].!.%.!.].&.&.!.].&.).].&.!.3.!.).&.!.3.!.&.!.).!.).!.).!.).!.<.!.M J J P P P Z P J P P P P Z J J Z J J J P P Z P K ", -" L N ..R R U X U R N N N N =.Q N R R U N N X R N U (.~.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.].!.&.).!.3.!.).&.!.].&.&.&.!.].|.].&.%.!.&.).!.%.3.&.&.%.!.].&.%.!.].).<.&.].!.).&.].!.|.].&.].!.).&.].!.].!.).).].3.).].).].3.<.&.].).].).].).].3.<.).].D P P Z J J J Z P J Z J J J P P P P P P Z J P Z J ", -" L X N N X N Q N ..@.R U Q S ..N N R ..N R U N R R -.~.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.~.<.).].).!.].].).].&.&.).!.<.).).!.!.).].&.).].&.&.).!.].&.&.!.].&.&.&.).!.!.].].&.!.].&.).&.&.].!.!.].).!.].&.!.3.!.].!.!.).!.3.!.3.!.).!.).!.).!.].!.).!.z J P P P P J J P P P P P Z J J Z J J J P J P P J ", -" .N N N R R N N X X N R N N X U N N Q ..U R Q N U (.;.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.;.].!.!.].].).!.!.&.&.%.!.].).].!.3.].1.].!.!.&.&.].!.].&.].&.].|.].<.!.].].).&.!.].).].!.).&.&.&.].].|.].3.<.!.].&.].).<.].&.].].].).].).].).].).].&.].).<.z P J Z J J P P J J Z J J J P P P P P P Z P J Z P ", -" .Q ..U U N ..N N N N N N U a.R N N X R N U N R R -.~.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.;.].<.).&.&.).].].!.].&.&.&.!.].].&.].|.].].).].!.].&.&.&.!.).).&.!.].!.&.&.).<.!.].1.].!.%.!.].&.&.!.).&.&.].&.!.3.!.).&.!.3.!.&.!.).!.).!.).!.).!.).!.].&.z P P P P J Z P P P P P P Z J J Z J J J J P P J J ", -" L U X R R N X U N Q U N R R N N N N U N N X R N U [.;.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.3.<.!.3.!.).&.!.].).&.].!.).&.1.].!.!.&.).!.!.].&.].!.!.].].!.!.].).<.).].!.).).).!.&.].&.].!.&.).].!.].!.).).].).].).).].3.<.&.].).].).].).].3.<.&.].&.).z J J Z J P J Z J J Z J J J P P P P P P P J J P P ", -" L N N N ..N Q =.U R R N N N N N N Q N ..R U N R N -.~.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.].).%.).].&.3.).&.).!.].].&.!.%.&.].).).].3.).&.!.].].).!.].].&.).&.!.!.].].&.!.<.).].1.&.3.!.%.|.<.!.].&.!.3.!.).!.!.3.!.3.!.3.!.).!.).!.).!.].!.).!.3.).M J P P J P J P P P P P P Z J J Z J J Z P P Z J K ", -" z N N N Q N N U X N U N U R ..Q R N N Q U R Q N R [.;.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.;.).&.1.].!.!.&.].!.!.].&.<.!.).&.&.3.!.!.|.].3.!.).&.&.&.3.&.&.<.!.].].).&.!.].).].!.).&.].&.].&.&.].3.<.!.].).].3.].].&.].].].).].).].).].).].&.].).<.).&.D P J Z P J P Z J J Z J J J P P P P P J Z J P P J ", -" .R N N N N Q N Q R Q R N N U U N N N X N U N U N -.;.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.~.;.].].|.].].].!.].].).&.!.].].).].&.].].].&.!.].).).).!.<.).).!.].!.).).).<.!.].|.].!.%.!.).&.&.!.3.&.&.].&.!.).!.).&.!.3.!.&.!.&.!.).!.).!.).!.).!.].!.<.!.M J P Z P J J P P P P P P Z J J Z J P J P J Z P K ", -" L N U N Q N N N U N U N N U X R N N N R N X R R R [.~.~.~.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.~.&.).!.|.&.!.].&.&.].!.3.&.1.].!.!.&.).!.!.].&.&.%.!.].&.%.!.].).<.&.].!.).).).!.|.].&.].!.&.].].!.].!.).).].&.].3.&.].].<.&.].).].).].).].3.<.&.].&.].&.].D P J P J P P Z J J Z J J J P P P P J P Z P P Z J ", -" .Q N S R N R X N X ..Q R R N ..R N U ..R U N U N j.;.;.~.~.~.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.;.~.!.].3.).<.&.&.&.!.].].&.!.%.&.].).).3.<.).).!.].&.).!.).].|.).).!.!.].].&.!.].].&.&.&.].!.%.1.].!.].&.!.3.!.).!.!.<.!.&.!.).!.).!.).!.).!.].!.).!.).!.3.k.O P J P J J J P P P P P P Z J J Z P J J J J P P K ", -" T N R N N N N R ..R X U N N N Q N ..X Q U R U R N =.l.c.;.;.;.~.~.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.;.].|.%.!.).&.%.!.).&.<.!.).&.&.3.!.!.&.].<.!.].&.].&.].&.&.].!.].].).&.!.].).&.!.].).).|.].&.).).3.<.!.].).].).].].).).].].).].).].).].).].&.].).<.).|.m.V K J P Z P P P Z J J Z J J J P P P J P P P P J Z J ", -" L U R N ..N U X U U X N N N N N Q N N X N Q N Q N N R N n.o.;.;.;.;.~.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.~.).&.).].!.].&.].&.!.].].).].&.].].].&.!.].&.&.&.!.).&.&.!.].!.&.).).<.!.].&.<.!.!.!.].&.&.!.3.].&.].&.!.3.!.).&.!.<.!.&.!.).!.).!.).!.).!.).!.].!.p.v B J P J P Z J J J P P P P P P Z J J P J J Z J P P P K ", -" .R U N Q ..R U X Q =.Q ..N N N N N N R N N N U N R N R N q.r.^.~.~.;.;.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.;.!.).&.!.].&.&.<.!.).&.1.].!.!.&.).!.!.].&.].!.!.].&.%.!.3.).<.&.].!.).3.3.!.3.<.].].!.].).].!.).!.).).].).].).&.].].<.).].).].).].).].3.<.&.].k.8.B ' K P Z P J P P P P Z J J Z J J J P P Z P P J P J J Z J ", -" L R N N X N Q =.S N U X R N N N N N U Q N R X U N ..N N N N U l.[.^.~.;.;.~.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.].&.].&.&.&.!.].].&.!.%.&.].).).3.<.).&.!.].].&.!.].&.].&.).!.!.].].&.!.].].&.&.&.).!.!.).].!.].).!.3.!.).!.!.<.!.&.!.).!.).!.).!.).!.].!.e.s.J K K K J J Z P J Z J J J P P P P P P Z J P Z J P Z P P P P K ", -" M N ..N N N N X W U X U U R @.N R ..R U ..N =.Q N Q N X U X M N R t.u.~.~.;.~.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.;.;.!.!.&.&.%.!.].&.<.!.).&.&.3.!.!.&.].<.!.3.&.&.&.].&.).).!.].].3.&.!.].).).!.&.].&.].3.].&.).<.3.!.].).].).].].).<.&.].).].).].).].).].1.v.v B K ' K J P P J J P P P P P Z J J Z J J J P J P P J J Z J J Z J ", -" L Q N U R N U N Q X Q R U X ..U X N X X N Q S N N N R Q R N N N U N R w.x.;.;.;.;.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.].3.!.].&.&.).!.].].).].&.].].].&.!.].).).).!.].&.&.!.].!.).&.).<.!.].&.<.!.%.!.&.).&.!.].&.).].&.!.).!.).&.!.<.!.3.!.).!.).!.).!.).p.y.+ B K P J P J J P P J J Z J J J P P P P P P Z P J Z P P J P P P P K ", -" .N N Q N N Q R N N N N R N X R U N R N N N N N N @.U N N N R R X N U N m.j.~.~.~.;.~.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.;.;.3.!.].1.].<.!.3.&.1.].!.!.&.).!.!.].&.&.%.!.].|.%.!.].).<.).].!.).3.).!.].).&.].!.].&.].!.].!.).).].).].3.).].).].).].).].).].3.z.A.P K K J Z K P Z P P J Z P P P P P P Z J J Z J J J J P P J J P Z J J Z J ", -" L N N N N N N N R N N N N U X Q R U N U N N ..N X R N N @.N U Q N R U X N R l.-.~.;.~.;.;.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.].&.].&.!.].].&.!.%.&.].).).<.<.).).!.].&.).!.).).).).).!.!.].].&.!.].).&.&.&.3.!.!.).3.!.].&.!.3.!.).!.!.3.!.).!.).!.).!.).B.C.K K K K P P J Z P Z J P J Z J J Z J J J P P P P P P P J J P P J J P P P P K ", -" .R N R R N N N U N R N R Q N N N R R Q N R X R N N ....X N R U R N a.U R U R N D.u.;.~.~.~.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.;.;.&.).!.!.].&.<.!.).&.&.3.!.!.&.].3.!.].|.].&.].).&.].!.].].).&.!.].<.).!.&.].).].3.].).3.3.3.!.].).].).].].&.].].].&.].3.).E.P K P Z J P Z J P P J P P J P J P P P P P P Z J J Z J J Z P P Z J P P Z J J Z J ", -" T N U U N ....R ..N R N N R N N N U N R N N U N N X X N R N X U N N R N R U U N N F.G.~.;.;.;.~.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.~.;.!.<.].).&.!.].].).].&.].].).).!.].&.).&.!.).&.&.!.].!.&.).).<.!.].&.].!.!.!.).).&.!.].&.).].&.!.).!.).&.!.3.!.&.!.).!.H.+.K ' J P P J P P Z J P J Z P J P Z J J Z J J J P P P P P J Z J P P J J J P P P P K ", -" ...R R N Q X N Q U U N N U N ..N R N U N U R R R U U N U N R R R N N N N =.Q R N N N I.%.~.~.;.~.;.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.;.;.).].&.<.!.).&.1.].!.!.&.|.%.!.].&.&.%.!.&.].%.!.].).<.&.].!.).).).!.).].].].!.).).].!.].!.).).].).].3.&.].3.<.&.].e.e P P 5 P P J J P J J P P J P P Z P J J P P P P P P Z J J Z J P J P J Z P P P Z J J Z J ", -" .N N N N N N N R R ..N R ..X R N N R Q R N U N Q R R R R U N N N U R N X N N N U Q R N R l.b.;.~.~.;.;.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.;.;.&.).!.].].&.!.%.&.].).].1.].|.).!.].&.].!.&.&.&.).&.!.!.].].&.!.].).&.&.&.].!.%.|.3.!.].).!.3.!.).!.%.|.!.3.!.r.h y.5 K J J Z P P Z P P J J P J J P J P P Z J J Z J J J P P P P J P Z P P Z J J J P P P P K ", -" L U N ..N U N N N N Q ..N Q U U N ..N U N N R N N N N N U R N N R Q N X U N N Q R N U N U R N D.x.;.~.~.~.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.~.;.^.%.!.].&.<.!.).&.&.).!.!.].).3.!.].&.&.&.].).&.].!.].].).&.!.].3.3.!.).).).|.].1.].3.3.3.!.].).].&.].&.].].).j d 5 K B K P P J J Z J J Z P P Z P P J P J J J P P P P P P Z J J Z P J J J J P P P P Z J J Z Z ", -" .Q X N Q N N U N N X N N X R Q N N X ..R N Q S N U U M N Q ..N N N Q R N N N N N R U M U U X R F.r.~.;.~.~.~.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.~.;.~.].|.&.!.].].).].&.].3.).&.!.].&.&.).!.].1.].!.].!.&.).).<.!.].&.].!.%.!.].&.].!.&.).).].&.!.).!.3.&.!.&.J.8.P K J K 5 J J P P P P P J J Z J Z J P Z P P P Z J J Z J J J P P P J P P P P J Z J J J P P P P K ", -" K.N R N R R Q N N U N N Q N U N R N Q N N U =.Q R Q N N U N N N ..U N R ..N N N N Q N =.Q N U N N I.[.;.;.;.;.;.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.~.;.~.~.&.].!.).&.1.].!.!.&.&.%.!.].&.&.%.!.].1.%.!.3.).<.&.].!.).3.).!.).).&.].!.&.&.].!.].!.).).].3.).].).e.s.K ' Z K P K B P P J Z J J Z P P J P J P J P Z J J J P P P P P P Z J J P J J Z J P P P P P Z J J V L. ", -" M.U N N N N N Q N N U N X U N N N N Q N N U N N N R X N ....Q X N N Q N Q ..N N N X N R R U X Q =.N l.c.~.~.;.;.;.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.~.;.;.;.!.].].&.!.%.&.].3.).&.].|.).!.].&.&.!.].&.].&.).!.!.].].&.!.].].&.&.&.3.!.%.|.].!.].&.!.3.!.].!.!.v.K 5 P J J J Z K J Z P J P P J J Z P J P Z P J P P P P Z J J Z J J J P P Z P P J P J J Z J J J P P 4 ", -" N.U N Q R N N ..X N =.Q U R N N U N N X R N @.U R N Q X N N ..N N N U N R N N U N U N Q N N U N R R n.x.~.~.~.~.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.~.;.~.~.;.).&.<.!.).&.&.|.%.!.&.&.].!.].).&.].).&.&.).!.].].3.&.!.].).&.!.&.].).].).).).).3.3.!.].&.].&.#.0 J K B J P P P P J P P J P J J P P J J P J J Z P J Z J J J P P P P P P Z J P Z J P Z P P P P P P ~ ", -" O.U N R X R U .U R N N @.X R U X N R X R U N N N N N Q N N N X N N ..R Q N R N N R N Q X U N N R F.j.~.;.~.~.;.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.~.;.;.;.;.).!.].].).).].1.].&.).!.].&.&.).!.].&.).!.].!.).&.).<.!.].&.<.!.%.!.&.&.&.!.].&.).].&.!.3.k.z J K ' J P J Z Z J P Z J P J P P J J P P J P P J J P P P P P Z J J Z J J J P J P P J J Z J J Z J O P. ", -" Q.i.N N $.Q N N N N R S =.N Q R N U N N M U N N N N N N N ..R U N X N N R N R N U N N N R ..N U N R l.-.;.;.~.~.~.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.~.;.~.~.;.;.!.3.&.&.).!.!.].&.%.!.3.&.].!.!.&.].!.!.].).<.&.].!.).3.3.!.&.].&.].!.].&.].!.].!.).).1.F.V K K J P P J P P P P Z J P Z P Z Z P P J J P J J P P J J Z J J J P P P P P P Z P J Z P P J P P V R. ", -" S...U N N Q ..U X Q N N U @.=.N N N Q N U R R N U R X N Q R U N N N U N N R R N R N X R R U X N X X t.u.;.;.;.;.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.~.;.;.;.;.;.].&.!.%.).].&.&.&.).].&.!.].].].!.].].&.).).!.!.].].&.!.].].&.&.&.].!.!.].&.!.].).!.m.T.B Z K P K J P J J J J P P J P J J P J Z P P Z P P J Z P P P P P P Z J J Z J J J J P P J J P Z J U. ", -" V.N R U N R N N N N R X X N R N N =.Q U U N Q N U N N N R Q N N Q U ..N U N U N U U N Q N X U R N $.w.x.~.~.~.;.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.~.;.~.~.~.;.;.<.!.).&.&.).!.].&.&.).!.].&.&.).3.&.&.<.!.].].3.&.!.].).&.!.).&.&.).].).).3.3.&.J.z K B K P Z Z J P Z P P P P J J P J P P J P P J Z P Z J P J Z J J Z J J J P P P P P P P J J P P V . ", -" W.N N N N N ..N N U Q U ..N Q S R R ..N N Q R N N N U ..R N R Q N R ..R R Q R N N R Q R N U ..N R I.j.;.~.~.~.~.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.~.;.;.;.;.;.;.].).].&.).].!.).).!.].).&.&.!.<.).].!.].!.).&.).<.!.].&.].!.%.!.).&.&.!.].&.k.X.K K ' J J P P P Z J Z J J Z P P Z P Z J P Z J P P J P P J P J P P P P P P Z J J Z J J Z P P Z J O ", -" Y.i.R N N X N X R N X X N N N N N X N ..N N R @.N X X U N N N N N Q N N N N R N U U N N Q W U U R R l.-.;.;.;.~.;.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.~.;.~.~.~.~.;.~.&.&.1.%.!.|.].%.!.].&.&.%.!.).].!.!.].).<.&.].!.).3.).!.|.].).].!.&.].].e.m.V B K K P P P J J Z P P P P P J J J J J P P J P P Z J P J Z P J P Z J J Z J J J P P P P P J Z J y. ", -" S.i.X R N N N R U N N N N N N ..Q N N U X ..R U R R N N N N N N N N N U N R X N R N N Q R U U R N N D.o.;.~.;.;.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.~.;.;.;.;.~.;.;.!.%.].&.!.].1.).&.].!.&.].&.!.].3.).&.&.!.!.].].&.!.].3.].1.&.].!.%.*.p.8 K J Z K K Z J P P P J J J Z Z P P P P P J J P J J P P J P P Z P J J P P P P P P Z J J Z J P J P ", -" Z.U Q U N N Q N N R R Q U X N N ..R N Q N Q N U Q N Q N N U ..N R R ..N =.Q U N N N N R R N U R N `.w.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.~.;.~.~.~.~.;.;.;.&.1.).&.].&.].&.).!.].).&.].).&.).3.!.].].3.&.!.].3.).!.&.].).).).J.z K P K P P 5 K P P J J J P P P J J J Z Z J Z P P Z P P J J P J J P J P P Z J J Z J J J P P P P J + ", -" .+R N N R ..N U U R N N N X N N N N N N R U ..U N N Q X ..N N Q S U N R N R N R N N N Q N N N N R I.%.;.;.;.;.;.;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.~.;.;.;.;.~.~.;.;.].&.&.).!.&.).!.].&.&.&.!.].&.].!.].!.).).).<.!.].&.].!.!.!.].++F.J K K K Z J J Z J Z P P P J J J P P P J P P J J Z J J Z P P Z P P J P J J J P P P P P P Z J J Z .@+ ", -" #+`.N U Q N R X X U N N U N N N N N R N X X X R R N N Q N N N X Q N N ..U ..S Q R R N N Q N Q U Q N $+%+~.~.~.~.~.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.~.;.~.~.~.~.;.;.;.;.1.%.!.).).%.!.].&.&.%.!.].).!.!.].).<.&.].!.).3.).!.).<.].1.m.P B P K J J P P P P P J Z Z J P P P J J J P J J P P P P P J J Z J Z J P Z P P P Z J J Z J J J P y.&+ ", -" *+U N N R Q R R R Q R N N ..N N N R N R U U N N N N U N N N N N Q X X R U U U N R U ..U =.U N ..i.R n.=+;.;.;.;.;.;.;.~.~.;.~.;.~.;.;.;.;.;.~.;.;.;.;.~.~.~.~.;.&.).].&.&.].|.).!.].&.&.!.].<.).&.&.!.!.].].&.!.].3.].|.p.Y K K Z 5 P P J J J J J P J J P Z Z Z P P P J P P J Z J J Z P P J P J P J P Z J J J P P P P P P Z @. ", -" M.N U U N U U N N R ..X ..N ..U N U R R ..N N R Q N N N N N N N U U X R R ..U X X X Q X R W R N N `.r.^.~.~.~.~.~.;.;.~.;.~.;.~.~.~.~.~.;.~.~.~.~.;.;.;.;.;.).1.].!.&.&.].!.].&.].3.3.&.).<.!.].].3.&.!.].3.).!.k.A.B K ' K P B J Z P P P P P J P P Z J P J J J Z P J Z P J P P J J Z P J P Z P J P P P P Z J J Z J .-+ ", -" ;+K.U R R N N U Q N Q N X R Q =.N N X U N U N R R N ..R N R Q =.N N N X R R N N N N N N N N N N N i.W.[.;.;.;.~.~.;.~.;.~.;.;.;.;.;.~.;.;.;.;.~.~.~.~.;.;.%.!.].&.).!.].&.&.&.!.].&.).!.].!.).).).<.!.].&.!.F.P ' 5 P ' J J P P J Z J J Z P J J J P J P P P P J P P J P J J P P J J P J J Z P J Z J J J P P P ` @+ ", -" >+i.N N ..X N N N N U N S Q U N N Q R R N U N N Q U N N N X N N N U N N U N N N U U N Q N R X X ..R l.c.~.;.;.~.;.~.;.~.~.~.~.~.;.~.~.~.~.;.;.;.;.;.^.1.].1.%.!.].&.].!.!.].|.%.!.].).<.&.].!.).3.&.m.V K K P B K P P P Z J P J P P J J P P P J P J Z Z J P Z J P J P P J J P P J P P J J P P P P P Z J ,+ ", -" &+N R N N N Q R N N N X Q N N N N ..R N N N X ..N N U R R R Q N N Q N N R Q R R U R N Q R N U R Q R w.o.;.~.;.~.;.;.;.;.;.~.;.;.;.;.~.~.~.~.~.;.;.&.].1.].|.&.!.].].&.!.].&.&.&.).!.!.].].&.p.z K K K K K K J J J P P Z P Z Z P P J J J P J P P P P Z J P Z P Z Z P P J J P J J P P J J Z J J J s ", -" '+N N N U N R N N N U R N N N X N @...N N Q ..N Q N U N N R ..N R ..N N N U X N N U U N R S U N U q.j.;.~.;.~.~.~.~.~.;.~.~.~.~.;.;.;.;.;.;.;.).!.].&.].!.3.&.).&.].).&.].!.].].3.&.k.e P K K Z Z J K Z P P P J J J J J J J Z P P P J P J J J J P P J P J J P J Z P P Z P P J Z P P P P .P. ", -" Y..+X N N R N Q N N ..@.R U X X X N N N X N N N R N N N X N N Q N N R R R N ..X R Q N R R N Q N R N l.[.~.;.;.;.;.~.;.;.;.;.~.~.~.~.~.;.;.;.].&.&.!.].].&.).!.3.&.&.!.].!.).&.!.)+V K K P P P P Z P J Z Z P P P P P P P P Z Z J P Z P P P P J J P J P P J P P J Z P Z J P J Z J J : !+ ", -" ~+@.N U R U R N X X N Q R N U ..R N U R S Q N @.N N U ..N N N ..N N U N Q R N U R U N R N N N R N R D.c.~.~.~.;.~.~.~.~.;.;.;.;.;.~.~.^.3.!.!.].&.&.%.!.].&.%.!.3.).<.&.{+y.B K K K J J J Z P J P J P J Z J J J J J J P P P Z J Z J J Z P P Z P Z J P Z J P P J P P J P J P ", -" M.U X N ..N N N N U N Q X U N Q N R U N X ..R Q X N N N X U N R N N U N X U R N U N R N N N N U R F.w.=+~.;.;.;.;.~.~.~.~.~.;.;.;.x.].].).&.!.).].|.!.].&.].&.).J.z K J Z 5 5 P P P P J P Z P J P J P P P P P P J J Z P P P P P J J J J J P P J P P Z J P J Z P J P ~ ", -" W.N Q U N R N R R N N R R N N U X R N X U N N ..N ..N Q R N @.N X R R R N R R N U Q N R R Q N N N m.]+~.~.~.~.;.;.;.;.;.~.~.~.^+&.&.).!.].&.).&.].&.&.3.k.e Z K K P P B J Z J J J P J P J P Z P J Z J J Z J P P P J J J Z Z P P P P P J J P J J P P J P P Z . ", -" /+@.R U N N N N U X U N N R R N N U R N N Q N Q N N N N X N R U U N N U N ..R U R N N N N U U X R R l.b.;.~.~.~.~.~.;.;.;.;.^+).!.].).&.&.!.].&.).!.m T.P 5 J Z J J P J P P P J P J P J J J P P P P P P J J J P P P J J J Z Z J Z P P Z P P J J P J J V 4 ", -" (+N ..N N N Q U R N R N U N R Q N N N N N N N N N R N ..U R R N R R N Q N X N U N N R X Q N U U R U D.x.;.;.;.;.~.~.~.;.=+!.].&.&.%.!.].&.!.p._+' ' J B P P P P J P Z Z J P Z P J P P P Z J Z Z J Z P P P J J J P P P J P P J J Z J J Z P P Z P :+ ", -" <+@.=.N R N ..U N R ..N N N ..Q N N N N ..@.N N X R N N R U N N N N R U Q ....U R N N R R N Q X R `.w.^.~.;.;.;.~.;./.).).!.].&.&.!.++A.K K P P J Z J J J P J J J P Z J J P Z J J P P P P P J Z Z J P P P J J J P J J P P P P P J J Z J ~ ", -" [+}+N N N Q R R N Q N N R X U N ..U Q X X N R U N N N U R N N N N N R N X X R N N Q N N ..N N U N N |+%.~.~.~.;.;.^+3.!.].).).B.C.P B K K K J P P P P P J P P P Z J P P Z J P P J J J J J P J J P Z Z Z P P P J P P J Z J J Z P P 1+ ", -" 2+U N N U N N N N N U X ..Q X S N N R N Q N R R R N Q ..N R N N N U U X U N U N N X N Q R U Q N N R $+u.~.;.~.=+].&.&.B.m.y.' K Z P J P J J J Z Z P J J J J P J Z P P J Z P P P P P J P P Z J P J J J Z P J Z P J P P J J Z ", -" V.i.R N N ....N Q R X N R N N N U N N R U U N N U X ..U ..Q R R Q N Q R X ..Q N ..U N R N N N U N Q n.=+;.^+&.].p.z P K P ' P Z P Z P P P J P Z P P P P J P J J J P P J Z J J Z P J J J P J P P P P J P P J P J J V 7 ", -" <+N Q S R N N N N U R Q ..R @.N N R R N R X U Q X N U N N N R N U R X U N X X R N N N @.R R N N N `.r.o.n.e K K K K P J J Z P Z J Z P J J Z J J J P J P P P Z J P J P P J J P P P J P J Z Z J P Z J P J P P .P. ", -" 3+W.X N N N N N R U U X N X N N N N Q U R X N N N X N N N U N R U N X R N R U Q N R X N U N N R N N |+K K ' K J K K P P P J P P J J P P P P P P J P J J J P P Z P Z Z P P J J J P J P P P P Z J P Z P : 4+ ", -" 5+K...U R N R X N N N R ..U N U R N Q N R U R ..Q N R ..N R U R U U N R U ..N N N R N U N N R R $.P P K P Z J J J J P J Z P P J J J Z Z J P Z P P P J J J J J J J Z P P P J P J J J J P P J P J U. ", -" 6+Q U N N R U R N U X Q R X N N U N N Q N X U ..N X N N Q N R Q N N X X N N R N R Q N Q U N s.Z K 5 Z P P P P P J P J J J P P P P P P Z P J Z Z P P P P P P P P Z Z J P Z P P P P J J P ~ ", -" 7+N N Q N R R N N U R N ..X ..N N N U X X N U R N N N N N ..N R U R R N N U N R U R N N U J J P J Z Z J J P J P P P Z J J J J Z P J P J P J Z J J J J J J P P P Z J Z J J Z P P 2 8+ ", -" 9+W.N N U X U N R $.Q X R X ..N R Q R N R Q N R N ..N N X ..N Q U U N R R N U X N N U S P P J P P J P P Z P J J Z J P P P P P J P Z P J P J P P P P P P J J Z P P P P P J V 0+ ", -" a+R N Q R N R U N U N Q N N N N U N N N N ..X R ..U X N N R R @.N N N R R N R Q =.U J P J J P Z Z J Z P P P P Z Z J J J P J P J P Z P J Z J J Z J P P P J J J Z Z P b+ ", -" c+N U N U X U R N N N N N N Q N N ..N X U N X a.U ..N N N X N N ..N U R N N X U P J P P J P J P J J Z J J P J P P P J P J P J J J P P P P P P J J J P P P P .d+ ", -" e+f+R R Q N U N ....N R N R N Q N U a.N N N R X N N N N ..R Q N R U N N U R U P Z J P J P J P P P P P J P Z Z J P Z P J P P P Z J Z Z J Z P P P J J J O 2+ ", -" g+K.N X Q N X X ..U N U N N N R N R N N N N ....Q N X U N N N R @.N Q N N Z J P J P J P J Z J J J P J J J P Z J J P Z J J P P P P P J Z Z J P ` h+ ", -" i+U R U U .N ..R ..N R N N U Q N U Q X X U R U X N N N N X N N N ..U P Z P J P J P P P P P J P P P Z J P P Z J P P J J J J J P J J P Z :+ ", -" M.Q U N ..X N Q N N U N R U R R N N U X N Q R N R R N N R N R X S J J Z P J P J J J Z Z P J J J J P J Z P P J Z P P P P P J P P ~ j+ ", -" k+X U N N N U Q R N X N N N U a.=.N N N ..U U R N U N N U R K.P P Z P Z P P P J P Z P P P P J P J J J P P J Z J J Z P J V @+ ", -" S.@.N N ..R N N N R U Q N R S Q N N N Q R R N R R ..N Q N U J J J Z P Z J Z P J J Z J J J P J P P P Z J P J P P J J &+ ", -" l+U U X N Q $.R U R N X N N N N N N N N U N Q N N ..R K.P P P J P P J J P P P P P P J P J J J P P Z P Z Z P 7 ", -" <+R ..U R N X U N N N N ..N N N N @.R N N N N X N U J J J P J Z P P J J J Z Z J P Z P P P J J J J P O 8+ ", -" m+K.U R R R Q ..N @.X @.N U R X N N N R N N R R U P P J P J J J P P P P P P Z P J Z Z P P P P V n+ ", -" o+K.U N U X ..X X S =.Q N N N R N U ..N U N U J J P J P P P Z J J J J Z P J P J P J Z J p+ ", -" V.X N X N N X Q S N N Q U ..R Q N R R R K.P Z P J J Z J P P P P P J P Z P J P J s ", -" q+U N Q N N N R R U N Q N N N N U N U Z J Z P P P P Z Z J J J P J P J P 2 r+ ", -" Y.K.N N N U U X N N N N Q N R ..R U P J J Z J J P J P P P J P J P V 4 ", -" ~+U R R R R R N N N U ..N X N S J P P P P P J P Z Z J P Z P :+ ", -" c+N U N N U R X X N U R R K.J Z J J J P J J J P Z J ~ s+ ", -" .+N R Q U R N R Q N U U P P P P P J P P P Z O t+ ", -" #+K.R U U N N N R R N J J Z Z P J J J y.&+ ", -" u+N Q N N ..N U .P P J P Z P P v+ ", -" <+N Q N R U ./ P J J Z ( ", -" ;+O.N N N X J J P ` 5+ ", -" o+i.X X P J w+ ", -" l+Q Q x+ ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner_xlarge.ico b/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner_xlarge.ico deleted file mode 100644 index 12f7a6d349..0000000000 Binary files a/build/com.liferay.ide.upgrade.planner-repository/icons/UpgradePlanner_xlarge.ico and /dev/null differ diff --git a/build/com.liferay.ide.upgrade.planner-repository/pom.xml b/build/com.liferay.ide.upgrade.planner-repository/pom.xml deleted file mode 100644 index 773b193d55..0000000000 --- a/build/com.liferay.ide.upgrade.planner-repository/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - 4.0.0 - - - com.liferay.ide.build - build - 3.10.6-SNAPSHOT - - - com.liferay.ide.upgrade.planner-repository - eclipse-repository - - Liferay IDE Upgrade Planner Repository - - - - - org.eclipse.tycho - tycho-p2-director-plugin - ${tycho-version} - - - create-product-distributions - - materialize-products - archive-products - - - - - - - com.liferay.ide.upgrade.planner - liferay-upgrade-planner - - LiferayUpgradePlanner.app - - - - - - - - - \ No newline at end of file diff --git a/build/com.liferay.ide.upgrade.planner-repository/upgrade-planner.product b/build/com.liferay.ide.upgrade.planner-repository/upgrade-planner.product deleted file mode 100644 index f2f6e0b18e..0000000000 --- a/build/com.liferay.ide.upgrade.planner-repository/upgrade-planner.product +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - %aboutText - - - - - - - - -product -com.liferay.ide.upgrade.planner.ui.product ---launcher.defaultAction -openFile ---launcher.XXMaxPermSize -384M --showsplash -com.liferay.ide.upgrade.planner.ui ---launcher.defaultAction -openFile - - -Dosgi.requiredJavaVersion=1.8 --Xms40m --Xmx1024m --Dsun.java2d.noddraw=true - - -Dosgi.requiredJavaVersion=1.8 --XstartOnFirstThread --Dorg.eclipse.swt.internal.carbon.smallFonts --XX:MaxPermSize=384m --Xms40m --Xmx1024m --Xdock:icon=../Resources/UpgradePlanner.icns --Dorg.eclipse.swt.internal.carbon.smallFonts - - - - - - - - - - - - - - - - - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8 - - - - - Copyright (c) 2000-present Liferay, Inc. All rights reserved. - -The contents of this feature are subject to the terms of the -End User License Agreement for Liferay Developer Studio ("License"). -You may not use this feature except in compliance with the License. -You can obtain a copy of the License by contacting Liferay, Inc. -See the License for the specific language governing permissions -and limitations under the License, including but not limited -to distribution rights of the Software. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/installers/pom.xml b/build/installers/pom.xml index d54c945378..538ef43976 100644 --- a/build/installers/pom.xml +++ b/build/installers/pom.xml @@ -34,8 +34,8 @@ ${install-builder-home}/bin/builder - https://us-east-1.linodeobjects.com/devtools-s3.liferay.com/liferay-ide-files/biz.aQute.jpm.run-4.0.0-SNAPSHOT.jar - 7aafe878e453385fbcfbf0ced0ead2c6 + https://storage.googleapis.com/liferay-devtools/liferay-ide-files/biz.aQute.jpm.run-4.0.0-SNAPSHOT.jar + 737452891c8bb7b8bb3eb83299936ccc diff --git a/build/liferay-docs-offline/generate_offline.sh b/build/liferay-docs-offline/generate_offline.sh index 39fa9d1702..674e89941d 100755 --- a/build/liferay-docs-offline/generate_offline.sh +++ b/build/liferay-docs-offline/generate_offline.sh @@ -40,7 +40,7 @@ if [ -d "${unzip_dir}" ]; then rm -rf "${unzip_dir}" "${zipfile}" "output" if [ -s "code-upgrade-docs-${tag}.zip" ]; then - s3cmd --no-mime-magic --acl-public --delete-removed --delete-after sync code-upgrade-docs-${tag}.zip s3://devtools-s3.liferay.com/liferay-ide-files/docs/ + gcloud storage cp code-upgrade-docs-${tag}.zip gs://liferay-devtools/liferay-ide-files/docs/ if [ $? -ne 0 ]; then echo "Failed to upload code-upgrade-docs-${tag}.zip file." diff --git a/build/osgi-bundle-repository/build.gradle b/build/osgi-bundle-repository/build.gradle index 65f419fa36..89b55e9885 100644 --- a/build/osgi-bundle-repository/build.gradle +++ b/build/osgi-bundle-repository/build.gradle @@ -1,15 +1,7 @@ -buildscript { - dependencies { - classpath group: "nu.studer", name: "gradle-credentials-plugin", version: "1.0.7" - } - - repositories { - jcenter() - } +plugins { + id("nu.studer.credentials") version "3.0" } -apply plugin: "nu.studer.credentials" - task deployToS3(type:Exec) { args = ["target/repository", "eclipse", "liferay-ide-deps", "201904221700"] executable = "./deployToS3.sh" diff --git a/build/osgi-bundle-repository/deployToS3.sh b/build/osgi-bundle-repository/deployToS3.sh index 6216674898..442ad36c72 100755 --- a/build/osgi-bundle-repository/deployToS3.sh +++ b/build/osgi-bundle-repository/deployToS3.sh @@ -18,5 +18,5 @@ PACKAGE=$3 VERSION=$4 echo "uploading to version $VERSION ..." -s3cmd --no-mime-magic --acl-public --delete-removed --delete-after sync $REPO_PATH/ s3://devtools-s3.liferay.com/$REPO/$PACKAGE/$VERSION/ +gcloud storage rsync --recursive --delete-unmatched-destination-objects $REPO_PATH/ gs://liferay-devtools/$REPO/$PACKAGE/$VERSION/ echo \ No newline at end of file diff --git a/build/osgi-bundle-repository/gradle/wrapper/gradle-wrapper.jar b/build/osgi-bundle-repository/gradle/wrapper/gradle-wrapper.jar index 29953ea141..1b33c55baa 100644 Binary files a/build/osgi-bundle-repository/gradle/wrapper/gradle-wrapper.jar and b/build/osgi-bundle-repository/gradle/wrapper/gradle-wrapper.jar differ diff --git a/build/osgi-bundle-repository/gradle/wrapper/gradle-wrapper.properties b/build/osgi-bundle-repository/gradle/wrapper/gradle-wrapper.properties index ce17e26bbc..ca025c83a7 100644 --- a/build/osgi-bundle-repository/gradle/wrapper/gradle-wrapper.properties +++ b/build/osgi-bundle-repository/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists \ No newline at end of file +zipStorePath=wrapper/dists diff --git a/build/osgi-bundle-repository/gradlew b/build/osgi-bundle-repository/gradlew index cccdd3d517..23d15a9367 100755 --- a/build/osgi-bundle-repository/gradlew +++ b/build/osgi-bundle-repository/gradlew @@ -1,78 +1,129 @@ -#!/usr/bin/env sh +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -81,92 +132,120 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" fi +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + exec "$JAVACMD" "$@" diff --git a/build/osgi-bundle-repository/gradlew.bat b/build/osgi-bundle-repository/gradlew.bat index f9553162f1..5eed7ee845 100644 --- a/build/osgi-bundle-repository/gradlew.bat +++ b/build/osgi-bundle-repository/gradlew.bat @@ -1,84 +1,94 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/build/parent/pom.xml b/build/parent/pom.xml index f97c310547..71acdee2e5 100644 --- a/build/parent/pom.xml +++ b/build/parent/pom.xml @@ -27,20 +27,17 @@ Liferay IDE Parent - https://repository.liferay.com/nexus/content/repositories/liferay-public-snapshots/com/liferay/blade/com.liferay.blade.cli/7.0.6-SNAPSHOT/com.liferay.blade.cli-7.0.6-20250903.192012-3.jar - 23690badf90a065a62c266cc1df88d1c + https://repository.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/blade/com.liferay.blade.cli/8.0.0/com.liferay.blade.cli-8.0.0.jar + 0c99630b33c9a96c2205cea512ce5a1b https://repository-cdn.liferay.com/nexus/content/repositories/public/com/liferay/blade/com.liferay.blade.cli/3.9.2/com.liferay.blade.cli-3.9.2.jar 08aedcb6bacc3166060d0032f9489dd1 - https://us-east-1.linodeobjects.com/devtools-s3.liferay.com/liferay-ide-files/docs/code-upgrade-docs-20210312.zip - c4bce64c362ecffcce300f31e88b2e63 https://bndtools.org/bndtools.p2.repo/7.0.0/ https://download.eclipse.org/releases/2023-12/202312061001/ - https://us-east-1.linodeobjects.com/devtools-s3.liferay.com/eclipse/eclipse-wtp-xml-search/ https://download.eclipse.org/buildship/updates/e427/releases/3.x/3.1.8.v20231117-1658/ https://files.liferay.org.es/staged/public-files/liferay-ide/unstable/build/com.liferay.ide.testing-repository/target/repository/ https://download.eclipse.org/tools/orbit/downloads/drops/N20230908195041/repository - https://us-east-1.linodeobjects.com/devtools-s3.liferay.com/eclipse/sapphire/9.1.1/ - https://us-east-1.linodeobjects.com/devtools-s3.liferay.com/eclipse/liferay-ide-deps/201904221700/ + https://mirrors.ibiblio.org/eclipse/sapphire/9.1.1/repository/ + https://storage.googleapis.com/liferay-devtools/eclipse/liferay-ide-deps/201904221700/ false https://download.eclipse.org/technology/swtbot/releases/2.8.0/ https://download.eclipse.org/tm/updates/4.5.500/repository/ @@ -59,7 +56,7 @@ lide-deps p2 ${osgi-bundles-site} - + eclipse p2 @@ -70,11 +67,6 @@ p2 ${orbit-site} - - eclipse-xml-search - p2 - ${eclipse-xml-search-site} - bndtools p2 diff --git a/build/pom.xml b/build/pom.xml index 88fad47cd2..7f4621f427 100644 --- a/build/pom.xml +++ b/build/pom.xml @@ -43,31 +43,6 @@ installers - - upgradePlanner - - ../tools/features/com.liferay.ide.upgrade.planner - ../tools/plugins/com.liferay.ide.core - ../tools/plugins/com.liferay.ide.gradle.core - ../tools/plugins/com.liferay.ide.gradle.ui - ../tools/plugins/com.liferay.ide.project.core - ../tools/plugins/com.liferay.ide.project.ui - ../tools/plugins/com.liferay.ide.sdk.core - ../tools/plugins/com.liferay.ide.server.core - ../tools/plugins/com.liferay.ide.server.tomcat.core - ../tools/plugins/com.liferay.ide.server.tomcat.ui - ../tools/plugins/com.liferay.ide.server.ui - ../tools/plugins/com.liferay.ide.ui - ../tools/plugins/com.liferay.ide.upgrade.commands.core - ../tools/plugins/com.liferay.ide.upgrade.commands.ui - ../tools/plugins/com.liferay.ide.upgrade.plan.core - ../tools/plugins/com.liferay.ide.upgrade.plan.ui - ../tools/plugins/com.liferay.ide.upgrade.planner.ui - ../tools/plugins/com.liferay.ide.upgrade.problems.core - ../tools/plugins/com.liferay.ide.upgrade.problems.ui - com.liferay.ide.upgrade.planner-repository - - installersOnly diff --git a/jsdt/.gitignore b/jsdt/.gitignore deleted file mode 100644 index 541e88799a..0000000000 --- a/jsdt/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.project -/.settings diff --git a/jsdt/features/.gitignore b/jsdt/features/.gitignore deleted file mode 100644 index 541e88799a..0000000000 --- a/jsdt/features/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.project -/.settings diff --git a/jsdt/features/com.liferay.ide.alloy/.project b/jsdt/features/com.liferay.ide.alloy/.project deleted file mode 100644 index 22a82cb984..0000000000 --- a/jsdt/features/com.liferay.ide.alloy/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - com.liferay.ide.alloy - - - - - - org.eclipse.pde.FeatureBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.FeatureNature - - diff --git a/jsdt/features/com.liferay.ide.alloy/.settings/org.eclipse.m2e.core.prefs b/jsdt/features/com.liferay.ide.alloy/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/jsdt/features/com.liferay.ide.alloy/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/jsdt/features/com.liferay.ide.alloy/build.properties b/jsdt/features/com.liferay.ide.alloy/build.properties deleted file mode 100644 index 64f93a9f0b..0000000000 --- a/jsdt/features/com.liferay.ide.alloy/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/jsdt/features/com.liferay.ide.alloy/feature.xml b/jsdt/features/com.liferay.ide.alloy/feature.xml deleted file mode 100644 index 94b4a15b0c..0000000000 --- a/jsdt/features/com.liferay.ide.alloy/feature.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Liferay IDE AlloyUI includes javascript development tooling for AlloyUI framework including Tern integration, and css webresources feature. - - - - /** -* 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. -*/ - - - - Liferay IDE is free software distributed under the terms of the Lesser GNU Public License. See URL for full license text. http://www.gnu.org/licenses/lgpl-2.1.html - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jsdt/features/com.liferay.ide.alloy/pom.xml b/jsdt/features/com.liferay.ide.alloy/pom.xml deleted file mode 100644 index c2d1e0a69b..0000000000 --- a/jsdt/features/com.liferay.ide.alloy/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - 4.0.0 - - - com.liferay.ide.jsdt.features - jsdt-features - 3.10.6-SNAPSHOT - - - com.liferay.ide.alloy - eclipse-feature - - Liferay IDE AlloyUI Feature - - \ No newline at end of file diff --git a/jsdt/features/pom.xml b/jsdt/features/pom.xml deleted file mode 100644 index d15a981707..0000000000 --- a/jsdt/features/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - 4.0.0 - - - com.liferay.ide.jsdt - jsdt - 3.10.6-SNAPSHOT - - - com.liferay.ide.jsdt.features - jsdt-features - pom - - Liferay IDE JavaScript Features - - - com.liferay.ide.alloy - - \ No newline at end of file diff --git a/jsdt/plugins/.gitignore b/jsdt/plugins/.gitignore deleted file mode 100644 index 541e88799a..0000000000 --- a/jsdt/plugins/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.project -/.settings diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/.classpath b/jsdt/plugins/com.liferay.ide.alloy.core/.classpath deleted file mode 100644 index cf36b56119..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/.project b/jsdt/plugins/com.liferay.ide.alloy.core/.project deleted file mode 100644 index 6f3615c83b..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - com.liferay.ide.alloy.core - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/.settings/org.eclipse.jdt.core.prefs b/jsdt/plugins/com.liferay.ide.alloy.core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 0c68a61dca..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/.settings/org.eclipse.m2e.core.prefs b/jsdt/plugins/com.liferay.ide.alloy.core/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/META-INF/MANIFEST.MF b/jsdt/plugins/com.liferay.ide.alloy.core/META-INF/MANIFEST.MF deleted file mode 100644 index bf1e142669..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/META-INF/MANIFEST.MF +++ /dev/null @@ -1,26 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %bundle.name -Bundle-SymbolicName: com.liferay.ide.alloy.core;singleton:=true -Bundle-Version: 3.10.6.qualifier -Bundle-Activator: com.liferay.ide.alloy.core.AlloyCore -Bundle-Vendor: %bundle.vendor -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.core.resources, - com.liferay.ide.core, - org.eclipse.debug.core, - com.liferay.ide.project.core, - tern.eclipse.ide.core, - org.eclipse.core.filebuffers, - org.eclipse.core.filesystem, - org.eclipse.jst.jsp.core, - org.eclipse.wst.jsdt.core, - org.eclipse.wst.jsdt.web.core, - org.apache.commons.io, - tern.core, - org.eclipse.wst.html.core -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-ActivationPolicy: lazy -Export-Package: com.liferay.ide.alloy.core, - com.liferay.ide.alloy.core.jsp -Bundle-ClassPath: . diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/OSGI-INF/l10n/bundle.properties b/jsdt/plugins/com.liferay.ide.alloy.core/OSGI-INF/l10n/bundle.properties deleted file mode 100644 index b117b05c71..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/OSGI-INF/l10n/bundle.properties +++ /dev/null @@ -1,3 +0,0 @@ -#Properties file for com.liferay.ide.alloy.core -bundle.name = Liferay IDE AlloyUI Core -bundle.vendor = Liferay, Inc. \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/build.properties b/jsdt/plugins/com.liferay.ide.alloy.core/build.properties deleted file mode 100644 index bd9e34e191..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/ -output.. = target/classes/ -bin.includes = META-INF/,\ - .,\ - OSGI-INF/,\ - plugin.xml,\ - resources/ diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/plugin.xml b/jsdt/plugins/com.liferay.ide.alloy.core/plugin.xml deleted file mode 100644 index 3d72ee54f1..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/plugin.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/pom.xml b/jsdt/plugins/com.liferay.ide.alloy.core/pom.xml deleted file mode 100644 index 96d609087b..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - 4.0.0 - - - com.liferay.ide.jsdt.plugins - jsdt-plugins - 3.10.6-SNAPSHOT - - - com.liferay.ide.alloy.core - eclipse-plugin - - Liferay IDE Alloy Core - - \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/resources/layouttpl-6.1.css b/jsdt/plugins/com.liferay.ide.alloy.core/resources/layouttpl-6.1.css deleted file mode 100644 index e8a733939e..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/resources/layouttpl-6.1.css +++ /dev/null @@ -1,51 +0,0 @@ -/* - * !!!NOTICE!!! - * This file is a synthetic file created by Liferay IDE eclipse plugin to provide - * code assist and validation support for layout template files. Please don't edit - */ -.aui-w5 {} -.aui-w10 {} -.aui-w25 {} -.aui-w20 {} -.aui-w30 {} -.aui-w33 {} -.aui-w35 {} -.aui-w40 {} -.aui-w45 {} -.aui-w50 {} -.aui-w55 {} -.aui-w60 {} -.aui-w65 {} -.aui-w66 {} -.aui-w70 {} -.aui-w75 {} -.aui-w80 {} -.aui-w85 {} -.aui-w90 {} -.aui-w95 {} -.aui-w100 {} -.portlet-column {} -.portlet-column-first {} -.portlet-column-last {} -.portlet-column-only {} -.portlet-layout {} -#column-1 {} -#column-2 {} -#column-3 {} -#column-4 {} -#column-5 {} -#column-6 {} -#column-7 {} -#column-8 {} -#column-9 {} -#column-10 {} -#column-11 {} -#column-12 {} -#column-13 {} -#column-14 {} -#column-15 {} -#column-16 {} -#column-17 {} -#column-18 {} -#column-19 {} -#column-20 {} \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/resources/layouttpl-6.2.css b/jsdt/plugins/com.liferay.ide.alloy.core/resources/layouttpl-6.2.css deleted file mode 100644 index b87d823ea4..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/resources/layouttpl-6.2.css +++ /dev/null @@ -1,43 +0,0 @@ -/* - * !!!NOTICE!!! - * This file is a synthetic file created by Liferay IDE eclipse plugin to provide - * code assist and validation support for layout template files. Please don't edit - */ -.portlet-column {} -.portlet-column-first {} -.portlet-column-last {} -.portlet-column-only {} -.portlet-layout {} -.row-fluid {} -.span1 {} -.span2 {} -.span3 {} -.span4 {} -.span5 {} -.span6 {} -.span7 {} -.span8 {} -.span9 {} -.span10 {} -.span11 {} -.span12 {} -#column-1 {} -#column-2 {} -#column-3 {} -#column-4 {} -#column-5 {} -#column-6 {} -#column-7 {} -#column-8 {} -#column-9 {} -#column-10 {} -#column-11 {} -#column-12 {} -#column-13 {} -#column-14 {} -#column-15 {} -#column-16 {} -#column-17 {} -#column-18 {} -#column-19 {} -#column-20 {} \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/AlloyCore.java b/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/AlloyCore.java deleted file mode 100644 index b41862bf33..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/AlloyCore.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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 com.liferay.ide.alloy.core; - -import org.eclipse.core.runtime.ILog; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.core.runtime.Status; - -import org.osgi.framework.BundleContext; - -/** - * @author Gregory Amerson - */ -public class AlloyCore extends Plugin { - - public static final String PLUGIN_ID = "com.liferay.ide.alloy.core"; - - public static IStatus createErrorStatus(Exception ex) { - return new Status(IStatus.ERROR, PLUGIN_ID, ex.getMessage(), ex); - } - - public static IStatus createErrorStatus(String msg) { - return new Status(IStatus.ERROR, PLUGIN_ID, msg); - } - - public static IStatus createErrorStatus(String msg, Exception e) { - return new Status(IStatus.ERROR, PLUGIN_ID, msg, e); - } - - public static IStatus createWarningStatus(String msg) { - return new Status(IStatus.WARNING, PLUGIN_ID, msg); - } - - public static AlloyCore getDefault() { - return _plugin; - } - - public static void logError(Exception ex) { - ILog log = getDefault().getLog(); - - log.log(createErrorStatus(ex)); - } - - public static void logError(String msg) { - ILog log = getDefault().getLog(); - - log.log(createErrorStatus(msg)); - } - - public static void logError(String msg, Exception e) { - ILog log = getDefault().getLog(); - - log.log(createErrorStatus(msg, e)); - } - - public AlloyCore() { - } - - public void start(BundleContext context) throws Exception { - super.start(context); - - _plugin = this; - } - - public void stop(BundleContext context) throws Exception { - _plugin = null; - - super.stop(context); - } - - private static AlloyCore _plugin; - -} \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/LiferayProjectTernAdapter.java b/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/LiferayProjectTernAdapter.java deleted file mode 100644 index 3212603f79..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/LiferayProjectTernAdapter.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * 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 com.liferay.ide.alloy.core; - -import com.liferay.ide.project.core.util.ProjectUtil; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; - -import tern.eclipse.ide.core.DefaultTernModule; -import tern.eclipse.ide.core.IDefaultTernModulesProvider; -import tern.eclipse.ide.core.ITernNatureCapability; - -import tern.server.TernPlugin; - -/** - * @author Gregory Amerson - */ -public class LiferayProjectTernAdapter implements IDefaultTernModulesProvider, ITernNatureCapability { - - @Override - public Collection getTernModules(IProject project) { - Collection modules = new ArrayList<>(); - - // here manage your condition to add aui2.0.x - - modules.add(new DefaultTernModule(TernPlugin.aui2.getName())); - - return modules; - } - - @Override - public boolean hasTernNature(IProject project) throws CoreException { - return ProjectUtil.isPortletProject(project); - } - -} \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyContentDescriberForJSP.java b/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyContentDescriberForJSP.java deleted file mode 100644 index e5e5e83fcf..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyContentDescriberForJSP.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * 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 com.liferay.ide.alloy.core.jsp; - -import com.liferay.ide.core.LiferayNature; -import com.liferay.ide.core.util.CoreUtil; -import com.liferay.ide.project.core.util.ProjectUtil; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; - -import java.lang.reflect.Field; - -import org.eclipse.core.filesystem.IFileStore; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.runtime.ListenerList; -import org.eclipse.core.runtime.QualifiedName; -import org.eclipse.core.runtime.content.IContentDescription; -import org.eclipse.core.runtime.content.ITextContentDescriber; -import org.eclipse.jst.jsp.core.internal.contenttype.ContentDescriberForJSP; -import org.eclipse.jst.jsp.core.internal.provisional.contenttype.IContentDescriptionForJSP; -import org.eclipse.wst.sse.core.internal.encoding.IContentDescriptionExtended; - -/** - * @author Gregory Amerson - */ -@SuppressWarnings("restriction") -public class AlloyContentDescriberForJSP implements ITextContentDescriber { - - @Override - public int describe(InputStream contents, IContentDescription description) throws IOException { - int retval = new ContentDescriberForJSP().describe(contents, description); - - try { - Class contentsClass = contents.getClass(); - - Field inputStreamField = contentsClass.getDeclaredField("in"); - - inputStreamField.setAccessible(true); - - try (InputStream inputStream = (InputStream)inputStreamField.get(contents)) { - Class ipStream = inputStream.getClass(); - - Field fileStoreField = ipStream.getDeclaredField("target"); - - fileStoreField.setAccessible(true); - - IFileStore fileStore = (IFileStore)fileStoreField.get(inputStream); - - if (fileStore != null) { - IWorkspaceRoot root = CoreUtil.getWorkspaceRoot(); - - IFile[] files = root.findFilesForLocationURI(fileStore.toURI()); - - for (IFile file : files) { - if (ProjectUtil.isPortletProject(file.getProject()) || - LiferayNature.hasNature(file.getProject())) { - - return VALID; - } - } - } - } - } - catch (Exception e) { - } - - return retval; - } - - @Override - public int describe(Reader contents, IContentDescription description) throws IOException { - int retval = new ContentDescriberForJSP().describe(contents, description); - - try { - Class reader = contents.getClass(); - - Field documentReaderField = reader.getDeclaredField("in"); - - documentReaderField.setAccessible(true); - - Object documentReader = documentReaderField.get(contents); - - Class docReader = documentReader.getClass(); - - Field fDocumentField = docReader.getDeclaredField("fDocument"); - - fDocumentField.setAccessible(true); - - Object fDocument = fDocumentField.get(documentReader); - - Class documentClass = fDocument.getClass(); - - Class documentSuperClass = documentClass.getSuperclass(); - - Class superDocument = documentSuperClass.getSuperclass(); - - Field fDocumentListenersField = superDocument.getDeclaredField("fDocumentListeners"); - - fDocumentListenersField.setAccessible(true); - - ListenerList fDocumentListeners = (ListenerList)fDocumentListenersField.get(fDocument); - - Object[] listeners = fDocumentListeners.getListeners(); - - for (Object listener : listeners) { - try { - Class listenerClass = listener.getClass(); - - Class enclosingClass = listenerClass.getEnclosingClass(); - - Class superClass = enclosingClass.getSuperclass(); - - Field fFileField = superClass.getDeclaredField("fFile"); - - fFileField.setAccessible(true); - - // get enclosing instance of listener - - Field thisField = listenerClass.getDeclaredField("this$0"); - - thisField.setAccessible(true); - - Object enclosingObject = thisField.get(listener); - - Object fFile = fFileField.get(enclosingObject); - - if (fFile instanceof IFile) { - IFile file = (IFile)fFile; - - if (ProjectUtil.isPortletProject(file.getProject()) || - LiferayNature.hasNature(file.getProject())) { - - return VALID; - } - } - } - catch (Exception e) { - } - } - } - catch (Exception e) { - } - - return retval; - } - - @Override - public QualifiedName[] getSupportedOptions() { - return _SUPPORTED_OPTIONS; - } - - private static final QualifiedName[] _SUPPORTED_OPTIONS = { - IContentDescription.CHARSET, IContentDescription.BYTE_ORDER_MARK, IContentDescriptionExtended.DETECTED_CHARSET, - IContentDescriptionExtended.UNSUPPORTED_CHARSET, IContentDescriptionExtended.APPROPRIATE_DEFAULT, - IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE, IContentDescriptionForJSP.LANGUAGE_ATTRIBUTE, - IContentDescriptionForJSP.CONTENT_FAMILY_ATTRIBUTE - }; - -} \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJSPDocumentFactory.java b/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJSPDocumentFactory.java deleted file mode 100644 index 30ef9221ba..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJSPDocumentFactory.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * 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 com.liferay.ide.alloy.core.jsp; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.content.IContentType; -import org.eclipse.core.runtime.content.IContentTypeManager; -import org.eclipse.jface.text.IDocument; -import org.eclipse.wst.sse.core.internal.document.IDocumentLoader; -import org.eclipse.wst.sse.core.internal.filebuffers.BasicStructuredDocumentFactory; -import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler; -import org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry; -import org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument; - -/** - * @author Gregory Amerson - */ -@SuppressWarnings("restriction") -public class AlloyJSPDocumentFactory extends BasicStructuredDocumentFactory { - - @Override - public IDocument createDocument() { - IModelHandler handler = null; - - IContentTypeManager manager = Platform.getContentTypeManager(); - - IContentType contentType = manager.getContentType("com.liferay.ide.alloy.core.alloyjspsource"); - - while ((handler == null) && !IContentTypeManager.CT_TEXT.equals(contentType.getId())) { - ModelHandlerRegistry registry = ModelHandlerRegistry.getInstance(); - - handler = registry.getHandlerForContentTypeId(contentType.getId()); - - contentType = contentType.getBaseType(); - } - - if (handler != null) { - IDocumentLoader loader = handler.getDocumentLoader(); - - return loader.createNewStructuredDocument(); - } - - return new JobSafeStructuredDocument(); - } - -} \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJSPDocumentLoader.java b/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJSPDocumentLoader.java deleted file mode 100644 index 4adb16b57f..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJSPDocumentLoader.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * 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 com.liferay.ide.alloy.core.jsp; - -import org.eclipse.jface.text.IDocumentPartitioner; -import org.eclipse.jst.jsp.core.internal.encoding.JSPDocumentLoader; -import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker; -import org.eclipse.wst.sse.core.internal.ltk.parser.BlockTagParser; -import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser; -import org.eclipse.wst.sse.core.internal.provisional.document.IEncodedDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext; - -/** - * @author Gregory Amerson - */ -@SuppressWarnings("restriction") -public class AlloyJSPDocumentLoader extends JSPDocumentLoader { - - @Override - public IDocumentPartitioner getDefaultDocumentPartitioner() { - return new AlloyStructuredTextPartitionerForJSP(); - } - - @Override - protected IEncodedDocument newEncodedDocument() { - IEncodedDocument retval = super.newEncodedDocument(); - - if (retval instanceof IStructuredDocument) { - IStructuredDocument doc = (IStructuredDocument)retval; - - RegionParser parser = doc.getParser(); - - if (parser instanceof BlockTagParser) { - BlockTagParser blockParser = (BlockTagParser)parser; - - BlockMarker bm = new BlockMarker("aui:script", null, DOMRegionContext.BLOCK_TEXT, false); - - blockParser.addBlockMarker(bm); - } - } - - return retval; - } - -} \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJSPFileConfiguration.java b/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJSPFileConfiguration.java deleted file mode 100644 index 5f789f42d7..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJSPFileConfiguration.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 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 com.liferay.ide.alloy.core.jsp; - -import com.liferay.ide.project.core.util.ProjectUtil; - -import org.eclipse.core.resources.IFile; - -import tern.ITernFile; - -import tern.eclipse.ide.core.ITernFileConfiguration; - -import tern.server.protocol.html.ScriptTagRegion; - -/** - * @author Gregory Amerson - */ -public class AlloyJSPFileConfiguration implements ITernFileConfiguration { - - @Override - public ScriptTagRegion[] getScriptTags(ITernFile ternFile) { - if (ternFile == null) { - return null; - } - - Object file = ternFile.getAdapter(IFile.class); - - IFile iFile = (IFile)file; - - if ((file instanceof IFile) && ProjectUtil.isPortletProject(iFile.getProject())) { - return _tags; - } - - return null; - } - - private static final ScriptTagRegion[] _tags = {ScriptTagRegion.SCRIPT_TAG, new ScriptTagRegion("aui:script")}; - -} \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJsTranslation.java b/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJsTranslation.java deleted file mode 100644 index 05e14f558a..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJsTranslation.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 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 com.liferay.ide.alloy.core.jsp; - -import org.eclipse.wst.jsdt.core.IJavaScriptProject; -import org.eclipse.wst.jsdt.web.core.javascript.IJsTranslation; -import org.eclipse.wst.jsdt.web.core.javascript.IJsTranslator; -import org.eclipse.wst.jsdt.web.core.javascript.JsTranslation; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; - -/** - * @author Gregory Amerson - */ -@SuppressWarnings("restriction") -public class AlloyJsTranslation extends JsTranslation { - - public AlloyJsTranslation() { - } - - public AlloyJsTranslation(IStructuredDocument doc, IJavaScriptProject project, boolean listen) { - super(doc, project, listen); - } - - @Override - public IJsTranslation getInstance(IStructuredDocument doc, IJavaScriptProject project, boolean listen) { - return new AlloyJsTranslation(doc, project, listen); - } - - public IJsTranslator getTranslator() { - if (fTranslator != null) { - return fTranslator; - } - - fTranslator = new AlloyJsTranslator(fHtmlDocument, fModelBaseLocation, listenForChanges); - - return fTranslator; - } - -} \ No newline at end of file diff --git a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJsTranslator.java b/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJsTranslator.java deleted file mode 100644 index bd10de01df..0000000000 --- a/jsdt/plugins/com.liferay.ide.alloy.core/src/com/liferay/ide/alloy/core/jsp/AlloyJsTranslator.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * 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 com.liferay.ide.alloy.core.jsp; - -import java.util.Iterator; - -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.Position; -import org.eclipse.wst.jsdt.web.core.internal.Logger; -import org.eclipse.wst.jsdt.web.core.javascript.JsDataTypes; -import org.eclipse.wst.jsdt.web.core.javascript.JsTranslator; -import org.eclipse.wst.jsdt.web.core.javascript.NodeHelper; -import org.eclipse.wst.jsdt.web.core.javascript.Util; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList; -import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext; - -/** - * @author Gregory Amerson - */ -@SuppressWarnings("restriction") -public class AlloyJsTranslator extends JsTranslator { - - public static final String[] ALLOYATTREVENTS = { - "onActiveStateChange", "onBlurMethod", "onBoundingBoxChange", "onChange", "onChangeMethod", - "onClassNamesChange", "onClick", "onContentBoxChange", "onContentUpdate", "onCssClassChange", - "onDefaultStateChange", "onDepthChange", "onDestroy", "onDestroyedChange", "onDisabledChange", - "onFocusedChange", "onFocusMethod", "onHandlerChange", "onHeightChange", "onHideClassChange", - "onHoverStateChange", "onIconChange", "onIconNodeChange", "onIdChange", "onIndexChange", "onInit", - "onInitializedChange", "onLabelChange", "onLabelNodeChange", "onlyActions", "onParentChange", "onRender", - "onRenderChange", "onRenderedChange", "onRootChange", "onSelectedChange", "onSrcNodeChange", "onStringsChange", - "onSubmit", "onTabIndexChange", "onTitleChange", "onTypeChange", "onUseARIAChange", "onVisibleChange", - "onWidthChange" - }; - - public AlloyJsTranslator(IStructuredDocument doc, String baseLocation, boolean listen) { - super(doc, baseLocation, listen); - } - - public void translate() { - synchronized (finished) { - if (getCurrentNode() != null) { - NodeHelper nh = new NodeHelper(getCurrentNode()); - - while ((getCurrentNode() != null) && !isCanceled()) { - nh.setDocumentRegion(getCurrentNode()); - - if (getCurrentNode().getType() == DOMRegionContext.XML_TAG_NAME) { - if ((!nh.isEndTag() || nh.isSelfClosingTag()) && - (nh.nameEquals("script") || nh.nameEquals("aui:script"))) { - - /** - * Handles the following cases: - - <% - String apiURL = protocol + "://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=Liferay.Maps.onGMapsReady"; - if (Validator.isNotNull(googleMapDisplayContext.getGoogleMapsAPIKey())) { - apiURL += "&key=" + googleMapDisplayContext.getGoogleMapsAPIKey(); - } - %> - - - - - - var MapControls = Liferay.MapBase.CONTROLS; - - var mapConfig = { - boundingBox: '#<%= name %>Map', - - - - - controls: [MapControls.HOME, MapControls.SEARCH], - - - controls: [MapControls.HOME, MapControls.PAN, MapControls.SEARCH, MapControls.TYPE, MapControls.ZOOM], - - - - - - data: <%= points %>, - - - geolocation: <%= geolocation %> - - - ,position: { - location: { - lat: <%= latitude %>, - lng: <%= longitude %> - } - } - - }; - - var destroyMap = function(event, map) { - if (event.portletId === '<%= portletDisplay.getId() %>') { - map.destructor(); - - Liferay.detach('destroyPortlet', destroyMap); - } - }; - - var createMap = function() { - var map = new MapGoogleMaps.default(mapConfig); - - Liferay.MapBase.register('<%= name %>', map); - - Liferay.on( - 'destroyPortlet', - function(event) { - destroyMap(event, map); - } - ); - }; - - if (Liferay.Maps.gmapsReady) { - createMap(); - } - else { - Liferay.once('gmapsReady', createMap); - } - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/imports/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/imports/view.jsp deleted file mode 100644 index 218bbaf16b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/imports/view.jsp +++ /dev/null @@ -1,205 +0,0 @@ - - -<%@ page language="Java" import="java.net.*,java.io.*,javax.net.ssl.HttpsURLConnection,java.util.*, javax.xml.parsers.*, org.w3c.dom.Document, -com.liferay.portal.model.UserGroup, com.liferay.portal.model.Role, com.liferay.portal.model.Portlet, com.liferay.portal.util.PortletKeys, javax.portlet.PortletPreferences, -com.liferay.portal.service.PortletPreferencesLocalServiceUtil, com.liferay.portal.service.LayoutLocalServiceUtil"%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - - -<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%> - - - - -<%@include file="/jsp/init.jsp"%> - - - - -<% - System.out.println(" --- Establishing Qlikview Connection ---"); - - String internalServer = GetterUtil.getString(initInternalServer); //"https://srv-ess-qlik1"; - String externalServer = GetterUtil.getString(initExternalServer); //"https://esp.usdoj.gov"; - String targetURL = GetterUtil.getString(initTargetURL); - - String qlikviewPath = GetterUtil.getString(initQlikviewPath);//"qlikview"; - String qvAJAXPath = GetterUtil.getString(initQVAJAXPath);//"QvAJAXZfc"; - - boolean useTargetURL = Boolean.parseBoolean( GetterUtil.getString(initUseTargetURL) ); - boolean displayConnectionContent = Boolean.parseBoolean( GetterUtil.getString(initDisplayConnectionContent) ); - - //String useTargetURL = GetterUtil.getString(initUseTargetURL); - //String displayConnectionContent = GetterUtil.getString(initDisplayConnectionContent); - - System.out.println("useTargetURL: "+useTargetURL); - System.out.println("displayConnectionContent: "+displayConnectionContent); - - try - { - if(user != null) - { - //User Info (client) - String userId = user.getFullName(); - String loginID = user.getLogin(); //Currently being used with QV. - String userName = user.getFullName(); - String userEmail = user.getEmailAddress(); - - System.out.println("Web Ticket for: " + loginID); - - - //Groups - String latestUserGroup = GetterUtil.getString(origUserGroup); - //out.println("Authorized UserGroup: "+ latestUserGroup); - System.out.println("Authorized UserGroup: "+ latestUserGroup); - - List groups = user.getUserGroups(); - boolean authorized = false; - for (UserGroup group : groups) - { - //Check if authorized - if( group.getGroup().getDescriptiveName().equalsIgnoreCase(latestUserGroup) )// || group.getGroup().getDescriptiveName().equalsIgnoreCase("Non LEA")) - authorized = true; - } - - - //Roles - List roles = user.getRoles(); - boolean isAdmin = false; - for (Role role : roles) - { - //Check if Admin - if( role.getDescriptiveName().equalsIgnoreCase("Administrator") ) - isAdmin = true; - } - - - //User Authorized for Portlet Content? - if(authorized) - { - //if Admin, display content - if(isAdmin && displayConnectionContent) - { - System.out.println("- Admin User - Displaying Connection Content"); - out.println("
"); - } - else//otherwise use a non-display div - out.println("
"); - - out.println("
"); - out.println("Authorized!"); - out.println("
"); - - - - //WebTicket Generation - String qvWebTicket = generateWebTicket(internalServer, qvAJAXPath, loginID); - System.out.println("Web Ticket Received: " + qvWebTicket); - - //Qlikview Authentication - String qvAuthenticateURL = generateAuthenticationURL(externalServer, qlikviewPath, qvAJAXPath, qvWebTicket); - - - //Execute Authentication (from client) - out.println("
"); - - - //Display Target Document - if (useTargetURL) - { - System.out.println("Displaying: "+targetURL); - out.println(""); - } - - } - else - { - out.println("User Not Authorized"); - System.out.println("User NOT Authorized, must be part of UserGroup: "+ latestUserGroup); - } - } - else - { - //out.println("You have not been Authenticated!"); - - System.out.println("\n*** Someone has tried accessing QlikView Without Authenticating - Unknown Client Denied ***\n"); - } - - } - catch ( Exception e ) - { - e.printStackTrace(); - } -%> - - - - -<%! - - public String generateWebTicket(String internalServer, String qvAJAXPath, String userID) - { - String ticket = null; - - try - { - //URL for WebTicket - URL webTicketURL = new URL( internalServer + "/" + qvAJAXPath + "/GetWebTicket.aspx" ); //new URL( internalServer + "/QvAJAXZfc/GetWebTicket.aspx" ); - //System.out.println("User Web Ticket URL: " + webTicketURL); - - HttpsURLConnection qlikViewUrlConn = (HttpsURLConnection)webTicketURL.openConnection(); - qlikViewUrlConn.setRequestMethod( "POST" ); - qlikViewUrlConn.setDoOutput( true ); - qlikViewUrlConn.setUseCaches( false ); - qlikViewUrlConn.setRequestProperty( "Content-Type", "text/xml;charset=utf-8" ); - - String webTicketXML = "" + userID + " test true" ; - qlikViewUrlConn.setRequestProperty("Content-length", webTicketXML.length()+""); - - OutputStreamWriter wr = new OutputStreamWriter( qlikViewUrlConn.getOutputStream() ); - wr.write( webTicketXML ); - wr.flush(); - - int responseCode = qlikViewUrlConn.getResponseCode(); - String responseMsg = qlikViewUrlConn.getResponseMessage(); - - - //System Output - System.out.println("POST: "+ webTicketURL); - //System.out.println("Post parameters : " + urlParameters); - System.out.println("RESPONSE: "+ responseCode +", "+ responseMsg); - //System.out.println("Response Message : " + responseMsg); - - - DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - Document document = documentBuilder.parse( qlikViewUrlConn.getInputStream() ); - - if ( document.getDocumentElement().getFirstChild() != null && document.getDocumentElement().getFirstChild().getFirstChild() != null ) - ticket = document.getDocumentElement().getFirstChild().getFirstChild().getNodeValue(); - - //System.out.println("The Web Ticket received for the user - '" + userId + "' is : " + ticket); - } - catch(Exception e) - { e.printStackTrace(); } - - return ticket; - } - - - - public String generateAuthenticationURL(String externalServer, String qlikviewPath, String qvAJAXPath, String ticket) - { - //URL for initial qlikview authentication (with default acces point) - String accessPointURL = externalServer + "/" + qlikviewPath + "/"; //"https://srv-pps-qlik/qlikview"; - String qvAuthenticateURL = externalServer + "/" + qvAJAXPath + "/Authenticate.aspx?type=html&webticket=" + ticket + "&try=" + accessPointURL + "?webticket=" + ticket; - - //Logging - //System.out.println("Ticket Assigend: " + ticket); - System.out.println("Establishing Client Handshake: " + qvAuthenticateURL +"\n"); - - - return qvAuthenticateURL; - } - -%> diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/input-date/page.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/input-date/page.jsp deleted file mode 100644 index be5d27ea65..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/input-date/page.jsp +++ /dev/null @@ -1,311 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/html/taglib/init.jsp" %> - -<% -String randomNamespace = PortalUtil.generateRandomKey(request, "taglib_ui_input_date_page") + StringPool.UNDERLINE; -if (GetterUtil.getBoolean((String)request.getAttribute("liferay-ui:input-date:disableNamespace"))) { - namespace = StringPool.BLANK; -} -String cssClass = GetterUtil.getString((String)request.getAttribute("liferay-ui:input-date:cssClass")); -String dateTogglerCheckboxLabel = GetterUtil.getString((String)request.getAttribute("liferay-ui:input-date:dateTogglerCheckboxLabel"), "disable"); -boolean disabled = GetterUtil.getBoolean((String)request.getAttribute("liferay-ui:input-date:disabled")); -String dayParam = GetterUtil.getString((String)request.getAttribute("liferay-ui:input-date:dayParam")); -int dayValue = GetterUtil.getInteger((String)request.getAttribute("liferay-ui:input-date:dayValue")); -int firstDayOfWeek = GetterUtil.getInteger((String)request.getAttribute("liferay-ui:input-date:firstDayOfWeek")); -Date firstEnabledDate = GetterUtil.getDate(request.getAttribute("liferay-ui:input-date:firstEnabledDate"), DateFormatFactoryUtil.getDate(locale), null); -String formName = GetterUtil.getString((String)request.getAttribute("liferay-ui:input-date:formName")); -Date lastEnabledDate = GetterUtil.getDate(request.getAttribute("liferay-ui:input-date:lastEnabledDate"), DateFormatFactoryUtil.getDate(locale), null); -String monthParam = GetterUtil.getString((String)request.getAttribute("liferay-ui:input-date:monthParam")); -int monthValue = GetterUtil.getInteger((String)request.getAttribute("liferay-ui:input-date:monthValue")); -String name = GetterUtil.getString((String)request.getAttribute("liferay-ui:input-date:name")); -boolean nullable = GetterUtil.getBoolean((String)request.getAttribute("liferay-ui:input-date:nullable")); -boolean required = GetterUtil.getBoolean((String)request.getAttribute("liferay-ui:input-date:required")); -boolean showDisableCheckbox = GetterUtil.getBoolean((String)request.getAttribute("liferay-ui:input-date:showDisableCheckbox")); -String yearParam = GetterUtil.getString((String)request.getAttribute("liferay-ui:input-date:yearParam")); -int yearValue = GetterUtil.getInteger((String)request.getAttribute("liferay-ui:input-date:yearValue")); -String dayParamId = namespace + HtmlUtil.getAUICompatibleId(dayParam); -String monthParamId = namespace + HtmlUtil.getAUICompatibleId(monthParam); -String nameId = namespace + HtmlUtil.getAUICompatibleId(name); -String yearParamId = namespace + HtmlUtil.getAUICompatibleId(yearParam); -Calendar calendar = CalendarFactoryUtil.getCalendar(yearValue, monthValue, dayValue); -String mask = _MASK_YMD; -String simpleDateFormatPattern = _SIMPLE_DATE_FORMAT_PATTERN_HTML5; -if (!BrowserSnifferUtil.isMobile(request)) { - DateFormat shortDateFormat = DateFormat.getDateInstance(DateFormat.SHORT, locale); - SimpleDateFormat shortDateFormatSimpleDateFormat = (SimpleDateFormat)shortDateFormat; - simpleDateFormatPattern = shortDateFormatSimpleDateFormat.toPattern(); - simpleDateFormatPattern = simpleDateFormatPattern.replaceAll("yyyy", "yy"); - simpleDateFormatPattern = simpleDateFormatPattern.replaceAll("MM", "M"); - simpleDateFormatPattern = simpleDateFormatPattern.replaceAll("dd", "d"); - simpleDateFormatPattern = simpleDateFormatPattern.replaceAll("yy", "yyyy"); - simpleDateFormatPattern = simpleDateFormatPattern.replaceAll("M", "MM"); - simpleDateFormatPattern = simpleDateFormatPattern.replaceAll("d", "dd"); - mask = simpleDateFormatPattern; - mask = mask.replaceAll("yyyy", "%Y"); - mask = mask.replaceAll("MM", "%m"); - mask = mask.replaceAll("dd", "%d"); -} -String dayAbbreviation = LanguageUtil.get(resourceBundle, "day-abbreviation"); -String monthAbbreviation = LanguageUtil.get(resourceBundle, "month-abbreviation"); -String yearAbbreviation = LanguageUtil.get(resourceBundle, "year-abbreviation"); -String[] dateAbbreviations = {"M", "d", "y"}; -String[] localizedDateAbbreviations = {monthAbbreviation, dayAbbreviation, yearAbbreviation}; -String placeholderValue = StringUtil.replace(simpleDateFormatPattern, dateAbbreviations, localizedDateAbbreviations); -boolean nullDate = false; -if (nullable && !required && (dayValue == 0) && (monthValue == -1) && (yearValue == 0)) { - nullDate = true; -} -String dateString = null; -Format format = FastDateFormatFactoryUtil.getSimpleDateFormat(simpleDateFormatPattern, locale); -if (nullable && nullDate) { - dateString = StringPool.BLANK; -} -else { - dateString = format.format(calendar.getTime()); -} -%> - - - - - - - - id="<%= nameId %>" name="<%= namespace + HtmlUtil.escapeAttribute(name) %>" type="date" value="<%= format.format(calendar.getTime()) %>" /> - - - - - function(val) { - return AUI().use('aui-datatype-date-parse').Parsers.date('<%= mask %>', val); - } - - - - - - id="<%= dayParamId %>" name="<%= namespace + HtmlUtil.escapeAttribute(dayParam) %>" type="hidden" value="<%= dayValue %>" /> - id="<%= monthParamId %>" name="<%= namespace + HtmlUtil.escapeAttribute(monthParam) %>" type="hidden" value="<%= monthValue %>" /> - id="<%= yearParamId %>" name="<%= namespace + HtmlUtil.escapeAttribute(yearParam) %>" type="hidden" value="<%= yearValue %>" /> - - <% - DateFormat shortDateFormat = DateFormat.getDateInstance(DateFormat.SHORT, locale); - SimpleDateFormat shortDateFormatSimpleDateFormat = (SimpleDateFormat)shortDateFormat; - %> - - - - - - <% - String dateTogglerCheckboxName = TextFormatter.format(dateTogglerCheckboxLabel, TextFormatter.M); - %> - - - - - var checkbox = $('#<%= namespace + randomNamespace + dateTogglerCheckboxName %>'); - - checkbox.on( - 'click mouseover', - function(event) { - var checked = checkbox.prop('checked'); - - var form = $(document.forms.<%= namespace + formName %>); - - if (!form.length) { - form = $(checkbox.prop('form')); - } - - var dayField = form.fm('<%= HtmlUtil.escapeJS(dayParam) %>'); - var inputDateField = form.fm('<%= HtmlUtil.getAUICompatibleId(name) %>'); - var monthField = form.fm('<%= HtmlUtil.escapeJS(monthParam) %>'); - var yearField = form.fm('<%= HtmlUtil.escapeJS(yearParam) %>'); - - inputDateField.prop('disabled', checked); - dayField.prop('disabled', checked); - monthField.prop('disabled', checked); - yearField.prop('disabled', checked); - - if (checked) { - inputDateField.val(''); - dayField.val(''); - monthField.val(''); - yearField.val(''); - } - } - ); - - - - - Liferay.component( - '<%= nameId %>DatePicker', - function() { - var datePicker = new A.DatePicker<%= BrowserSnifferUtil.isMobile(request) ? "Native" : StringPool.BLANK %>( - { - calendar: { - - <% - String calendarOptions = StringPool.BLANK; - if (lastEnabledDate != null) { - calendarOptions += String.format("maximumDate: new Date(%s)", lastEnabledDate.getTime()); - } - if (firstEnabledDate != null) { - if (Validator.isNotNull(calendarOptions)) { - calendarOptions += StringPool.COMMA; - } - calendarOptions += String.format("minimumDate: new Date(%s)", firstEnabledDate.getTime()); - } - if (firstDayOfWeek != -1) { - if (Validator.isNotNull(calendarOptions)) { - calendarOptions += StringPool.COMMA; - } - calendarOptions += String.format("'strings.first_weekday': %d", firstDayOfWeek); - } - %> - - <%= calendarOptions %> - }, - container: '#<%= randomNamespace %>displayDate', - mask: '<%= mask %>', - on: { - disabledChange: function(event) { - var instance = this; - - var container = instance.get('container'); - - var newVal = event.newVal; - - container.one('#<%= dayParamId %>').attr('disabled', newVal); - container.one('#<%= monthParamId %>').attr('disabled', newVal); - container.one('#<%= nameId %>').attr('disabled', newVal); - container.one('#<%= yearParamId %>').attr('disabled', newVal); - }, - enterKey: function(event) { - var instance = this; - - var inputVal = instance.get('activeInput').val(); - - var date = instance.getParsedDatesFromInputValue(inputVal); - - if (date) { - datePicker.updateValue(date[0]); - } - else if (<%= nullable %> && !date) { - datePicker.updateValue(''); - } - }, - selectionChange: function(event) { - var newSelection = event.newSelection[0]; - - var nullable = <%= nullable %>; - - var date = A.DataType.Date.parse(newSelection); - var invalidNumber = isNaN(newSelection); - - if ((invalidNumber && !nullable) || (invalidNumber && !date && nullable && newSelection)) { - event.newSelection[0] = new Date(); - } - - var updatedVal = ''; - - if (event.newSelection[0]) { - updatedVal = event.newSelection[0]; - } - - datePicker.updateValue(updatedVal); - } - }, - popover: { - zIndex: Liferay.zIndex.POPOVER - }, - trigger: '#<%= nameId %>' - } - ); - - datePicker.getDate = function() { - var instance = this; - - var container = instance.get('container'); - - return new Date(container.one('#<%= yearParamId %>').val(), container.one('#<%= monthParamId %>').val(), container.one('#<%= dayParamId %>').val()); - }; - - datePicker.updateValue = function(date) { - var instance = this; - - var container = instance.get('container'); - - var dateVal = ''; - var monthVal = ''; - var yearVal = ''; - - if (date && !isNaN(date)) { - dateVal = date.getDate(); - monthVal = date.getMonth(); - yearVal = date.getFullYear(); - } - - container.one('#<%= dayParamId %>').val(dateVal); - container.one('#<%= monthParamId %>').val(monthVal); - container.one('#<%= yearParamId %>').val(yearVal); - }; - - datePicker.after( - 'selectionChange', - function(event) { - var input = A.one('#<%= nameId %>'); - - if (input) { - var form = input.get('form'); - - var formId = form.get('id'); - - var formInstance = Liferay.Form.get(formId); - - if (formInstance && formInstance.formValidator) { - formInstance.formValidator.validateField('<%= namespace + HtmlUtil.escapeAttribute(name) %>'); - } - } - } - ); - - Liferay.once( - 'screenLoad', - function() { - datePicker.destroy(); - } - ); - - return datePicker; - } - ); - - Liferay.component('<%= nameId %>DatePicker'); - - -<%! -private static final String _SIMPLE_DATE_FORMAT_PATTERN_HTML5 = "yyyy-MM-dd"; -private static final String _MASK_YMD = "%Y/%m/%d"; -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/journal-article-tags/JournalArticleTagsTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/journal-article-tags/JournalArticleTagsTest.jsp deleted file mode 100644 index 29e8b8de81..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/journal-article-tags/JournalArticleTagsTest.jsp +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - Welcome to our site. We maintain this web site as a service to our members. By using our site, you are agreeing to comply with and be bound by the following terms of use. Please review the following terms carefully. If you do not agree to these terms, you should not use this site. - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jqueryNoLongerDefaultInclude/jqueryNoLongerDefaultIncludeTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jqueryNoLongerDefaultInclude/jqueryNoLongerDefaultIncludeTest.jsp deleted file mode 100644 index dae6366ac8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jqueryNoLongerDefaultInclude/jqueryNoLongerDefaultIncludeTest.jsp +++ /dev/null @@ -1,53 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -LayoutPrototype layoutPrototype = (LayoutPrototype)request.getAttribute("edit_layout_prototype.jsp-layoutPrototype"); -String redirect = (String)request.getAttribute("edit_layout_prototype.jsp-redirect"); - -int mergeFailCount = SitesUtil.getMergeFailCount(layoutPrototype); -%> - - - - <% - String randomNamespace = PortalUtil.generateRandomKey(request, "portlet_layout_prototypes_merge_alert") + StringPool.UNDERLINE; - %> - - - - - - - - - - - AUI.$('#<%= randomNamespace %>resetButton').on( - 'click', - function(event) { - - - - - - submitForm(document.hrefFm, '<%= resetMergeFailCountURL.toString() %>'); - } - ); - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/META-INF/custom_jsps/html/portlet/search/dependencies/facet_configuration.json b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/META-INF/custom_jsps/html/portlet/search/dependencies/facet_configuration.json deleted file mode 100644 index bc1a9ef3e8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/META-INF/custom_jsps/html/portlet/search/dependencies/facet_configuration.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - facets: [ - { - className: 'com.liferay.portal.kernel.search.facet.ScopeFacet', - data: { - frequencyThreshold: 1, - maxTerms: 10, - showAssetCount: true - }, - displayStyle: 'scopes', - fieldName: 'groupId', - label: 'site', - order: 'OrderHitsDesc', - static: false, - weight: 1.6 - }, - { - className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet', - data: { - frequencyThreshold: 1, - values: [ - 'com.liferay.portal.model.User', - 'com.liferay.portlet.bookmarks.model.BookmarksEntry', - 'com.liferay.portlet.bookmarks.model.BookmarksFolder', - 'com.liferay.portlet.blogs.model.BlogsEntry', - 'com.liferay.portlet.documentlibrary.model.DLFileEntry', - 'com.liferay.portlet.documentlibrary.model.DLFolder', - 'com.liferay.portlet.journal.model.JournalArticle', - 'com.liferay.portlet.journal.model.JournalFolder', - 'com.liferay.portlet.messageboards.model.MBMessage', - 'com.liferay.portlet.wiki.model.WikiPage', - 'org.liferay.jukebox.model.Song', - 'org.liferay.jukebox.model.Artist', - 'org.liferay.jukebox.model.Album' - ] - }, - displayStyle: 'asset_entries', - fieldName: 'entryClassName', - label: 'asset-type', - order: 'OrderHitsDesc', - static: false, - weight: 1.5 - }, - { - className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet', - data: { - displayStyle: 'list', - frequencyThreshold: 1, - maxTerms: 10, - showAssetCount: true - }, - displayStyle: 'asset_tags', - fieldName: 'assetTagNames', - label: 'tag', - order: 'OrderHitsDesc', - static: false, - weight: 1.4 - }, - { - className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet', - data: { - displayStyle: 'list', - frequencyThreshold: 1, - maxTerms: 10, - showAssetCount: true - }, - displayStyle: 'asset_tags', - fieldName: 'assetCategoryTitles', - label: 'category', - order: 'OrderHitsDesc', - static: false, - weight: 1.3 - }, - { - className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet', - data: { - frequencyThreshold: 1, - maxTerms: 10, - showAssetCount: true - }, - displayStyle: 'folders', - fieldName: 'folderId', - label: 'folder', - order: 'OrderHitsDesc', - static: false, - weight: 1.2 - }, - { - className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet', - data: { - frequencyThreshold: 1, - maxTerms: 10, - showAssetCount: true - }, - displayStyle: 'users', - fieldName: 'userId', - label: 'user', - order: 'OrderHitsDesc', - static: false, - weight: 1.1 - }, - { - className: 'com.liferay.portal.kernel.search.facet.ModifiedFacet', - data: { - frequencyThreshold: 0, - ranges: [ - { - label:'past-hour', - range:'[past-hour TO *]' - }, - { - label:'past-24-hours', - range:'[past-24-hours TO *]' - }, - { - label:'past-week', - range:'[past-week TO *]' - }, - { - label:'past-month', - range:'[past-month TO *]' - }, - { - label:'past-year', - range:'[past-year TO *]' - } - ] - }, - displayStyle: 'modified', - fieldName: 'modified', - label: 'modified', - order: 'OrderHitsDesc', - static: false, - weight: 1.0 - }, - { - "className": "com.liferay.portal.kernel.search.facet.MultiValueFacet", - "data": { - "maxTerms": 10, - "displayStyle": "list", - "frequencyThreshold": 1, - "showAssetCount": true - }, - "displayStyle": "artist", - "fieldName": "artistId", - "label": "artist", - "order": "OrderHitsDesc", - "static": false, - "weight": 1.3 - } - ] -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/META-INF/custom_jsps/html/portlet/search/facets/artist.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/META-INF/custom_jsps/html/portlet/search/facets/artist.jsp deleted file mode 100644 index 01a2743e68..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/META-INF/custom_jsps/html/portlet/search/facets/artist.jsp +++ /dev/null @@ -1,125 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/html/portlet/search/facets/init.jsp" %> - -<%@ page import="com.liferay.portal.kernel.repository.model.FileEntry" %> -<%@ page import="com.liferay.portal.model.Repository" %> -<%@ page import="com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil" %> -<%@ page import="com.liferay.portlet.documentlibrary.model.DLFolderConstants" %> -<%@ page import="com.liferay.portlet.documentlibrary.util.DLUtil" %> - -<% -if (termCollectors.isEmpty()) { - return; -} - -int frequencyThreshold = dataJSONObject.getInt("frequencyThreshold"); -int maxTerms = dataJSONObject.getInt("maxTerms", 10); -boolean showAssetCount = dataJSONObject.getBoolean("showAssetCount", true); - -Indexer indexer = IndexerRegistryUtil.getIndexer("org.liferay.jukebox.model.Artist"); -%> - -
- - -
    -
  • "> - -
  • - - <% - long artistId = GetterUtil.getLong(fieldParam); - - for (int i = 0; i < termCollectors.size(); i++) { - TermCollector termCollector = termCollectors.get(i); - - long curArtistId = GetterUtil.getLong(termCollector.getTerm()); - - SearchContext searchContext = SearchContextFactory.getInstance(request); - - searchContext.setAttribute("artistId", curArtistId); - searchContext.setKeywords(StringPool.BLANK); - - Hits results = indexer.search(searchContext); - - if (results.getLength() == 0) { - continue; - } - - Document document = results.doc(0); - - String artistName = document.get(Field.TITLE); - %> - - - - Liferay.Search.tokenList.add( - { - clearFields: '<%= renderResponse.getNamespace() + facet.getFieldId() %>', - text: '<%= artistName %>' - } - ); - - - - <% - if (((maxTerms > 0) && (i >= maxTerms)) || ((frequencyThreshold > 0) && (frequencyThreshold > termCollector.getFrequency()))) { - break; - } - %> - -
  • "> - <%= HtmlUtil.escape(artistName) %> (<%= termCollector.getFrequency() %>) -
  • - - <% - } - %> - -
-
- - - -<%! -protected String getImageURL(long artistId, ThemeDisplay themeDisplay) throws SystemException { - Repository repository = PortletFileRepositoryUtil.fetchPortletRepository(themeDisplay.getScopeGroupId(), "JukeboxPortletRepository"); - - try { - if (repository != null) { - FileEntry fileEntry = PortletFileRepositoryUtil.getPortletFileEntry(repository.getRepositoryId(), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, String.valueOf(artistId)); - - return DLUtil.getPreviewURL(fileEntry, fileEntry.getLatestFileVersion(), themeDisplay, StringPool.BLANK); - } - } - catch (Exception e) { - } - - return themeDisplay.getPortalURL() + "/jukebox-portlet/images/singer2.jpeg"; -} -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-display.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index ca65079825..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-hook.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-hook.xml deleted file mode 100644 index 7a69d24c4d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-hook.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - content/Language.properties - content/Language_es.properties - content/Language_en.properties - /META-INF/custom_jsps - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-plugin-package.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 89a679a71b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,18 +0,0 @@ -name=JukeBox -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=\ - jstl-api.jar,\ - jstl-impl.jar - -portal-dependency-tlds=\ - c.tld \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index 32a11fce6b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - artists - /icons/artists.png - com.liferay.portal.kernel.portlet.DefaultConfigurationAction - org.liferay.jukebox.util.ArtistIndexer - org.liferay.jukebox.lar.JukeboxPortletDataHandler - org.liferay.jukebox.template.ArtistsPortletDisplayTemplateHandler - org.liferay.jukebox.asset.ArtistAssetRendererFactory - false - true - /css/jukebox.css - /css/inlineplayer.css - /css/flashblock.css - /js/soundmanager2-jsmin.js - /js/inlineplayer.js - /js/artists.js - /js/jukebox_search.js - artists-portlet - - - albums - /icons/albums.png - com.liferay.portal.kernel.portlet.DefaultConfigurationAction - org.liferay.jukebox.util.AlbumIndexer - org.liferay.jukebox.lar.JukeboxPortletDataHandler - org.liferay.jukebox.lar.AlbumStagedModelDataHandler - org.liferay.jukebox.lar.ArtistStagedModelDataHandler - org.liferay.jukebox.template.AlbumsPortletDisplayTemplateHandler - org.liferay.jukebox.asset.AlbumAssetRendererFactory - false - true - /css/jukebox.css - /css/inlineplayer.css - /css/flashblock.css - /js/soundmanager2-jsmin.js - /js/inlineplayer.js - /js/albums.js - /js/jukebox_search.js - albums-portlet - - - songs - /icons/songs.png - com.liferay.portal.kernel.portlet.DefaultConfigurationAction - org.liferay.jukebox.util.SongIndexer - org.liferay.jukebox.template.SongsPortletDisplayTemplateHandler - org.liferay.jukebox.asset.SongAssetRendererFactory - org.liferay.jukebox.trash.AlbumTrashHandler - org.liferay.jukebox.trash.SongTrashHandler - false - true - /css/jukebox.css - /css/inlineplayer.css - /css/flashblock.css - /js/soundmanager2-jsmin.js - /js/inlineplayer.js - /js/songs.js - /js/jukebox_search.js - songs-portlet - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/portlet.xml deleted file mode 100644 index d3a86780ca..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - artists - Artists - org.liferay.jukebox.portlet.ArtistsPortlet - - config-template - /html/artists/configuration.jsp - - - view-jsp - /html/artists/view.jsp - - 0 - - text/html - VIEW - - content.Language - - Artists - Artists - Artists - - - administrator - - - guest - - - power-user - - - user - - - - albums - Albums - org.liferay.jukebox.portlet.AlbumsPortlet - - config-template - /html/albums/configuration.jsp - - - view-jsp - /html/albums/view.jsp - - 0 - - text/html - VIEW - - content.Language - - Albums - Albums - Albums - - - administrator - - - guest - - - power-user - - - user - - - - songs - Songs - org.liferay.jukebox.portlet.SongsPortlet - - config-template - /html/songs/configuration.jsp - - - view-jsp - /html/songs/view.jsp - - 0 - - text/html - VIEW - - content.Language - - Songs - Songs - Songs - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service.xml deleted file mode 100644 index 1540e43450..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - Julio Camarero - jukebox - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AlbumName - ArtistName - SongName - DuplicatedSong - DuplicatedArtist - DuplicatedAlbum - NoSuchArtist - NoSuchAlbum - NoSuchSong - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/AlbumNameException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/AlbumNameException.java deleted file mode 100644 index 95f5123972..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/AlbumNameException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Julio Camarero - */ -public class AlbumNameException extends PortalException { - - public AlbumNameException() { - super(); - } - - public AlbumNameException(String msg) { - super(msg); - } - - public AlbumNameException(String msg, Throwable cause) { - super(msg, cause); - } - - public AlbumNameException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/ArtistNameException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/ArtistNameException.java deleted file mode 100644 index 9023565231..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/ArtistNameException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Julio Camarero - */ -public class ArtistNameException extends PortalException { - - public ArtistNameException() { - super(); - } - - public ArtistNameException(String msg) { - super(msg); - } - - public ArtistNameException(String msg, Throwable cause) { - super(msg, cause); - } - - public ArtistNameException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/DuplicatedAlbumException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/DuplicatedAlbumException.java deleted file mode 100644 index 01e8dbd892..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/DuplicatedAlbumException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Julio Camarero - */ -public class DuplicatedAlbumException extends PortalException { - - public DuplicatedAlbumException() { - super(); - } - - public DuplicatedAlbumException(String msg) { - super(msg); - } - - public DuplicatedAlbumException(String msg, Throwable cause) { - super(msg, cause); - } - - public DuplicatedAlbumException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/DuplicatedArtistException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/DuplicatedArtistException.java deleted file mode 100644 index 99df31ebf9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/DuplicatedArtistException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Julio Camarero - */ -public class DuplicatedArtistException extends PortalException { - - public DuplicatedArtistException() { - super(); - } - - public DuplicatedArtistException(String msg) { - super(msg); - } - - public DuplicatedArtistException(String msg, Throwable cause) { - super(msg, cause); - } - - public DuplicatedArtistException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/DuplicatedSongException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/DuplicatedSongException.java deleted file mode 100644 index ef88ad2593..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/DuplicatedSongException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Julio Camarero - */ -public class DuplicatedSongException extends PortalException { - - public DuplicatedSongException() { - super(); - } - - public DuplicatedSongException(String msg) { - super(msg); - } - - public DuplicatedSongException(String msg, Throwable cause) { - super(msg, cause); - } - - public DuplicatedSongException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/NoSuchAlbumException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/NoSuchAlbumException.java deleted file mode 100644 index 3f7f297dd5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/NoSuchAlbumException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Julio Camarero - */ -public class NoSuchAlbumException extends NoSuchModelException { - - public NoSuchAlbumException() { - super(); - } - - public NoSuchAlbumException(String msg) { - super(msg); - } - - public NoSuchAlbumException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchAlbumException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/NoSuchArtistException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/NoSuchArtistException.java deleted file mode 100644 index 986ead3342..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/NoSuchArtistException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Julio Camarero - */ -public class NoSuchArtistException extends NoSuchModelException { - - public NoSuchArtistException() { - super(); - } - - public NoSuchArtistException(String msg) { - super(msg); - } - - public NoSuchArtistException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchArtistException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/NoSuchSongException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/NoSuchSongException.java deleted file mode 100644 index 3ba2b6c085..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/NoSuchSongException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Julio Camarero - */ -public class NoSuchSongException extends NoSuchModelException { - - public NoSuchSongException() { - super(); - } - - public NoSuchSongException(String msg) { - super(msg); - } - - public NoSuchSongException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchSongException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/SongNameException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/SongNameException.java deleted file mode 100644 index 7444df551d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/SongNameException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Julio Camarero - */ -public class SongNameException extends PortalException { - - public SongNameException() { - super(); - } - - public SongNameException(String msg) { - super(msg); - } - - public SongNameException(String msg, Throwable cause) { - super(msg, cause); - } - - public SongNameException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/Album.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/Album.java deleted file mode 100644 index 3551034428..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/Album.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the Album service. Represents a row in the "jukebox_Album" database table, with each column mapped to a property of this class. - * - * @author Julio Camarero - * @see AlbumModel - * @see org.liferay.jukebox.model.impl.AlbumImpl - * @see org.liferay.jukebox.model.impl.AlbumModelImpl - * @generated - */ -public interface Album extends AlbumModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link org.liferay.jukebox.model.impl.AlbumImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - public com.liferay.portal.kernel.repository.model.FileEntry getCustomImage() - throws com.liferay.portal.kernel.exception.SystemException; - - public java.lang.String getImageURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public boolean hasCustomImage() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumClp.java deleted file mode 100644 index b482f95198..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumClp.java +++ /dev/null @@ -1,1085 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil; -import com.liferay.portal.kernel.util.ProxyUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.ContainerModel; -import com.liferay.portal.model.TrashedModel; -import com.liferay.portal.model.impl.BaseModelImpl; -import com.liferay.portal.util.PortalUtil; - -import com.liferay.portlet.trash.model.TrashEntry; -import com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil; - -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.ClpSerializer; - -import java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Julio Camarero - */ -public class AlbumClp extends BaseModelImpl implements Album { - public AlbumClp() { - } - - @Override - public Class getModelClass() { - return Album.class; - } - - @Override - public String getModelClassName() { - return Album.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _albumId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setAlbumId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _albumId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("albumId", getAlbumId()); - attributes.put("companyId", getCompanyId()); - attributes.put("groupId", getGroupId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("artistId", getArtistId()); - attributes.put("name", getName()); - attributes.put("year", getYear()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long albumId = (Long)attributes.get("albumId"); - - if (albumId != null) { - setAlbumId(albumId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Long groupId = (Long)attributes.get("groupId"); - - if (groupId != null) { - setGroupId(groupId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long artistId = (Long)attributes.get("artistId"); - - if (artistId != null) { - setArtistId(artistId); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - Integer year = (Integer)attributes.get("year"); - - if (year != null) { - setYear(year); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - } - - @Override - public String getUuid() { - return _uuid; - } - - @Override - public void setUuid(String uuid) { - _uuid = uuid; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setUuid", String.class); - - method.invoke(_albumRemoteModel, uuid); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getAlbumId() { - return _albumId; - } - - @Override - public void setAlbumId(long albumId) { - _albumId = albumId; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setAlbumId", long.class); - - method.invoke(_albumRemoteModel, albumId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_albumRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _groupId = groupId; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setGroupId", long.class); - - method.invoke(_albumRemoteModel, groupId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _userId = userId; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserId", long.class); - - method.invoke(_albumRemoteModel, 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 (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserName", String.class); - - method.invoke(_albumRemoteModel, userName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_albumRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_albumRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getArtistId() { - return _artistId; - } - - @Override - public void setArtistId(long artistId) { - _artistId = artistId; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setArtistId", long.class); - - method.invoke(_albumRemoteModel, artistId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getName() { - return _name; - } - - @Override - public void setName(String name) { - _name = name; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setName", String.class); - - method.invoke(_albumRemoteModel, name); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public int getYear() { - return _year; - } - - @Override - public void setYear(int year) { - _year = year; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setYear", int.class); - - method.invoke(_albumRemoteModel, year); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _status = status; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatus", int.class); - - method.invoke(_albumRemoteModel, status); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getStatusByUserId() { - return _statusByUserId; - } - - @Override - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusByUserId", long.class); - - method.invoke(_albumRemoteModel, statusByUserId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getStatusByUserUuid() throws SystemException { - return PortalUtil.getUserValue(getStatusByUserId(), "uuid", - _statusByUserUuid); - } - - @Override - public void setStatusByUserUuid(String statusByUserUuid) { - _statusByUserUuid = statusByUserUuid; - } - - @Override - public String getStatusByUserName() { - return _statusByUserName; - } - - @Override - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusByUserName", - String.class); - - method.invoke(_albumRemoteModel, statusByUserName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getStatusDate() { - return _statusDate; - } - - @Override - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - - if (_albumRemoteModel != null) { - try { - Class clazz = _albumRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusDate", Date.class); - - method.invoke(_albumRemoteModel, statusDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public boolean hasCustomImage() { - try { - String methodName = "hasCustomImage"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - Boolean returnObj = (Boolean)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public com.liferay.portal.kernel.repository.model.FileEntry getCustomImage() { - try { - String methodName = "getCustomImage"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - com.liferay.portal.kernel.repository.model.FileEntry returnObj = (com.liferay.portal.kernel.repository.model.FileEntry)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public java.lang.String getImageURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) { - try { - String methodName = "getImageURL"; - - Class[] parameterTypes = new Class[] { - com.liferay.portal.theme.ThemeDisplay.class - }; - - Object[] parameterValues = new Object[] { themeDisplay }; - - java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - public long getContainerModelId() { - return getAlbumId(); - } - - public void setContainerModelId(long containerModelId) { - _albumId = containerModelId; - } - - public String getContainerModelName() { - return String.valueOf(getName()); - } - - public long getParentContainerModelId() { - return 0; - } - - public void setParentContainerModelId(long parentContainerModelId) { - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Album.class.getName())); - } - - @Override - public TrashEntry getTrashEntry() throws PortalException, SystemException { - if (!isInTrash()) { - return null; - } - - TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(), - getTrashEntryClassPK()); - - if (trashEntry != null) { - return trashEntry; - } - - TrashHandler trashHandler = getTrashHandler(); - - if (!Validator.isNull(trashHandler.getContainerModelClassName())) { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - while (containerModel != null) { - if (containerModel instanceof TrashedModel) { - TrashedModel trashedModel = (TrashedModel)containerModel; - - return trashedModel.getTrashEntry(); - } - - trashHandler = TrashHandlerRegistryUtil.getTrashHandler(trashHandler.getContainerModelClassName()); - - if (trashHandler == null) { - return null; - } - - containerModel = trashHandler.getContainerModel(containerModel.getParentContainerModelId()); - } - } - - return null; - } - - @Override - public long getTrashEntryClassPK() { - return getPrimaryKey(); - } - - @Override - public TrashHandler getTrashHandler() { - return TrashHandlerRegistryUtil.getTrashHandler(getModelClassName()); - } - - @Override - public boolean isInTrash() { - if (getStatus() == WorkflowConstants.STATUS_IN_TRASH) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInTrashContainer() { - TrashHandler trashHandler = getTrashHandler(); - - if ((trashHandler == null) || - Validator.isNull(trashHandler.getContainerModelClassName())) { - return false; - } - - try { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - if (containerModel == null) { - return false; - } - - if (containerModel instanceof TrashedModel) { - return ((TrashedModel)containerModel).isInTrash(); - } - } - catch (Exception e) { - } - - return false; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved} - */ - @Override - public boolean getApproved() { - return isApproved(); - } - - @Override - public boolean isApproved() { - if (getStatus() == WorkflowConstants.STATUS_APPROVED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDenied() { - if (getStatus() == WorkflowConstants.STATUS_DENIED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDraft() { - if (getStatus() == WorkflowConstants.STATUS_DRAFT) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isExpired() { - if (getStatus() == WorkflowConstants.STATUS_EXPIRED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInactive() { - if (getStatus() == WorkflowConstants.STATUS_INACTIVE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isIncomplete() { - if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isPending() { - if (getStatus() == WorkflowConstants.STATUS_PENDING) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isScheduled() { - if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) { - return true; - } - else { - return false; - } - } - - public BaseModel getAlbumRemoteModel() { - return _albumRemoteModel; - } - - public void setAlbumRemoteModel(BaseModel albumRemoteModel) { - _albumRemoteModel = albumRemoteModel; - } - - 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 = _albumRemoteModel.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(_albumRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - AlbumLocalServiceUtil.addAlbum(this); - } - else { - AlbumLocalServiceUtil.updateAlbum(this); - } - } - - @Override - public Album toEscapedModel() { - return (Album)ProxyUtil.newProxyInstance(Album.class.getClassLoader(), - new Class[] { Album.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - AlbumClp clone = new AlbumClp(); - - clone.setUuid(getUuid()); - clone.setAlbumId(getAlbumId()); - clone.setCompanyId(getCompanyId()); - clone.setGroupId(getGroupId()); - clone.setUserId(getUserId()); - clone.setUserName(getUserName()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setArtistId(getArtistId()); - clone.setName(getName()); - clone.setYear(getYear()); - clone.setStatus(getStatus()); - clone.setStatusByUserId(getStatusByUserId()); - clone.setStatusByUserName(getStatusByUserName()); - clone.setStatusDate(getStatusDate()); - - return clone; - } - - @Override - public int compareTo(Album album) { - long primaryKey = album.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof AlbumClp)) { - return false; - } - - AlbumClp album = (AlbumClp)obj; - - long primaryKey = album.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(31); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", albumId="); - sb.append(getAlbumId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", groupId="); - sb.append(getGroupId()); - sb.append(", userId="); - sb.append(getUserId()); - sb.append(", userName="); - sb.append(getUserName()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", artistId="); - sb.append(getArtistId()); - sb.append(", name="); - sb.append(getName()); - sb.append(", year="); - sb.append(getYear()); - sb.append(", status="); - sb.append(getStatus()); - sb.append(", statusByUserId="); - sb.append(getStatusByUserId()); - sb.append(", statusByUserName="); - sb.append(getStatusByUserName()); - sb.append(", statusDate="); - sb.append(getStatusDate()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(49); - - sb.append(""); - sb.append("org.liferay.jukebox.model.Album"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "albumId"); - sb.append( - "companyId"); - sb.append( - "groupId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "artistId"); - sb.append( - "name"); - sb.append( - "year"); - sb.append( - "status"); - sb.append( - "statusByUserId"); - sb.append( - "statusByUserName"); - sb.append( - "statusDate"); - - sb.append(""); - - return sb.toString(); - } - - private String _uuid; - private long _albumId; - private long _companyId; - private long _groupId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _artistId; - private String _name; - private int _year; - private int _status; - private long _statusByUserId; - private String _statusByUserUuid; - private String _statusByUserName; - private Date _statusDate; - private BaseModel _albumRemoteModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumModel.java deleted file mode 100644 index c3dcfe2d6a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumModel.java +++ /dev/null @@ -1,549 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.kernel.bean.AutoEscape; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ContainerModel; -import com.liferay.portal.model.StagedGroupedModel; -import com.liferay.portal.model.TrashedModel; -import com.liferay.portal.model.WorkflowedModel; -import com.liferay.portal.service.ServiceContext; - -import com.liferay.portlet.expando.model.ExpandoBridge; -import com.liferay.portlet.trash.model.TrashEntry; - -import java.io.Serializable; - -import java.util.Date; - -/** - * The base model interface for the Album service. Represents a row in the "jukebox_Album" database table, with each column mapped to a property of this class. - * - *

- * This interface and its corresponding implementation {@link org.liferay.jukebox.model.impl.AlbumModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.liferay.jukebox.model.impl.AlbumImpl}. - *

- * - * @author Julio Camarero - * @see Album - * @see org.liferay.jukebox.model.impl.AlbumImpl - * @see org.liferay.jukebox.model.impl.AlbumModelImpl - * @generated - */ -public interface AlbumModel extends BaseModel, ContainerModel, - StagedGroupedModel, TrashedModel, WorkflowedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a album model instance should use the {@link Album} interface instead. - */ - - /** - * Returns the primary key of this album. - * - * @return the primary key of this album - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this album. - * - * @param primaryKey the primary key of this album - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the uuid of this album. - * - * @return the uuid of this album - */ - @AutoEscape - @Override - public String getUuid(); - - /** - * Sets the uuid of this album. - * - * @param uuid the uuid of this album - */ - @Override - public void setUuid(String uuid); - - /** - * Returns the album ID of this album. - * - * @return the album ID of this album - */ - public long getAlbumId(); - - /** - * Sets the album ID of this album. - * - * @param albumId the album ID of this album - */ - public void setAlbumId(long albumId); - - /** - * Returns the company ID of this album. - * - * @return the company ID of this album - */ - @Override - public long getCompanyId(); - - /** - * Sets the company ID of this album. - * - * @param companyId the company ID of this album - */ - @Override - public void setCompanyId(long companyId); - - /** - * Returns the group ID of this album. - * - * @return the group ID of this album - */ - @Override - public long getGroupId(); - - /** - * Sets the group ID of this album. - * - * @param groupId the group ID of this album - */ - @Override - public void setGroupId(long groupId); - - /** - * Returns the user ID of this album. - * - * @return the user ID of this album - */ - @Override - public long getUserId(); - - /** - * Sets the user ID of this album. - * - * @param userId the user ID of this album - */ - @Override - public void setUserId(long userId); - - /** - * Returns the user uuid of this album. - * - * @return the user uuid of this album - * @throws SystemException if a system exception occurred - */ - @Override - public String getUserUuid() throws SystemException; - - /** - * Sets the user uuid of this album. - * - * @param userUuid the user uuid of this album - */ - @Override - public void setUserUuid(String userUuid); - - /** - * Returns the user name of this album. - * - * @return the user name of this album - */ - @AutoEscape - @Override - public String getUserName(); - - /** - * Sets the user name of this album. - * - * @param userName the user name of this album - */ - @Override - public void setUserName(String userName); - - /** - * Returns the create date of this album. - * - * @return the create date of this album - */ - @Override - public Date getCreateDate(); - - /** - * Sets the create date of this album. - * - * @param createDate the create date of this album - */ - @Override - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this album. - * - * @return the modified date of this album - */ - @Override - public Date getModifiedDate(); - - /** - * Sets the modified date of this album. - * - * @param modifiedDate the modified date of this album - */ - @Override - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the artist ID of this album. - * - * @return the artist ID of this album - */ - public long getArtistId(); - - /** - * Sets the artist ID of this album. - * - * @param artistId the artist ID of this album - */ - public void setArtistId(long artistId); - - /** - * Returns the name of this album. - * - * @return the name of this album - */ - @AutoEscape - public String getName(); - - /** - * Sets the name of this album. - * - * @param name the name of this album - */ - public void setName(String name); - - /** - * Returns the year of this album. - * - * @return the year of this album - */ - public int getYear(); - - /** - * Sets the year of this album. - * - * @param year the year of this album - */ - public void setYear(int year); - - /** - * Returns the status of this album. - * - * @return the status of this album - */ - @Override - public int getStatus(); - - /** - * Sets the status of this album. - * - * @param status the status of this album - */ - @Override - public void setStatus(int status); - - /** - * Returns the status by user ID of this album. - * - * @return the status by user ID of this album - */ - @Override - public long getStatusByUserId(); - - /** - * Sets the status by user ID of this album. - * - * @param statusByUserId the status by user ID of this album - */ - @Override - public void setStatusByUserId(long statusByUserId); - - /** - * Returns the status by user uuid of this album. - * - * @return the status by user uuid of this album - * @throws SystemException if a system exception occurred - */ - @Override - public String getStatusByUserUuid() throws SystemException; - - /** - * Sets the status by user uuid of this album. - * - * @param statusByUserUuid the status by user uuid of this album - */ - @Override - public void setStatusByUserUuid(String statusByUserUuid); - - /** - * Returns the status by user name of this album. - * - * @return the status by user name of this album - */ - @AutoEscape - @Override - public String getStatusByUserName(); - - /** - * Sets the status by user name of this album. - * - * @param statusByUserName the status by user name of this album - */ - @Override - public void setStatusByUserName(String statusByUserName); - - /** - * Returns the status date of this album. - * - * @return the status date of this album - */ - @Override - public Date getStatusDate(); - - /** - * Sets the status date of this album. - * - * @param statusDate the status date of this album - */ - @Override - public void setStatusDate(Date statusDate); - - /** - * Returns the trash entry created when this album was moved to the Recycle Bin. The trash entry may belong to one of the ancestors of this album. - * - * @return the trash entry created when this album was moved to the Recycle Bin - * @throws SystemException if a system exception occurred - */ - @Override - public TrashEntry getTrashEntry() throws PortalException, SystemException; - - /** - * Returns the class primary key of the trash entry for this album. - * - * @return the class primary key of the trash entry for this album - */ - @Override - public long getTrashEntryClassPK(); - - /** - * Returns the trash handler for this album. - * - * @return the trash handler for this album - */ - @Override - public TrashHandler getTrashHandler(); - - /** - * Returns true if this album is in the Recycle Bin. - * - * @return true if this album is in the Recycle Bin; false otherwise - */ - @Override - public boolean isInTrash(); - - /** - * Returns true if the parent of this album is in the Recycle Bin. - * - * @return true if the parent of this album is in the Recycle Bin; false otherwise - * @throws SystemException if a system exception occurred - */ - @Override - public boolean isInTrashContainer(); - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved()} - */ - @Override - public boolean getApproved(); - - /** - * Returns true if this album is approved. - * - * @return true if this album is approved; false otherwise - */ - @Override - public boolean isApproved(); - - /** - * Returns true if this album is denied. - * - * @return true if this album is denied; false otherwise - */ - @Override - public boolean isDenied(); - - /** - * Returns true if this album is a draft. - * - * @return true if this album is a draft; false otherwise - */ - @Override - public boolean isDraft(); - - /** - * Returns true if this album is expired. - * - * @return true if this album is expired; false otherwise - */ - @Override - public boolean isExpired(); - - /** - * Returns true if this album is inactive. - * - * @return true if this album is inactive; false otherwise - */ - @Override - public boolean isInactive(); - - /** - * Returns true if this album is incomplete. - * - * @return true if this album is incomplete; false otherwise - */ - @Override - public boolean isIncomplete(); - - /** - * Returns true if this album is pending. - * - * @return true if this album is pending; false otherwise - */ - @Override - public boolean isPending(); - - /** - * Returns true if this album is scheduled. - * - * @return true if this album is scheduled; false otherwise - */ - @Override - public boolean isScheduled(); - - /** - * Returns the container model ID of this album. - * - * @return the container model ID of this album - */ - @Override - public long getContainerModelId(); - - /** - * Sets the container model ID of this album. - * - * @param containerModelId the container model ID of this album - */ - @Override - public void setContainerModelId(long containerModelId); - - /** - * Returns the container name of this album. - * - * @return the container name of this album - */ - @Override - public String getContainerModelName(); - - /** - * Returns the parent container model ID of this album. - * - * @return the parent container model ID of this album - */ - @Override - public long getParentContainerModelId(); - - /** - * Sets the parent container model ID of this album. - * - * @param parentContainerModelId the parent container model ID of this album - */ - @Override - public void setParentContainerModelId(long parentContainerModelId); - - @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(Album album); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public Album toEscapedModel(); - - @Override - public Album toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumSoap.java deleted file mode 100644 index 8538f28393..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumSoap.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 org.liferay.jukebox.service.http.AlbumServiceSoap}. - * - * @author Julio Camarero - * @see org.liferay.jukebox.service.http.AlbumServiceSoap - * @generated - */ -public class AlbumSoap implements Serializable { - public static AlbumSoap toSoapModel(Album model) { - AlbumSoap soapModel = new AlbumSoap(); - - soapModel.setUuid(model.getUuid()); - soapModel.setAlbumId(model.getAlbumId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setGroupId(model.getGroupId()); - soapModel.setUserId(model.getUserId()); - soapModel.setUserName(model.getUserName()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setArtistId(model.getArtistId()); - soapModel.setName(model.getName()); - soapModel.setYear(model.getYear()); - soapModel.setStatus(model.getStatus()); - soapModel.setStatusByUserId(model.getStatusByUserId()); - soapModel.setStatusByUserName(model.getStatusByUserName()); - soapModel.setStatusDate(model.getStatusDate()); - - return soapModel; - } - - public static AlbumSoap[] toSoapModels(Album[] models) { - AlbumSoap[] soapModels = new AlbumSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static AlbumSoap[][] toSoapModels(Album[][] models) { - AlbumSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new AlbumSoap[models.length][models[0].length]; - } - else { - soapModels = new AlbumSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static AlbumSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (Album model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new AlbumSoap[soapModels.size()]); - } - - public AlbumSoap() { - } - - public long getPrimaryKey() { - return _albumId; - } - - public void setPrimaryKey(long pk) { - setAlbumId(pk); - } - - public String getUuid() { - return _uuid; - } - - public void setUuid(String uuid) { - _uuid = uuid; - } - - public long getAlbumId() { - return _albumId; - } - - public void setAlbumId(long albumId) { - _albumId = albumId; - } - - public long getCompanyId() { - return _companyId; - } - - public void setCompanyId(long companyId) { - _companyId = companyId; - } - - public long getGroupId() { - return _groupId; - } - - public void setGroupId(long groupId) { - _groupId = groupId; - } - - 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 Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public long getArtistId() { - return _artistId; - } - - public void setArtistId(long artistId) { - _artistId = artistId; - } - - public String getName() { - return _name; - } - - public void setName(String name) { - _name = name; - } - - public int getYear() { - return _year; - } - - public void setYear(int year) { - _year = year; - } - - public int getStatus() { - return _status; - } - - public void setStatus(int status) { - _status = status; - } - - public long getStatusByUserId() { - return _statusByUserId; - } - - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - } - - public String getStatusByUserName() { - return _statusByUserName; - } - - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - } - - public Date getStatusDate() { - return _statusDate; - } - - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - } - - private String _uuid; - private long _albumId; - private long _companyId; - private long _groupId; - private long _userId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _artistId; - private String _name; - private int _year; - private int _status; - private long _statusByUserId; - private String _statusByUserName; - private Date _statusDate; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumWrapper.java deleted file mode 100644 index 44d6841c39..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/AlbumWrapper.java +++ /dev/null @@ -1,888 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.kernel.lar.StagedModelType; -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 Album}. - *

- * - * @author Julio Camarero - * @see Album - * @generated - */ -public class AlbumWrapper implements Album, ModelWrapper { - public AlbumWrapper(Album album) { - _album = album; - } - - @Override - public Class getModelClass() { - return Album.class; - } - - @Override - public String getModelClassName() { - return Album.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("albumId", getAlbumId()); - attributes.put("companyId", getCompanyId()); - attributes.put("groupId", getGroupId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("artistId", getArtistId()); - attributes.put("name", getName()); - attributes.put("year", getYear()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long albumId = (Long)attributes.get("albumId"); - - if (albumId != null) { - setAlbumId(albumId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Long groupId = (Long)attributes.get("groupId"); - - if (groupId != null) { - setGroupId(groupId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long artistId = (Long)attributes.get("artistId"); - - if (artistId != null) { - setArtistId(artistId); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - Integer year = (Integer)attributes.get("year"); - - if (year != null) { - setYear(year); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - } - - /** - * Returns the primary key of this album. - * - * @return the primary key of this album - */ - @Override - public long getPrimaryKey() { - return _album.getPrimaryKey(); - } - - /** - * Sets the primary key of this album. - * - * @param primaryKey the primary key of this album - */ - @Override - public void setPrimaryKey(long primaryKey) { - _album.setPrimaryKey(primaryKey); - } - - /** - * Returns the uuid of this album. - * - * @return the uuid of this album - */ - @Override - public java.lang.String getUuid() { - return _album.getUuid(); - } - - /** - * Sets the uuid of this album. - * - * @param uuid the uuid of this album - */ - @Override - public void setUuid(java.lang.String uuid) { - _album.setUuid(uuid); - } - - /** - * Returns the album ID of this album. - * - * @return the album ID of this album - */ - @Override - public long getAlbumId() { - return _album.getAlbumId(); - } - - /** - * Sets the album ID of this album. - * - * @param albumId the album ID of this album - */ - @Override - public void setAlbumId(long albumId) { - _album.setAlbumId(albumId); - } - - /** - * Returns the company ID of this album. - * - * @return the company ID of this album - */ - @Override - public long getCompanyId() { - return _album.getCompanyId(); - } - - /** - * Sets the company ID of this album. - * - * @param companyId the company ID of this album - */ - @Override - public void setCompanyId(long companyId) { - _album.setCompanyId(companyId); - } - - /** - * Returns the group ID of this album. - * - * @return the group ID of this album - */ - @Override - public long getGroupId() { - return _album.getGroupId(); - } - - /** - * Sets the group ID of this album. - * - * @param groupId the group ID of this album - */ - @Override - public void setGroupId(long groupId) { - _album.setGroupId(groupId); - } - - /** - * Returns the user ID of this album. - * - * @return the user ID of this album - */ - @Override - public long getUserId() { - return _album.getUserId(); - } - - /** - * Sets the user ID of this album. - * - * @param userId the user ID of this album - */ - @Override - public void setUserId(long userId) { - _album.setUserId(userId); - } - - /** - * Returns the user uuid of this album. - * - * @return the user uuid of this album - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _album.getUserUuid(); - } - - /** - * Sets the user uuid of this album. - * - * @param userUuid the user uuid of this album - */ - @Override - public void setUserUuid(java.lang.String userUuid) { - _album.setUserUuid(userUuid); - } - - /** - * Returns the user name of this album. - * - * @return the user name of this album - */ - @Override - public java.lang.String getUserName() { - return _album.getUserName(); - } - - /** - * Sets the user name of this album. - * - * @param userName the user name of this album - */ - @Override - public void setUserName(java.lang.String userName) { - _album.setUserName(userName); - } - - /** - * Returns the create date of this album. - * - * @return the create date of this album - */ - @Override - public java.util.Date getCreateDate() { - return _album.getCreateDate(); - } - - /** - * Sets the create date of this album. - * - * @param createDate the create date of this album - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _album.setCreateDate(createDate); - } - - /** - * Returns the modified date of this album. - * - * @return the modified date of this album - */ - @Override - public java.util.Date getModifiedDate() { - return _album.getModifiedDate(); - } - - /** - * Sets the modified date of this album. - * - * @param modifiedDate the modified date of this album - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _album.setModifiedDate(modifiedDate); - } - - /** - * Returns the artist ID of this album. - * - * @return the artist ID of this album - */ - @Override - public long getArtistId() { - return _album.getArtistId(); - } - - /** - * Sets the artist ID of this album. - * - * @param artistId the artist ID of this album - */ - @Override - public void setArtistId(long artistId) { - _album.setArtistId(artistId); - } - - /** - * Returns the name of this album. - * - * @return the name of this album - */ - @Override - public java.lang.String getName() { - return _album.getName(); - } - - /** - * Sets the name of this album. - * - * @param name the name of this album - */ - @Override - public void setName(java.lang.String name) { - _album.setName(name); - } - - /** - * Returns the year of this album. - * - * @return the year of this album - */ - @Override - public int getYear() { - return _album.getYear(); - } - - /** - * Sets the year of this album. - * - * @param year the year of this album - */ - @Override - public void setYear(int year) { - _album.setYear(year); - } - - /** - * Returns the status of this album. - * - * @return the status of this album - */ - @Override - public int getStatus() { - return _album.getStatus(); - } - - /** - * Sets the status of this album. - * - * @param status the status of this album - */ - @Override - public void setStatus(int status) { - _album.setStatus(status); - } - - /** - * Returns the status by user ID of this album. - * - * @return the status by user ID of this album - */ - @Override - public long getStatusByUserId() { - return _album.getStatusByUserId(); - } - - /** - * Sets the status by user ID of this album. - * - * @param statusByUserId the status by user ID of this album - */ - @Override - public void setStatusByUserId(long statusByUserId) { - _album.setStatusByUserId(statusByUserId); - } - - /** - * Returns the status by user uuid of this album. - * - * @return the status by user uuid of this album - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getStatusByUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _album.getStatusByUserUuid(); - } - - /** - * Sets the status by user uuid of this album. - * - * @param statusByUserUuid the status by user uuid of this album - */ - @Override - public void setStatusByUserUuid(java.lang.String statusByUserUuid) { - _album.setStatusByUserUuid(statusByUserUuid); - } - - /** - * Returns the status by user name of this album. - * - * @return the status by user name of this album - */ - @Override - public java.lang.String getStatusByUserName() { - return _album.getStatusByUserName(); - } - - /** - * Sets the status by user name of this album. - * - * @param statusByUserName the status by user name of this album - */ - @Override - public void setStatusByUserName(java.lang.String statusByUserName) { - _album.setStatusByUserName(statusByUserName); - } - - /** - * Returns the status date of this album. - * - * @return the status date of this album - */ - @Override - public java.util.Date getStatusDate() { - return _album.getStatusDate(); - } - - /** - * Sets the status date of this album. - * - * @param statusDate the status date of this album - */ - @Override - public void setStatusDate(java.util.Date statusDate) { - _album.setStatusDate(statusDate); - } - - /** - * Returns the trash entry created when this album was moved to the Recycle Bin. The trash entry may belong to one of the ancestors of this album. - * - * @return the trash entry created when this album was moved to the Recycle Bin - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.portlet.trash.model.TrashEntry getTrashEntry() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _album.getTrashEntry(); - } - - /** - * Returns the class primary key of the trash entry for this album. - * - * @return the class primary key of the trash entry for this album - */ - @Override - public long getTrashEntryClassPK() { - return _album.getTrashEntryClassPK(); - } - - /** - * Returns the trash handler for this album. - * - * @return the trash handler for this album - */ - @Override - public com.liferay.portal.kernel.trash.TrashHandler getTrashHandler() { - return _album.getTrashHandler(); - } - - /** - * Returns true if this album is in the Recycle Bin. - * - * @return true if this album is in the Recycle Bin; false otherwise - */ - @Override - public boolean isInTrash() { - return _album.isInTrash(); - } - - /** - * Returns true if the parent of this album is in the Recycle Bin. - * - * @return true if the parent of this album is in the Recycle Bin; false otherwise - * @throws SystemException if a system exception occurred - */ - @Override - public boolean isInTrashContainer() { - return _album.isInTrashContainer(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved()} - */ - @Override - public boolean getApproved() { - return _album.getApproved(); - } - - /** - * Returns true if this album is approved. - * - * @return true if this album is approved; false otherwise - */ - @Override - public boolean isApproved() { - return _album.isApproved(); - } - - /** - * Returns true if this album is denied. - * - * @return true if this album is denied; false otherwise - */ - @Override - public boolean isDenied() { - return _album.isDenied(); - } - - /** - * Returns true if this album is a draft. - * - * @return true if this album is a draft; false otherwise - */ - @Override - public boolean isDraft() { - return _album.isDraft(); - } - - /** - * Returns true if this album is expired. - * - * @return true if this album is expired; false otherwise - */ - @Override - public boolean isExpired() { - return _album.isExpired(); - } - - /** - * Returns true if this album is inactive. - * - * @return true if this album is inactive; false otherwise - */ - @Override - public boolean isInactive() { - return _album.isInactive(); - } - - /** - * Returns true if this album is incomplete. - * - * @return true if this album is incomplete; false otherwise - */ - @Override - public boolean isIncomplete() { - return _album.isIncomplete(); - } - - /** - * Returns true if this album is pending. - * - * @return true if this album is pending; false otherwise - */ - @Override - public boolean isPending() { - return _album.isPending(); - } - - /** - * Returns true if this album is scheduled. - * - * @return true if this album is scheduled; false otherwise - */ - @Override - public boolean isScheduled() { - return _album.isScheduled(); - } - - /** - * Returns the container model ID of this album. - * - * @return the container model ID of this album - */ - @Override - public long getContainerModelId() { - return _album.getContainerModelId(); - } - - /** - * Sets the container model ID of this album. - * - * @param containerModelId the container model ID of this album - */ - @Override - public void setContainerModelId(long containerModelId) { - _album.setContainerModelId(containerModelId); - } - - /** - * Returns the container name of this album. - * - * @return the container name of this album - */ - @Override - public java.lang.String getContainerModelName() { - return _album.getContainerModelName(); - } - - /** - * Returns the parent container model ID of this album. - * - * @return the parent container model ID of this album - */ - @Override - public long getParentContainerModelId() { - return _album.getParentContainerModelId(); - } - - /** - * Sets the parent container model ID of this album. - * - * @param parentContainerModelId the parent container model ID of this album - */ - @Override - public void setParentContainerModelId(long parentContainerModelId) { - _album.setParentContainerModelId(parentContainerModelId); - } - - @Override - public boolean isNew() { - return _album.isNew(); - } - - @Override - public void setNew(boolean n) { - _album.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _album.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _album.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _album.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _album.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _album.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _album.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _album.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _album.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _album.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new AlbumWrapper((Album)_album.clone()); - } - - @Override - public int compareTo(org.liferay.jukebox.model.Album album) { - return _album.compareTo(album); - } - - @Override - public int hashCode() { - return _album.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _album.toCacheModel(); - } - - @Override - public org.liferay.jukebox.model.Album toEscapedModel() { - return new AlbumWrapper(_album.toEscapedModel()); - } - - @Override - public org.liferay.jukebox.model.Album toUnescapedModel() { - return new AlbumWrapper(_album.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _album.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _album.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _album.persist(); - } - - @Override - public com.liferay.portal.kernel.repository.model.FileEntry getCustomImage() - throws com.liferay.portal.kernel.exception.SystemException { - return _album.getCustomImage(); - } - - @Override - public java.lang.String getImageURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _album.getImageURL(themeDisplay); - } - - @Override - public boolean hasCustomImage() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _album.hasCustomImage(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof AlbumWrapper)) { - return false; - } - - AlbumWrapper albumWrapper = (AlbumWrapper)obj; - - if (Validator.equals(_album, albumWrapper._album)) { - return true; - } - - return false; - } - - @Override - public StagedModelType getStagedModelType() { - return _album.getStagedModelType(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public Album getWrappedAlbum() { - return _album; - } - - @Override - public Album getWrappedModel() { - return _album; - } - - @Override - public void resetOriginalValues() { - _album.resetOriginalValues(); - } - - private Album _album; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/Artist.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/Artist.java deleted file mode 100644 index 6e4a4b86c0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/Artist.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the Artist service. Represents a row in the "jukebox_Artist" database table, with each column mapped to a property of this class. - * - * @author Julio Camarero - * @see ArtistModel - * @see org.liferay.jukebox.model.impl.ArtistImpl - * @see org.liferay.jukebox.model.impl.ArtistModelImpl - * @generated - */ -public interface Artist extends ArtistModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link org.liferay.jukebox.model.impl.ArtistImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - public com.liferay.portal.kernel.repository.model.FileEntry getCustomImage() - throws com.liferay.portal.kernel.exception.SystemException; - - public java.lang.String getImageURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public boolean hasCustomImage() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistClp.java deleted file mode 100644 index a50ed91a6c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistClp.java +++ /dev/null @@ -1,1028 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil; -import com.liferay.portal.kernel.util.ProxyUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.ContainerModel; -import com.liferay.portal.model.TrashedModel; -import com.liferay.portal.model.impl.BaseModelImpl; -import com.liferay.portal.util.PortalUtil; - -import com.liferay.portlet.trash.model.TrashEntry; -import com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil; - -import org.liferay.jukebox.service.ArtistLocalServiceUtil; -import org.liferay.jukebox.service.ClpSerializer; - -import java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Julio Camarero - */ -public class ArtistClp extends BaseModelImpl implements Artist { - public ArtistClp() { - } - - @Override - public Class getModelClass() { - return Artist.class; - } - - @Override - public String getModelClassName() { - return Artist.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _artistId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setArtistId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _artistId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("artistId", getArtistId()); - attributes.put("companyId", getCompanyId()); - attributes.put("groupId", getGroupId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - attributes.put("name", getName()); - attributes.put("bio", getBio()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long artistId = (Long)attributes.get("artistId"); - - if (artistId != null) { - setArtistId(artistId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Long groupId = (Long)attributes.get("groupId"); - - if (groupId != null) { - setGroupId(groupId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - String bio = (String)attributes.get("bio"); - - if (bio != null) { - setBio(bio); - } - } - - @Override - public String getUuid() { - return _uuid; - } - - @Override - public void setUuid(String uuid) { - _uuid = uuid; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setUuid", String.class); - - method.invoke(_artistRemoteModel, uuid); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getArtistId() { - return _artistId; - } - - @Override - public void setArtistId(long artistId) { - _artistId = artistId; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setArtistId", long.class); - - method.invoke(_artistRemoteModel, artistId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_artistRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _groupId = groupId; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setGroupId", long.class); - - method.invoke(_artistRemoteModel, groupId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _userId = userId; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserId", long.class); - - method.invoke(_artistRemoteModel, 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 (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserName", String.class); - - method.invoke(_artistRemoteModel, userName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_artistRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_artistRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _status = status; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatus", int.class); - - method.invoke(_artistRemoteModel, status); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getStatusByUserId() { - return _statusByUserId; - } - - @Override - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusByUserId", long.class); - - method.invoke(_artistRemoteModel, statusByUserId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getStatusByUserUuid() throws SystemException { - return PortalUtil.getUserValue(getStatusByUserId(), "uuid", - _statusByUserUuid); - } - - @Override - public void setStatusByUserUuid(String statusByUserUuid) { - _statusByUserUuid = statusByUserUuid; - } - - @Override - public String getStatusByUserName() { - return _statusByUserName; - } - - @Override - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusByUserName", - String.class); - - method.invoke(_artistRemoteModel, statusByUserName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getStatusDate() { - return _statusDate; - } - - @Override - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusDate", Date.class); - - method.invoke(_artistRemoteModel, statusDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getName() { - return _name; - } - - @Override - public void setName(String name) { - _name = name; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setName", String.class); - - method.invoke(_artistRemoteModel, name); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getBio() { - return _bio; - } - - @Override - public void setBio(String bio) { - _bio = bio; - - if (_artistRemoteModel != null) { - try { - Class clazz = _artistRemoteModel.getClass(); - - Method method = clazz.getMethod("setBio", String.class); - - method.invoke(_artistRemoteModel, bio); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public boolean hasCustomImage() { - try { - String methodName = "hasCustomImage"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - Boolean returnObj = (Boolean)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public com.liferay.portal.kernel.repository.model.FileEntry getCustomImage() { - try { - String methodName = "getCustomImage"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - com.liferay.portal.kernel.repository.model.FileEntry returnObj = (com.liferay.portal.kernel.repository.model.FileEntry)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public java.lang.String getImageURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) { - try { - String methodName = "getImageURL"; - - Class[] parameterTypes = new Class[] { - com.liferay.portal.theme.ThemeDisplay.class - }; - - Object[] parameterValues = new Object[] { themeDisplay }; - - java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Artist.class.getName())); - } - - @Override - public TrashEntry getTrashEntry() throws PortalException, SystemException { - if (!isInTrash()) { - return null; - } - - TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(), - getTrashEntryClassPK()); - - if (trashEntry != null) { - return trashEntry; - } - - TrashHandler trashHandler = getTrashHandler(); - - if (!Validator.isNull(trashHandler.getContainerModelClassName())) { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - while (containerModel != null) { - if (containerModel instanceof TrashedModel) { - TrashedModel trashedModel = (TrashedModel)containerModel; - - return trashedModel.getTrashEntry(); - } - - trashHandler = TrashHandlerRegistryUtil.getTrashHandler(trashHandler.getContainerModelClassName()); - - if (trashHandler == null) { - return null; - } - - containerModel = trashHandler.getContainerModel(containerModel.getParentContainerModelId()); - } - } - - return null; - } - - @Override - public long getTrashEntryClassPK() { - return getPrimaryKey(); - } - - @Override - public TrashHandler getTrashHandler() { - return TrashHandlerRegistryUtil.getTrashHandler(getModelClassName()); - } - - @Override - public boolean isInTrash() { - if (getStatus() == WorkflowConstants.STATUS_IN_TRASH) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInTrashContainer() { - TrashHandler trashHandler = getTrashHandler(); - - if ((trashHandler == null) || - Validator.isNull(trashHandler.getContainerModelClassName())) { - return false; - } - - try { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - if (containerModel == null) { - return false; - } - - if (containerModel instanceof TrashedModel) { - return ((TrashedModel)containerModel).isInTrash(); - } - } - catch (Exception e) { - } - - return false; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved} - */ - @Override - public boolean getApproved() { - return isApproved(); - } - - @Override - public boolean isApproved() { - if (getStatus() == WorkflowConstants.STATUS_APPROVED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDenied() { - if (getStatus() == WorkflowConstants.STATUS_DENIED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDraft() { - if (getStatus() == WorkflowConstants.STATUS_DRAFT) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isExpired() { - if (getStatus() == WorkflowConstants.STATUS_EXPIRED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInactive() { - if (getStatus() == WorkflowConstants.STATUS_INACTIVE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isIncomplete() { - if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isPending() { - if (getStatus() == WorkflowConstants.STATUS_PENDING) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isScheduled() { - if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) { - return true; - } - else { - return false; - } - } - - public BaseModel getArtistRemoteModel() { - return _artistRemoteModel; - } - - public void setArtistRemoteModel(BaseModel artistRemoteModel) { - _artistRemoteModel = artistRemoteModel; - } - - 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 = _artistRemoteModel.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(_artistRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - ArtistLocalServiceUtil.addArtist(this); - } - else { - ArtistLocalServiceUtil.updateArtist(this); - } - } - - @Override - public Artist toEscapedModel() { - return (Artist)ProxyUtil.newProxyInstance(Artist.class.getClassLoader(), - new Class[] { Artist.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - ArtistClp clone = new ArtistClp(); - - clone.setUuid(getUuid()); - clone.setArtistId(getArtistId()); - clone.setCompanyId(getCompanyId()); - clone.setGroupId(getGroupId()); - clone.setUserId(getUserId()); - clone.setUserName(getUserName()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setStatus(getStatus()); - clone.setStatusByUserId(getStatusByUserId()); - clone.setStatusByUserName(getStatusByUserName()); - clone.setStatusDate(getStatusDate()); - clone.setName(getName()); - clone.setBio(getBio()); - - return clone; - } - - @Override - public int compareTo(Artist artist) { - long primaryKey = artist.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof ArtistClp)) { - return false; - } - - ArtistClp artist = (ArtistClp)obj; - - long primaryKey = artist.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(29); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", artistId="); - sb.append(getArtistId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", groupId="); - sb.append(getGroupId()); - sb.append(", userId="); - sb.append(getUserId()); - sb.append(", userName="); - sb.append(getUserName()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", status="); - sb.append(getStatus()); - sb.append(", statusByUserId="); - sb.append(getStatusByUserId()); - sb.append(", statusByUserName="); - sb.append(getStatusByUserName()); - sb.append(", statusDate="); - sb.append(getStatusDate()); - sb.append(", name="); - sb.append(getName()); - sb.append(", bio="); - sb.append(getBio()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(46); - - sb.append(""); - sb.append("org.liferay.jukebox.model.Artist"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "artistId"); - sb.append( - "companyId"); - sb.append( - "groupId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "status"); - sb.append( - "statusByUserId"); - sb.append( - "statusByUserName"); - sb.append( - "statusDate"); - sb.append( - "name"); - sb.append( - "bio"); - - sb.append(""); - - return sb.toString(); - } - - private String _uuid; - private long _artistId; - private long _companyId; - private long _groupId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private int _status; - private long _statusByUserId; - private String _statusByUserUuid; - private String _statusByUserName; - private Date _statusDate; - private String _name; - private String _bio; - private BaseModel _artistRemoteModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistModel.java deleted file mode 100644 index a7f78e99b5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistModel.java +++ /dev/null @@ -1,495 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.kernel.bean.AutoEscape; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.StagedGroupedModel; -import com.liferay.portal.model.TrashedModel; -import com.liferay.portal.model.WorkflowedModel; -import com.liferay.portal.service.ServiceContext; - -import com.liferay.portlet.expando.model.ExpandoBridge; -import com.liferay.portlet.trash.model.TrashEntry; - -import java.io.Serializable; - -import java.util.Date; - -/** - * The base model interface for the Artist service. Represents a row in the "jukebox_Artist" database table, with each column mapped to a property of this class. - * - *

- * This interface and its corresponding implementation {@link org.liferay.jukebox.model.impl.ArtistModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.liferay.jukebox.model.impl.ArtistImpl}. - *

- * - * @author Julio Camarero - * @see Artist - * @see org.liferay.jukebox.model.impl.ArtistImpl - * @see org.liferay.jukebox.model.impl.ArtistModelImpl - * @generated - */ -public interface ArtistModel extends BaseModel, StagedGroupedModel, - TrashedModel, WorkflowedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a artist model instance should use the {@link Artist} interface instead. - */ - - /** - * Returns the primary key of this artist. - * - * @return the primary key of this artist - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this artist. - * - * @param primaryKey the primary key of this artist - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the uuid of this artist. - * - * @return the uuid of this artist - */ - @AutoEscape - @Override - public String getUuid(); - - /** - * Sets the uuid of this artist. - * - * @param uuid the uuid of this artist - */ - @Override - public void setUuid(String uuid); - - /** - * Returns the artist ID of this artist. - * - * @return the artist ID of this artist - */ - public long getArtistId(); - - /** - * Sets the artist ID of this artist. - * - * @param artistId the artist ID of this artist - */ - public void setArtistId(long artistId); - - /** - * Returns the company ID of this artist. - * - * @return the company ID of this artist - */ - @Override - public long getCompanyId(); - - /** - * Sets the company ID of this artist. - * - * @param companyId the company ID of this artist - */ - @Override - public void setCompanyId(long companyId); - - /** - * Returns the group ID of this artist. - * - * @return the group ID of this artist - */ - @Override - public long getGroupId(); - - /** - * Sets the group ID of this artist. - * - * @param groupId the group ID of this artist - */ - @Override - public void setGroupId(long groupId); - - /** - * Returns the user ID of this artist. - * - * @return the user ID of this artist - */ - @Override - public long getUserId(); - - /** - * Sets the user ID of this artist. - * - * @param userId the user ID of this artist - */ - @Override - public void setUserId(long userId); - - /** - * Returns the user uuid of this artist. - * - * @return the user uuid of this artist - * @throws SystemException if a system exception occurred - */ - @Override - public String getUserUuid() throws SystemException; - - /** - * Sets the user uuid of this artist. - * - * @param userUuid the user uuid of this artist - */ - @Override - public void setUserUuid(String userUuid); - - /** - * Returns the user name of this artist. - * - * @return the user name of this artist - */ - @AutoEscape - @Override - public String getUserName(); - - /** - * Sets the user name of this artist. - * - * @param userName the user name of this artist - */ - @Override - public void setUserName(String userName); - - /** - * Returns the create date of this artist. - * - * @return the create date of this artist - */ - @Override - public Date getCreateDate(); - - /** - * Sets the create date of this artist. - * - * @param createDate the create date of this artist - */ - @Override - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this artist. - * - * @return the modified date of this artist - */ - @Override - public Date getModifiedDate(); - - /** - * Sets the modified date of this artist. - * - * @param modifiedDate the modified date of this artist - */ - @Override - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the status of this artist. - * - * @return the status of this artist - */ - @Override - public int getStatus(); - - /** - * Sets the status of this artist. - * - * @param status the status of this artist - */ - @Override - public void setStatus(int status); - - /** - * Returns the status by user ID of this artist. - * - * @return the status by user ID of this artist - */ - @Override - public long getStatusByUserId(); - - /** - * Sets the status by user ID of this artist. - * - * @param statusByUserId the status by user ID of this artist - */ - @Override - public void setStatusByUserId(long statusByUserId); - - /** - * Returns the status by user uuid of this artist. - * - * @return the status by user uuid of this artist - * @throws SystemException if a system exception occurred - */ - @Override - public String getStatusByUserUuid() throws SystemException; - - /** - * Sets the status by user uuid of this artist. - * - * @param statusByUserUuid the status by user uuid of this artist - */ - @Override - public void setStatusByUserUuid(String statusByUserUuid); - - /** - * Returns the status by user name of this artist. - * - * @return the status by user name of this artist - */ - @AutoEscape - @Override - public String getStatusByUserName(); - - /** - * Sets the status by user name of this artist. - * - * @param statusByUserName the status by user name of this artist - */ - @Override - public void setStatusByUserName(String statusByUserName); - - /** - * Returns the status date of this artist. - * - * @return the status date of this artist - */ - @Override - public Date getStatusDate(); - - /** - * Sets the status date of this artist. - * - * @param statusDate the status date of this artist - */ - @Override - public void setStatusDate(Date statusDate); - - /** - * Returns the name of this artist. - * - * @return the name of this artist - */ - @AutoEscape - public String getName(); - - /** - * Sets the name of this artist. - * - * @param name the name of this artist - */ - public void setName(String name); - - /** - * Returns the bio of this artist. - * - * @return the bio of this artist - */ - @AutoEscape - public String getBio(); - - /** - * Sets the bio of this artist. - * - * @param bio the bio of this artist - */ - public void setBio(String bio); - - /** - * Returns the trash entry created when this artist was moved to the Recycle Bin. The trash entry may belong to one of the ancestors of this artist. - * - * @return the trash entry created when this artist was moved to the Recycle Bin - * @throws SystemException if a system exception occurred - */ - @Override - public TrashEntry getTrashEntry() throws PortalException, SystemException; - - /** - * Returns the class primary key of the trash entry for this artist. - * - * @return the class primary key of the trash entry for this artist - */ - @Override - public long getTrashEntryClassPK(); - - /** - * Returns the trash handler for this artist. - * - * @return the trash handler for this artist - */ - @Override - public TrashHandler getTrashHandler(); - - /** - * Returns true if this artist is in the Recycle Bin. - * - * @return true if this artist is in the Recycle Bin; false otherwise - */ - @Override - public boolean isInTrash(); - - /** - * Returns true if the parent of this artist is in the Recycle Bin. - * - * @return true if the parent of this artist is in the Recycle Bin; false otherwise - * @throws SystemException if a system exception occurred - */ - @Override - public boolean isInTrashContainer(); - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved()} - */ - @Override - public boolean getApproved(); - - /** - * Returns true if this artist is approved. - * - * @return true if this artist is approved; false otherwise - */ - @Override - public boolean isApproved(); - - /** - * Returns true if this artist is denied. - * - * @return true if this artist is denied; false otherwise - */ - @Override - public boolean isDenied(); - - /** - * Returns true if this artist is a draft. - * - * @return true if this artist is a draft; false otherwise - */ - @Override - public boolean isDraft(); - - /** - * Returns true if this artist is expired. - * - * @return true if this artist is expired; false otherwise - */ - @Override - public boolean isExpired(); - - /** - * Returns true if this artist is inactive. - * - * @return true if this artist is inactive; false otherwise - */ - @Override - public boolean isInactive(); - - /** - * Returns true if this artist is incomplete. - * - * @return true if this artist is incomplete; false otherwise - */ - @Override - public boolean isIncomplete(); - - /** - * Returns true if this artist is pending. - * - * @return true if this artist is pending; false otherwise - */ - @Override - public boolean isPending(); - - /** - * Returns true if this artist is scheduled. - * - * @return true if this artist is scheduled; false otherwise - */ - @Override - public boolean isScheduled(); - - @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(Artist artist); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public Artist toEscapedModel(); - - @Override - public Artist toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistSoap.java deleted file mode 100644 index 3420b73125..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistSoap.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 org.liferay.jukebox.service.http.ArtistServiceSoap}. - * - * @author Julio Camarero - * @see org.liferay.jukebox.service.http.ArtistServiceSoap - * @generated - */ -public class ArtistSoap implements Serializable { - public static ArtistSoap toSoapModel(Artist model) { - ArtistSoap soapModel = new ArtistSoap(); - - soapModel.setUuid(model.getUuid()); - soapModel.setArtistId(model.getArtistId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setGroupId(model.getGroupId()); - soapModel.setUserId(model.getUserId()); - soapModel.setUserName(model.getUserName()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setStatus(model.getStatus()); - soapModel.setStatusByUserId(model.getStatusByUserId()); - soapModel.setStatusByUserName(model.getStatusByUserName()); - soapModel.setStatusDate(model.getStatusDate()); - soapModel.setName(model.getName()); - soapModel.setBio(model.getBio()); - - return soapModel; - } - - public static ArtistSoap[] toSoapModels(Artist[] models) { - ArtistSoap[] soapModels = new ArtistSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static ArtistSoap[][] toSoapModels(Artist[][] models) { - ArtistSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new ArtistSoap[models.length][models[0].length]; - } - else { - soapModels = new ArtistSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static ArtistSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (Artist model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new ArtistSoap[soapModels.size()]); - } - - public ArtistSoap() { - } - - public long getPrimaryKey() { - return _artistId; - } - - public void setPrimaryKey(long pk) { - setArtistId(pk); - } - - public String getUuid() { - return _uuid; - } - - public void setUuid(String uuid) { - _uuid = uuid; - } - - public long getArtistId() { - return _artistId; - } - - public void setArtistId(long artistId) { - _artistId = artistId; - } - - public long getCompanyId() { - return _companyId; - } - - public void setCompanyId(long companyId) { - _companyId = companyId; - } - - public long getGroupId() { - return _groupId; - } - - public void setGroupId(long groupId) { - _groupId = groupId; - } - - 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 Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public int getStatus() { - return _status; - } - - public void setStatus(int status) { - _status = status; - } - - public long getStatusByUserId() { - return _statusByUserId; - } - - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - } - - public String getStatusByUserName() { - return _statusByUserName; - } - - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - } - - public Date getStatusDate() { - return _statusDate; - } - - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - } - - public String getName() { - return _name; - } - - public void setName(String name) { - _name = name; - } - - public String getBio() { - return _bio; - } - - public void setBio(String bio) { - _bio = bio; - } - - private String _uuid; - private long _artistId; - private long _companyId; - private long _groupId; - private long _userId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private int _status; - private long _statusByUserId; - private String _statusByUserName; - private Date _statusDate; - private String _name; - private String _bio; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistWrapper.java deleted file mode 100644 index 4e82e273df..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/ArtistWrapper.java +++ /dev/null @@ -1,811 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.kernel.lar.StagedModelType; -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 Artist}. - *

- * - * @author Julio Camarero - * @see Artist - * @generated - */ -public class ArtistWrapper implements Artist, ModelWrapper { - public ArtistWrapper(Artist artist) { - _artist = artist; - } - - @Override - public Class getModelClass() { - return Artist.class; - } - - @Override - public String getModelClassName() { - return Artist.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("artistId", getArtistId()); - attributes.put("companyId", getCompanyId()); - attributes.put("groupId", getGroupId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - attributes.put("name", getName()); - attributes.put("bio", getBio()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long artistId = (Long)attributes.get("artistId"); - - if (artistId != null) { - setArtistId(artistId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Long groupId = (Long)attributes.get("groupId"); - - if (groupId != null) { - setGroupId(groupId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - String bio = (String)attributes.get("bio"); - - if (bio != null) { - setBio(bio); - } - } - - /** - * Returns the primary key of this artist. - * - * @return the primary key of this artist - */ - @Override - public long getPrimaryKey() { - return _artist.getPrimaryKey(); - } - - /** - * Sets the primary key of this artist. - * - * @param primaryKey the primary key of this artist - */ - @Override - public void setPrimaryKey(long primaryKey) { - _artist.setPrimaryKey(primaryKey); - } - - /** - * Returns the uuid of this artist. - * - * @return the uuid of this artist - */ - @Override - public java.lang.String getUuid() { - return _artist.getUuid(); - } - - /** - * Sets the uuid of this artist. - * - * @param uuid the uuid of this artist - */ - @Override - public void setUuid(java.lang.String uuid) { - _artist.setUuid(uuid); - } - - /** - * Returns the artist ID of this artist. - * - * @return the artist ID of this artist - */ - @Override - public long getArtistId() { - return _artist.getArtistId(); - } - - /** - * Sets the artist ID of this artist. - * - * @param artistId the artist ID of this artist - */ - @Override - public void setArtistId(long artistId) { - _artist.setArtistId(artistId); - } - - /** - * Returns the company ID of this artist. - * - * @return the company ID of this artist - */ - @Override - public long getCompanyId() { - return _artist.getCompanyId(); - } - - /** - * Sets the company ID of this artist. - * - * @param companyId the company ID of this artist - */ - @Override - public void setCompanyId(long companyId) { - _artist.setCompanyId(companyId); - } - - /** - * Returns the group ID of this artist. - * - * @return the group ID of this artist - */ - @Override - public long getGroupId() { - return _artist.getGroupId(); - } - - /** - * Sets the group ID of this artist. - * - * @param groupId the group ID of this artist - */ - @Override - public void setGroupId(long groupId) { - _artist.setGroupId(groupId); - } - - /** - * Returns the user ID of this artist. - * - * @return the user ID of this artist - */ - @Override - public long getUserId() { - return _artist.getUserId(); - } - - /** - * Sets the user ID of this artist. - * - * @param userId the user ID of this artist - */ - @Override - public void setUserId(long userId) { - _artist.setUserId(userId); - } - - /** - * Returns the user uuid of this artist. - * - * @return the user uuid of this artist - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _artist.getUserUuid(); - } - - /** - * Sets the user uuid of this artist. - * - * @param userUuid the user uuid of this artist - */ - @Override - public void setUserUuid(java.lang.String userUuid) { - _artist.setUserUuid(userUuid); - } - - /** - * Returns the user name of this artist. - * - * @return the user name of this artist - */ - @Override - public java.lang.String getUserName() { - return _artist.getUserName(); - } - - /** - * Sets the user name of this artist. - * - * @param userName the user name of this artist - */ - @Override - public void setUserName(java.lang.String userName) { - _artist.setUserName(userName); - } - - /** - * Returns the create date of this artist. - * - * @return the create date of this artist - */ - @Override - public java.util.Date getCreateDate() { - return _artist.getCreateDate(); - } - - /** - * Sets the create date of this artist. - * - * @param createDate the create date of this artist - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _artist.setCreateDate(createDate); - } - - /** - * Returns the modified date of this artist. - * - * @return the modified date of this artist - */ - @Override - public java.util.Date getModifiedDate() { - return _artist.getModifiedDate(); - } - - /** - * Sets the modified date of this artist. - * - * @param modifiedDate the modified date of this artist - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _artist.setModifiedDate(modifiedDate); - } - - /** - * Returns the status of this artist. - * - * @return the status of this artist - */ - @Override - public int getStatus() { - return _artist.getStatus(); - } - - /** - * Sets the status of this artist. - * - * @param status the status of this artist - */ - @Override - public void setStatus(int status) { - _artist.setStatus(status); - } - - /** - * Returns the status by user ID of this artist. - * - * @return the status by user ID of this artist - */ - @Override - public long getStatusByUserId() { - return _artist.getStatusByUserId(); - } - - /** - * Sets the status by user ID of this artist. - * - * @param statusByUserId the status by user ID of this artist - */ - @Override - public void setStatusByUserId(long statusByUserId) { - _artist.setStatusByUserId(statusByUserId); - } - - /** - * Returns the status by user uuid of this artist. - * - * @return the status by user uuid of this artist - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getStatusByUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _artist.getStatusByUserUuid(); - } - - /** - * Sets the status by user uuid of this artist. - * - * @param statusByUserUuid the status by user uuid of this artist - */ - @Override - public void setStatusByUserUuid(java.lang.String statusByUserUuid) { - _artist.setStatusByUserUuid(statusByUserUuid); - } - - /** - * Returns the status by user name of this artist. - * - * @return the status by user name of this artist - */ - @Override - public java.lang.String getStatusByUserName() { - return _artist.getStatusByUserName(); - } - - /** - * Sets the status by user name of this artist. - * - * @param statusByUserName the status by user name of this artist - */ - @Override - public void setStatusByUserName(java.lang.String statusByUserName) { - _artist.setStatusByUserName(statusByUserName); - } - - /** - * Returns the status date of this artist. - * - * @return the status date of this artist - */ - @Override - public java.util.Date getStatusDate() { - return _artist.getStatusDate(); - } - - /** - * Sets the status date of this artist. - * - * @param statusDate the status date of this artist - */ - @Override - public void setStatusDate(java.util.Date statusDate) { - _artist.setStatusDate(statusDate); - } - - /** - * Returns the name of this artist. - * - * @return the name of this artist - */ - @Override - public java.lang.String getName() { - return _artist.getName(); - } - - /** - * Sets the name of this artist. - * - * @param name the name of this artist - */ - @Override - public void setName(java.lang.String name) { - _artist.setName(name); - } - - /** - * Returns the bio of this artist. - * - * @return the bio of this artist - */ - @Override - public java.lang.String getBio() { - return _artist.getBio(); - } - - /** - * Sets the bio of this artist. - * - * @param bio the bio of this artist - */ - @Override - public void setBio(java.lang.String bio) { - _artist.setBio(bio); - } - - /** - * Returns the trash entry created when this artist was moved to the Recycle Bin. The trash entry may belong to one of the ancestors of this artist. - * - * @return the trash entry created when this artist was moved to the Recycle Bin - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.portlet.trash.model.TrashEntry getTrashEntry() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artist.getTrashEntry(); - } - - /** - * Returns the class primary key of the trash entry for this artist. - * - * @return the class primary key of the trash entry for this artist - */ - @Override - public long getTrashEntryClassPK() { - return _artist.getTrashEntryClassPK(); - } - - /** - * Returns the trash handler for this artist. - * - * @return the trash handler for this artist - */ - @Override - public com.liferay.portal.kernel.trash.TrashHandler getTrashHandler() { - return _artist.getTrashHandler(); - } - - /** - * Returns true if this artist is in the Recycle Bin. - * - * @return true if this artist is in the Recycle Bin; false otherwise - */ - @Override - public boolean isInTrash() { - return _artist.isInTrash(); - } - - /** - * Returns true if the parent of this artist is in the Recycle Bin. - * - * @return true if the parent of this artist is in the Recycle Bin; false otherwise - * @throws SystemException if a system exception occurred - */ - @Override - public boolean isInTrashContainer() { - return _artist.isInTrashContainer(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved()} - */ - @Override - public boolean getApproved() { - return _artist.getApproved(); - } - - /** - * Returns true if this artist is approved. - * - * @return true if this artist is approved; false otherwise - */ - @Override - public boolean isApproved() { - return _artist.isApproved(); - } - - /** - * Returns true if this artist is denied. - * - * @return true if this artist is denied; false otherwise - */ - @Override - public boolean isDenied() { - return _artist.isDenied(); - } - - /** - * Returns true if this artist is a draft. - * - * @return true if this artist is a draft; false otherwise - */ - @Override - public boolean isDraft() { - return _artist.isDraft(); - } - - /** - * Returns true if this artist is expired. - * - * @return true if this artist is expired; false otherwise - */ - @Override - public boolean isExpired() { - return _artist.isExpired(); - } - - /** - * Returns true if this artist is inactive. - * - * @return true if this artist is inactive; false otherwise - */ - @Override - public boolean isInactive() { - return _artist.isInactive(); - } - - /** - * Returns true if this artist is incomplete. - * - * @return true if this artist is incomplete; false otherwise - */ - @Override - public boolean isIncomplete() { - return _artist.isIncomplete(); - } - - /** - * Returns true if this artist is pending. - * - * @return true if this artist is pending; false otherwise - */ - @Override - public boolean isPending() { - return _artist.isPending(); - } - - /** - * Returns true if this artist is scheduled. - * - * @return true if this artist is scheduled; false otherwise - */ - @Override - public boolean isScheduled() { - return _artist.isScheduled(); - } - - @Override - public boolean isNew() { - return _artist.isNew(); - } - - @Override - public void setNew(boolean n) { - _artist.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _artist.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _artist.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _artist.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _artist.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _artist.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _artist.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _artist.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _artist.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _artist.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new ArtistWrapper((Artist)_artist.clone()); - } - - @Override - public int compareTo(org.liferay.jukebox.model.Artist artist) { - return _artist.compareTo(artist); - } - - @Override - public int hashCode() { - return _artist.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _artist.toCacheModel(); - } - - @Override - public org.liferay.jukebox.model.Artist toEscapedModel() { - return new ArtistWrapper(_artist.toEscapedModel()); - } - - @Override - public org.liferay.jukebox.model.Artist toUnescapedModel() { - return new ArtistWrapper(_artist.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _artist.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _artist.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _artist.persist(); - } - - @Override - public com.liferay.portal.kernel.repository.model.FileEntry getCustomImage() - throws com.liferay.portal.kernel.exception.SystemException { - return _artist.getCustomImage(); - } - - @Override - public java.lang.String getImageURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artist.getImageURL(themeDisplay); - } - - @Override - public boolean hasCustomImage() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artist.hasCustomImage(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof ArtistWrapper)) { - return false; - } - - ArtistWrapper artistWrapper = (ArtistWrapper)obj; - - if (Validator.equals(_artist, artistWrapper._artist)) { - return true; - } - - return false; - } - - @Override - public StagedModelType getStagedModelType() { - return _artist.getStagedModelType(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public Artist getWrappedArtist() { - return _artist; - } - - @Override - public Artist getWrappedModel() { - return _artist; - } - - @Override - public void resetOriginalValues() { - _artist.resetOriginalValues(); - } - - private Artist _artist; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/Song.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/Song.java deleted file mode 100644 index bda89b0126..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/Song.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the Song service. Represents a row in the "jukebox_Song" database table, with each column mapped to a property of this class. - * - * @author Julio Camarero - * @see SongModel - * @see org.liferay.jukebox.model.impl.SongImpl - * @see org.liferay.jukebox.model.impl.SongModelImpl - * @generated - */ -public interface Song extends SongModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link org.liferay.jukebox.model.impl.SongImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - public java.lang.String getImageURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.SystemException; - - public java.lang.String getLyricsURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public java.lang.String getSongURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay, - java.lang.String audioContainer) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongClp.java deleted file mode 100644 index 1b6b322675..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongClp.java +++ /dev/null @@ -1,1074 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil; -import com.liferay.portal.kernel.util.ProxyUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.ContainerModel; -import com.liferay.portal.model.TrashedModel; -import com.liferay.portal.model.impl.BaseModelImpl; -import com.liferay.portal.util.PortalUtil; - -import com.liferay.portlet.trash.model.TrashEntry; -import com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil; - -import org.liferay.jukebox.service.ClpSerializer; -import org.liferay.jukebox.service.SongLocalServiceUtil; - -import java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Julio Camarero - */ -public class SongClp extends BaseModelImpl implements Song { - public SongClp() { - } - - @Override - public Class getModelClass() { - return Song.class; - } - - @Override - public String getModelClassName() { - return Song.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _songId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setSongId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _songId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("songId", getSongId()); - attributes.put("companyId", getCompanyId()); - attributes.put("groupId", getGroupId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("artistId", getArtistId()); - attributes.put("albumId", getAlbumId()); - attributes.put("name", getName()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long songId = (Long)attributes.get("songId"); - - if (songId != null) { - setSongId(songId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Long groupId = (Long)attributes.get("groupId"); - - if (groupId != null) { - setGroupId(groupId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long artistId = (Long)attributes.get("artistId"); - - if (artistId != null) { - setArtistId(artistId); - } - - Long albumId = (Long)attributes.get("albumId"); - - if (albumId != null) { - setAlbumId(albumId); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - } - - @Override - public String getUuid() { - return _uuid; - } - - @Override - public void setUuid(String uuid) { - _uuid = uuid; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setUuid", String.class); - - method.invoke(_songRemoteModel, uuid); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getSongId() { - return _songId; - } - - @Override - public void setSongId(long songId) { - _songId = songId; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setSongId", long.class); - - method.invoke(_songRemoteModel, songId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_songRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _groupId = groupId; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setGroupId", long.class); - - method.invoke(_songRemoteModel, groupId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _userId = userId; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserId", long.class); - - method.invoke(_songRemoteModel, 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 (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserName", String.class); - - method.invoke(_songRemoteModel, userName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_songRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_songRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getArtistId() { - return _artistId; - } - - @Override - public void setArtistId(long artistId) { - _artistId = artistId; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setArtistId", long.class); - - method.invoke(_songRemoteModel, artistId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getAlbumId() { - return _albumId; - } - - @Override - public void setAlbumId(long albumId) { - _albumId = albumId; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setAlbumId", long.class); - - method.invoke(_songRemoteModel, albumId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getName() { - return _name; - } - - @Override - public void setName(String name) { - _name = name; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setName", String.class); - - method.invoke(_songRemoteModel, name); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _status = status; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatus", int.class); - - method.invoke(_songRemoteModel, status); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getStatusByUserId() { - return _statusByUserId; - } - - @Override - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusByUserId", long.class); - - method.invoke(_songRemoteModel, statusByUserId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getStatusByUserUuid() throws SystemException { - return PortalUtil.getUserValue(getStatusByUserId(), "uuid", - _statusByUserUuid); - } - - @Override - public void setStatusByUserUuid(String statusByUserUuid) { - _statusByUserUuid = statusByUserUuid; - } - - @Override - public String getStatusByUserName() { - return _statusByUserName; - } - - @Override - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusByUserName", - String.class); - - method.invoke(_songRemoteModel, statusByUserName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getStatusDate() { - return _statusDate; - } - - @Override - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - - if (_songRemoteModel != null) { - try { - Class clazz = _songRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusDate", Date.class); - - method.invoke(_songRemoteModel, statusDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public java.lang.String getSongURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay, - java.lang.String audioContainer) { - try { - String methodName = "getSongURL"; - - Class[] parameterTypes = new Class[] { - com.liferay.portal.theme.ThemeDisplay.class, - java.lang.String.class - }; - - Object[] parameterValues = new Object[] { themeDisplay, audioContainer }; - - java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public java.lang.String getImageURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) { - try { - String methodName = "getImageURL"; - - Class[] parameterTypes = new Class[] { - com.liferay.portal.theme.ThemeDisplay.class - }; - - Object[] parameterValues = new Object[] { themeDisplay }; - - java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public java.lang.String getLyricsURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) { - try { - String methodName = "getLyricsURL"; - - Class[] parameterTypes = new Class[] { - com.liferay.portal.theme.ThemeDisplay.class - }; - - Object[] parameterValues = new Object[] { themeDisplay }; - - java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Song.class.getName())); - } - - @Override - public TrashEntry getTrashEntry() throws PortalException, SystemException { - if (!isInTrash()) { - return null; - } - - TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(), - getTrashEntryClassPK()); - - if (trashEntry != null) { - return trashEntry; - } - - TrashHandler trashHandler = getTrashHandler(); - - if (!Validator.isNull(trashHandler.getContainerModelClassName())) { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - while (containerModel != null) { - if (containerModel instanceof TrashedModel) { - TrashedModel trashedModel = (TrashedModel)containerModel; - - return trashedModel.getTrashEntry(); - } - - trashHandler = TrashHandlerRegistryUtil.getTrashHandler(trashHandler.getContainerModelClassName()); - - if (trashHandler == null) { - return null; - } - - containerModel = trashHandler.getContainerModel(containerModel.getParentContainerModelId()); - } - } - - return null; - } - - @Override - public long getTrashEntryClassPK() { - return getPrimaryKey(); - } - - @Override - public TrashHandler getTrashHandler() { - return TrashHandlerRegistryUtil.getTrashHandler(getModelClassName()); - } - - @Override - public boolean isInTrash() { - if (getStatus() == WorkflowConstants.STATUS_IN_TRASH) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInTrashContainer() { - TrashHandler trashHandler = getTrashHandler(); - - if ((trashHandler == null) || - Validator.isNull(trashHandler.getContainerModelClassName())) { - return false; - } - - try { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - if (containerModel == null) { - return false; - } - - if (containerModel instanceof TrashedModel) { - return ((TrashedModel)containerModel).isInTrash(); - } - } - catch (Exception e) { - } - - return false; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved} - */ - @Override - public boolean getApproved() { - return isApproved(); - } - - @Override - public boolean isApproved() { - if (getStatus() == WorkflowConstants.STATUS_APPROVED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDenied() { - if (getStatus() == WorkflowConstants.STATUS_DENIED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDraft() { - if (getStatus() == WorkflowConstants.STATUS_DRAFT) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isExpired() { - if (getStatus() == WorkflowConstants.STATUS_EXPIRED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInactive() { - if (getStatus() == WorkflowConstants.STATUS_INACTIVE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isIncomplete() { - if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isPending() { - if (getStatus() == WorkflowConstants.STATUS_PENDING) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isScheduled() { - if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) { - return true; - } - else { - return false; - } - } - - public BaseModel getSongRemoteModel() { - return _songRemoteModel; - } - - public void setSongRemoteModel(BaseModel songRemoteModel) { - _songRemoteModel = songRemoteModel; - } - - 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 = _songRemoteModel.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(_songRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - SongLocalServiceUtil.addSong(this); - } - else { - SongLocalServiceUtil.updateSong(this); - } - } - - @Override - public Song toEscapedModel() { - return (Song)ProxyUtil.newProxyInstance(Song.class.getClassLoader(), - new Class[] { Song.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - SongClp clone = new SongClp(); - - clone.setUuid(getUuid()); - clone.setSongId(getSongId()); - clone.setCompanyId(getCompanyId()); - clone.setGroupId(getGroupId()); - clone.setUserId(getUserId()); - clone.setUserName(getUserName()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setArtistId(getArtistId()); - clone.setAlbumId(getAlbumId()); - clone.setName(getName()); - clone.setStatus(getStatus()); - clone.setStatusByUserId(getStatusByUserId()); - clone.setStatusByUserName(getStatusByUserName()); - clone.setStatusDate(getStatusDate()); - - return clone; - } - - @Override - public int compareTo(Song song) { - long primaryKey = song.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof SongClp)) { - return false; - } - - SongClp song = (SongClp)obj; - - long primaryKey = song.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(31); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", songId="); - sb.append(getSongId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", groupId="); - sb.append(getGroupId()); - sb.append(", userId="); - sb.append(getUserId()); - sb.append(", userName="); - sb.append(getUserName()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", artistId="); - sb.append(getArtistId()); - sb.append(", albumId="); - sb.append(getAlbumId()); - sb.append(", name="); - sb.append(getName()); - sb.append(", status="); - sb.append(getStatus()); - sb.append(", statusByUserId="); - sb.append(getStatusByUserId()); - sb.append(", statusByUserName="); - sb.append(getStatusByUserName()); - sb.append(", statusDate="); - sb.append(getStatusDate()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(49); - - sb.append(""); - sb.append("org.liferay.jukebox.model.Song"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "songId"); - sb.append( - "companyId"); - sb.append( - "groupId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "artistId"); - sb.append( - "albumId"); - sb.append( - "name"); - sb.append( - "status"); - sb.append( - "statusByUserId"); - sb.append( - "statusByUserName"); - sb.append( - "statusDate"); - - sb.append(""); - - return sb.toString(); - } - - private String _uuid; - private long _songId; - private long _companyId; - private long _groupId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _artistId; - private long _albumId; - private String _name; - private int _status; - private long _statusByUserId; - private String _statusByUserUuid; - private String _statusByUserName; - private Date _statusDate; - private BaseModel _songRemoteModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongModel.java deleted file mode 100644 index ca579292e6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongModel.java +++ /dev/null @@ -1,508 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.kernel.bean.AutoEscape; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.StagedGroupedModel; -import com.liferay.portal.model.TrashedModel; -import com.liferay.portal.model.WorkflowedModel; -import com.liferay.portal.service.ServiceContext; - -import com.liferay.portlet.expando.model.ExpandoBridge; -import com.liferay.portlet.trash.model.TrashEntry; - -import java.io.Serializable; - -import java.util.Date; - -/** - * The base model interface for the Song service. Represents a row in the "jukebox_Song" database table, with each column mapped to a property of this class. - * - *

- * This interface and its corresponding implementation {@link org.liferay.jukebox.model.impl.SongModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.liferay.jukebox.model.impl.SongImpl}. - *

- * - * @author Julio Camarero - * @see Song - * @see org.liferay.jukebox.model.impl.SongImpl - * @see org.liferay.jukebox.model.impl.SongModelImpl - * @generated - */ -public interface SongModel extends BaseModel, StagedGroupedModel, - TrashedModel, WorkflowedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a song model instance should use the {@link Song} interface instead. - */ - - /** - * Returns the primary key of this song. - * - * @return the primary key of this song - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this song. - * - * @param primaryKey the primary key of this song - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the uuid of this song. - * - * @return the uuid of this song - */ - @AutoEscape - @Override - public String getUuid(); - - /** - * Sets the uuid of this song. - * - * @param uuid the uuid of this song - */ - @Override - public void setUuid(String uuid); - - /** - * Returns the song ID of this song. - * - * @return the song ID of this song - */ - public long getSongId(); - - /** - * Sets the song ID of this song. - * - * @param songId the song ID of this song - */ - public void setSongId(long songId); - - /** - * Returns the company ID of this song. - * - * @return the company ID of this song - */ - @Override - public long getCompanyId(); - - /** - * Sets the company ID of this song. - * - * @param companyId the company ID of this song - */ - @Override - public void setCompanyId(long companyId); - - /** - * Returns the group ID of this song. - * - * @return the group ID of this song - */ - @Override - public long getGroupId(); - - /** - * Sets the group ID of this song. - * - * @param groupId the group ID of this song - */ - @Override - public void setGroupId(long groupId); - - /** - * Returns the user ID of this song. - * - * @return the user ID of this song - */ - @Override - public long getUserId(); - - /** - * Sets the user ID of this song. - * - * @param userId the user ID of this song - */ - @Override - public void setUserId(long userId); - - /** - * Returns the user uuid of this song. - * - * @return the user uuid of this song - * @throws SystemException if a system exception occurred - */ - @Override - public String getUserUuid() throws SystemException; - - /** - * Sets the user uuid of this song. - * - * @param userUuid the user uuid of this song - */ - @Override - public void setUserUuid(String userUuid); - - /** - * Returns the user name of this song. - * - * @return the user name of this song - */ - @AutoEscape - @Override - public String getUserName(); - - /** - * Sets the user name of this song. - * - * @param userName the user name of this song - */ - @Override - public void setUserName(String userName); - - /** - * Returns the create date of this song. - * - * @return the create date of this song - */ - @Override - public Date getCreateDate(); - - /** - * Sets the create date of this song. - * - * @param createDate the create date of this song - */ - @Override - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this song. - * - * @return the modified date of this song - */ - @Override - public Date getModifiedDate(); - - /** - * Sets the modified date of this song. - * - * @param modifiedDate the modified date of this song - */ - @Override - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the artist ID of this song. - * - * @return the artist ID of this song - */ - public long getArtistId(); - - /** - * Sets the artist ID of this song. - * - * @param artistId the artist ID of this song - */ - public void setArtistId(long artistId); - - /** - * Returns the album ID of this song. - * - * @return the album ID of this song - */ - public long getAlbumId(); - - /** - * Sets the album ID of this song. - * - * @param albumId the album ID of this song - */ - public void setAlbumId(long albumId); - - /** - * Returns the name of this song. - * - * @return the name of this song - */ - @AutoEscape - public String getName(); - - /** - * Sets the name of this song. - * - * @param name the name of this song - */ - public void setName(String name); - - /** - * Returns the status of this song. - * - * @return the status of this song - */ - @Override - public int getStatus(); - - /** - * Sets the status of this song. - * - * @param status the status of this song - */ - @Override - public void setStatus(int status); - - /** - * Returns the status by user ID of this song. - * - * @return the status by user ID of this song - */ - @Override - public long getStatusByUserId(); - - /** - * Sets the status by user ID of this song. - * - * @param statusByUserId the status by user ID of this song - */ - @Override - public void setStatusByUserId(long statusByUserId); - - /** - * Returns the status by user uuid of this song. - * - * @return the status by user uuid of this song - * @throws SystemException if a system exception occurred - */ - @Override - public String getStatusByUserUuid() throws SystemException; - - /** - * Sets the status by user uuid of this song. - * - * @param statusByUserUuid the status by user uuid of this song - */ - @Override - public void setStatusByUserUuid(String statusByUserUuid); - - /** - * Returns the status by user name of this song. - * - * @return the status by user name of this song - */ - @AutoEscape - @Override - public String getStatusByUserName(); - - /** - * Sets the status by user name of this song. - * - * @param statusByUserName the status by user name of this song - */ - @Override - public void setStatusByUserName(String statusByUserName); - - /** - * Returns the status date of this song. - * - * @return the status date of this song - */ - @Override - public Date getStatusDate(); - - /** - * Sets the status date of this song. - * - * @param statusDate the status date of this song - */ - @Override - public void setStatusDate(Date statusDate); - - /** - * Returns the trash entry created when this song was moved to the Recycle Bin. The trash entry may belong to one of the ancestors of this song. - * - * @return the trash entry created when this song was moved to the Recycle Bin - * @throws SystemException if a system exception occurred - */ - @Override - public TrashEntry getTrashEntry() throws PortalException, SystemException; - - /** - * Returns the class primary key of the trash entry for this song. - * - * @return the class primary key of the trash entry for this song - */ - @Override - public long getTrashEntryClassPK(); - - /** - * Returns the trash handler for this song. - * - * @return the trash handler for this song - */ - @Override - public TrashHandler getTrashHandler(); - - /** - * Returns true if this song is in the Recycle Bin. - * - * @return true if this song is in the Recycle Bin; false otherwise - */ - @Override - public boolean isInTrash(); - - /** - * Returns true if the parent of this song is in the Recycle Bin. - * - * @return true if the parent of this song is in the Recycle Bin; false otherwise - * @throws SystemException if a system exception occurred - */ - @Override - public boolean isInTrashContainer(); - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved()} - */ - @Override - public boolean getApproved(); - - /** - * Returns true if this song is approved. - * - * @return true if this song is approved; false otherwise - */ - @Override - public boolean isApproved(); - - /** - * Returns true if this song is denied. - * - * @return true if this song is denied; false otherwise - */ - @Override - public boolean isDenied(); - - /** - * Returns true if this song is a draft. - * - * @return true if this song is a draft; false otherwise - */ - @Override - public boolean isDraft(); - - /** - * Returns true if this song is expired. - * - * @return true if this song is expired; false otherwise - */ - @Override - public boolean isExpired(); - - /** - * Returns true if this song is inactive. - * - * @return true if this song is inactive; false otherwise - */ - @Override - public boolean isInactive(); - - /** - * Returns true if this song is incomplete. - * - * @return true if this song is incomplete; false otherwise - */ - @Override - public boolean isIncomplete(); - - /** - * Returns true if this song is pending. - * - * @return true if this song is pending; false otherwise - */ - @Override - public boolean isPending(); - - /** - * Returns true if this song is scheduled. - * - * @return true if this song is scheduled; false otherwise - */ - @Override - public boolean isScheduled(); - - @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(Song song); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public Song toEscapedModel(); - - @Override - public Song toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongSoap.java deleted file mode 100644 index 8c9ce6ce8b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongSoap.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 org.liferay.jukebox.service.http.SongServiceSoap}. - * - * @author Julio Camarero - * @see org.liferay.jukebox.service.http.SongServiceSoap - * @generated - */ -public class SongSoap implements Serializable { - public static SongSoap toSoapModel(Song model) { - SongSoap soapModel = new SongSoap(); - - soapModel.setUuid(model.getUuid()); - soapModel.setSongId(model.getSongId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setGroupId(model.getGroupId()); - soapModel.setUserId(model.getUserId()); - soapModel.setUserName(model.getUserName()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setArtistId(model.getArtistId()); - soapModel.setAlbumId(model.getAlbumId()); - soapModel.setName(model.getName()); - soapModel.setStatus(model.getStatus()); - soapModel.setStatusByUserId(model.getStatusByUserId()); - soapModel.setStatusByUserName(model.getStatusByUserName()); - soapModel.setStatusDate(model.getStatusDate()); - - return soapModel; - } - - public static SongSoap[] toSoapModels(Song[] models) { - SongSoap[] soapModels = new SongSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static SongSoap[][] toSoapModels(Song[][] models) { - SongSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new SongSoap[models.length][models[0].length]; - } - else { - soapModels = new SongSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static SongSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (Song model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new SongSoap[soapModels.size()]); - } - - public SongSoap() { - } - - public long getPrimaryKey() { - return _songId; - } - - public void setPrimaryKey(long pk) { - setSongId(pk); - } - - public String getUuid() { - return _uuid; - } - - public void setUuid(String uuid) { - _uuid = uuid; - } - - public long getSongId() { - return _songId; - } - - public void setSongId(long songId) { - _songId = songId; - } - - public long getCompanyId() { - return _companyId; - } - - public void setCompanyId(long companyId) { - _companyId = companyId; - } - - public long getGroupId() { - return _groupId; - } - - public void setGroupId(long groupId) { - _groupId = groupId; - } - - 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 Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public long getArtistId() { - return _artistId; - } - - public void setArtistId(long artistId) { - _artistId = artistId; - } - - public long getAlbumId() { - return _albumId; - } - - public void setAlbumId(long albumId) { - _albumId = albumId; - } - - public String getName() { - return _name; - } - - public void setName(String name) { - _name = name; - } - - public int getStatus() { - return _status; - } - - public void setStatus(int status) { - _status = status; - } - - public long getStatusByUserId() { - return _statusByUserId; - } - - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - } - - public String getStatusByUserName() { - return _statusByUserName; - } - - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - } - - public Date getStatusDate() { - return _statusDate; - } - - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - } - - private String _uuid; - private long _songId; - private long _companyId; - private long _groupId; - private long _userId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _artistId; - private long _albumId; - private String _name; - private int _status; - private long _statusByUserId; - private String _statusByUserName; - private Date _statusDate; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongWrapper.java deleted file mode 100644 index db5c0a455d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/model/SongWrapper.java +++ /dev/null @@ -1,841 +0,0 @@ -/** - * 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 org.liferay.jukebox.model; - -import com.liferay.portal.kernel.lar.StagedModelType; -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 Song}. - *

- * - * @author Julio Camarero - * @see Song - * @generated - */ -public class SongWrapper implements Song, ModelWrapper { - public SongWrapper(Song song) { - _song = song; - } - - @Override - public Class getModelClass() { - return Song.class; - } - - @Override - public String getModelClassName() { - return Song.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("songId", getSongId()); - attributes.put("companyId", getCompanyId()); - attributes.put("groupId", getGroupId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("artistId", getArtistId()); - attributes.put("albumId", getAlbumId()); - attributes.put("name", getName()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long songId = (Long)attributes.get("songId"); - - if (songId != null) { - setSongId(songId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Long groupId = (Long)attributes.get("groupId"); - - if (groupId != null) { - setGroupId(groupId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long artistId = (Long)attributes.get("artistId"); - - if (artistId != null) { - setArtistId(artistId); - } - - Long albumId = (Long)attributes.get("albumId"); - - if (albumId != null) { - setAlbumId(albumId); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - } - - /** - * Returns the primary key of this song. - * - * @return the primary key of this song - */ - @Override - public long getPrimaryKey() { - return _song.getPrimaryKey(); - } - - /** - * Sets the primary key of this song. - * - * @param primaryKey the primary key of this song - */ - @Override - public void setPrimaryKey(long primaryKey) { - _song.setPrimaryKey(primaryKey); - } - - /** - * Returns the uuid of this song. - * - * @return the uuid of this song - */ - @Override - public java.lang.String getUuid() { - return _song.getUuid(); - } - - /** - * Sets the uuid of this song. - * - * @param uuid the uuid of this song - */ - @Override - public void setUuid(java.lang.String uuid) { - _song.setUuid(uuid); - } - - /** - * Returns the song ID of this song. - * - * @return the song ID of this song - */ - @Override - public long getSongId() { - return _song.getSongId(); - } - - /** - * Sets the song ID of this song. - * - * @param songId the song ID of this song - */ - @Override - public void setSongId(long songId) { - _song.setSongId(songId); - } - - /** - * Returns the company ID of this song. - * - * @return the company ID of this song - */ - @Override - public long getCompanyId() { - return _song.getCompanyId(); - } - - /** - * Sets the company ID of this song. - * - * @param companyId the company ID of this song - */ - @Override - public void setCompanyId(long companyId) { - _song.setCompanyId(companyId); - } - - /** - * Returns the group ID of this song. - * - * @return the group ID of this song - */ - @Override - public long getGroupId() { - return _song.getGroupId(); - } - - /** - * Sets the group ID of this song. - * - * @param groupId the group ID of this song - */ - @Override - public void setGroupId(long groupId) { - _song.setGroupId(groupId); - } - - /** - * Returns the user ID of this song. - * - * @return the user ID of this song - */ - @Override - public long getUserId() { - return _song.getUserId(); - } - - /** - * Sets the user ID of this song. - * - * @param userId the user ID of this song - */ - @Override - public void setUserId(long userId) { - _song.setUserId(userId); - } - - /** - * Returns the user uuid of this song. - * - * @return the user uuid of this song - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _song.getUserUuid(); - } - - /** - * Sets the user uuid of this song. - * - * @param userUuid the user uuid of this song - */ - @Override - public void setUserUuid(java.lang.String userUuid) { - _song.setUserUuid(userUuid); - } - - /** - * Returns the user name of this song. - * - * @return the user name of this song - */ - @Override - public java.lang.String getUserName() { - return _song.getUserName(); - } - - /** - * Sets the user name of this song. - * - * @param userName the user name of this song - */ - @Override - public void setUserName(java.lang.String userName) { - _song.setUserName(userName); - } - - /** - * Returns the create date of this song. - * - * @return the create date of this song - */ - @Override - public java.util.Date getCreateDate() { - return _song.getCreateDate(); - } - - /** - * Sets the create date of this song. - * - * @param createDate the create date of this song - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _song.setCreateDate(createDate); - } - - /** - * Returns the modified date of this song. - * - * @return the modified date of this song - */ - @Override - public java.util.Date getModifiedDate() { - return _song.getModifiedDate(); - } - - /** - * Sets the modified date of this song. - * - * @param modifiedDate the modified date of this song - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _song.setModifiedDate(modifiedDate); - } - - /** - * Returns the artist ID of this song. - * - * @return the artist ID of this song - */ - @Override - public long getArtistId() { - return _song.getArtistId(); - } - - /** - * Sets the artist ID of this song. - * - * @param artistId the artist ID of this song - */ - @Override - public void setArtistId(long artistId) { - _song.setArtistId(artistId); - } - - /** - * Returns the album ID of this song. - * - * @return the album ID of this song - */ - @Override - public long getAlbumId() { - return _song.getAlbumId(); - } - - /** - * Sets the album ID of this song. - * - * @param albumId the album ID of this song - */ - @Override - public void setAlbumId(long albumId) { - _song.setAlbumId(albumId); - } - - /** - * Returns the name of this song. - * - * @return the name of this song - */ - @Override - public java.lang.String getName() { - return _song.getName(); - } - - /** - * Sets the name of this song. - * - * @param name the name of this song - */ - @Override - public void setName(java.lang.String name) { - _song.setName(name); - } - - /** - * Returns the status of this song. - * - * @return the status of this song - */ - @Override - public int getStatus() { - return _song.getStatus(); - } - - /** - * Sets the status of this song. - * - * @param status the status of this song - */ - @Override - public void setStatus(int status) { - _song.setStatus(status); - } - - /** - * Returns the status by user ID of this song. - * - * @return the status by user ID of this song - */ - @Override - public long getStatusByUserId() { - return _song.getStatusByUserId(); - } - - /** - * Sets the status by user ID of this song. - * - * @param statusByUserId the status by user ID of this song - */ - @Override - public void setStatusByUserId(long statusByUserId) { - _song.setStatusByUserId(statusByUserId); - } - - /** - * Returns the status by user uuid of this song. - * - * @return the status by user uuid of this song - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getStatusByUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _song.getStatusByUserUuid(); - } - - /** - * Sets the status by user uuid of this song. - * - * @param statusByUserUuid the status by user uuid of this song - */ - @Override - public void setStatusByUserUuid(java.lang.String statusByUserUuid) { - _song.setStatusByUserUuid(statusByUserUuid); - } - - /** - * Returns the status by user name of this song. - * - * @return the status by user name of this song - */ - @Override - public java.lang.String getStatusByUserName() { - return _song.getStatusByUserName(); - } - - /** - * Sets the status by user name of this song. - * - * @param statusByUserName the status by user name of this song - */ - @Override - public void setStatusByUserName(java.lang.String statusByUserName) { - _song.setStatusByUserName(statusByUserName); - } - - /** - * Returns the status date of this song. - * - * @return the status date of this song - */ - @Override - public java.util.Date getStatusDate() { - return _song.getStatusDate(); - } - - /** - * Sets the status date of this song. - * - * @param statusDate the status date of this song - */ - @Override - public void setStatusDate(java.util.Date statusDate) { - _song.setStatusDate(statusDate); - } - - /** - * Returns the trash entry created when this song was moved to the Recycle Bin. The trash entry may belong to one of the ancestors of this song. - * - * @return the trash entry created when this song was moved to the Recycle Bin - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.portlet.trash.model.TrashEntry getTrashEntry() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _song.getTrashEntry(); - } - - /** - * Returns the class primary key of the trash entry for this song. - * - * @return the class primary key of the trash entry for this song - */ - @Override - public long getTrashEntryClassPK() { - return _song.getTrashEntryClassPK(); - } - - /** - * Returns the trash handler for this song. - * - * @return the trash handler for this song - */ - @Override - public com.liferay.portal.kernel.trash.TrashHandler getTrashHandler() { - return _song.getTrashHandler(); - } - - /** - * Returns true if this song is in the Recycle Bin. - * - * @return true if this song is in the Recycle Bin; false otherwise - */ - @Override - public boolean isInTrash() { - return _song.isInTrash(); - } - - /** - * Returns true if the parent of this song is in the Recycle Bin. - * - * @return true if the parent of this song is in the Recycle Bin; false otherwise - * @throws SystemException if a system exception occurred - */ - @Override - public boolean isInTrashContainer() { - return _song.isInTrashContainer(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved()} - */ - @Override - public boolean getApproved() { - return _song.getApproved(); - } - - /** - * Returns true if this song is approved. - * - * @return true if this song is approved; false otherwise - */ - @Override - public boolean isApproved() { - return _song.isApproved(); - } - - /** - * Returns true if this song is denied. - * - * @return true if this song is denied; false otherwise - */ - @Override - public boolean isDenied() { - return _song.isDenied(); - } - - /** - * Returns true if this song is a draft. - * - * @return true if this song is a draft; false otherwise - */ - @Override - public boolean isDraft() { - return _song.isDraft(); - } - - /** - * Returns true if this song is expired. - * - * @return true if this song is expired; false otherwise - */ - @Override - public boolean isExpired() { - return _song.isExpired(); - } - - /** - * Returns true if this song is inactive. - * - * @return true if this song is inactive; false otherwise - */ - @Override - public boolean isInactive() { - return _song.isInactive(); - } - - /** - * Returns true if this song is incomplete. - * - * @return true if this song is incomplete; false otherwise - */ - @Override - public boolean isIncomplete() { - return _song.isIncomplete(); - } - - /** - * Returns true if this song is pending. - * - * @return true if this song is pending; false otherwise - */ - @Override - public boolean isPending() { - return _song.isPending(); - } - - /** - * Returns true if this song is scheduled. - * - * @return true if this song is scheduled; false otherwise - */ - @Override - public boolean isScheduled() { - return _song.isScheduled(); - } - - @Override - public boolean isNew() { - return _song.isNew(); - } - - @Override - public void setNew(boolean n) { - _song.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _song.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _song.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _song.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _song.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _song.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _song.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _song.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _song.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _song.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new SongWrapper((Song)_song.clone()); - } - - @Override - public int compareTo(org.liferay.jukebox.model.Song song) { - return _song.compareTo(song); - } - - @Override - public int hashCode() { - return _song.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _song.toCacheModel(); - } - - @Override - public org.liferay.jukebox.model.Song toEscapedModel() { - return new SongWrapper(_song.toEscapedModel()); - } - - @Override - public org.liferay.jukebox.model.Song toUnescapedModel() { - return new SongWrapper(_song.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _song.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _song.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _song.persist(); - } - - @Override - public java.lang.String getImageURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.SystemException { - return _song.getImageURL(themeDisplay); - } - - @Override - public java.lang.String getLyricsURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _song.getLyricsURL(themeDisplay); - } - - @Override - public java.lang.String getSongURL( - com.liferay.portal.theme.ThemeDisplay themeDisplay, - java.lang.String audioContainer) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _song.getSongURL(themeDisplay, audioContainer); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof SongWrapper)) { - return false; - } - - SongWrapper songWrapper = (SongWrapper)obj; - - if (Validator.equals(_song, songWrapper._song)) { - return true; - } - - return false; - } - - @Override - public StagedModelType getStagedModelType() { - return _song.getStagedModelType(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public Song getWrappedSong() { - return _song; - } - - @Override - public Song getWrappedModel() { - return _song; - } - - @Override - public void resetOriginalValues() { - _song.resetOriginalValues(); - } - - private Song _song; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalService.java deleted file mode 100644 index be020d2f28..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalService.java +++ /dev/null @@ -1,365 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -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 Album. 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 Julio Camarero - * @see AlbumLocalServiceUtil - * @see org.liferay.jukebox.service.base.AlbumLocalServiceBaseImpl - * @see org.liferay.jukebox.service.impl.AlbumLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface AlbumLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link AlbumLocalServiceUtil} to access the album local service. Add custom service methods to {@link org.liferay.jukebox.service.impl.AlbumLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the album to the database. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was added - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album addAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new album with the primary key. Does not add the album to the database. - * - * @param albumId the primary key for the new album - * @return the new album - */ - public org.liferay.jukebox.model.Album createAlbum(long albumId); - - /** - * Deletes the album with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param albumId the primary key of the album - * @return the album that was removed - * @throws PortalException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album deleteAlbum(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the album from the database. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was removed - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album deleteAlbum( - org.liferay.jukebox.model.Album album) - 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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 org.liferay.jukebox.model.Album fetchAlbum(long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the album with the matching UUID and company. - * - * @param uuid the album's UUID - * @param companyId the primary key of the company - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Album fetchAlbumByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the album matching the UUID and group. - * - * @param uuid the album's UUID - * @param groupId the primary key of the group - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Album fetchAlbumByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the album with the primary key. - * - * @param albumId the primary key of the album - * @return the album - * @throws PortalException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Album getAlbum(long albumId) - 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 the album with the matching UUID and company. - * - * @param uuid the album's UUID - * @param companyId the primary key of the company - * @return the matching album - * @throws PortalException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Album getAlbumByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the album matching the UUID and group. - * - * @param uuid the album's UUID - * @param groupId the primary key of the group - * @return the matching album - * @throws PortalException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Album getAlbumByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of albums - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getAlbums( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums. - * - * @return the number of albums - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getAlbumsCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the album in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was updated - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album updateAlbum( - org.liferay.jukebox.model.Album album) - 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 org.liferay.jukebox.model.Album addAlbum(long userId, long artistId, - java.lang.String name, int year, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addEntryResources(org.liferay.jukebox.model.Album album, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addEntryResources(org.liferay.jukebox.model.Album album, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteAlbums(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getAlbums( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getAlbums( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getAlbumsByArtistId( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getAlbumsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Album moveAlbumToTrash(long userId, - long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Album restoreAlbumFromTrash(long userId, - long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Album updateAlbum(long userId, - long albumId, long artistId, java.lang.String name, int year, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateAsset(long userId, org.liferay.jukebox.model.Album album, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalServiceClp.java deleted file mode 100644 index a54efad834..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalServiceClp.java +++ /dev/null @@ -1,1364 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Julio Camarero - * @generated - */ -public class AlbumLocalServiceClp implements AlbumLocalService { - public AlbumLocalServiceClp(InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addAlbum"; - - _methodParameterTypes0 = new String[] { "org.liferay.jukebox.model.Album" }; - - _methodName1 = "createAlbum"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteAlbum"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteAlbum"; - - _methodParameterTypes3 = new String[] { "org.liferay.jukebox.model.Album" }; - - _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 = "fetchAlbum"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchAlbumByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchAlbumByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getAlbum"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getAlbumByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getAlbumByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getAlbums"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getAlbumsCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateAlbum"; - - _methodParameterTypes19 = new String[] { "org.liferay.jukebox.model.Album" }; - - _methodName20 = "getBeanIdentifier"; - - _methodParameterTypes20 = new String[] { }; - - _methodName21 = "setBeanIdentifier"; - - _methodParameterTypes21 = new String[] { "java.lang.String" }; - - _methodName23 = "addAlbum"; - - _methodParameterTypes23 = new String[] { - "long", "long", "java.lang.String", "int", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName24 = "addEntryResources"; - - _methodParameterTypes24 = new String[] { - "org.liferay.jukebox.model.Album", "boolean", "boolean" - }; - - _methodName25 = "addEntryResources"; - - _methodParameterTypes25 = new String[] { - "org.liferay.jukebox.model.Album", "java.lang.String[][]", - "java.lang.String[][]" - }; - - _methodName26 = "deleteAlbums"; - - _methodParameterTypes26 = new String[] { "long" }; - - _methodName27 = "getAlbums"; - - _methodParameterTypes27 = new String[] { "long" }; - - _methodName28 = "getAlbums"; - - _methodParameterTypes28 = new String[] { "long", "int", "int" }; - - _methodName29 = "getAlbumsByArtistId"; - - _methodParameterTypes29 = new String[] { "long" }; - - _methodName30 = "getAlbumsCount"; - - _methodParameterTypes30 = new String[] { "long" }; - - _methodName31 = "moveAlbumToTrash"; - - _methodParameterTypes31 = new String[] { "long", "long" }; - - _methodName32 = "restoreAlbumFromTrash"; - - _methodParameterTypes32 = new String[] { "long", "long" }; - - _methodName33 = "updateAlbum"; - - _methodParameterTypes33 = new String[] { - "long", "long", "long", "java.lang.String", "int", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName34 = "updateAsset"; - - _methodParameterTypes34 = new String[] { - "long", "org.liferay.jukebox.model.Album", "long[][]", - "java.lang.String[][]", "long[][]" - }; - } - - @Override - public org.liferay.jukebox.model.Album addAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(album) }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album createAlbum(long albumId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { albumId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album deleteAlbum(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { albumId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album deleteAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(album) }); - } - 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 (org.liferay.jukebox.model.Album)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 org.liferay.jukebox.model.Album fetchAlbum(long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { albumId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album fetchAlbumByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { ClpSerializer.translateInput(uuid), 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album fetchAlbumByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album getAlbum(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName13, - _methodParameterTypes13, new Object[] { albumId }); - } - 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 (org.liferay.jukebox.model.Album)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(_methodName14, - _methodParameterTypes14, - 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 org.liferay.jukebox.model.Album getAlbumByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { ClpSerializer.translateInput(uuid), companyId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album getAlbumByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName16, - _methodParameterTypes16, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getAlbums( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName17, - _methodParameterTypes17, 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getAlbumsCount() - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName18, - _methodParameterTypes18, 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 org.liferay.jukebox.model.Album updateAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { ClpSerializer.translateInput(album) }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.lang.String getBeanIdentifier() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName20, - _methodParameterTypes20, 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(_methodName21, - _methodParameterTypes21, - 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 org.liferay.jukebox.model.Album addAlbum(long userId, long artistId, - java.lang.String name, int year, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { - userId, - - artistId, - - ClpSerializer.translateInput(name), - - year, - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Album album, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, - new Object[] { - ClpSerializer.translateInput(album), - - addGroupPermissions, - - addGuestPermissions - }); - } - 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"); - } - } - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Album album, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { - ClpSerializer.translateInput(album), - - ClpSerializer.translateInput(groupPermissions), - - ClpSerializer.translateInput(guestPermissions) - }); - } - 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"); - } - } - } - - @Override - public void deleteAlbums(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName26, - _methodParameterTypes26, new Object[] { groupId }); - } - 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"); - } - } - } - - @Override - public java.util.List getAlbums( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName27, - _methodParameterTypes27, new Object[] { groupId }); - } - 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 java.util.List getAlbums( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName28, - _methodParameterTypes28, - new Object[] { groupId, 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 - public java.util.List getAlbumsByArtistId( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName29, - _methodParameterTypes29, new Object[] { artistId }); - } - 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 int getAlbumsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName30, - _methodParameterTypes30, new Object[] { groupId }); - } - 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 org.liferay.jukebox.model.Album moveAlbumToTrash(long userId, - long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName31, - _methodParameterTypes31, new Object[] { userId, albumId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album restoreAlbumFromTrash(long userId, - long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName32, - _methodParameterTypes32, new Object[] { userId, albumId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album updateAlbum(long userId, - long albumId, long artistId, java.lang.String name, int year, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName33, - _methodParameterTypes33, - new Object[] { - userId, - - albumId, - - artistId, - - ClpSerializer.translateInput(name), - - year, - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void updateAsset(long userId, org.liferay.jukebox.model.Album album, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName34, - _methodParameterTypes34, - new Object[] { - userId, - - ClpSerializer.translateInput(album), - - ClpSerializer.translateInput(assetCategoryIds), - - ClpSerializer.translateInput(assetTagNames), - - ClpSerializer.translateInput(assetLinkEntryIds) - }); - } - 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"); - } - } - } - - 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 _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName20; - private String[] _methodParameterTypes20; - private String _methodName21; - private String[] _methodParameterTypes21; - private String _methodName23; - private String[] _methodParameterTypes23; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; - private String _methodName27; - private String[] _methodParameterTypes27; - private String _methodName28; - private String[] _methodParameterTypes28; - private String _methodName29; - private String[] _methodParameterTypes29; - private String _methodName30; - private String[] _methodParameterTypes30; - private String _methodName31; - private String[] _methodParameterTypes31; - private String _methodName32; - private String[] _methodParameterTypes32; - private String _methodName33; - private String[] _methodParameterTypes33; - private String _methodName34; - private String[] _methodParameterTypes34; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalServiceUtil.java deleted file mode 100644 index da5e06c0e4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalServiceUtil.java +++ /dev/null @@ -1,456 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 Album. This utility wraps - * {@link org.liferay.jukebox.service.impl.AlbumLocalServiceImpl} 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 Julio Camarero - * @see AlbumLocalService - * @see org.liferay.jukebox.service.base.AlbumLocalServiceBaseImpl - * @see org.liferay.jukebox.service.impl.AlbumLocalServiceImpl - * @generated - */ -public class AlbumLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link org.liferay.jukebox.service.impl.AlbumLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the album to the database. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was added - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album addAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addAlbum(album); - } - - /** - * Creates a new album with the primary key. Does not add the album to the database. - * - * @param albumId the primary key for the new album - * @return the new album - */ - public static org.liferay.jukebox.model.Album createAlbum(long albumId) { - return getService().createAlbum(albumId); - } - - /** - * Deletes the album with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param albumId the primary key of the album - * @return the album that was removed - * @throws PortalException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album deleteAlbum(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteAlbum(albumId); - } - - /** - * Deletes the album from the database. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was removed - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album deleteAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().deleteAlbum(album); - } - - 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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 org.liferay.jukebox.model.Album fetchAlbum(long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchAlbum(albumId); - } - - /** - * Returns the album with the matching UUID and company. - * - * @param uuid the album's UUID - * @param companyId the primary key of the company - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchAlbumByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchAlbumByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the album matching the UUID and group. - * - * @param uuid the album's UUID - * @param groupId the primary key of the group - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchAlbumByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchAlbumByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the album with the primary key. - * - * @param albumId the primary key of the album - * @return the album - * @throws PortalException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album getAlbum(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbum(albumId); - } - - 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 the album with the matching UUID and company. - * - * @param uuid the album's UUID - * @param companyId the primary key of the company - * @return the matching album - * @throws PortalException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album getAlbumByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbumByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the album matching the UUID and group. - * - * @param uuid the album's UUID - * @param groupId the primary key of the group - * @return the matching album - * @throws PortalException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album getAlbumByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbumByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List getAlbums( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbums(start, end); - } - - /** - * Returns the number of albums. - * - * @return the number of albums - * @throws SystemException if a system exception occurred - */ - public static int getAlbumsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbumsCount(); - } - - /** - * Updates the album in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was updated - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album updateAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateAlbum(album); - } - - /** - * 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 org.liferay.jukebox.model.Album addAlbum(long userId, - long artistId, java.lang.String name, int year, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addAlbum(userId, artistId, name, year, inputStream, - serviceContext); - } - - public static void addEntryResources( - org.liferay.jukebox.model.Album album, boolean addGroupPermissions, - boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addEntryResources(album, addGroupPermissions, addGuestPermissions); - } - - public static void addEntryResources( - org.liferay.jukebox.model.Album album, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().addEntryResources(album, groupPermissions, guestPermissions); - } - - public static void deleteAlbums(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteAlbums(groupId); - } - - public static java.util.List getAlbums( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbums(groupId); - } - - public static java.util.List getAlbums( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbums(groupId, start, end); - } - - public static java.util.List getAlbumsByArtistId( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbumsByArtistId(artistId); - } - - public static int getAlbumsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbumsCount(groupId); - } - - public static org.liferay.jukebox.model.Album moveAlbumToTrash( - long userId, long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().moveAlbumToTrash(userId, albumId); - } - - public static org.liferay.jukebox.model.Album restoreAlbumFromTrash( - long userId, long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().restoreAlbumFromTrash(userId, albumId); - } - - public static org.liferay.jukebox.model.Album updateAlbum(long userId, - long albumId, long artistId, java.lang.String name, int year, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateAlbum(userId, albumId, artistId, name, year, - inputStream, serviceContext); - } - - public static void updateAsset(long userId, - org.liferay.jukebox.model.Album album, long[] assetCategoryIds, - java.lang.String[] assetTagNames, long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .updateAsset(userId, album, assetCategoryIds, assetTagNames, - assetLinkEntryIds); - } - - public static void clearService() { - _service = null; - } - - public static AlbumLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - AlbumLocalService.class.getName()); - - if (invokableLocalService instanceof AlbumLocalService) { - _service = (AlbumLocalService)invokableLocalService; - } - else { - _service = new AlbumLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(AlbumLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(AlbumLocalService service) { - } - - private static AlbumLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalServiceWrapper.java deleted file mode 100644 index 9a71e0583e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumLocalServiceWrapper.java +++ /dev/null @@ -1,471 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link AlbumLocalService}. - * - * @author Julio Camarero - * @see AlbumLocalService - * @generated - */ -public class AlbumLocalServiceWrapper implements AlbumLocalService, - ServiceWrapper { - public AlbumLocalServiceWrapper(AlbumLocalService albumLocalService) { - _albumLocalService = albumLocalService; - } - - /** - * Adds the album to the database. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was added - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Album addAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.addAlbum(album); - } - - /** - * Creates a new album with the primary key. Does not add the album to the database. - * - * @param albumId the primary key for the new album - * @return the new album - */ - @Override - public org.liferay.jukebox.model.Album createAlbum(long albumId) { - return _albumLocalService.createAlbum(albumId); - } - - /** - * Deletes the album with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param albumId the primary key of the album - * @return the album that was removed - * @throws PortalException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Album deleteAlbum(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.deleteAlbum(albumId); - } - - /** - * Deletes the album from the database. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Album deleteAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.deleteAlbum(album); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _albumLocalService.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 _albumLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @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 _albumLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 _albumLocalService.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 _albumLocalService.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 _albumLocalService.dynamicQueryCount(dynamicQuery, projection); - } - - @Override - public org.liferay.jukebox.model.Album fetchAlbum(long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.fetchAlbum(albumId); - } - - /** - * Returns the album with the matching UUID and company. - * - * @param uuid the album's UUID - * @param companyId the primary key of the company - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Album fetchAlbumByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.fetchAlbumByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the album matching the UUID and group. - * - * @param uuid the album's UUID - * @param groupId the primary key of the group - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Album fetchAlbumByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.fetchAlbumByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the album with the primary key. - * - * @param albumId the primary key of the album - * @return the album - * @throws PortalException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Album getAlbum(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.getAlbum(albumId); - } - - @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 _albumLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns the album with the matching UUID and company. - * - * @param uuid the album's UUID - * @param companyId the primary key of the company - * @return the matching album - * @throws PortalException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Album getAlbumByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.getAlbumByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the album matching the UUID and group. - * - * @param uuid the album's UUID - * @param groupId the primary key of the group - * @return the matching album - * @throws PortalException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Album getAlbumByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.getAlbumByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of albums - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getAlbums( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.getAlbums(start, end); - } - - /** - * Returns the number of albums. - * - * @return the number of albums - * @throws SystemException if a system exception occurred - */ - @Override - public int getAlbumsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.getAlbumsCount(); - } - - /** - * Updates the album in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Album updateAlbum( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.updateAlbum(album); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _albumLocalService.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) { - _albumLocalService.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 _albumLocalService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public org.liferay.jukebox.model.Album addAlbum(long userId, long artistId, - java.lang.String name, int year, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.addAlbum(userId, artistId, name, year, - inputStream, serviceContext); - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Album album, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _albumLocalService.addEntryResources(album, addGroupPermissions, - addGuestPermissions); - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Album album, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _albumLocalService.addEntryResources(album, groupPermissions, - guestPermissions); - } - - @Override - public void deleteAlbums(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _albumLocalService.deleteAlbums(groupId); - } - - @Override - public java.util.List getAlbums( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.getAlbums(groupId); - } - - @Override - public java.util.List getAlbums( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.getAlbums(groupId, start, end); - } - - @Override - public java.util.List getAlbumsByArtistId( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.getAlbumsByArtistId(artistId); - } - - @Override - public int getAlbumsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.getAlbumsCount(groupId); - } - - @Override - public org.liferay.jukebox.model.Album moveAlbumToTrash(long userId, - long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.moveAlbumToTrash(userId, albumId); - } - - @Override - public org.liferay.jukebox.model.Album restoreAlbumFromTrash(long userId, - long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.restoreAlbumFromTrash(userId, albumId); - } - - @Override - public org.liferay.jukebox.model.Album updateAlbum(long userId, - long albumId, long artistId, java.lang.String name, int year, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumLocalService.updateAlbum(userId, albumId, artistId, name, - year, inputStream, serviceContext); - } - - @Override - public void updateAsset(long userId, org.liferay.jukebox.model.Album album, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _albumLocalService.updateAsset(userId, album, assetCategoryIds, - assetTagNames, assetLinkEntryIds); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public AlbumLocalService getWrappedAlbumLocalService() { - return _albumLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedAlbumLocalService(AlbumLocalService albumLocalService) { - _albumLocalService = albumLocalService; - } - - @Override - public AlbumLocalService getWrappedService() { - return _albumLocalService; - } - - @Override - public void setWrappedService(AlbumLocalService albumLocalService) { - _albumLocalService = albumLocalService; - } - - private AlbumLocalService _albumLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumService.java deleted file mode 100644 index 2529b222b9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumService.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.Propagation; -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 Album. Methods of this - * service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. - * - * @author Julio Camarero - * @see AlbumServiceUtil - * @see org.liferay.jukebox.service.base.AlbumServiceBaseImpl - * @see org.liferay.jukebox.service.impl.AlbumServiceImpl - * @generated - */ -@AccessControlled -@JSONWebService -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface AlbumService extends BaseService, InvokableService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link AlbumServiceUtil} to access the album remote service. Add custom service methods to {@link org.liferay.jukebox.service.impl.AlbumServiceImpl} 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; - - public org.liferay.jukebox.model.Album addAlbum(long artistId, - java.lang.String name, int year, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Album deleteAlbum(long albumId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getAlbums( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getAlbums( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getAlbums( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getAlbumsByArtistId( - long groupId, long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getAlbumsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getAlbumsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getAlbumsCountByArtistId(long groupId, long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Album moveAlbumToTrash(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Album restoreAlbumFromTrash(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Album updateAlbum(long albumId, - long artistId, java.lang.String name, int year, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumServiceClp.java deleted file mode 100644 index 2dce2b2c70..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumServiceClp.java +++ /dev/null @@ -1,575 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.InvokableService; - -/** - * @author Julio Camarero - * @generated - */ -public class AlbumServiceClp implements AlbumService { - public AlbumServiceClp(InvokableService invokableService) { - _invokableService = invokableService; - - _methodName0 = "getBeanIdentifier"; - - _methodParameterTypes0 = new String[] { }; - - _methodName1 = "setBeanIdentifier"; - - _methodParameterTypes1 = new String[] { "java.lang.String" }; - - _methodName3 = "addAlbum"; - - _methodParameterTypes3 = new String[] { - "long", "java.lang.String", "int", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName4 = "deleteAlbum"; - - _methodParameterTypes4 = new String[] { - "long", "com.liferay.portal.service.ServiceContext" - }; - - _methodName5 = "getAlbums"; - - _methodParameterTypes5 = new String[] { "long" }; - - _methodName6 = "getAlbums"; - - _methodParameterTypes6 = new String[] { "long", "int", "int" }; - - _methodName7 = "getAlbums"; - - _methodParameterTypes7 = new String[] { "long", "java.lang.String" }; - - _methodName8 = "getAlbumsByArtistId"; - - _methodParameterTypes8 = new String[] { "long", "long" }; - - _methodName9 = "getAlbumsCount"; - - _methodParameterTypes9 = new String[] { "long" }; - - _methodName10 = "getAlbumsCount"; - - _methodParameterTypes10 = new String[] { "long", "java.lang.String" }; - - _methodName11 = "getAlbumsCountByArtistId"; - - _methodParameterTypes11 = new String[] { "long", "long" }; - - _methodName12 = "moveAlbumToTrash"; - - _methodParameterTypes12 = new String[] { "long" }; - - _methodName13 = "restoreAlbumFromTrash"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "updateAlbum"; - - _methodParameterTypes14 = new String[] { - "long", "long", "java.lang.String", "int", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - } - - @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(); - } - - @Override - public org.liferay.jukebox.model.Album addAlbum(long artistId, - java.lang.String name, int year, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { - artistId, - - ClpSerializer.translateInput(name), - - year, - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album deleteAlbum(long albumId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName4, - _methodParameterTypes4, - new Object[] { - albumId, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getAlbums( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName5, - _methodParameterTypes5, new Object[] { groupId }); - } - 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 java.util.List getAlbums( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName6, - _methodParameterTypes6, new Object[] { groupId, 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 - public java.util.List getAlbums( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName7, - _methodParameterTypes7, - new Object[] { groupId, ClpSerializer.translateInput( - keywords) }); - } - 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 java.util.List getAlbumsByArtistId( - long groupId, long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName8, - _methodParameterTypes8, new Object[] { groupId, artistId }); - } - 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 int getAlbumsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName9, - _methodParameterTypes9, new Object[] { groupId }); - } - 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 int getAlbumsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName10, - _methodParameterTypes10, - new Object[] { groupId, ClpSerializer.translateInput( - keywords) }); - } - 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 int getAlbumsCountByArtistId(long groupId, long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName11, - _methodParameterTypes11, new Object[] { groupId, artistId }); - } - 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 org.liferay.jukebox.model.Album moveAlbumToTrash(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName12, - _methodParameterTypes12, new Object[] { albumId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album restoreAlbumFromTrash(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName13, - _methodParameterTypes13, new Object[] { albumId }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Album updateAlbum(long albumId, - long artistId, java.lang.String name, int year, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName14, - _methodParameterTypes14, - new Object[] { - albumId, - - artistId, - - ClpSerializer.translateInput(name), - - year, - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Album)ClpSerializer.translateOutput(returnObj); - } - - private InvokableService _invokableService; - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - 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; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumServiceUtil.java deleted file mode 100644 index 2e944b99f7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumServiceUtil.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 Album. This utility wraps - * {@link org.liferay.jukebox.service.impl.AlbumServiceImpl} 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 Julio Camarero - * @see AlbumService - * @see org.liferay.jukebox.service.base.AlbumServiceBaseImpl - * @see org.liferay.jukebox.service.impl.AlbumServiceImpl - * @generated - */ -public class AlbumServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link org.liferay.jukebox.service.impl.AlbumServiceImpl} 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 org.liferay.jukebox.model.Album addAlbum(long artistId, - java.lang.String name, int year, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addAlbum(artistId, name, year, inputStream, serviceContext); - } - - public static org.liferay.jukebox.model.Album deleteAlbum(long albumId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteAlbum(albumId, serviceContext); - } - - public static java.util.List getAlbums( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbums(groupId); - } - - public static java.util.List getAlbums( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbums(groupId, start, end); - } - - public static java.util.List getAlbums( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbums(groupId, keywords); - } - - public static java.util.List getAlbumsByArtistId( - long groupId, long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbumsByArtistId(groupId, artistId); - } - - public static int getAlbumsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbumsCount(groupId); - } - - public static int getAlbumsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbumsCount(groupId, keywords); - } - - public static int getAlbumsCountByArtistId(long groupId, long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getAlbumsCountByArtistId(groupId, artistId); - } - - public static org.liferay.jukebox.model.Album moveAlbumToTrash(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().moveAlbumToTrash(albumId); - } - - public static org.liferay.jukebox.model.Album restoreAlbumFromTrash( - long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().restoreAlbumFromTrash(albumId); - } - - public static org.liferay.jukebox.model.Album updateAlbum(long albumId, - long artistId, java.lang.String name, int year, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateAlbum(albumId, artistId, name, year, inputStream, - serviceContext); - } - - public static void clearService() { - _service = null; - } - - public static AlbumService getService() { - if (_service == null) { - InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - AlbumService.class.getName()); - - if (invokableService instanceof AlbumService) { - _service = (AlbumService)invokableService; - } - else { - _service = new AlbumServiceClp(invokableService); - } - - ReferenceRegistry.registerReference(AlbumServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(AlbumService service) { - } - - private static AlbumService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumServiceWrapper.java deleted file mode 100644 index da2cf14fb7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/AlbumServiceWrapper.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link AlbumService}. - * - * @author Julio Camarero - * @see AlbumService - * @generated - */ -public class AlbumServiceWrapper implements AlbumService, - ServiceWrapper { - public AlbumServiceWrapper(AlbumService albumService) { - _albumService = albumService; - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _albumService.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) { - _albumService.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 _albumService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public org.liferay.jukebox.model.Album addAlbum(long artistId, - java.lang.String name, int year, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumService.addAlbum(artistId, name, year, inputStream, - serviceContext); - } - - @Override - public org.liferay.jukebox.model.Album deleteAlbum(long albumId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumService.deleteAlbum(albumId, serviceContext); - } - - @Override - public java.util.List getAlbums( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumService.getAlbums(groupId); - } - - @Override - public java.util.List getAlbums( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumService.getAlbums(groupId, start, end); - } - - @Override - public java.util.List getAlbums( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumService.getAlbums(groupId, keywords); - } - - @Override - public java.util.List getAlbumsByArtistId( - long groupId, long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumService.getAlbumsByArtistId(groupId, artistId); - } - - @Override - public int getAlbumsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumService.getAlbumsCount(groupId); - } - - @Override - public int getAlbumsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumService.getAlbumsCount(groupId, keywords); - } - - @Override - public int getAlbumsCountByArtistId(long groupId, long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return _albumService.getAlbumsCountByArtistId(groupId, artistId); - } - - @Override - public org.liferay.jukebox.model.Album moveAlbumToTrash(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumService.moveAlbumToTrash(albumId); - } - - @Override - public org.liferay.jukebox.model.Album restoreAlbumFromTrash(long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumService.restoreAlbumFromTrash(albumId); - } - - @Override - public org.liferay.jukebox.model.Album updateAlbum(long albumId, - long artistId, java.lang.String name, int year, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _albumService.updateAlbum(albumId, artistId, name, year, - inputStream, serviceContext); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public AlbumService getWrappedAlbumService() { - return _albumService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedAlbumService(AlbumService albumService) { - _albumService = albumService; - } - - @Override - public AlbumService getWrappedService() { - return _albumService; - } - - @Override - public void setWrappedService(AlbumService albumService) { - _albumService = albumService; - } - - private AlbumService _albumService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalService.java deleted file mode 100644 index f6143d935f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalService.java +++ /dev/null @@ -1,351 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -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 Artist. 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 Julio Camarero - * @see ArtistLocalServiceUtil - * @see org.liferay.jukebox.service.base.ArtistLocalServiceBaseImpl - * @see org.liferay.jukebox.service.impl.ArtistLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface ArtistLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link ArtistLocalServiceUtil} to access the artist local service. Add custom service methods to {@link org.liferay.jukebox.service.impl.ArtistLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the artist to the database. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was added - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist addArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new artist with the primary key. Does not add the artist to the database. - * - * @param artistId the primary key for the new artist - * @return the new artist - */ - public org.liferay.jukebox.model.Artist createArtist(long artistId); - - /** - * Deletes the artist with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param artistId the primary key of the artist - * @return the artist that was removed - * @throws PortalException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist deleteArtist(long artistId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the artist from the database. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was removed - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist deleteArtist( - org.liferay.jukebox.model.Artist artist) - 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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 org.liferay.jukebox.model.Artist fetchArtist(long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artist with the matching UUID and company. - * - * @param uuid the artist's UUID - * @param companyId the primary key of the company - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Artist fetchArtistByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artist matching the UUID and group. - * - * @param uuid the artist's UUID - * @param groupId the primary key of the group - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Artist fetchArtistByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artist with the primary key. - * - * @param artistId the primary key of the artist - * @return the artist - * @throws PortalException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Artist getArtist(long artistId) - 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 the artist with the matching UUID and company. - * - * @param uuid the artist's UUID - * @param companyId the primary key of the company - * @return the matching artist - * @throws PortalException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Artist getArtistByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artist matching the UUID and group. - * - * @param uuid the artist's UUID - * @param groupId the primary key of the group - * @return the matching artist - * @throws PortalException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Artist getArtistByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of artists - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getArtists( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists. - * - * @return the number of artists - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getArtistsCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the artist in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was updated - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist updateArtist( - org.liferay.jukebox.model.Artist artist) - 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 org.liferay.jukebox.model.Artist addArtist(long userId, - java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addEntryResources(org.liferay.jukebox.model.Artist artist, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addEntryResources(org.liferay.jukebox.model.Artist artist, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteArtists(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getArtists( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getArtists( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getArtistsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Artist updateArtist(long userId, - long artistId, java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateAsset(long userId, - org.liferay.jukebox.model.Artist artist, long[] assetCategoryIds, - java.lang.String[] assetTagNames, long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalServiceClp.java deleted file mode 100644 index 70769ace52..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalServiceClp.java +++ /dev/null @@ -1,1249 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Julio Camarero - * @generated - */ -public class ArtistLocalServiceClp implements ArtistLocalService { - public ArtistLocalServiceClp(InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addArtist"; - - _methodParameterTypes0 = new String[] { "org.liferay.jukebox.model.Artist" }; - - _methodName1 = "createArtist"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteArtist"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteArtist"; - - _methodParameterTypes3 = new String[] { "org.liferay.jukebox.model.Artist" }; - - _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 = "fetchArtist"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchArtistByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchArtistByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getArtist"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getArtistByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getArtistByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getArtists"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getArtistsCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateArtist"; - - _methodParameterTypes19 = new String[] { - "org.liferay.jukebox.model.Artist" - }; - - _methodName20 = "getBeanIdentifier"; - - _methodParameterTypes20 = new String[] { }; - - _methodName21 = "setBeanIdentifier"; - - _methodParameterTypes21 = new String[] { "java.lang.String" }; - - _methodName23 = "addArtist"; - - _methodParameterTypes23 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName24 = "addEntryResources"; - - _methodParameterTypes24 = new String[] { - "org.liferay.jukebox.model.Artist", "boolean", "boolean" - }; - - _methodName25 = "addEntryResources"; - - _methodParameterTypes25 = new String[] { - "org.liferay.jukebox.model.Artist", "java.lang.String[][]", - "java.lang.String[][]" - }; - - _methodName26 = "deleteArtists"; - - _methodParameterTypes26 = new String[] { "long" }; - - _methodName27 = "getArtists"; - - _methodParameterTypes27 = new String[] { "long" }; - - _methodName28 = "getArtists"; - - _methodParameterTypes28 = new String[] { "long", "int", "int" }; - - _methodName29 = "getArtistsCount"; - - _methodParameterTypes29 = new String[] { "long" }; - - _methodName30 = "updateArtist"; - - _methodParameterTypes30 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName31 = "updateAsset"; - - _methodParameterTypes31 = new String[] { - "long", "org.liferay.jukebox.model.Artist", "long[][]", - "java.lang.String[][]", "long[][]" - }; - } - - @Override - public org.liferay.jukebox.model.Artist addArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(artist) }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Artist createArtist(long artistId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { artistId }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Artist deleteArtist(long artistId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { artistId }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Artist deleteArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(artist) }); - } - 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 (org.liferay.jukebox.model.Artist)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 org.liferay.jukebox.model.Artist fetchArtist(long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { artistId }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Artist fetchArtistByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { ClpSerializer.translateInput(uuid), 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Artist fetchArtistByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Artist getArtist(long artistId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName13, - _methodParameterTypes13, new Object[] { artistId }); - } - 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 (org.liferay.jukebox.model.Artist)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(_methodName14, - _methodParameterTypes14, - 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 org.liferay.jukebox.model.Artist getArtistByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { ClpSerializer.translateInput(uuid), companyId }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Artist getArtistByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName16, - _methodParameterTypes16, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getArtists( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName17, - _methodParameterTypes17, 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getArtistsCount() - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName18, - _methodParameterTypes18, 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 org.liferay.jukebox.model.Artist updateArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { ClpSerializer.translateInput(artist) }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.lang.String getBeanIdentifier() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName20, - _methodParameterTypes20, 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(_methodName21, - _methodParameterTypes21, - 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 org.liferay.jukebox.model.Artist addArtist(long userId, - java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { - userId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(bio), - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Artist artist, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, - new Object[] { - ClpSerializer.translateInput(artist), - - addGroupPermissions, - - addGuestPermissions - }); - } - 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"); - } - } - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Artist artist, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { - ClpSerializer.translateInput(artist), - - ClpSerializer.translateInput(groupPermissions), - - ClpSerializer.translateInput(guestPermissions) - }); - } - 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"); - } - } - } - - @Override - public void deleteArtists(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName26, - _methodParameterTypes26, new Object[] { groupId }); - } - 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"); - } - } - } - - @Override - public java.util.List getArtists( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName27, - _methodParameterTypes27, new Object[] { groupId }); - } - 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 java.util.List getArtists( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName28, - _methodParameterTypes28, - new Object[] { groupId, 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 - public int getArtistsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName29, - _methodParameterTypes29, new Object[] { groupId }); - } - 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 org.liferay.jukebox.model.Artist updateArtist(long userId, - long artistId, java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName30, - _methodParameterTypes30, - new Object[] { - userId, - - artistId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(bio), - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void updateAsset(long userId, - org.liferay.jukebox.model.Artist artist, long[] assetCategoryIds, - java.lang.String[] assetTagNames, long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName31, - _methodParameterTypes31, - new Object[] { - userId, - - ClpSerializer.translateInput(artist), - - ClpSerializer.translateInput(assetCategoryIds), - - ClpSerializer.translateInput(assetTagNames), - - ClpSerializer.translateInput(assetLinkEntryIds) - }); - } - 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"); - } - } - } - - 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 _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName20; - private String[] _methodParameterTypes20; - private String _methodName21; - private String[] _methodParameterTypes21; - private String _methodName23; - private String[] _methodParameterTypes23; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; - private String _methodName27; - private String[] _methodParameterTypes27; - private String _methodName28; - private String[] _methodParameterTypes28; - private String _methodName29; - private String[] _methodParameterTypes29; - private String _methodName30; - private String[] _methodParameterTypes30; - private String _methodName31; - private String[] _methodParameterTypes31; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalServiceUtil.java deleted file mode 100644 index add26ae3b1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalServiceUtil.java +++ /dev/null @@ -1,436 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 Artist. This utility wraps - * {@link org.liferay.jukebox.service.impl.ArtistLocalServiceImpl} 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 Julio Camarero - * @see ArtistLocalService - * @see org.liferay.jukebox.service.base.ArtistLocalServiceBaseImpl - * @see org.liferay.jukebox.service.impl.ArtistLocalServiceImpl - * @generated - */ -public class ArtistLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link org.liferay.jukebox.service.impl.ArtistLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the artist to the database. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was added - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist addArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addArtist(artist); - } - - /** - * Creates a new artist with the primary key. Does not add the artist to the database. - * - * @param artistId the primary key for the new artist - * @return the new artist - */ - public static org.liferay.jukebox.model.Artist createArtist(long artistId) { - return getService().createArtist(artistId); - } - - /** - * Deletes the artist with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param artistId the primary key of the artist - * @return the artist that was removed - * @throws PortalException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist deleteArtist(long artistId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteArtist(artistId); - } - - /** - * Deletes the artist from the database. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was removed - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist deleteArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().deleteArtist(artist); - } - - 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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 org.liferay.jukebox.model.Artist fetchArtist(long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchArtist(artistId); - } - - /** - * Returns the artist with the matching UUID and company. - * - * @param uuid the artist's UUID - * @param companyId the primary key of the company - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchArtistByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchArtistByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the artist matching the UUID and group. - * - * @param uuid the artist's UUID - * @param groupId the primary key of the group - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchArtistByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchArtistByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the artist with the primary key. - * - * @param artistId the primary key of the artist - * @return the artist - * @throws PortalException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist getArtist(long artistId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getArtist(artistId); - } - - 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 the artist with the matching UUID and company. - * - * @param uuid the artist's UUID - * @param companyId the primary key of the company - * @return the matching artist - * @throws PortalException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist getArtistByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getArtistByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the artist matching the UUID and group. - * - * @param uuid the artist's UUID - * @param groupId the primary key of the group - * @return the matching artist - * @throws PortalException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist getArtistByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getArtistByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List getArtists( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtists(start, end); - } - - /** - * Returns the number of artists. - * - * @return the number of artists - * @throws SystemException if a system exception occurred - */ - public static int getArtistsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtistsCount(); - } - - /** - * Updates the artist in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was updated - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist updateArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateArtist(artist); - } - - /** - * 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 org.liferay.jukebox.model.Artist addArtist(long userId, - java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addArtist(userId, name, bio, inputStream, serviceContext); - } - - public static void addEntryResources( - org.liferay.jukebox.model.Artist artist, boolean addGroupPermissions, - boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addEntryResources(artist, addGroupPermissions, addGuestPermissions); - } - - public static void addEntryResources( - org.liferay.jukebox.model.Artist artist, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addEntryResources(artist, groupPermissions, guestPermissions); - } - - public static void deleteArtists(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteArtists(groupId); - } - - public static java.util.List getArtists( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtists(groupId); - } - - public static java.util.List getArtists( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtists(groupId, start, end); - } - - public static int getArtistsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtistsCount(groupId); - } - - public static org.liferay.jukebox.model.Artist updateArtist(long userId, - long artistId, java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateArtist(userId, artistId, name, bio, inputStream, - serviceContext); - } - - public static void updateAsset(long userId, - org.liferay.jukebox.model.Artist artist, long[] assetCategoryIds, - java.lang.String[] assetTagNames, long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .updateAsset(userId, artist, assetCategoryIds, assetTagNames, - assetLinkEntryIds); - } - - public static void clearService() { - _service = null; - } - - public static ArtistLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - ArtistLocalService.class.getName()); - - if (invokableLocalService instanceof ArtistLocalService) { - _service = (ArtistLocalService)invokableLocalService; - } - else { - _service = new ArtistLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(ArtistLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(ArtistLocalService service) { - } - - private static ArtistLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalServiceWrapper.java deleted file mode 100644 index 3ca33c3c6f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistLocalServiceWrapper.java +++ /dev/null @@ -1,450 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link ArtistLocalService}. - * - * @author Julio Camarero - * @see ArtistLocalService - * @generated - */ -public class ArtistLocalServiceWrapper implements ArtistLocalService, - ServiceWrapper { - public ArtistLocalServiceWrapper(ArtistLocalService artistLocalService) { - _artistLocalService = artistLocalService; - } - - /** - * Adds the artist to the database. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was added - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Artist addArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.addArtist(artist); - } - - /** - * Creates a new artist with the primary key. Does not add the artist to the database. - * - * @param artistId the primary key for the new artist - * @return the new artist - */ - @Override - public org.liferay.jukebox.model.Artist createArtist(long artistId) { - return _artistLocalService.createArtist(artistId); - } - - /** - * Deletes the artist with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param artistId the primary key of the artist - * @return the artist that was removed - * @throws PortalException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Artist deleteArtist(long artistId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.deleteArtist(artistId); - } - - /** - * Deletes the artist from the database. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Artist deleteArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.deleteArtist(artist); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _artistLocalService.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 _artistLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @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 _artistLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 _artistLocalService.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 _artistLocalService.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 _artistLocalService.dynamicQueryCount(dynamicQuery, projection); - } - - @Override - public org.liferay.jukebox.model.Artist fetchArtist(long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.fetchArtist(artistId); - } - - /** - * Returns the artist with the matching UUID and company. - * - * @param uuid the artist's UUID - * @param companyId the primary key of the company - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Artist fetchArtistByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.fetchArtistByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the artist matching the UUID and group. - * - * @param uuid the artist's UUID - * @param groupId the primary key of the group - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Artist fetchArtistByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.fetchArtistByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the artist with the primary key. - * - * @param artistId the primary key of the artist - * @return the artist - * @throws PortalException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Artist getArtist(long artistId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.getArtist(artistId); - } - - @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 _artistLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns the artist with the matching UUID and company. - * - * @param uuid the artist's UUID - * @param companyId the primary key of the company - * @return the matching artist - * @throws PortalException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Artist getArtistByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.getArtistByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the artist matching the UUID and group. - * - * @param uuid the artist's UUID - * @param groupId the primary key of the group - * @return the matching artist - * @throws PortalException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Artist getArtistByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.getArtistByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of artists - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getArtists( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.getArtists(start, end); - } - - /** - * Returns the number of artists. - * - * @return the number of artists - * @throws SystemException if a system exception occurred - */ - @Override - public int getArtistsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.getArtistsCount(); - } - - /** - * Updates the artist in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Artist updateArtist( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.updateArtist(artist); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _artistLocalService.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) { - _artistLocalService.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 _artistLocalService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public org.liferay.jukebox.model.Artist addArtist(long userId, - java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.addArtist(userId, name, bio, inputStream, - serviceContext); - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Artist artist, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _artistLocalService.addEntryResources(artist, addGroupPermissions, - addGuestPermissions); - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Artist artist, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _artistLocalService.addEntryResources(artist, groupPermissions, - guestPermissions); - } - - @Override - public void deleteArtists(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _artistLocalService.deleteArtists(groupId); - } - - @Override - public java.util.List getArtists( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.getArtists(groupId); - } - - @Override - public java.util.List getArtists( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.getArtists(groupId, start, end); - } - - @Override - public int getArtistsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.getArtistsCount(groupId); - } - - @Override - public org.liferay.jukebox.model.Artist updateArtist(long userId, - long artistId, java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artistLocalService.updateArtist(userId, artistId, name, bio, - inputStream, serviceContext); - } - - @Override - public void updateAsset(long userId, - org.liferay.jukebox.model.Artist artist, long[] assetCategoryIds, - java.lang.String[] assetTagNames, long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _artistLocalService.updateAsset(userId, artist, assetCategoryIds, - assetTagNames, assetLinkEntryIds); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public ArtistLocalService getWrappedArtistLocalService() { - return _artistLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedArtistLocalService( - ArtistLocalService artistLocalService) { - _artistLocalService = artistLocalService; - } - - @Override - public ArtistLocalService getWrappedService() { - return _artistLocalService; - } - - @Override - public void setWrappedService(ArtistLocalService artistLocalService) { - _artistLocalService = artistLocalService; - } - - private ArtistLocalService _artistLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistService.java deleted file mode 100644 index 3b31878ddb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistService.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.Propagation; -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 Artist. Methods of this - * service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. - * - * @author Julio Camarero - * @see ArtistServiceUtil - * @see org.liferay.jukebox.service.base.ArtistServiceBaseImpl - * @see org.liferay.jukebox.service.impl.ArtistServiceImpl - * @generated - */ -@AccessControlled -@JSONWebService -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface ArtistService extends BaseService, InvokableService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link ArtistServiceUtil} to access the artist remote service. Add custom service methods to {@link org.liferay.jukebox.service.impl.ArtistServiceImpl} 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; - - public org.liferay.jukebox.model.Artist addArtist(java.lang.String name, - java.lang.String bio, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Artist deleteArtist(long artistId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getArtists( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getArtists( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getArtists( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getArtistsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getArtistsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Artist updateArtist(long artistId, - java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistServiceClp.java deleted file mode 100644 index 2428c100d4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistServiceClp.java +++ /dev/null @@ -1,425 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.InvokableService; - -/** - * @author Julio Camarero - * @generated - */ -public class ArtistServiceClp implements ArtistService { - public ArtistServiceClp(InvokableService invokableService) { - _invokableService = invokableService; - - _methodName0 = "getBeanIdentifier"; - - _methodParameterTypes0 = new String[] { }; - - _methodName1 = "setBeanIdentifier"; - - _methodParameterTypes1 = new String[] { "java.lang.String" }; - - _methodName3 = "addArtist"; - - _methodParameterTypes3 = new String[] { - "java.lang.String", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName4 = "deleteArtist"; - - _methodParameterTypes4 = new String[] { - "long", "com.liferay.portal.service.ServiceContext" - }; - - _methodName5 = "getArtists"; - - _methodParameterTypes5 = new String[] { "long" }; - - _methodName6 = "getArtists"; - - _methodParameterTypes6 = new String[] { "long", "int", "int" }; - - _methodName7 = "getArtists"; - - _methodParameterTypes7 = new String[] { "long", "java.lang.String" }; - - _methodName8 = "getArtistsCount"; - - _methodParameterTypes8 = new String[] { "long" }; - - _methodName9 = "getArtistsCount"; - - _methodParameterTypes9 = new String[] { "long", "java.lang.String" }; - - _methodName10 = "updateArtist"; - - _methodParameterTypes10 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - } - - @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(); - } - - @Override - public org.liferay.jukebox.model.Artist addArtist(java.lang.String name, - java.lang.String bio, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(bio), - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Artist deleteArtist(long artistId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName4, - _methodParameterTypes4, - new Object[] { - artistId, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getArtists( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName5, - _methodParameterTypes5, new Object[] { groupId }); - } - 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 java.util.List getArtists( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName6, - _methodParameterTypes6, new Object[] { groupId, 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 - public java.util.List getArtists( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName7, - _methodParameterTypes7, - new Object[] { groupId, ClpSerializer.translateInput( - keywords) }); - } - 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 int getArtistsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName8, - _methodParameterTypes8, new Object[] { groupId }); - } - 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 int getArtistsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName9, - _methodParameterTypes9, - new Object[] { groupId, ClpSerializer.translateInput( - keywords) }); - } - 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 org.liferay.jukebox.model.Artist updateArtist(long artistId, - java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName10, - _methodParameterTypes10, - new Object[] { - artistId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(bio), - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Artist)ClpSerializer.translateOutput(returnObj); - } - - private InvokableService _invokableService; - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - 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; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistServiceUtil.java deleted file mode 100644 index e9fbbfcbf8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistServiceUtil.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 Artist. This utility wraps - * {@link org.liferay.jukebox.service.impl.ArtistServiceImpl} 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 Julio Camarero - * @see ArtistService - * @see org.liferay.jukebox.service.base.ArtistServiceBaseImpl - * @see org.liferay.jukebox.service.impl.ArtistServiceImpl - * @generated - */ -public class ArtistServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link org.liferay.jukebox.service.impl.ArtistServiceImpl} 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 org.liferay.jukebox.model.Artist addArtist( - java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().addArtist(name, bio, inputStream, serviceContext); - } - - public static org.liferay.jukebox.model.Artist deleteArtist(long artistId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteArtist(artistId, serviceContext); - } - - public static java.util.List getArtists( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtists(groupId); - } - - public static java.util.List getArtists( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtists(groupId, start, end); - } - - public static java.util.List getArtists( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtists(groupId, keywords); - } - - public static int getArtistsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtistsCount(groupId); - } - - public static int getArtistsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getArtistsCount(groupId, keywords); - } - - public static org.liferay.jukebox.model.Artist updateArtist(long artistId, - java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateArtist(artistId, name, bio, inputStream, - serviceContext); - } - - public static void clearService() { - _service = null; - } - - public static ArtistService getService() { - if (_service == null) { - InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - ArtistService.class.getName()); - - if (invokableService instanceof ArtistService) { - _service = (ArtistService)invokableService; - } - else { - _service = new ArtistServiceClp(invokableService); - } - - ReferenceRegistry.registerReference(ArtistServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(ArtistService service) { - } - - private static ArtistService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistServiceWrapper.java deleted file mode 100644 index e87bca2853..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ArtistServiceWrapper.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link ArtistService}. - * - * @author Julio Camarero - * @see ArtistService - * @generated - */ -public class ArtistServiceWrapper implements ArtistService, - ServiceWrapper { - public ArtistServiceWrapper(ArtistService artistService) { - _artistService = artistService; - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _artistService.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) { - _artistService.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 _artistService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public org.liferay.jukebox.model.Artist addArtist(java.lang.String name, - java.lang.String bio, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artistService.addArtist(name, bio, inputStream, serviceContext); - } - - @Override - public org.liferay.jukebox.model.Artist deleteArtist(long artistId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artistService.deleteArtist(artistId, serviceContext); - } - - @Override - public java.util.List getArtists( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistService.getArtists(groupId); - } - - @Override - public java.util.List getArtists( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistService.getArtists(groupId, start, end); - } - - @Override - public java.util.List getArtists( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistService.getArtists(groupId, keywords); - } - - @Override - public int getArtistsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistService.getArtistsCount(groupId); - } - - @Override - public int getArtistsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return _artistService.getArtistsCount(groupId, keywords); - } - - @Override - public org.liferay.jukebox.model.Artist updateArtist(long artistId, - java.lang.String name, java.lang.String bio, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _artistService.updateArtist(artistId, name, bio, inputStream, - serviceContext); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public ArtistService getWrappedArtistService() { - return _artistService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedArtistService(ArtistService artistService) { - _artistService = artistService; - } - - @Override - public ArtistService getWrappedService() { - return _artistService; - } - - @Override - public void setWrappedService(ArtistService artistService) { - _artistService = artistService; - } - - private ArtistService _artistService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ClpSerializer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ClpSerializer.java deleted file mode 100644 index 26d1ff0230..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/ClpSerializer.java +++ /dev/null @@ -1,358 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 org.liferay.jukebox.model.AlbumClp; -import org.liferay.jukebox.model.ArtistClp; -import org.liferay.jukebox.model.SongClp; - -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; - -import java.lang.reflect.Method; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Julio Camarero - */ -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, - "jukebox-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( - "jukebox-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 = "jukebox-portlet"; - } - - return _servletContextName; - } - } - - public static Object translateInput(BaseModel oldModel) { - Class oldModelClass = oldModel.getClass(); - - String oldModelClassName = oldModelClass.getName(); - - if (oldModelClassName.equals(AlbumClp.class.getName())) { - return translateInputAlbum(oldModel); - } - - if (oldModelClassName.equals(ArtistClp.class.getName())) { - return translateInputArtist(oldModel); - } - - if (oldModelClassName.equals(SongClp.class.getName())) { - return translateInputSong(oldModel); - } - - return oldModel; - } - - public static Object translateInput(List oldList) { - List newList = new ArrayList(oldList.size()); - - for (int i = 0; i < oldList.size(); i++) { - Object curObj = oldList.get(i); - - newList.add(translateInput(curObj)); - } - - return newList; - } - - public static Object translateInputAlbum(BaseModel oldModel) { - AlbumClp oldClpModel = (AlbumClp)oldModel; - - BaseModel newModel = oldClpModel.getAlbumRemoteModel(); - - newModel.setModelAttributes(oldClpModel.getModelAttributes()); - - return newModel; - } - - public static Object translateInputArtist(BaseModel oldModel) { - ArtistClp oldClpModel = (ArtistClp)oldModel; - - BaseModel newModel = oldClpModel.getArtistRemoteModel(); - - newModel.setModelAttributes(oldClpModel.getModelAttributes()); - - return newModel; - } - - public static Object translateInputSong(BaseModel oldModel) { - SongClp oldClpModel = (SongClp)oldModel; - - BaseModel newModel = oldClpModel.getSongRemoteModel(); - - 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)obj); - } - else { - return obj; - } - } - - public static Object translateOutput(BaseModel oldModel) { - Class oldModelClass = oldModel.getClass(); - - String oldModelClassName = oldModelClass.getName(); - - if (oldModelClassName.equals("org.liferay.jukebox.model.impl.AlbumImpl")) { - return translateOutputAlbum(oldModel); - } - - if (oldModelClassName.equals( - "org.liferay.jukebox.model.impl.ArtistImpl")) { - return translateOutputArtist(oldModel); - } - - if (oldModelClassName.equals("org.liferay.jukebox.model.impl.SongImpl")) { - return translateOutputSong(oldModel); - } - - return oldModel; - } - - public static Object translateOutput(List oldList) { - List newList = new ArrayList(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)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("org.liferay.jukebox.AlbumNameException")) { - return new org.liferay.jukebox.AlbumNameException(); - } - - if (className.equals("org.liferay.jukebox.ArtistNameException")) { - return new org.liferay.jukebox.ArtistNameException(); - } - - if (className.equals("org.liferay.jukebox.DuplicatedAlbumException")) { - return new org.liferay.jukebox.DuplicatedAlbumException(); - } - - if (className.equals("org.liferay.jukebox.DuplicatedArtistException")) { - return new org.liferay.jukebox.DuplicatedArtistException(); - } - - if (className.equals("org.liferay.jukebox.DuplicatedSongException")) { - return new org.liferay.jukebox.DuplicatedSongException(); - } - - if (className.equals("org.liferay.jukebox.NoSuchAlbumException")) { - return new org.liferay.jukebox.NoSuchAlbumException(); - } - - if (className.equals("org.liferay.jukebox.NoSuchArtistException")) { - return new org.liferay.jukebox.NoSuchArtistException(); - } - - if (className.equals("org.liferay.jukebox.NoSuchSongException")) { - return new org.liferay.jukebox.NoSuchSongException(); - } - - if (className.equals("org.liferay.jukebox.SongNameException")) { - return new org.liferay.jukebox.SongNameException(); - } - - if (className.equals("org.liferay.jukebox.NoSuchAlbumException")) { - return new org.liferay.jukebox.NoSuchAlbumException(); - } - - if (className.equals("org.liferay.jukebox.NoSuchArtistException")) { - return new org.liferay.jukebox.NoSuchArtistException(); - } - - if (className.equals("org.liferay.jukebox.NoSuchSongException")) { - return new org.liferay.jukebox.NoSuchSongException(); - } - - return throwable; - } - - public static Object translateOutputAlbum(BaseModel oldModel) { - AlbumClp newModel = new AlbumClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setAlbumRemoteModel(oldModel); - - return newModel; - } - - public static Object translateOutputArtist(BaseModel oldModel) { - ArtistClp newModel = new ArtistClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setArtistRemoteModel(oldModel); - - return newModel; - } - - public static Object translateOutputSong(BaseModel oldModel) { - SongClp newModel = new SongClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setSongRemoteModel(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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalService.java deleted file mode 100644 index c7bb43f784..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalService.java +++ /dev/null @@ -1,390 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -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 Song. 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 Julio Camarero - * @see SongLocalServiceUtil - * @see org.liferay.jukebox.service.base.SongLocalServiceBaseImpl - * @see org.liferay.jukebox.service.impl.SongLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface SongLocalService extends BaseLocalService, InvokableLocalService, - PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link SongLocalServiceUtil} to access the song local service. Add custom service methods to {@link org.liferay.jukebox.service.impl.SongLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the song to the database. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was added - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song addSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new song with the primary key. Does not add the song to the database. - * - * @param songId the primary key for the new song - * @return the new song - */ - public org.liferay.jukebox.model.Song createSong(long songId); - - /** - * Deletes the song with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param songId the primary key of the song - * @return the song that was removed - * @throws PortalException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song deleteSong(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the song from the database. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song deleteSong( - org.liferay.jukebox.model.Song song) - 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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 org.liferay.jukebox.model.Song fetchSong(long songId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the song with the matching UUID and company. - * - * @param uuid the song's UUID - * @param companyId the primary key of the company - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Song fetchSongByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the song matching the UUID and group. - * - * @param uuid the song's UUID - * @param groupId the primary key of the group - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Song fetchSongByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the song with the primary key. - * - * @param songId the primary key of the song - * @return the song - * @throws PortalException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Song getSong(long songId) - 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 the song with the matching UUID and company. - * - * @param uuid the song's UUID - * @param companyId the primary key of the company - * @return the matching song - * @throws PortalException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Song getSongByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the song matching the UUID and group. - * - * @param uuid the song's UUID - * @param groupId the primary key of the group - * @return the matching song - * @throws PortalException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Song getSongByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of songs - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongs(int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs. - * - * @return the number of songs - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSongsCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the song in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was updated - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song updateSong( - org.liferay.jukebox.model.Song song) - 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 addEntryResources(org.liferay.jukebox.model.Song song, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addEntryResources(org.liferay.jukebox.model.Song song, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song addSong(long userId, long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public org.liferay.jukebox.model.Song getSong(long groupId, long artistId, - long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongs(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongs( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongsByAlbumId( - long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongsByAlbumId( - long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongsByAlbumId( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSongsByAlbumIdCount(long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSongsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song moveSong(long songId, long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song moveSongFromTrash(long userId, - long songId, long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song moveSongToTrash(long userId, - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song restoreSongFromTrash(long userId, - long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateAsset(long userId, org.liferay.jukebox.model.Song song, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song updateSong(long userId, long songId, - long albumId, java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalServiceClp.java deleted file mode 100644 index beecd7b1c1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalServiceClp.java +++ /dev/null @@ -1,1574 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Julio Camarero - * @generated - */ -public class SongLocalServiceClp implements SongLocalService { - public SongLocalServiceClp(InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addSong"; - - _methodParameterTypes0 = new String[] { "org.liferay.jukebox.model.Song" }; - - _methodName1 = "createSong"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteSong"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteSong"; - - _methodParameterTypes3 = new String[] { "org.liferay.jukebox.model.Song" }; - - _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 = "fetchSong"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchSongByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchSongByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getSong"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getSongByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getSongByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getSongs"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getSongsCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateSong"; - - _methodParameterTypes19 = new String[] { "org.liferay.jukebox.model.Song" }; - - _methodName20 = "getBeanIdentifier"; - - _methodParameterTypes20 = new String[] { }; - - _methodName21 = "setBeanIdentifier"; - - _methodParameterTypes21 = new String[] { "java.lang.String" }; - - _methodName23 = "addEntryResources"; - - _methodParameterTypes23 = new String[] { - "org.liferay.jukebox.model.Song", "boolean", "boolean" - }; - - _methodName24 = "addEntryResources"; - - _methodParameterTypes24 = new String[] { - "org.liferay.jukebox.model.Song", "java.lang.String[][]", - "java.lang.String[][]" - }; - - _methodName25 = "addSong"; - - _methodParameterTypes25 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName26 = "getSong"; - - _methodParameterTypes26 = new String[] { - "long", "long", "long", "java.lang.String" - }; - - _methodName27 = "getSongs"; - - _methodParameterTypes27 = new String[] { "long" }; - - _methodName28 = "getSongs"; - - _methodParameterTypes28 = new String[] { "long", "int", "int" }; - - _methodName29 = "getSongsByAlbumId"; - - _methodParameterTypes29 = new String[] { "long" }; - - _methodName30 = "getSongsByAlbumId"; - - _methodParameterTypes30 = new String[] { "long", "int", "int" }; - - _methodName31 = "getSongsByAlbumId"; - - _methodParameterTypes31 = new String[] { "long", "long", "int" }; - - _methodName32 = "getSongsByAlbumIdCount"; - - _methodParameterTypes32 = new String[] { "long" }; - - _methodName33 = "getSongsCount"; - - _methodParameterTypes33 = new String[] { "long" }; - - _methodName34 = "moveSong"; - - _methodParameterTypes34 = new String[] { "long", "long" }; - - _methodName35 = "moveSongFromTrash"; - - _methodParameterTypes35 = new String[] { "long", "long", "long" }; - - _methodName36 = "moveSongToTrash"; - - _methodParameterTypes36 = new String[] { - "long", "org.liferay.jukebox.model.Song" - }; - - _methodName37 = "restoreSongFromTrash"; - - _methodParameterTypes37 = new String[] { "long", "long" }; - - _methodName38 = "updateAsset"; - - _methodParameterTypes38 = new String[] { - "long", "org.liferay.jukebox.model.Song", "long[][]", - "java.lang.String[][]", "long[][]" - }; - - _methodName39 = "updateSong"; - - _methodParameterTypes39 = new String[] { - "long", "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - } - - @Override - public org.liferay.jukebox.model.Song addSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(song) }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song createSong(long songId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { songId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song deleteSong(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { songId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song deleteSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(song) }); - } - 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 (org.liferay.jukebox.model.Song)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 org.liferay.jukebox.model.Song fetchSong(long songId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { songId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song fetchSongByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { ClpSerializer.translateInput(uuid), 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song fetchSongByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song getSong(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName13, - _methodParameterTypes13, new Object[] { songId }); - } - 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 (org.liferay.jukebox.model.Song)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(_methodName14, - _methodParameterTypes14, - 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 org.liferay.jukebox.model.Song getSongByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { ClpSerializer.translateInput(uuid), companyId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song getSongByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName16, - _methodParameterTypes16, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getSongs(int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName17, - _methodParameterTypes17, 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getSongsCount() - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName18, - _methodParameterTypes18, 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 org.liferay.jukebox.model.Song updateSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { ClpSerializer.translateInput(song) }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.lang.String getBeanIdentifier() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName20, - _methodParameterTypes20, 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(_methodName21, - _methodParameterTypes21, - 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 addEntryResources(org.liferay.jukebox.model.Song song, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { - ClpSerializer.translateInput(song), - - addGroupPermissions, - - addGuestPermissions - }); - } - 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"); - } - } - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Song song, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, - new Object[] { - ClpSerializer.translateInput(song), - - ClpSerializer.translateInput(groupPermissions), - - ClpSerializer.translateInput(guestPermissions) - }); - } - 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"); - } - } - } - - @Override - public org.liferay.jukebox.model.Song addSong(long userId, long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { - userId, - - albumId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(songFileName), - - ClpSerializer.translateInput(songInputStream), - - ClpSerializer.translateInput(lyricsFileName), - - ClpSerializer.translateInput(lyricsInputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song getSong(long groupId, long artistId, - long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName26, - _methodParameterTypes26, - new Object[] { - groupId, - - artistId, - - albumId, - - ClpSerializer.translateInput(name) - }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getSongs(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName27, - _methodParameterTypes27, new Object[] { groupId }); - } - 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 java.util.List getSongs( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName28, - _methodParameterTypes28, - new Object[] { groupId, 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 - public java.util.List getSongsByAlbumId( - long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName29, - _methodParameterTypes29, new Object[] { albumId }); - } - 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 java.util.List getSongsByAlbumId( - long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName30, - _methodParameterTypes30, - new Object[] { albumId, 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 - public java.util.List getSongsByAlbumId( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName31, - _methodParameterTypes31, - new Object[] { groupId, albumId, status }); - } - 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 int getSongsByAlbumIdCount(long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName32, - _methodParameterTypes32, new Object[] { albumId }); - } - 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 int getSongsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName33, - _methodParameterTypes33, new Object[] { groupId }); - } - 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 org.liferay.jukebox.model.Song moveSong(long songId, long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName34, - _methodParameterTypes34, new Object[] { songId, albumId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song moveSongFromTrash(long userId, - long songId, long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName35, - _methodParameterTypes35, - new Object[] { userId, songId, albumId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song moveSongToTrash(long userId, - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName36, - _methodParameterTypes36, - new Object[] { userId, ClpSerializer.translateInput(song) }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song restoreSongFromTrash(long userId, - long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName37, - _methodParameterTypes37, new Object[] { userId, songId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void updateAsset(long userId, org.liferay.jukebox.model.Song song, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName38, - _methodParameterTypes38, - new Object[] { - userId, - - ClpSerializer.translateInput(song), - - ClpSerializer.translateInput(assetCategoryIds), - - ClpSerializer.translateInput(assetTagNames), - - ClpSerializer.translateInput(assetLinkEntryIds) - }); - } - 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"); - } - } - } - - @Override - public org.liferay.jukebox.model.Song updateSong(long userId, long songId, - long albumId, java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName39, - _methodParameterTypes39, - new Object[] { - userId, - - songId, - - albumId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(songFileName), - - ClpSerializer.translateInput(songInputStream), - - ClpSerializer.translateInput(lyricsFileName), - - ClpSerializer.translateInput(lyricsInputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Song)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 _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName20; - private String[] _methodParameterTypes20; - private String _methodName21; - private String[] _methodParameterTypes21; - private String _methodName23; - private String[] _methodParameterTypes23; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; - private String _methodName27; - private String[] _methodParameterTypes27; - private String _methodName28; - private String[] _methodParameterTypes28; - private String _methodName29; - private String[] _methodParameterTypes29; - private String _methodName30; - private String[] _methodParameterTypes30; - private String _methodName31; - private String[] _methodParameterTypes31; - private String _methodName32; - private String[] _methodParameterTypes32; - private String _methodName33; - private String[] _methodParameterTypes33; - private String _methodName34; - private String[] _methodParameterTypes34; - private String _methodName35; - private String[] _methodParameterTypes35; - private String _methodName36; - private String[] _methodParameterTypes36; - private String _methodName37; - private String[] _methodParameterTypes37; - private String _methodName38; - private String[] _methodParameterTypes38; - private String _methodName39; - private String[] _methodParameterTypes39; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalServiceUtil.java deleted file mode 100644 index 4a3d91c091..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalServiceUtil.java +++ /dev/null @@ -1,487 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 Song. This utility wraps - * {@link org.liferay.jukebox.service.impl.SongLocalServiceImpl} 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 Julio Camarero - * @see SongLocalService - * @see org.liferay.jukebox.service.base.SongLocalServiceBaseImpl - * @see org.liferay.jukebox.service.impl.SongLocalServiceImpl - * @generated - */ -public class SongLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link org.liferay.jukebox.service.impl.SongLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the song to the database. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was added - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song addSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addSong(song); - } - - /** - * Creates a new song with the primary key. Does not add the song to the database. - * - * @param songId the primary key for the new song - * @return the new song - */ - public static org.liferay.jukebox.model.Song createSong(long songId) { - return getService().createSong(songId); - } - - /** - * Deletes the song with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param songId the primary key of the song - * @return the song that was removed - * @throws PortalException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song deleteSong(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteSong(songId); - } - - /** - * Deletes the song from the database. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song deleteSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().deleteSong(song); - } - - 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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @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. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 org.liferay.jukebox.model.Song fetchSong(long songId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchSong(songId); - } - - /** - * Returns the song with the matching UUID and company. - * - * @param uuid the song's UUID - * @param companyId the primary key of the company - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchSongByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchSongByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the song matching the UUID and group. - * - * @param uuid the song's UUID - * @param groupId the primary key of the group - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchSongByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchSongByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the song with the primary key. - * - * @param songId the primary key of the song - * @return the song - * @throws PortalException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song getSong(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getSong(songId); - } - - 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 the song with the matching UUID and company. - * - * @param uuid the song's UUID - * @param companyId the primary key of the company - * @return the matching song - * @throws PortalException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song getSongByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getSongByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the song matching the UUID and group. - * - * @param uuid the song's UUID - * @param groupId the primary key of the group - * @return the matching song - * @throws PortalException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song getSongByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getSongByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List getSongs( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongs(start, end); - } - - /** - * Returns the number of songs. - * - * @return the number of songs - * @throws SystemException if a system exception occurred - */ - public static int getSongsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsCount(); - } - - /** - * Updates the song in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was updated - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song updateSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateSong(song); - } - - /** - * 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 addEntryResources(org.liferay.jukebox.model.Song song, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addEntryResources(song, addGroupPermissions, addGuestPermissions); - } - - public static void addEntryResources(org.liferay.jukebox.model.Song song, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().addEntryResources(song, groupPermissions, guestPermissions); - } - - public static org.liferay.jukebox.model.Song addSong(long userId, - long albumId, java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addSong(userId, albumId, name, songFileName, - songInputStream, lyricsFileName, lyricsInputStream, serviceContext); - } - - public static org.liferay.jukebox.model.Song getSong(long groupId, - long artistId, long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSong(groupId, artistId, albumId, name); - } - - public static java.util.List getSongs( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongs(groupId); - } - - public static java.util.List getSongs( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongs(groupId, start, end); - } - - public static java.util.List getSongsByAlbumId( - long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsByAlbumId(albumId); - } - - public static java.util.List getSongsByAlbumId( - long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsByAlbumId(albumId, start, end); - } - - public static java.util.List getSongsByAlbumId( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsByAlbumId(groupId, albumId, status); - } - - public static int getSongsByAlbumIdCount(long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsByAlbumIdCount(albumId); - } - - public static int getSongsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsCount(groupId); - } - - public static org.liferay.jukebox.model.Song moveSong(long songId, - long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().moveSong(songId, albumId); - } - - public static org.liferay.jukebox.model.Song moveSongFromTrash( - long userId, long songId, long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().moveSongFromTrash(userId, songId, albumId); - } - - public static org.liferay.jukebox.model.Song moveSongToTrash(long userId, - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().moveSongToTrash(userId, song); - } - - public static org.liferay.jukebox.model.Song restoreSongFromTrash( - long userId, long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().restoreSongFromTrash(userId, songId); - } - - public static void updateAsset(long userId, - org.liferay.jukebox.model.Song song, long[] assetCategoryIds, - java.lang.String[] assetTagNames, long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .updateAsset(userId, song, assetCategoryIds, assetTagNames, - assetLinkEntryIds); - } - - public static org.liferay.jukebox.model.Song updateSong(long userId, - long songId, long albumId, java.lang.String name, - java.lang.String songFileName, java.io.InputStream songInputStream, - java.lang.String lyricsFileName, java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateSong(userId, songId, albumId, name, songFileName, - songInputStream, lyricsFileName, lyricsInputStream, serviceContext); - } - - public static void clearService() { - _service = null; - } - - public static SongLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - SongLocalService.class.getName()); - - if (invokableLocalService instanceof SongLocalService) { - _service = (SongLocalService)invokableLocalService; - } - else { - _service = new SongLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(SongLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(SongLocalService service) { - } - - private static SongLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalServiceWrapper.java deleted file mode 100644 index 3b2bcc4f24..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongLocalServiceWrapper.java +++ /dev/null @@ -1,508 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link SongLocalService}. - * - * @author Julio Camarero - * @see SongLocalService - * @generated - */ -public class SongLocalServiceWrapper implements SongLocalService, - ServiceWrapper { - public SongLocalServiceWrapper(SongLocalService songLocalService) { - _songLocalService = songLocalService; - } - - /** - * Adds the song to the database. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was added - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Song addSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.addSong(song); - } - - /** - * Creates a new song with the primary key. Does not add the song to the database. - * - * @param songId the primary key for the new song - * @return the new song - */ - @Override - public org.liferay.jukebox.model.Song createSong(long songId) { - return _songLocalService.createSong(songId); - } - - /** - * Deletes the song with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param songId the primary key of the song - * @return the song that was removed - * @throws PortalException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Song deleteSong(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.deleteSong(songId); - } - - /** - * Deletes the song from the database. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Song deleteSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.deleteSong(song); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _songLocalService.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 _songLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @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 _songLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 _songLocalService.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 _songLocalService.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 _songLocalService.dynamicQueryCount(dynamicQuery, projection); - } - - @Override - public org.liferay.jukebox.model.Song fetchSong(long songId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.fetchSong(songId); - } - - /** - * Returns the song with the matching UUID and company. - * - * @param uuid the song's UUID - * @param companyId the primary key of the company - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Song fetchSongByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.fetchSongByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the song matching the UUID and group. - * - * @param uuid the song's UUID - * @param groupId the primary key of the group - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Song fetchSongByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.fetchSongByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the song with the primary key. - * - * @param songId the primary key of the song - * @return the song - * @throws PortalException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Song getSong(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSong(songId); - } - - @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 _songLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns the song with the matching UUID and company. - * - * @param uuid the song's UUID - * @param companyId the primary key of the company - * @return the matching song - * @throws PortalException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Song getSongByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the song matching the UUID and group. - * - * @param uuid the song's UUID - * @param groupId the primary key of the group - * @return the matching song - * @throws PortalException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Song getSongByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of songs - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getSongs(int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongs(start, end); - } - - /** - * Returns the number of songs. - * - * @return the number of songs - * @throws SystemException if a system exception occurred - */ - @Override - public int getSongsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongsCount(); - } - - /** - * Updates the song in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public org.liferay.jukebox.model.Song updateSong( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.updateSong(song); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _songLocalService.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) { - _songLocalService.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 _songLocalService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Song song, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _songLocalService.addEntryResources(song, addGroupPermissions, - addGuestPermissions); - } - - @Override - public void addEntryResources(org.liferay.jukebox.model.Song song, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _songLocalService.addEntryResources(song, groupPermissions, - guestPermissions); - } - - @Override - public org.liferay.jukebox.model.Song addSong(long userId, long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.addSong(userId, albumId, name, songFileName, - songInputStream, lyricsFileName, lyricsInputStream, serviceContext); - } - - @Override - public org.liferay.jukebox.model.Song getSong(long groupId, long artistId, - long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSong(groupId, artistId, albumId, name); - } - - @Override - public java.util.List getSongs(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongs(groupId); - } - - @Override - public java.util.List getSongs( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongs(groupId, start, end); - } - - @Override - public java.util.List getSongsByAlbumId( - long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongsByAlbumId(albumId); - } - - @Override - public java.util.List getSongsByAlbumId( - long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongsByAlbumId(albumId, start, end); - } - - @Override - public java.util.List getSongsByAlbumId( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongsByAlbumId(groupId, albumId, status); - } - - @Override - public int getSongsByAlbumIdCount(long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongsByAlbumIdCount(albumId); - } - - @Override - public int getSongsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.getSongsCount(groupId); - } - - @Override - public org.liferay.jukebox.model.Song moveSong(long songId, long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.moveSong(songId, albumId); - } - - @Override - public org.liferay.jukebox.model.Song moveSongFromTrash(long userId, - long songId, long albumId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.moveSongFromTrash(userId, songId, albumId); - } - - @Override - public org.liferay.jukebox.model.Song moveSongToTrash(long userId, - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.moveSongToTrash(userId, song); - } - - @Override - public org.liferay.jukebox.model.Song restoreSongFromTrash(long userId, - long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.restoreSongFromTrash(userId, songId); - } - - @Override - public void updateAsset(long userId, org.liferay.jukebox.model.Song song, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _songLocalService.updateAsset(userId, song, assetCategoryIds, - assetTagNames, assetLinkEntryIds); - } - - @Override - public org.liferay.jukebox.model.Song updateSong(long userId, long songId, - long albumId, java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songLocalService.updateSong(userId, songId, albumId, name, - songFileName, songInputStream, lyricsFileName, lyricsInputStream, - serviceContext); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public SongLocalService getWrappedSongLocalService() { - return _songLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedSongLocalService(SongLocalService songLocalService) { - _songLocalService = songLocalService; - } - - @Override - public SongLocalService getWrappedService() { - return _songLocalService; - } - - @Override - public void setWrappedService(SongLocalService songLocalService) { - _songLocalService = songLocalService; - } - - private SongLocalService _songLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongService.java deleted file mode 100644 index 40609f8761..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongService.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.Propagation; -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 Song. Methods of this - * service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. - * - * @author Julio Camarero - * @see SongServiceUtil - * @see org.liferay.jukebox.service.base.SongServiceBaseImpl - * @see org.liferay.jukebox.service.impl.SongServiceImpl - * @generated - */ -@AccessControlled -@JSONWebService -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface SongService extends BaseService, InvokableService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link SongServiceUtil} to access the song remote service. Add custom service methods to {@link org.liferay.jukebox.service.impl.SongServiceImpl} 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; - - public org.liferay.jukebox.model.Song addSong(long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song deleteSong(long songId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongs(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongs( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongs( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongsByAlbumId( - long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSongsByAlbumId( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSongsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSongsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSongsCountByAlbumId(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSongsCountByAlbumId(long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song moveSongToTrash(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song restoreSongFromTrash(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public org.liferay.jukebox.model.Song updateSong(long songId, long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongServiceClp.java deleted file mode 100644 index 1de557741b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongServiceClp.java +++ /dev/null @@ -1,658 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.InvokableService; - -/** - * @author Julio Camarero - * @generated - */ -public class SongServiceClp implements SongService { - public SongServiceClp(InvokableService invokableService) { - _invokableService = invokableService; - - _methodName0 = "getBeanIdentifier"; - - _methodParameterTypes0 = new String[] { }; - - _methodName1 = "setBeanIdentifier"; - - _methodParameterTypes1 = new String[] { "java.lang.String" }; - - _methodName3 = "addSong"; - - _methodParameterTypes3 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName4 = "deleteSong"; - - _methodParameterTypes4 = new String[] { - "long", "com.liferay.portal.service.ServiceContext" - }; - - _methodName5 = "getSongs"; - - _methodParameterTypes5 = new String[] { "long" }; - - _methodName6 = "getSongs"; - - _methodParameterTypes6 = new String[] { "long", "int", "int" }; - - _methodName7 = "getSongs"; - - _methodParameterTypes7 = new String[] { "long", "java.lang.String" }; - - _methodName8 = "getSongsByAlbumId"; - - _methodParameterTypes8 = new String[] { "long", "long" }; - - _methodName9 = "getSongsByAlbumId"; - - _methodParameterTypes9 = new String[] { "long", "long", "int" }; - - _methodName10 = "getSongsCount"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "getSongsCount"; - - _methodParameterTypes11 = new String[] { "long", "java.lang.String" }; - - _methodName12 = "getSongsCountByAlbumId"; - - _methodParameterTypes12 = new String[] { "long", "long" }; - - _methodName13 = "getSongsCountByAlbumId"; - - _methodParameterTypes13 = new String[] { "long", "long", "int" }; - - _methodName14 = "moveSongToTrash"; - - _methodParameterTypes14 = new String[] { "long" }; - - _methodName15 = "restoreSongFromTrash"; - - _methodParameterTypes15 = new String[] { "long" }; - - _methodName16 = "updateSong"; - - _methodParameterTypes16 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - } - - @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(); - } - - @Override - public org.liferay.jukebox.model.Song addSong(long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { - albumId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(songFileName), - - ClpSerializer.translateInput(songInputStream), - - ClpSerializer.translateInput(lyricsFileName), - - ClpSerializer.translateInput(lyricsInputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song deleteSong(long songId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName4, - _methodParameterTypes4, - new Object[] { - songId, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getSongs(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName5, - _methodParameterTypes5, new Object[] { groupId }); - } - 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 java.util.List getSongs( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName6, - _methodParameterTypes6, new Object[] { groupId, 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 - public java.util.List getSongs( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName7, - _methodParameterTypes7, - new Object[] { groupId, ClpSerializer.translateInput( - keywords) }); - } - 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 java.util.List getSongsByAlbumId( - long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName8, - _methodParameterTypes8, new Object[] { groupId, albumId }); - } - 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 java.util.List getSongsByAlbumId( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName9, - _methodParameterTypes9, - new Object[] { groupId, albumId, status }); - } - 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 int getSongsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { groupId }); - } - 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 int getSongsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { groupId, ClpSerializer.translateInput( - keywords) }); - } - 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 int getSongsCountByAlbumId(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName12, - _methodParameterTypes12, new Object[] { groupId, albumId }); - } - 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 int getSongsCountByAlbumId(long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName13, - _methodParameterTypes13, - new Object[] { groupId, albumId, status }); - } - 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 org.liferay.jukebox.model.Song moveSongToTrash(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName14, - _methodParameterTypes14, new Object[] { songId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song restoreSongFromTrash(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName15, - _methodParameterTypes15, new Object[] { songId }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - @Override - public org.liferay.jukebox.model.Song updateSong(long songId, long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName16, - _methodParameterTypes16, - new Object[] { - songId, - - albumId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(songFileName), - - ClpSerializer.translateInput(songInputStream), - - ClpSerializer.translateInput(lyricsFileName), - - ClpSerializer.translateInput(lyricsInputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 (org.liferay.jukebox.model.Song)ClpSerializer.translateOutput(returnObj); - } - - private InvokableService _invokableService; - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - 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; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongServiceUtil.java deleted file mode 100644 index f59f89341e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongServiceUtil.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 Song. This utility wraps - * {@link org.liferay.jukebox.service.impl.SongServiceImpl} 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 Julio Camarero - * @see SongService - * @see org.liferay.jukebox.service.base.SongServiceBaseImpl - * @see org.liferay.jukebox.service.impl.SongServiceImpl - * @generated - */ -public class SongServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link org.liferay.jukebox.service.impl.SongServiceImpl} 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 org.liferay.jukebox.model.Song addSong(long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addSong(albumId, name, songFileName, songInputStream, - lyricsFileName, lyricsInputStream, serviceContext); - } - - public static org.liferay.jukebox.model.Song deleteSong(long songId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteSong(songId, serviceContext); - } - - public static java.util.List getSongs( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongs(groupId); - } - - public static java.util.List getSongs( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongs(groupId, start, end); - } - - public static java.util.List getSongs( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongs(groupId, keywords); - } - - public static java.util.List getSongsByAlbumId( - long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsByAlbumId(groupId, albumId); - } - - public static java.util.List getSongsByAlbumId( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsByAlbumId(groupId, albumId, status); - } - - public static int getSongsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsCount(groupId); - } - - public static int getSongsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsCount(groupId, keywords); - } - - public static int getSongsCountByAlbumId(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsCountByAlbumId(groupId, albumId); - } - - public static int getSongsCountByAlbumId(long groupId, long albumId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSongsCountByAlbumId(groupId, albumId, status); - } - - public static org.liferay.jukebox.model.Song moveSongToTrash(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().moveSongToTrash(songId); - } - - public static org.liferay.jukebox.model.Song restoreSongFromTrash( - long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().restoreSongFromTrash(songId); - } - - public static org.liferay.jukebox.model.Song updateSong(long songId, - long albumId, java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateSong(songId, albumId, name, songFileName, - songInputStream, lyricsFileName, lyricsInputStream, serviceContext); - } - - public static void clearService() { - _service = null; - } - - public static SongService getService() { - if (_service == null) { - InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - SongService.class.getName()); - - if (invokableService instanceof SongService) { - _service = (SongService)invokableService; - } - else { - _service = new SongServiceClp(invokableService); - } - - ReferenceRegistry.registerReference(SongServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(SongService service) { - } - - private static SongService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongServiceWrapper.java deleted file mode 100644 index ccaf8463d9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/SongServiceWrapper.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * 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 org.liferay.jukebox.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link SongService}. - * - * @author Julio Camarero - * @see SongService - * @generated - */ -public class SongServiceWrapper implements SongService, - ServiceWrapper { - public SongServiceWrapper(SongService songService) { - _songService = songService; - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _songService.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) { - _songService.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 _songService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public org.liferay.jukebox.model.Song addSong(long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songService.addSong(albumId, name, songFileName, - songInputStream, lyricsFileName, lyricsInputStream, serviceContext); - } - - @Override - public org.liferay.jukebox.model.Song deleteSong(long songId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songService.deleteSong(songId, serviceContext); - } - - @Override - public java.util.List getSongs(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songService.getSongs(groupId); - } - - @Override - public java.util.List getSongs( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _songService.getSongs(groupId, start, end); - } - - @Override - public java.util.List getSongs( - long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return _songService.getSongs(groupId, keywords); - } - - @Override - public java.util.List getSongsByAlbumId( - long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songService.getSongsByAlbumId(groupId, albumId); - } - - @Override - public java.util.List getSongsByAlbumId( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _songService.getSongsByAlbumId(groupId, albumId, status); - } - - @Override - public int getSongsCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songService.getSongsCount(groupId); - } - - @Override - public int getSongsCount(long groupId, java.lang.String keywords) - throws com.liferay.portal.kernel.exception.SystemException { - return _songService.getSongsCount(groupId, keywords); - } - - @Override - public int getSongsCountByAlbumId(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return _songService.getSongsCountByAlbumId(groupId, albumId); - } - - @Override - public int getSongsCountByAlbumId(long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _songService.getSongsCountByAlbumId(groupId, albumId, status); - } - - @Override - public org.liferay.jukebox.model.Song moveSongToTrash(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songService.moveSongToTrash(songId); - } - - @Override - public org.liferay.jukebox.model.Song restoreSongFromTrash(long songId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songService.restoreSongFromTrash(songId); - } - - @Override - public org.liferay.jukebox.model.Song updateSong(long songId, long albumId, - java.lang.String name, java.lang.String songFileName, - java.io.InputStream songInputStream, java.lang.String lyricsFileName, - java.io.InputStream lyricsInputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _songService.updateSong(songId, albumId, name, songFileName, - songInputStream, lyricsFileName, lyricsInputStream, serviceContext); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public SongService getWrappedSongService() { - return _songService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedSongService(SongService songService) { - _songService = songService; - } - - @Override - public SongService getWrappedService() { - return _songService; - } - - @Override - public void setWrappedService(SongService songService) { - _songService = songService; - } - - private SongService _songService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/messaging/ClpMessageListener.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/messaging/ClpMessageListener.java deleted file mode 100644 index ec2eb4b56b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/messaging/ClpMessageListener.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.messaging; - -import com.liferay.portal.kernel.messaging.BaseMessageListener; -import com.liferay.portal.kernel.messaging.Message; - -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.AlbumServiceUtil; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; -import org.liferay.jukebox.service.ArtistServiceUtil; -import org.liferay.jukebox.service.ClpSerializer; -import org.liferay.jukebox.service.SongLocalServiceUtil; -import org.liferay.jukebox.service.SongServiceUtil; - -/** - * @author Julio Camarero - */ -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())) { - AlbumLocalServiceUtil.clearService(); - - AlbumServiceUtil.clearService(); - ArtistLocalServiceUtil.clearService(); - - ArtistServiceUtil.clearService(); - SongLocalServiceUtil.clearService(); - - SongServiceUtil.clearService(); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumActionableDynamicQuery.java deleted file mode 100644 index 8505d676b6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.persistence; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; - -/** - * @author Julio Camarero - * @generated - */ -public abstract class AlbumActionableDynamicQuery - extends BaseActionableDynamicQuery { - public AlbumActionableDynamicQuery() throws SystemException { - setBaseLocalService(AlbumLocalServiceUtil.getService()); - setClass(Album.class); - - setClassLoader(org.liferay.jukebox.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("albumId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumExportActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumExportActionableDynamicQuery.java deleted file mode 100644 index 7f18791e82..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumExportActionableDynamicQuery.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.persistence; - -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.Property; -import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.ExportImportHelperUtil; -import com.liferay.portal.kernel.lar.ManifestSummary; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandler; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerRegistryUtil; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.util.PortalUtil; - -import org.liferay.jukebox.model.Album; - -/** - * @author Julio Camarero - * @generated - */ -public class AlbumExportActionableDynamicQuery - extends AlbumActionableDynamicQuery { - public AlbumExportActionableDynamicQuery( - PortletDataContext portletDataContext) throws SystemException { - _portletDataContext = portletDataContext; - - setCompanyId(_portletDataContext.getCompanyId()); - - setGroupId(_portletDataContext.getScopeGroupId()); - } - - @Override - public long performCount() throws PortalException, SystemException { - ManifestSummary manifestSummary = _portletDataContext.getManifestSummary(); - - StagedModelType stagedModelType = getStagedModelType(); - - long modelAdditionCount = super.performCount(); - - manifestSummary.addModelAdditionCount(stagedModelType.toString(), - modelAdditionCount); - - long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(_portletDataContext, - stagedModelType); - - manifestSummary.addModelDeletionCount(stagedModelType.toString(), - modelDeletionCount); - - return modelAdditionCount; - } - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - _portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate"); - - StagedModelDataHandler stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(Album.class.getName()); - - Property workflowStatusProperty = PropertyFactoryUtil.forName("status"); - - dynamicQuery.add(workflowStatusProperty.in( - stagedModelDataHandler.getExportableStatuses())); - } - - protected StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Album.class.getName())); - } - - @Override - @SuppressWarnings("unused") - protected void performAction(Object object) - throws PortalException, SystemException { - Album stagedModel = (Album)object; - - StagedModelDataHandlerUtil.exportStagedModel(_portletDataContext, - stagedModel); - } - - private PortletDataContext _portletDataContext; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumPersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumPersistence.java deleted file mode 100644 index 12091018ac..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumPersistence.java +++ /dev/null @@ -1,2055 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.persistence; - -import com.liferay.portal.service.persistence.BasePersistence; - -import org.liferay.jukebox.model.Album; - -/** - * The persistence interface for the album service. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author Julio Camarero - * @see AlbumPersistenceImpl - * @see AlbumUtil - * @generated - */ -public interface AlbumPersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link AlbumUtil} to access the album persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the albums where uuid = ?. - * - * @param uuid the uuid - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where uuid = ?. - * - * @param albumId the primary key of the current album - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByUuid_PrevAndNext( - long albumId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the album where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchAlbumException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByUUID_G(java.lang.String uuid, - long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the album where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the album where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the album where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the album that was removed - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the number of albums where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where uuid = ? and companyId = ?. - * - * @param albumId the primary key of the current album - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByUuid_C_PrevAndNext( - long albumId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums where groupId = ?. - * - * @param groupId the group ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByGroupId_First(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByGroupId_First(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByGroupId_Last(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByGroupId_Last(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByGroupId_PrevAndNext( - long albumId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns all the albums that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] filterFindByGroupId_PrevAndNext( - long albumId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums where userId = ?. - * - * @param userId the user ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUserId( - long userId) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUserId( - long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUserId( - long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByUserId_First(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByUserId_First(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByUserId_Last(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByUserId_Last(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where userId = ?. - * - * @param albumId the primary key of the current album - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByUserId_PrevAndNext( - long albumId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums where userId = ? from the database. - * - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - public void removeByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums where userId = ?. - * - * @param userId the user ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums where companyId = ?. - * - * @param companyId the company ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where companyId = ?. - * - * @param albumId the primary key of the current album - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByCompanyId_PrevAndNext( - long albumId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums 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 albums where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums where artistId = ?. - * - * @param artistId the artist ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByArtistId( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByArtistId( - long artistId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByArtistId( - long artistId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByArtistId_First(long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByArtistId_First( - long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByArtistId_Last(long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByArtistId_Last(long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where artistId = ?. - * - * @param albumId the primary key of the current album - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByArtistId_PrevAndNext( - long albumId, long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums where artistId = ? from the database. - * - * @param artistId the artist ID - * @throws SystemException if a system exception occurred - */ - public void removeByArtistId(long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums where artistId = ?. - * - * @param artistId the artist ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByArtistId(long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_U( - long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_U( - long groupId, long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_U( - long groupId, long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByG_U_First(long groupId, - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByG_U_First(long groupId, - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByG_U_Last(long groupId, - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByG_U_Last(long groupId, - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and userId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByG_U_PrevAndNext( - long albumId, long groupId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns all the albums that the user has permission to view where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_U( - long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_U( - long groupId, long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_U( - long groupId, long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and userId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] filterFindByG_U_PrevAndNext( - long albumId, long groupId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums where groupId = ? and userId = ? from the database. - * - * @param groupId the group ID - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - public void removeByG_U(long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByG_U(long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_U(long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByG_S_First(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByG_S_First(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByG_S_Last(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByG_S_Last(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByG_S_PrevAndNext( - long albumId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns all the albums that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] filterFindByG_S_PrevAndNext( - long albumId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_A_S( - long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_A_S( - long groupId, long artistId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_A_S( - long groupId, long artistId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByG_A_S_First(long groupId, - long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByG_A_S_First(long groupId, - long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByG_A_S_Last(long groupId, - long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByG_A_S_Last(long groupId, - long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByG_A_S_PrevAndNext( - long albumId, long groupId, long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns all the albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_A_S( - long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_A_S( - long groupId, long artistId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_A_S( - long groupId, long artistId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] filterFindByG_A_S_PrevAndNext( - long albumId, long groupId, long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums where groupId = ? and artistId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_A_S(long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByG_A_S(long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_A_S(long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByG_LikeN_S_First(long groupId, - java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the first album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByG_LikeN_S_First( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByG_LikeN_S_Last(long groupId, - java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the last album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByG_LikeN_S_Last(long groupId, - java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] findByG_LikeN_S_PrevAndNext( - long albumId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns all the albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album[] filterFindByG_LikeN_S_PrevAndNext( - long albumId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Removes all the albums where groupId = ? and name LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public int countByG_LikeN_S(long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the album in the entity cache if it is enabled. - * - * @param album the album - */ - public void cacheResult(org.liferay.jukebox.model.Album album); - - /** - * Caches the albums in the entity cache if it is enabled. - * - * @param albums the albums - */ - public void cacheResult( - java.util.List albums); - - /** - * Creates a new album with the primary key. Does not add the album to the database. - * - * @param albumId the primary key for the new album - * @return the new album - */ - public org.liferay.jukebox.model.Album create(long albumId); - - /** - * Removes the album with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param albumId the primary key of the album - * @return the album that was removed - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album remove(long albumId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - public org.liferay.jukebox.model.Album updateImpl( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the album with the primary key or throws a {@link org.liferay.jukebox.NoSuchAlbumException} if it could not be found. - * - * @param albumId the primary key of the album - * @return the album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album findByPrimaryKey(long albumId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException; - - /** - * Returns the album with the primary key or returns null if it could not be found. - * - * @param albumId the primary key of the album - * @return the album, or null if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Album fetchByPrimaryKey(long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the albums. - * - * @return the albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll(int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of albums - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll(int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the albums from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of albums. - * - * @return the number of albums - * @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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumUtil.java deleted file mode 100644 index 93e779cb92..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/AlbumUtil.java +++ /dev/null @@ -1,2528 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 org.liferay.jukebox.model.Album; - -import java.util.List; - -/** - * The persistence utility for the album service. This utility wraps {@link AlbumPersistenceImpl} 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. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author Julio Camarero - * @see AlbumPersistence - * @see AlbumPersistenceImpl - * @generated - */ -public class AlbumUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(Album album) { - getPersistence().clearCache(album); - } - - /** - * @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 findWithDynamicQuery(DynamicQuery dynamicQuery) - throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 Album update(Album album) throws SystemException { - return getPersistence().update(album); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static Album update(Album album, ServiceContext serviceContext) - throws SystemException { - return getPersistence().update(album, serviceContext); - } - - /** - * Returns all the albums where uuid = ?. - * - * @param uuid the uuid - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid); - } - - /** - * Returns a range of all the albums where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end); - } - - /** - * Returns an ordered range of all the albums where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end, orderByComparator); - } - - /** - * Returns the first album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the first album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the last album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the last album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set where uuid = ?. - * - * @param albumId the primary key of the current album - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByUuid_PrevAndNext( - long albumId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByUuid_PrevAndNext(albumId, uuid, orderByComparator); - } - - /** - * Removes all the albums where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid(uuid); - } - - /** - * Returns the number of albums where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid(uuid); - } - - /** - * Returns the album where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchAlbumException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByUUID_G(uuid, groupId); - } - - /** - * Returns the album where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the album where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); - } - - /** - * Removes the album where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the album that was removed - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().removeByUUID_G(uuid, groupId); - } - - /** - * Returns the number of albums where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUUID_G(uuid, groupId); - } - - /** - * Returns all the albums where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId); - } - - /** - * Returns a range of all the albums where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId, start, end); - } - - /** - * Returns an ordered range of all the albums where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C(uuid, companyId, start, end, orderByComparator); - } - - /** - * Returns the first album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the first album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set where uuid = ? and companyId = ?. - * - * @param albumId the primary key of the current album - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByUuid_C_PrevAndNext( - long albumId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByUuid_C_PrevAndNext(albumId, uuid, companyId, - orderByComparator); - } - - /** - * Removes all the albums where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid_C(uuid, companyId); - } - - /** - * Returns the number of albums where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid_C(uuid, companyId); - } - - /** - * Returns all the albums where groupId = ?. - * - * @param groupId the group ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId); - } - - /** - * Returns a range of all the albums where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId, start, end); - } - - /** - * Returns an ordered range of all the albums where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGroupId(groupId, start, end, orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByGroupId_PrevAndNext( - long albumId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByGroupId_PrevAndNext(albumId, groupId, - orderByComparator); - } - - /** - * Returns all the albums that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByGroupId(groupId); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByGroupId(groupId, start, end); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByGroupId(groupId, start, end, orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] filterFindByGroupId_PrevAndNext( - long albumId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .filterFindByGroupId_PrevAndNext(albumId, groupId, - orderByComparator); - } - - /** - * Removes all the albums where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public static void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByGroupId(groupId); - } - - /** - * Returns the number of albums where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByGroupId(groupId); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByGroupId(groupId); - } - - /** - * Returns all the albums where userId = ?. - * - * @param userId the user ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUserId( - long userId) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUserId(userId); - } - - /** - * Returns a range of all the albums where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUserId( - long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUserId(userId, start, end); - } - - /** - * Returns an ordered range of all the albums where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUserId( - long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUserId(userId, start, end, orderByComparator); - } - - /** - * Returns the first album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByUserId_First( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByUserId_First(userId, orderByComparator); - } - - /** - * Returns the first album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByUserId_First( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUserId_First(userId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByUserId_Last( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByUserId_Last(userId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByUserId_Last( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUserId_Last(userId, orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set where userId = ?. - * - * @param albumId the primary key of the current album - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByUserId_PrevAndNext( - long albumId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByUserId_PrevAndNext(albumId, userId, orderByComparator); - } - - /** - * Removes all the albums where userId = ? from the database. - * - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUserId(userId); - } - - /** - * Returns the number of albums where userId = ?. - * - * @param userId the user ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUserId(userId); - } - - /** - * Returns all the albums where companyId = ?. - * - * @param companyId the company ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByCompanyId(companyId); - } - - /** - * Returns a range of all the albums where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 albums where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByCompanyId_First(companyId, orderByComparator); - } - - /** - * Returns the first album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album 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 album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByCompanyId_Last(companyId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album 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 albums before and after the current album in the ordered set where companyId = ?. - * - * @param albumId the primary key of the current album - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByCompanyId_PrevAndNext( - long albumId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByCompanyId_PrevAndNext(albumId, companyId, - orderByComparator); - } - - /** - * Removes all the albums 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 albums where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByCompanyId(companyId); - } - - /** - * Returns all the albums where artistId = ?. - * - * @param artistId the artist ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByArtistId( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByArtistId(artistId); - } - - /** - * Returns a range of all the albums where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByArtistId( - long artistId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByArtistId(artistId, start, end); - } - - /** - * Returns an ordered range of all the albums where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByArtistId( - long artistId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByArtistId(artistId, start, end, orderByComparator); - } - - /** - * Returns the first album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByArtistId_First( - long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByArtistId_First(artistId, orderByComparator); - } - - /** - * Returns the first album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByArtistId_First( - long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByArtistId_First(artistId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByArtistId_Last( - long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByArtistId_Last(artistId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByArtistId_Last( - long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByArtistId_Last(artistId, orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set where artistId = ?. - * - * @param albumId the primary key of the current album - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByArtistId_PrevAndNext( - long albumId, long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByArtistId_PrevAndNext(albumId, artistId, - orderByComparator); - } - - /** - * Removes all the albums where artistId = ? from the database. - * - * @param artistId the artist ID - * @throws SystemException if a system exception occurred - */ - public static void removeByArtistId(long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByArtistId(artistId); - } - - /** - * Returns the number of albums where artistId = ?. - * - * @param artistId the artist ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByArtistId(long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByArtistId(artistId); - } - - /** - * Returns all the albums where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_U( - long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_U(groupId, userId); - } - - /** - * Returns a range of all the albums where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_U( - long groupId, long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_U(groupId, userId, start, end); - } - - /** - * Returns an ordered range of all the albums where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_U( - long groupId, long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_U(groupId, userId, start, end, orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByG_U_First( - long groupId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_U_First(groupId, userId, orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByG_U_First( - long groupId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_U_First(groupId, userId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByG_U_Last(long groupId, - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_U_Last(groupId, userId, orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByG_U_Last( - long groupId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_U_Last(groupId, userId, orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and userId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByG_U_PrevAndNext( - long albumId, long groupId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_U_PrevAndNext(albumId, groupId, userId, - orderByComparator); - } - - /** - * Returns all the albums that the user has permission to view where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_U( - long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_U(groupId, userId); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_U( - long groupId, long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_U(groupId, userId, start, end); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_U( - long groupId, long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_U(groupId, userId, start, end, - orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and userId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] filterFindByG_U_PrevAndNext( - long albumId, long groupId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .filterFindByG_U_PrevAndNext(albumId, groupId, userId, - orderByComparator); - } - - /** - * Removes all the albums where groupId = ? and userId = ? from the database. - * - * @param groupId the group ID - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - public static void removeByG_U(long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_U(groupId, userId); - } - - /** - * Returns the number of albums where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByG_U(long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_U(groupId, userId); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_U(long groupId, long userId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_U(groupId, userId); - } - - /** - * Returns all the albums where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status); - } - - /** - * Returns a range of all the albums where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status, start, end); - } - - /** - * Returns an ordered range of all the albums where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S(groupId, status, start, end, orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByG_S_Last(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByG_S_PrevAndNext( - long albumId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_S_PrevAndNext(albumId, groupId, status, - orderByComparator); - } - - /** - * Returns all the albums that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_S(groupId, status); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_S(groupId, status, start, end); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_S(groupId, status, start, end, - orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] filterFindByG_S_PrevAndNext( - long albumId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .filterFindByG_S_PrevAndNext(albumId, groupId, status, - orderByComparator); - } - - /** - * Removes all the albums where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_S(groupId, status); - } - - /** - * Returns the number of albums where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_S(groupId, status); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_S(groupId, status); - } - - /** - * Returns all the albums where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_A_S( - long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_A_S(groupId, artistId, status); - } - - /** - * Returns a range of all the albums where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_A_S( - long groupId, long artistId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_A_S(groupId, artistId, status, start, end); - } - - /** - * Returns an ordered range of all the albums where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_A_S( - long groupId, long artistId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_A_S(groupId, artistId, status, start, end, - orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByG_A_S_First( - long groupId, long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_A_S_First(groupId, artistId, status, - orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByG_A_S_First( - long groupId, long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_A_S_First(groupId, artistId, status, - orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByG_A_S_Last( - long groupId, long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_A_S_Last(groupId, artistId, status, - orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByG_A_S_Last( - long groupId, long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_A_S_Last(groupId, artistId, status, - orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByG_A_S_PrevAndNext( - long albumId, long groupId, long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_A_S_PrevAndNext(albumId, groupId, artistId, status, - orderByComparator); - } - - /** - * Returns all the albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_A_S( - long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_A_S(groupId, artistId, status); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_A_S( - long groupId, long artistId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_A_S(groupId, artistId, status, start, end); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_A_S( - long groupId, long artistId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_A_S(groupId, artistId, status, start, end, - orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] filterFindByG_A_S_PrevAndNext( - long albumId, long groupId, long artistId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .filterFindByG_A_S_PrevAndNext(albumId, groupId, artistId, - status, orderByComparator); - } - - /** - * Removes all the albums where groupId = ? and artistId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_A_S(long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_A_S(groupId, artistId, status); - } - - /** - * Returns the number of albums where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByG_A_S(long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_A_S(groupId, artistId, status); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_A_S(long groupId, long artistId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_A_S(groupId, artistId, status); - } - - /** - * Returns all the albums where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_LikeN_S(groupId, name, status); - } - - /** - * Returns a range of all the albums where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_LikeN_S(groupId, name, status, start, end); - } - - /** - * Returns an ordered range of all the albums where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_LikeN_S(groupId, name, status, start, end, - orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByG_LikeN_S_First( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_LikeN_S_First(groupId, name, status, - orderByComparator); - } - - /** - * Returns the first album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByG_LikeN_S_First( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_LikeN_S_First(groupId, name, status, - orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByG_LikeN_S_Last( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_LikeN_S_Last(groupId, name, status, - orderByComparator); - } - - /** - * Returns the last album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByG_LikeN_S_Last( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_LikeN_S_Last(groupId, name, status, - orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] findByG_LikeN_S_PrevAndNext( - long albumId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .findByG_LikeN_S_PrevAndNext(albumId, groupId, name, status, - orderByComparator); - } - - /** - * Returns all the albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_LikeN_S(groupId, name, status); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_LikeN_S(groupId, name, status, start, end); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_LikeN_S(groupId, name, status, start, end, - orderByComparator); - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album[] filterFindByG_LikeN_S_PrevAndNext( - long albumId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence() - .filterFindByG_LikeN_S_PrevAndNext(albumId, groupId, name, - status, orderByComparator); - } - - /** - * Removes all the albums where groupId = ? and name LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_LikeN_S(groupId, name, status); - } - - /** - * Returns the number of albums where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - public static int countByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_LikeN_S(groupId, name, status); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_LikeN_S(long groupId, - java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_LikeN_S(groupId, name, status); - } - - /** - * Caches the album in the entity cache if it is enabled. - * - * @param album the album - */ - public static void cacheResult(org.liferay.jukebox.model.Album album) { - getPersistence().cacheResult(album); - } - - /** - * Caches the albums in the entity cache if it is enabled. - * - * @param albums the albums - */ - public static void cacheResult( - java.util.List albums) { - getPersistence().cacheResult(albums); - } - - /** - * Creates a new album with the primary key. Does not add the album to the database. - * - * @param albumId the primary key for the new album - * @return the new album - */ - public static org.liferay.jukebox.model.Album create(long albumId) { - return getPersistence().create(albumId); - } - - /** - * Removes the album with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param albumId the primary key of the album - * @return the album that was removed - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album remove(long albumId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().remove(albumId); - } - - public static org.liferay.jukebox.model.Album updateImpl( - org.liferay.jukebox.model.Album album) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(album); - } - - /** - * Returns the album with the primary key or throws a {@link org.liferay.jukebox.NoSuchAlbumException} if it could not be found. - * - * @param albumId the primary key of the album - * @return the album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album findByPrimaryKey(long albumId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchAlbumException { - return getPersistence().findByPrimaryKey(albumId); - } - - /** - * Returns the album with the primary key or returns null if it could not be found. - * - * @param albumId the primary key of the album - * @return the album, or null if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Album fetchByPrimaryKey( - long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(albumId); - } - - /** - * Returns all the albums. - * - * @return the albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of albums - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 albums 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 albums. - * - * @return the number of albums - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static AlbumPersistence getPersistence() { - if (_persistence == null) { - _persistence = (AlbumPersistence)PortletBeanLocatorUtil.locate(org.liferay.jukebox.service.ClpSerializer.getServletContextName(), - AlbumPersistence.class.getName()); - - ReferenceRegistry.registerReference(AlbumUtil.class, "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(AlbumPersistence persistence) { - } - - private static AlbumPersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistActionableDynamicQuery.java deleted file mode 100644 index cb71ec0031..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.persistence; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; - -/** - * @author Julio Camarero - * @generated - */ -public abstract class ArtistActionableDynamicQuery - extends BaseActionableDynamicQuery { - public ArtistActionableDynamicQuery() throws SystemException { - setBaseLocalService(ArtistLocalServiceUtil.getService()); - setClass(Artist.class); - - setClassLoader(org.liferay.jukebox.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("artistId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistExportActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistExportActionableDynamicQuery.java deleted file mode 100644 index eae5876ebc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistExportActionableDynamicQuery.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.persistence; - -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.Property; -import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.ExportImportHelperUtil; -import com.liferay.portal.kernel.lar.ManifestSummary; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandler; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerRegistryUtil; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.util.PortalUtil; - -import org.liferay.jukebox.model.Artist; - -/** - * @author Julio Camarero - * @generated - */ -public class ArtistExportActionableDynamicQuery - extends ArtistActionableDynamicQuery { - public ArtistExportActionableDynamicQuery( - PortletDataContext portletDataContext) throws SystemException { - _portletDataContext = portletDataContext; - - setCompanyId(_portletDataContext.getCompanyId()); - - setGroupId(_portletDataContext.getScopeGroupId()); - } - - @Override - public long performCount() throws PortalException, SystemException { - ManifestSummary manifestSummary = _portletDataContext.getManifestSummary(); - - StagedModelType stagedModelType = getStagedModelType(); - - long modelAdditionCount = super.performCount(); - - manifestSummary.addModelAdditionCount(stagedModelType.toString(), - modelAdditionCount); - - long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(_portletDataContext, - stagedModelType); - - manifestSummary.addModelDeletionCount(stagedModelType.toString(), - modelDeletionCount); - - return modelAdditionCount; - } - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - _portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate"); - - StagedModelDataHandler stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(Artist.class.getName()); - - Property workflowStatusProperty = PropertyFactoryUtil.forName("status"); - - dynamicQuery.add(workflowStatusProperty.in( - stagedModelDataHandler.getExportableStatuses())); - } - - protected StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Artist.class.getName())); - } - - @Override - @SuppressWarnings("unused") - protected void performAction(Object object) - throws PortalException, SystemException { - Artist stagedModel = (Artist)object; - - StagedModelDataHandlerUtil.exportStagedModel(_portletDataContext, - stagedModel); - } - - private PortletDataContext _portletDataContext; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistPersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistPersistence.java deleted file mode 100644 index c030c96b8b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistPersistence.java +++ /dev/null @@ -1,1679 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.persistence; - -import com.liferay.portal.service.persistence.BasePersistence; - -import org.liferay.jukebox.model.Artist; - -/** - * The persistence interface for the artist service. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author Julio Camarero - * @see ArtistPersistenceImpl - * @see ArtistUtil - * @generated - */ -public interface ArtistPersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link ArtistUtil} to access the artist persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the artists where uuid = ?. - * - * @param uuid the uuid - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the first artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the last artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set where uuid = ?. - * - * @param artistId the primary key of the current artist - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] findByUuid_PrevAndNext( - long artistId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Removes all the artists where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artist where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchArtistException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the artist where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artist where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the artist where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the artist that was removed - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the number of artists where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the artists where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the first artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the last artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set where uuid = ? and companyId = ?. - * - * @param artistId the primary key of the current artist - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] findByUuid_C_PrevAndNext( - long artistId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Removes all the artists where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the artists where groupId = ?. - * - * @param groupId the group ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByGroupId_First(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the first artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByGroupId_First(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByGroupId_Last(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the last artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByGroupId_Last(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set where groupId = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] findByGroupId_PrevAndNext( - long artistId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns all the artists that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists that the user has permission to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists that the user has permissions to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where groupId = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] filterFindByGroupId_PrevAndNext( - long artistId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Removes all the artists where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the artists where userId = ?. - * - * @param userId the user ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUserId( - long userId) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUserId( - long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUserId( - long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByUserId_First(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the first artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByUserId_First(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByUserId_Last(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the last artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByUserId_Last(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set where userId = ?. - * - * @param artistId the primary key of the current artist - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] findByUserId_PrevAndNext( - long artistId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Removes all the artists where userId = ? from the database. - * - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - public void removeByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists where userId = ?. - * - * @param userId the user ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public int countByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the artists where companyId = ?. - * - * @param companyId the company ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the first artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the last artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set where companyId = ?. - * - * @param artistId the primary key of the current artist - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] findByCompanyId_PrevAndNext( - long artistId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Removes all the artists 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 artists where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public int countByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the artists where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByU_G( - long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByU_G( - long userId, long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByU_G( - long userId, long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByU_G_First(long userId, - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the first artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByU_G_First(long userId, - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByU_G_Last(long userId, - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the last artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByU_G_Last(long userId, - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set where userId = ? and groupId = ?. - * - * @param artistId the primary key of the current artist - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] findByU_G_PrevAndNext( - long artistId, long userId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns all the artists that the user has permission to view where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByU_G( - long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists that the user has permission to view where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByU_G( - long userId, long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists that the user has permissions to view where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByU_G( - long userId, long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where userId = ? and groupId = ?. - * - * @param artistId the primary key of the current artist - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] filterFindByU_G_PrevAndNext( - long artistId, long userId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Removes all the artists where userId = ? and groupId = ? from the database. - * - * @param userId the user ID - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public void removeByU_G(long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public int countByU_G(long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists that the user has permission to view where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByU_G(long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the artists where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByG_S_First(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the first artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByG_S_First(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByG_S_Last(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the last artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByG_S_Last(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set where groupId = ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] findByG_S_PrevAndNext( - long artistId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns all the artists that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists that the user has permission to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists that the user has permissions to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where groupId = ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] filterFindByG_S_PrevAndNext( - long artistId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Removes all the artists where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the artists where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByG_LikeN_S_First( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the first artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByG_LikeN_S_First( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByG_LikeN_S_Last(long groupId, - java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the last artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByG_LikeN_S_Last( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] findByG_LikeN_S_PrevAndNext( - long artistId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns all the artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists that the user has permissions to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist[] filterFindByG_LikeN_S_PrevAndNext( - long artistId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Removes all the artists where groupId = ? and name LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public int countByG_LikeN_S(long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the artist in the entity cache if it is enabled. - * - * @param artist the artist - */ - public void cacheResult(org.liferay.jukebox.model.Artist artist); - - /** - * Caches the artists in the entity cache if it is enabled. - * - * @param artists the artists - */ - public void cacheResult( - java.util.List artists); - - /** - * Creates a new artist with the primary key. Does not add the artist to the database. - * - * @param artistId the primary key for the new artist - * @return the new artist - */ - public org.liferay.jukebox.model.Artist create(long artistId); - - /** - * Removes the artist with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param artistId the primary key of the artist - * @return the artist that was removed - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist remove(long artistId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - public org.liferay.jukebox.model.Artist updateImpl( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the artist with the primary key or throws a {@link org.liferay.jukebox.NoSuchArtistException} if it could not be found. - * - * @param artistId the primary key of the artist - * @return the artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist findByPrimaryKey(long artistId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException; - - /** - * Returns the artist with the primary key or returns null if it could not be found. - * - * @param artistId the primary key of the artist - * @return the artist, or null if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Artist fetchByPrimaryKey(long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the artists. - * - * @return the artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll(int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of artists - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll(int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the artists from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of artists. - * - * @return the number of artists - * @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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistUtil.java deleted file mode 100644 index 9b335d904b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/ArtistUtil.java +++ /dev/null @@ -1,2078 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 org.liferay.jukebox.model.Artist; - -import java.util.List; - -/** - * The persistence utility for the artist service. This utility wraps {@link ArtistPersistenceImpl} 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. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author Julio Camarero - * @see ArtistPersistence - * @see ArtistPersistenceImpl - * @generated - */ -public class ArtistUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(Artist artist) { - getPersistence().clearCache(artist); - } - - /** - * @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 findWithDynamicQuery(DynamicQuery dynamicQuery) - throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 Artist update(Artist artist) throws SystemException { - return getPersistence().update(artist); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static Artist update(Artist artist, ServiceContext serviceContext) - throws SystemException { - return getPersistence().update(artist, serviceContext); - } - - /** - * Returns all the artists where uuid = ?. - * - * @param uuid the uuid - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid); - } - - /** - * Returns a range of all the artists where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end); - } - - /** - * Returns an ordered range of all the artists where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().findByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().findByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set where uuid = ?. - * - * @param artistId the primary key of the current artist - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] findByUuid_PrevAndNext( - long artistId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByUuid_PrevAndNext(artistId, uuid, orderByComparator); - } - - /** - * Removes all the artists where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid(uuid); - } - - /** - * Returns the number of artists where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public static int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid(uuid); - } - - /** - * Returns the artist where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchArtistException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().findByUUID_G(uuid, groupId); - } - - /** - * Returns the artist where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the artist where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); - } - - /** - * Removes the artist where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the artist that was removed - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().removeByUUID_G(uuid, groupId); - } - - /** - * Returns the number of artists where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public static int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUUID_G(uuid, groupId); - } - - /** - * Returns all the artists where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId); - } - - /** - * Returns a range of all the artists where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId, start, end); - } - - /** - * Returns an ordered range of all the artists where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C(uuid, companyId, start, end, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set where uuid = ? and companyId = ?. - * - * @param artistId the primary key of the current artist - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] findByUuid_C_PrevAndNext( - long artistId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByUuid_C_PrevAndNext(artistId, uuid, companyId, - orderByComparator); - } - - /** - * Removes all the artists where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid_C(uuid, companyId); - } - - /** - * Returns the number of artists where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public static int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid_C(uuid, companyId); - } - - /** - * Returns all the artists where groupId = ?. - * - * @param groupId the group ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId); - } - - /** - * Returns a range of all the artists where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId, start, end); - } - - /** - * Returns an ordered range of all the artists where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGroupId(groupId, start, end, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().findByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().findByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set where groupId = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] findByGroupId_PrevAndNext( - long artistId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByGroupId_PrevAndNext(artistId, groupId, - orderByComparator); - } - - /** - * Returns all the artists that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByGroupId(groupId); - } - - /** - * Returns a range of all the artists that the user has permission to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByGroupId(groupId, start, end); - } - - /** - * Returns an ordered range of all the artists that the user has permissions to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByGroupId(groupId, start, end, orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where groupId = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] filterFindByGroupId_PrevAndNext( - long artistId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .filterFindByGroupId_PrevAndNext(artistId, groupId, - orderByComparator); - } - - /** - * Removes all the artists where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public static void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByGroupId(groupId); - } - - /** - * Returns the number of artists where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public static int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByGroupId(groupId); - } - - /** - * Returns the number of artists that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByGroupId(groupId); - } - - /** - * Returns all the artists where userId = ?. - * - * @param userId the user ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUserId( - long userId) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUserId(userId); - } - - /** - * Returns a range of all the artists where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUserId( - long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUserId(userId, start, end); - } - - /** - * Returns an ordered range of all the artists where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUserId( - long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUserId(userId, start, end, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByUserId_First( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().findByUserId_First(userId, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByUserId_First( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUserId_First(userId, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByUserId_Last( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().findByUserId_Last(userId, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByUserId_Last( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUserId_Last(userId, orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set where userId = ?. - * - * @param artistId the primary key of the current artist - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] findByUserId_PrevAndNext( - long artistId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByUserId_PrevAndNext(artistId, userId, orderByComparator); - } - - /** - * Removes all the artists where userId = ? from the database. - * - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUserId(userId); - } - - /** - * Returns the number of artists where userId = ?. - * - * @param userId the user ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public static int countByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUserId(userId); - } - - /** - * Returns all the artists where companyId = ?. - * - * @param companyId the company ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByCompanyId(companyId); - } - - /** - * Returns a range of all the artists where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 artists where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByCompanyId_First(companyId, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist 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 artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByCompanyId_Last(companyId, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist 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 artists before and after the current artist in the ordered set where companyId = ?. - * - * @param artistId the primary key of the current artist - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] findByCompanyId_PrevAndNext( - long artistId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByCompanyId_PrevAndNext(artistId, companyId, - orderByComparator); - } - - /** - * Removes all the artists 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 artists where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public static int countByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByCompanyId(companyId); - } - - /** - * Returns all the artists where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByU_G( - long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByU_G(userId, groupId); - } - - /** - * Returns a range of all the artists where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByU_G( - long userId, long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByU_G(userId, groupId, start, end); - } - - /** - * Returns an ordered range of all the artists where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByU_G( - long userId, long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByU_G(userId, groupId, start, end, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByU_G_First( - long userId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByU_G_First(userId, groupId, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByU_G_First( - long userId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByU_G_First(userId, groupId, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByU_G_Last(long userId, - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByU_G_Last(userId, groupId, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByU_G_Last( - long userId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByU_G_Last(userId, groupId, orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set where userId = ? and groupId = ?. - * - * @param artistId the primary key of the current artist - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] findByU_G_PrevAndNext( - long artistId, long userId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByU_G_PrevAndNext(artistId, userId, groupId, - orderByComparator); - } - - /** - * Returns all the artists that the user has permission to view where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByU_G( - long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByU_G(userId, groupId); - } - - /** - * Returns a range of all the artists that the user has permission to view where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByU_G( - long userId, long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByU_G(userId, groupId, start, end); - } - - /** - * Returns an ordered range of all the artists that the user has permissions to view where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByU_G( - long userId, long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByU_G(userId, groupId, start, end, - orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where userId = ? and groupId = ?. - * - * @param artistId the primary key of the current artist - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] filterFindByU_G_PrevAndNext( - long artistId, long userId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .filterFindByU_G_PrevAndNext(artistId, userId, groupId, - orderByComparator); - } - - /** - * Removes all the artists where userId = ? and groupId = ? from the database. - * - * @param userId the user ID - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public static void removeByU_G(long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByU_G(userId, groupId); - } - - /** - * Returns the number of artists where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public static int countByU_G(long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByU_G(userId, groupId); - } - - /** - * Returns the number of artists that the user has permission to view where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByU_G(long userId, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByU_G(userId, groupId); - } - - /** - * Returns all the artists where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status); - } - - /** - * Returns a range of all the artists where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status, start, end); - } - - /** - * Returns an ordered range of all the artists where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S(groupId, status, start, end, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the first artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the last artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set where groupId = ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] findByG_S_PrevAndNext( - long artistId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByG_S_PrevAndNext(artistId, groupId, status, - orderByComparator); - } - - /** - * Returns all the artists that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_S(groupId, status); - } - - /** - * Returns a range of all the artists that the user has permission to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_S(groupId, status, start, end); - } - - /** - * Returns an ordered range of all the artists that the user has permissions to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_S(groupId, status, start, end, - orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where groupId = ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] filterFindByG_S_PrevAndNext( - long artistId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .filterFindByG_S_PrevAndNext(artistId, groupId, status, - orderByComparator); - } - - /** - * Removes all the artists where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_S(groupId, status); - } - - /** - * Returns the number of artists where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public static int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_S(groupId, status); - } - - /** - * Returns the number of artists that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_S(groupId, status); - } - - /** - * Returns all the artists where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_LikeN_S(groupId, name, status); - } - - /** - * Returns a range of all the artists where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_LikeN_S(groupId, name, status, start, end); - } - - /** - * Returns an ordered range of all the artists where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_LikeN_S(groupId, name, status, start, end, - orderByComparator); - } - - /** - * Returns the first artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByG_LikeN_S_First( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByG_LikeN_S_First(groupId, name, status, - orderByComparator); - } - - /** - * Returns the first artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByG_LikeN_S_First( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_LikeN_S_First(groupId, name, status, - orderByComparator); - } - - /** - * Returns the last artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByG_LikeN_S_Last( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByG_LikeN_S_Last(groupId, name, status, - orderByComparator); - } - - /** - * Returns the last artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByG_LikeN_S_Last( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_LikeN_S_Last(groupId, name, status, - orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] findByG_LikeN_S_PrevAndNext( - long artistId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .findByG_LikeN_S_PrevAndNext(artistId, groupId, name, - status, orderByComparator); - } - - /** - * Returns all the artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_LikeN_S(groupId, name, status); - } - - /** - * Returns a range of all the artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_LikeN_S(groupId, name, status, start, end); - } - - /** - * Returns an ordered range of all the artists that the user has permissions to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_LikeN_S(groupId, name, status, start, end, - orderByComparator); - } - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist[] filterFindByG_LikeN_S_PrevAndNext( - long artistId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence() - .filterFindByG_LikeN_S_PrevAndNext(artistId, groupId, name, - status, orderByComparator); - } - - /** - * Removes all the artists where groupId = ? and name LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_LikeN_S(groupId, name, status); - } - - /** - * Returns the number of artists where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - public static int countByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_LikeN_S(groupId, name, status); - } - - /** - * Returns the number of artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_LikeN_S(long groupId, - java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_LikeN_S(groupId, name, status); - } - - /** - * Caches the artist in the entity cache if it is enabled. - * - * @param artist the artist - */ - public static void cacheResult(org.liferay.jukebox.model.Artist artist) { - getPersistence().cacheResult(artist); - } - - /** - * Caches the artists in the entity cache if it is enabled. - * - * @param artists the artists - */ - public static void cacheResult( - java.util.List artists) { - getPersistence().cacheResult(artists); - } - - /** - * Creates a new artist with the primary key. Does not add the artist to the database. - * - * @param artistId the primary key for the new artist - * @return the new artist - */ - public static org.liferay.jukebox.model.Artist create(long artistId) { - return getPersistence().create(artistId); - } - - /** - * Removes the artist with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param artistId the primary key of the artist - * @return the artist that was removed - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist remove(long artistId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().remove(artistId); - } - - public static org.liferay.jukebox.model.Artist updateImpl( - org.liferay.jukebox.model.Artist artist) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(artist); - } - - /** - * Returns the artist with the primary key or throws a {@link org.liferay.jukebox.NoSuchArtistException} if it could not be found. - * - * @param artistId the primary key of the artist - * @return the artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist findByPrimaryKey( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchArtistException { - return getPersistence().findByPrimaryKey(artistId); - } - - /** - * Returns the artist with the primary key or returns null if it could not be found. - * - * @param artistId the primary key of the artist - * @return the artist, or null if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Artist fetchByPrimaryKey( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(artistId); - } - - /** - * Returns all the artists. - * - * @return the artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of artists - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 artists 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 artists. - * - * @return the number of artists - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static ArtistPersistence getPersistence() { - if (_persistence == null) { - _persistence = (ArtistPersistence)PortletBeanLocatorUtil.locate(org.liferay.jukebox.service.ClpSerializer.getServletContextName(), - ArtistPersistence.class.getName()); - - ReferenceRegistry.registerReference(ArtistUtil.class, "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(ArtistPersistence persistence) { - } - - private static ArtistPersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongActionableDynamicQuery.java deleted file mode 100644 index 9f162da873..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.persistence; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.SongLocalServiceUtil; - -/** - * @author Julio Camarero - * @generated - */ -public abstract class SongActionableDynamicQuery - extends BaseActionableDynamicQuery { - public SongActionableDynamicQuery() throws SystemException { - setBaseLocalService(SongLocalServiceUtil.getService()); - setClass(Song.class); - - setClassLoader(org.liferay.jukebox.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("songId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongExportActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongExportActionableDynamicQuery.java deleted file mode 100644 index fba888b2ec..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongExportActionableDynamicQuery.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.persistence; - -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.Property; -import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.ExportImportHelperUtil; -import com.liferay.portal.kernel.lar.ManifestSummary; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandler; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerRegistryUtil; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.util.PortalUtil; - -import org.liferay.jukebox.model.Song; - -/** - * @author Julio Camarero - * @generated - */ -public class SongExportActionableDynamicQuery extends SongActionableDynamicQuery { - public SongExportActionableDynamicQuery( - PortletDataContext portletDataContext) throws SystemException { - _portletDataContext = portletDataContext; - - setCompanyId(_portletDataContext.getCompanyId()); - - setGroupId(_portletDataContext.getScopeGroupId()); - } - - @Override - public long performCount() throws PortalException, SystemException { - ManifestSummary manifestSummary = _portletDataContext.getManifestSummary(); - - StagedModelType stagedModelType = getStagedModelType(); - - long modelAdditionCount = super.performCount(); - - manifestSummary.addModelAdditionCount(stagedModelType.toString(), - modelAdditionCount); - - long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(_portletDataContext, - stagedModelType); - - manifestSummary.addModelDeletionCount(stagedModelType.toString(), - modelDeletionCount); - - return modelAdditionCount; - } - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - _portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate"); - - StagedModelDataHandler stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(Song.class.getName()); - - Property workflowStatusProperty = PropertyFactoryUtil.forName("status"); - - dynamicQuery.add(workflowStatusProperty.in( - stagedModelDataHandler.getExportableStatuses())); - } - - protected StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Song.class.getName())); - } - - @Override - @SuppressWarnings("unused") - protected void performAction(Object object) - throws PortalException, SystemException { - Song stagedModel = (Song)object; - - StagedModelDataHandlerUtil.exportStagedModel(_portletDataContext, - stagedModel); - } - - private PortletDataContext _portletDataContext; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongPersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongPersistence.java deleted file mode 100644 index d7f59e8105..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongPersistence.java +++ /dev/null @@ -1,2262 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.persistence; - -import com.liferay.portal.service.persistence.BasePersistence; - -import org.liferay.jukebox.model.Song; - -/** - * The persistence interface for the song service. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author Julio Camarero - * @see SongPersistenceImpl - * @see SongUtil - * @generated - */ -public interface SongPersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link SongUtil} to access the song persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the songs where uuid = ?. - * - * @param uuid the uuid - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where uuid = ?. - * - * @param songId the primary key of the current song - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByUuid_PrevAndNext( - long songId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the song where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchSongException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByUUID_G(java.lang.String uuid, - long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the song where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByUUID_G(java.lang.String uuid, - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the song where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByUUID_G(java.lang.String uuid, - long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the song where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the number of songs where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where uuid = ? and companyId = ?. - * - * @param songId the primary key of the current song - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByUuid_C_PrevAndNext( - long songId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where groupId = ?. - * - * @param groupId the group ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByGroupId_First(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByGroupId_First(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByGroupId_Last(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByGroupId_Last(long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByGroupId_PrevAndNext( - long songId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns all the songs that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] filterFindByGroupId_PrevAndNext( - long songId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where userId = ?. - * - * @param userId the user ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUserId( - long userId) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUserId( - long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUserId( - long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByUserId_First(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByUserId_First(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByUserId_Last(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByUserId_Last(long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where userId = ?. - * - * @param songId the primary key of the current song - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByUserId_PrevAndNext( - long songId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where userId = ? from the database. - * - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - public void removeByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where userId = ?. - * - * @param userId the user ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where companyId = ?. - * - * @param companyId the company ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByCompanyId_Last(long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where companyId = ?. - * - * @param songId the primary key of the current song - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByCompanyId_PrevAndNext( - long songId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs 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 songs where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where artistId = ?. - * - * @param artistId the artist ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByArtistId( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByArtistId( - long artistId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByArtistId( - long artistId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByArtistId_First(long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByArtistId_First(long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByArtistId_Last(long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByArtistId_Last(long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where artistId = ?. - * - * @param songId the primary key of the current song - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByArtistId_PrevAndNext( - long songId, long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where artistId = ? from the database. - * - * @param artistId the artist ID - * @throws SystemException if a system exception occurred - */ - public void removeByArtistId(long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where artistId = ?. - * - * @param artistId the artist ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByArtistId(long artistId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where albumId = ?. - * - * @param albumId the album ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByAlbumId( - long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByAlbumId( - long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByAlbumId( - long albumId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByAlbumId_First(long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByAlbumId_First(long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByAlbumId_Last(long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByAlbumId_Last(long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where albumId = ?. - * - * @param songId the primary key of the current song - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByAlbumId_PrevAndNext( - long songId, long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where albumId = ? from the database. - * - * @param albumId the album ID - * @throws SystemException if a system exception occurred - */ - public void removeByAlbumId(long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where albumId = ?. - * - * @param albumId the album ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByAlbumId(long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByG_S_First(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_S_First(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByG_S_Last(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_S_Last(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByG_S_PrevAndNext(long songId, - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns all the songs that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] filterFindByG_S_PrevAndNext( - long songId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_A( - long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_A( - long groupId, long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_A( - long groupId, long albumId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByG_A_First(long groupId, - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_A_First(long groupId, - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByG_A_Last(long groupId, - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_A_Last(long groupId, - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and albumId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByG_A_PrevAndNext(long songId, - long groupId, long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns all the songs that the user has permission to view where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_A( - long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_A( - long groupId, long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_A( - long groupId, long albumId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and albumId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] filterFindByG_A_PrevAndNext( - long songId, long groupId, long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where groupId = ? and albumId = ? from the database. - * - * @param groupId the group ID - * @param albumId the album ID - * @throws SystemException if a system exception occurred - */ - public void removeByG_A(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByG_A(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_A(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_A_S( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_A_S( - long groupId, long albumId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_A_S( - long groupId, long albumId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByG_A_S_First(long groupId, - long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_A_S_First(long groupId, - long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByG_A_S_Last(long groupId, - long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_A_S_Last(long groupId, - long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByG_A_S_PrevAndNext( - long songId, long groupId, long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns all the songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_A_S( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_A_S( - long groupId, long albumId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_A_S( - long groupId, long albumId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] filterFindByG_A_S_PrevAndNext( - long songId, long groupId, long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where groupId = ? and albumId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_A_S(long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByG_A_S(long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_A_S(long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByG_LikeN_S_First(long groupId, - java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the first song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_LikeN_S_First(long groupId, - java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByG_LikeN_S_Last(long groupId, - java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the last song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_LikeN_S_Last(long groupId, - java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] findByG_LikeN_S_PrevAndNext( - long songId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns all the songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song[] filterFindByG_LikeN_S_PrevAndNext( - long songId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Removes all the songs where groupId = ? and name LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByG_LikeN_S(long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the song where groupId = ? and artistId = ? and albumId = ? and name = ? or throws a {@link org.liferay.jukebox.NoSuchSongException} if it could not be found. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByG_A_A_N(long groupId, - long artistId, long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the song where groupId = ? and artistId = ? and albumId = ? and name = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_A_A_N(long groupId, - long artistId, long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the song where groupId = ? and artistId = ? and albumId = ? and name = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @param retrieveFromCache whether to use the finder cache - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByG_A_A_N(long groupId, - long artistId, long albumId, java.lang.String name, - boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the song where groupId = ? and artistId = ? and albumId = ? and name = ? from the database. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song removeByG_A_A_N(long groupId, - long artistId, long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the number of songs where groupId = ? and artistId = ? and albumId = ? and name = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public int countByG_A_A_N(long groupId, long artistId, long albumId, - java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the song in the entity cache if it is enabled. - * - * @param song the song - */ - public void cacheResult(org.liferay.jukebox.model.Song song); - - /** - * Caches the songs in the entity cache if it is enabled. - * - * @param songs the songs - */ - public void cacheResult( - java.util.List songs); - - /** - * Creates a new song with the primary key. Does not add the song to the database. - * - * @param songId the primary key for the new song - * @return the new song - */ - public org.liferay.jukebox.model.Song create(long songId); - - /** - * Removes the song with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param songId the primary key of the song - * @return the song that was removed - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song remove(long songId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - public org.liferay.jukebox.model.Song updateImpl( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the song with the primary key or throws a {@link org.liferay.jukebox.NoSuchSongException} if it could not be found. - * - * @param songId the primary key of the song - * @return the song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song findByPrimaryKey(long songId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException; - - /** - * Returns the song with the primary key or returns null if it could not be found. - * - * @param songId the primary key of the song - * @return the song, or null if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public org.liferay.jukebox.model.Song fetchByPrimaryKey(long songId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the songs. - * - * @return the songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll(int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of songs - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll(int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the songs from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of songs. - * - * @return the number of songs - * @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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongUtil.java deleted file mode 100644 index 990ad9455e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/service/org/liferay/jukebox/service/persistence/SongUtil.java +++ /dev/null @@ -1,2771 +0,0 @@ -/** - * 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 org.liferay.jukebox.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 org.liferay.jukebox.model.Song; - -import java.util.List; - -/** - * The persistence utility for the song service. This utility wraps {@link SongPersistenceImpl} 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. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author Julio Camarero - * @see SongPersistence - * @see SongPersistenceImpl - * @generated - */ -public class SongUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(Song song) { - getPersistence().clearCache(song); - } - - /** - * @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 findWithDynamicQuery(DynamicQuery dynamicQuery) - throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 Song update(Song song) throws SystemException { - return getPersistence().update(song); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static Song update(Song song, ServiceContext serviceContext) - throws SystemException { - return getPersistence().update(song, serviceContext); - } - - /** - * Returns all the songs where uuid = ?. - * - * @param uuid the uuid - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid); - } - - /** - * Returns a range of all the songs where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end); - } - - /** - * Returns an ordered range of all the songs where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end, orderByComparator); - } - - /** - * Returns the first song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the first song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the last song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the last song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where uuid = ?. - * - * @param songId the primary key of the current song - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByUuid_PrevAndNext( - long songId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByUuid_PrevAndNext(songId, uuid, orderByComparator); - } - - /** - * Removes all the songs where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid(uuid); - } - - /** - * Returns the number of songs where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid(uuid); - } - - /** - * Returns the song where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchSongException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByUUID_G(uuid, groupId); - } - - /** - * Returns the song where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the song where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); - } - - /** - * Removes the song where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().removeByUUID_G(uuid, groupId); - } - - /** - * Returns the number of songs where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUUID_G(uuid, groupId); - } - - /** - * Returns all the songs where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId); - } - - /** - * Returns a range of all the songs where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId, start, end); - } - - /** - * Returns an ordered range of all the songs where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C(uuid, companyId, start, end, orderByComparator); - } - - /** - * Returns the first song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the first song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where uuid = ? and companyId = ?. - * - * @param songId the primary key of the current song - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByUuid_C_PrevAndNext( - long songId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByUuid_C_PrevAndNext(songId, uuid, companyId, - orderByComparator); - } - - /** - * Removes all the songs where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid_C(uuid, companyId); - } - - /** - * Returns the number of songs where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid_C(uuid, companyId); - } - - /** - * Returns all the songs where groupId = ?. - * - * @param groupId the group ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId); - } - - /** - * Returns a range of all the songs where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId, start, end); - } - - /** - * Returns an ordered range of all the songs where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGroupId(groupId, start, end, orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByGroupId_PrevAndNext( - long songId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByGroupId_PrevAndNext(songId, groupId, orderByComparator); - } - - /** - * Returns all the songs that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByGroupId(groupId); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByGroupId(groupId, start, end); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByGroupId(groupId, start, end, orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] filterFindByGroupId_PrevAndNext( - long songId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .filterFindByGroupId_PrevAndNext(songId, groupId, - orderByComparator); - } - - /** - * Removes all the songs where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public static void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByGroupId(groupId); - } - - /** - * Returns the number of songs where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByGroupId(groupId); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByGroupId(groupId); - } - - /** - * Returns all the songs where userId = ?. - * - * @param userId the user ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUserId( - long userId) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUserId(userId); - } - - /** - * Returns a range of all the songs where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUserId( - long userId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUserId(userId, start, end); - } - - /** - * Returns an ordered range of all the songs where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUserId( - long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUserId(userId, start, end, orderByComparator); - } - - /** - * Returns the first song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByUserId_First( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByUserId_First(userId, orderByComparator); - } - - /** - * Returns the first song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByUserId_First( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUserId_First(userId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByUserId_Last( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByUserId_Last(userId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByUserId_Last( - long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUserId_Last(userId, orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where userId = ?. - * - * @param songId the primary key of the current song - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByUserId_PrevAndNext( - long songId, long userId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByUserId_PrevAndNext(songId, userId, orderByComparator); - } - - /** - * Removes all the songs where userId = ? from the database. - * - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUserId(userId); - } - - /** - * Returns the number of songs where userId = ?. - * - * @param userId the user ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByUserId(long userId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUserId(userId); - } - - /** - * Returns all the songs where companyId = ?. - * - * @param companyId the company ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByCompanyId(companyId); - } - - /** - * Returns a range of all the songs where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 songs where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByCompanyId_First(companyId, orderByComparator); - } - - /** - * Returns the first song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song 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 song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByCompanyId_Last(companyId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song 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 songs before and after the current song in the ordered set where companyId = ?. - * - * @param songId the primary key of the current song - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByCompanyId_PrevAndNext( - long songId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByCompanyId_PrevAndNext(songId, companyId, - orderByComparator); - } - - /** - * Removes all the songs 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 songs where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByCompanyId(companyId); - } - - /** - * Returns all the songs where artistId = ?. - * - * @param artistId the artist ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByArtistId( - long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByArtistId(artistId); - } - - /** - * Returns a range of all the songs where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByArtistId( - long artistId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByArtistId(artistId, start, end); - } - - /** - * Returns an ordered range of all the songs where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByArtistId( - long artistId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByArtistId(artistId, start, end, orderByComparator); - } - - /** - * Returns the first song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByArtistId_First( - long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByArtistId_First(artistId, orderByComparator); - } - - /** - * Returns the first song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByArtistId_First( - long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByArtistId_First(artistId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByArtistId_Last( - long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByArtistId_Last(artistId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByArtistId_Last( - long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByArtistId_Last(artistId, orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where artistId = ?. - * - * @param songId the primary key of the current song - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByArtistId_PrevAndNext( - long songId, long artistId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByArtistId_PrevAndNext(songId, artistId, - orderByComparator); - } - - /** - * Removes all the songs where artistId = ? from the database. - * - * @param artistId the artist ID - * @throws SystemException if a system exception occurred - */ - public static void removeByArtistId(long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByArtistId(artistId); - } - - /** - * Returns the number of songs where artistId = ?. - * - * @param artistId the artist ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByArtistId(long artistId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByArtistId(artistId); - } - - /** - * Returns all the songs where albumId = ?. - * - * @param albumId the album ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByAlbumId( - long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByAlbumId(albumId); - } - - /** - * Returns a range of all the songs where albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByAlbumId( - long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByAlbumId(albumId, start, end); - } - - /** - * Returns an ordered range of all the songs where albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByAlbumId( - long albumId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByAlbumId(albumId, start, end, orderByComparator); - } - - /** - * Returns the first song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByAlbumId_First( - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByAlbumId_First(albumId, orderByComparator); - } - - /** - * Returns the first song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByAlbumId_First( - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByAlbumId_First(albumId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByAlbumId_Last( - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByAlbumId_Last(albumId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByAlbumId_Last( - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByAlbumId_Last(albumId, orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where albumId = ?. - * - * @param songId the primary key of the current song - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByAlbumId_PrevAndNext( - long songId, long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByAlbumId_PrevAndNext(songId, albumId, orderByComparator); - } - - /** - * Removes all the songs where albumId = ? from the database. - * - * @param albumId the album ID - * @throws SystemException if a system exception occurred - */ - public static void removeByAlbumId(long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByAlbumId(albumId); - } - - /** - * Returns the number of songs where albumId = ?. - * - * @param albumId the album ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByAlbumId(long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByAlbumId(albumId); - } - - /** - * Returns all the songs where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status); - } - - /** - * Returns a range of all the songs where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status, start, end); - } - - /** - * Returns an ordered range of all the songs where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S(groupId, status, start, end, orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByG_S_First(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByG_S_Last(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_S_Last(long groupId, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByG_S_PrevAndNext( - long songId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_S_PrevAndNext(songId, groupId, status, - orderByComparator); - } - - /** - * Returns all the songs that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_S(groupId, status); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_S(groupId, status, start, end); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_S(groupId, status, start, end, - orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] filterFindByG_S_PrevAndNext( - long songId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .filterFindByG_S_PrevAndNext(songId, groupId, status, - orderByComparator); - } - - /** - * Removes all the songs where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_S(groupId, status); - } - - /** - * Returns the number of songs where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_S(groupId, status); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_S(groupId, status); - } - - /** - * Returns all the songs where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_A( - long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_A(groupId, albumId); - } - - /** - * Returns a range of all the songs where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_A( - long groupId, long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_A(groupId, albumId, start, end); - } - - /** - * Returns an ordered range of all the songs where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_A( - long groupId, long albumId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_A(groupId, albumId, start, end, orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByG_A_First(long groupId, - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_A_First(groupId, albumId, orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_A_First( - long groupId, long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_A_First(groupId, albumId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByG_A_Last(long groupId, - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_A_Last(groupId, albumId, orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_A_Last(long groupId, - long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_A_Last(groupId, albumId, orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and albumId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByG_A_PrevAndNext( - long songId, long groupId, long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_A_PrevAndNext(songId, groupId, albumId, - orderByComparator); - } - - /** - * Returns all the songs that the user has permission to view where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_A( - long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_A(groupId, albumId); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_A( - long groupId, long albumId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_A(groupId, albumId, start, end); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_A( - long groupId, long albumId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_A(groupId, albumId, start, end, - orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and albumId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] filterFindByG_A_PrevAndNext( - long songId, long groupId, long albumId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .filterFindByG_A_PrevAndNext(songId, groupId, albumId, - orderByComparator); - } - - /** - * Removes all the songs where groupId = ? and albumId = ? from the database. - * - * @param groupId the group ID - * @param albumId the album ID - * @throws SystemException if a system exception occurred - */ - public static void removeByG_A(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_A(groupId, albumId); - } - - /** - * Returns the number of songs where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByG_A(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_A(groupId, albumId); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_A(long groupId, long albumId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_A(groupId, albumId); - } - - /** - * Returns all the songs where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_A_S( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_A_S(groupId, albumId, status); - } - - /** - * Returns a range of all the songs where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_A_S( - long groupId, long albumId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_A_S(groupId, albumId, status, start, end); - } - - /** - * Returns an ordered range of all the songs where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_A_S( - long groupId, long albumId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_A_S(groupId, albumId, status, start, end, - orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByG_A_S_First( - long groupId, long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_A_S_First(groupId, albumId, status, - orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_A_S_First( - long groupId, long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_A_S_First(groupId, albumId, status, - orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByG_A_S_Last( - long groupId, long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_A_S_Last(groupId, albumId, status, orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_A_S_Last( - long groupId, long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_A_S_Last(groupId, albumId, status, - orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByG_A_S_PrevAndNext( - long songId, long groupId, long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_A_S_PrevAndNext(songId, groupId, albumId, status, - orderByComparator); - } - - /** - * Returns all the songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_A_S( - long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_A_S(groupId, albumId, status); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_A_S( - long groupId, long albumId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_A_S(groupId, albumId, status, start, end); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_A_S( - long groupId, long albumId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_A_S(groupId, albumId, status, start, end, - orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] filterFindByG_A_S_PrevAndNext( - long songId, long groupId, long albumId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .filterFindByG_A_S_PrevAndNext(songId, groupId, albumId, - status, orderByComparator); - } - - /** - * Removes all the songs where groupId = ? and albumId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_A_S(long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_A_S(groupId, albumId, status); - } - - /** - * Returns the number of songs where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByG_A_S(long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_A_S(groupId, albumId, status); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_A_S(long groupId, long albumId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_A_S(groupId, albumId, status); - } - - /** - * Returns all the songs where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_LikeN_S(groupId, name, status); - } - - /** - * Returns a range of all the songs where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_LikeN_S(groupId, name, status, start, end); - } - - /** - * Returns an ordered range of all the songs where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_LikeN_S(groupId, name, status, start, end, - orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByG_LikeN_S_First( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_LikeN_S_First(groupId, name, status, - orderByComparator); - } - - /** - * Returns the first song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_LikeN_S_First( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_LikeN_S_First(groupId, name, status, - orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByG_LikeN_S_Last( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_LikeN_S_Last(groupId, name, status, - orderByComparator); - } - - /** - * Returns the last song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_LikeN_S_Last( - long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_LikeN_S_Last(groupId, name, status, - orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] findByG_LikeN_S_PrevAndNext( - long songId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .findByG_LikeN_S_PrevAndNext(songId, groupId, name, status, - orderByComparator); - } - - /** - * Returns all the songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_LikeN_S(groupId, name, status); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_LikeN_S(groupId, name, status, start, end); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_LikeN_S( - long groupId, java.lang.String name, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_LikeN_S(groupId, name, status, start, end, - orderByComparator); - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song[] filterFindByG_LikeN_S_PrevAndNext( - long songId, long groupId, java.lang.String name, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence() - .filterFindByG_LikeN_S_PrevAndNext(songId, groupId, name, - status, orderByComparator); - } - - /** - * Removes all the songs where groupId = ? and name LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_LikeN_S(groupId, name, status); - } - - /** - * Returns the number of songs where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByG_LikeN_S(long groupId, java.lang.String name, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_LikeN_S(groupId, name, status); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_LikeN_S(long groupId, - java.lang.String name, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_LikeN_S(groupId, name, status); - } - - /** - * Returns the song where groupId = ? and artistId = ? and albumId = ? and name = ? or throws a {@link org.liferay.jukebox.NoSuchSongException} if it could not be found. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByG_A_A_N(long groupId, - long artistId, long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByG_A_A_N(groupId, artistId, albumId, name); - } - - /** - * Returns the song where groupId = ? and artistId = ? and albumId = ? and name = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_A_A_N(long groupId, - long artistId, long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByG_A_A_N(groupId, artistId, albumId, name); - } - - /** - * Returns the song where groupId = ? and artistId = ? and albumId = ? and name = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @param retrieveFromCache whether to use the finder cache - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByG_A_A_N(long groupId, - long artistId, long albumId, java.lang.String name, - boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_A_A_N(groupId, artistId, albumId, name, - retrieveFromCache); - } - - /** - * Removes the song where groupId = ? and artistId = ? and albumId = ? and name = ? from the database. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song removeByG_A_A_N(long groupId, - long artistId, long albumId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().removeByG_A_A_N(groupId, artistId, albumId, name); - } - - /** - * Returns the number of songs where groupId = ? and artistId = ? and albumId = ? and name = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - public static int countByG_A_A_N(long groupId, long artistId, long albumId, - java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_A_A_N(groupId, artistId, albumId, name); - } - - /** - * Caches the song in the entity cache if it is enabled. - * - * @param song the song - */ - public static void cacheResult(org.liferay.jukebox.model.Song song) { - getPersistence().cacheResult(song); - } - - /** - * Caches the songs in the entity cache if it is enabled. - * - * @param songs the songs - */ - public static void cacheResult( - java.util.List songs) { - getPersistence().cacheResult(songs); - } - - /** - * Creates a new song with the primary key. Does not add the song to the database. - * - * @param songId the primary key for the new song - * @return the new song - */ - public static org.liferay.jukebox.model.Song create(long songId) { - return getPersistence().create(songId); - } - - /** - * Removes the song with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param songId the primary key of the song - * @return the song that was removed - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song remove(long songId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().remove(songId); - } - - public static org.liferay.jukebox.model.Song updateImpl( - org.liferay.jukebox.model.Song song) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(song); - } - - /** - * Returns the song with the primary key or throws a {@link org.liferay.jukebox.NoSuchSongException} if it could not be found. - * - * @param songId the primary key of the song - * @return the song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song findByPrimaryKey(long songId) - throws com.liferay.portal.kernel.exception.SystemException, - org.liferay.jukebox.NoSuchSongException { - return getPersistence().findByPrimaryKey(songId); - } - - /** - * Returns the song with the primary key or returns null if it could not be found. - * - * @param songId the primary key of the song - * @return the song, or null if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static org.liferay.jukebox.model.Song fetchByPrimaryKey(long songId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(songId); - } - - /** - * Returns all the songs. - * - * @return the songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of songs - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 songs 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 songs. - * - * @return the number of songs - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static SongPersistence getPersistence() { - if (_persistence == null) { - _persistence = (SongPersistence)PortletBeanLocatorUtil.locate(org.liferay.jukebox.service.ClpSerializer.getServletContextName(), - SongPersistence.class.getName()); - - ReferenceRegistry.registerReference(SongUtil.class, "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(SongPersistence persistence) { - } - - private static SongPersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/base-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/base-spring.xml deleted file mode 100644 index 8e5edbab1f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/base-spring.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/cluster-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/cluster-spring.xml deleted file mode 100644 index cd5219ba85..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/cluster-spring.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/hibernate-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/hibernate-spring.xml deleted file mode 100644 index 27564a2f12..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/hibernate-spring.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml deleted file mode 100644 index 380d6975c4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml deleted file mode 100644 index bfdabe58b5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml deleted file mode 100644 index 882a2114e9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml deleted file mode 100644 index 4ff02d9bab..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - PROPERTY - - - - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - - - - TIMESTAMP - - - - - - - - - - - - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - TIMESTAMP - - - - - - - - - - - - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - - - - TIMESTAMP - - - - - - - - - - - - - -
- - - -
- - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-spring.xml deleted file mode 100644 index 21e13922d2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/portlet-spring.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml deleted file mode 100644 index fe293f420e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/content/Language.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/content/Language.properties deleted file mode 100644 index b99041f588..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/content/Language.properties +++ /dev/null @@ -1,44 +0,0 @@ -javax.portlet.title.albums_WAR_jukeboxportlet=Albums -javax.portlet.title.artists_WAR_jukeboxportlet=Artists -javax.portlet.title.songs_WAR_jukeboxportlet=Songs - -model.resource.org.liferay.jukebox.model.Album=Album -model.resource.org.liferay.jukebox.model.Artist=Artist -model.resource.org.liferay.jukebox.model.Song=Song - -category.jukebox = JukeBox - -add-album=Add Album -add-artist=Add Artist -add-song=Add Song -album=Album -albums=Albums -artist=Artist -artists=Artists -a-song-with-the-same-name-already-exists-in-this-album=A song with the same name already exists in this album. -bio=Bio -lyrics-file=Lyrics File -lyrics=Lyrics -move-to-trash=Move to the Recycle Bin -new-album=New Album -new-song=New Song -new-artist=New Artist -song=Song -song-file=Song File -the-album-was-added-successfully=The album was added successfully -the-album-was-deleted-successfully=The album was deleted successfully -the-album-was-updated-successfully=The album was updated successfully -the-artist-was-added-successfully=The artist was added successfully -the-artist-was-deleted-successfully=The artist was deleted successfully -the-artist-was-updated-successfully=The artist was updated successfully -the-song-was-added-successfully=The song was added successfully -the-song-was-deleted-successfully=The song was deleted successfully -the-song-was-updated-successfully=The song was updated successfully -there-are-no-albums=There are no albums -there-are-no-artists=There are no artists -there-are-no-songs=There are no songs -this-album-does-not-have-any-song=This album does not have any song -this-artist-does-not-have-any-album=This artist does not have any album -you-should-activate-xuggler=You must activate xuggler -x-albums={0} albums -x-songs={0} songs \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/AlbumAssetRenderer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/AlbumAssetRenderer.java deleted file mode 100644 index f215248567..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/AlbumAssetRenderer.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * 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 org.liferay.jukebox.asset; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.portlet.LiferayPortletRequest; -import com.liferay.portal.kernel.portlet.LiferayPortletResponse; -import com.liferay.portal.kernel.trash.TrashRenderer; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.LayoutConstants; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortletURLFactoryUtil; -import com.liferay.portlet.asset.model.AssetRendererFactory; -import com.liferay.portlet.asset.model.BaseAssetRenderer; - -import java.util.Locale; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.WindowState; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.portlet.AlbumsPortlet; -import org.liferay.jukebox.service.permission.AlbumPermission; -import org.liferay.jukebox.util.PortletKeys; - -/** - * @author Julio Camarero - */ - -public class AlbumAssetRenderer - extends BaseAssetRenderer implements TrashRenderer { - - public AlbumAssetRenderer(Album album) { - _album = album; - } - - @Override - public String getClassName() { - return Album.class.getName(); - } - - @Override - public long getClassPK() { - return _album.getAlbumId(); - } - - @Override - public long getGroupId() { - return _album.getGroupId(); - } - - @Override - public String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPortalURL() + - "/jukebox-portlet/icons/albums.png"; - } - - public String getPortletId() { - AssetRendererFactory assetRendererFactory = getAssetRendererFactory(); - - return assetRendererFactory.getPortletId(); - } - - @Override - public String getSummary(Locale locale) { - String summary = _album.getName(); - - if (Validator.isNotNull(_album.getYear())) { - summary = StringUtil.appendParentheticalSuffix( - summary, String.valueOf(_album.getYear())); - } - - return summary; - } - - @Override - public String getThumbnailPath(PortletRequest portletRequest) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String thumbnailSrc = _album.getImageURL(themeDisplay); - - if (Validator.isNotNull(thumbnailSrc)) { - return thumbnailSrc; - } - - return themeDisplay.getPortalURL() + - "/jukebox-portlet/icons/albums.png"; - } - - @Override - public String getTitle(Locale locale) { - return _album.getName(); - } - - public String getType() { - return AlbumAssetRendererFactory.TYPE; - } - - @Override - public PortletURL getURLEdit( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse) - throws Exception { - - PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL( - getControlPanelPlid(liferayPortletRequest), - AlbumsPortlet.PORTLET_ID, PortletRequest.RENDER_PHASE); - - portletURL.setParameter("jspPage", "/html/albums/edit_album.jsp"); - portletURL.setParameter("albumId", String.valueOf(_album.getAlbumId())); - - return portletURL; - } - - @Override - public String getURLViewInContext( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse, - String noSuchEntryRedirect) { - - try { - long plid = PortalUtil.getPlidFromPortletId( - _album.getGroupId(), PortletKeys.ALBUMS); - - if (plid == LayoutConstants.DEFAULT_PLID) { - return StringPool.BLANK; - } - - PortletURL portletURL = PortletURLFactoryUtil.create( - liferayPortletRequest, PortletKeys.ALBUMS, plid, - PortletRequest.RENDER_PHASE); - - portletURL.setParameter("jspPage", "/html/albums/view_album.jsp"); - portletURL.setParameter( - "albumId", String.valueOf(_album.getAlbumId())); - - return portletURL.toString(); - } - catch (Exception e) { - } - - return StringPool.BLANK; - } - - @Override - public long getUserId() { - return _album.getUserId(); - } - - @Override - public String getUserName() { - return _album.getUserName(); - } - - @Override - public String getUuid() { - return _album.getUuid(); - } - - public boolean hasDeletePermission(PermissionChecker permissionChecker) - throws PortalException, SystemException { - - return AlbumPermission.contains( - permissionChecker, _album.getAlbumId(), ActionKeys.DELETE); - } - - @Override - public boolean hasEditPermission(PermissionChecker permissionChecker) - throws PortalException, SystemException { - - return AlbumPermission.contains( - permissionChecker, _album.getAlbumId(), ActionKeys.UPDATE); - } - - @Override - public boolean hasViewPermission(PermissionChecker permissionChecker) - throws PortalException, SystemException { - - return AlbumPermission.contains( - permissionChecker, _album.getAlbumId(), ActionKeys.VIEW); - } - - @Override - public boolean isPrintable() { - return true; - } - - @Override - public String render( - RenderRequest renderRequest, RenderResponse renderResponse, - String template) - throws Exception { - - if (template.equals(TEMPLATE_FULL_CONTENT)) { - renderRequest.setAttribute("jukebox_album", _album); - - return "/html/albums/asset/" + template + ".jsp"; - } - else { - return null; - } - } - - private Album _album; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/AlbumAssetRendererFactory.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/AlbumAssetRendererFactory.java deleted file mode 100644 index 27b3768f82..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/AlbumAssetRendererFactory.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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 org.liferay.jukebox.asset; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.asset.model.AssetRenderer; -import com.liferay.portlet.asset.model.BaseAssetRendererFactory; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.permission.AlbumPermission; - -/** - * @author Julio Camarero - */ -public class AlbumAssetRendererFactory extends BaseAssetRendererFactory { - - public static final String CLASS_NAME = Album.class.getName(); - - public static final String TYPE = "album"; - - public AssetRenderer getAssetRenderer(long classPK, int type) - throws PortalException, SystemException { - - Album album = AlbumLocalServiceUtil.getAlbum(classPK); - - return new AlbumAssetRenderer(album); - } - - public String getClassName() { - return CLASS_NAME; - } - - public String getType() { - return TYPE; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, long classPK, String actionId) - throws Exception { - - return AlbumPermission.contains(permissionChecker, classPK, actionId); - } - - @Override - public boolean isLinkable() { - return _LINKABLE; - } - - @Override - protected String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPortalURL() + - "/jukebox-portlet/icons/albums.png"; - } - - private static final boolean _LINKABLE = true; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/ArtistAssetRenderer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/ArtistAssetRenderer.java deleted file mode 100644 index 006f480421..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/ArtistAssetRenderer.java +++ /dev/null @@ -1,230 +0,0 @@ -/** - * 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 org.liferay.jukebox.asset; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.portlet.LiferayPortletRequest; -import com.liferay.portal.kernel.portlet.LiferayPortletResponse; -import com.liferay.portal.kernel.util.HtmlUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.LayoutConstants; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortletURLFactoryUtil; -import com.liferay.portlet.asset.model.AssetRendererFactory; -import com.liferay.portlet.asset.model.BaseAssetRenderer; - -import java.util.Locale; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.WindowState; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.portlet.ArtistsPortlet; -import org.liferay.jukebox.service.permission.ArtistPermission; -import org.liferay.jukebox.util.PortletKeys; - -/** - * @author Julio Camarero - */ - -public class ArtistAssetRenderer extends BaseAssetRenderer { - - public ArtistAssetRenderer(Artist artist) { - _artist = artist; - } - - @Override - public String getClassName() { - return Artist.class.getName(); - } - - @Override - public long getClassPK() { - return _artist.getArtistId(); - } - - @Override - public long getGroupId() { - return _artist.getGroupId(); - } - - @Override - public String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPortalURL() + - "/jukebox-portlet/icons/artists.png"; - } - - public String getPortletId() { - AssetRendererFactory assetRendererFactory = getAssetRendererFactory(); - - return assetRendererFactory.getPortletId(); - } - - @Override - public String getSummary(Locale locale) { - String summary = _artist.getName(); - - if (Validator.isNotNull(_artist.getBio())) { - summary = StringUtil.shorten(_artist.getBio(), 200); - } - - return summary; - } - - @Override - public String getThumbnailPath(PortletRequest portletRequest) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String thumbnailSrc = _artist.getImageURL(themeDisplay); - - if (Validator.isNotNull(thumbnailSrc)) { - return thumbnailSrc; - } - - return themeDisplay.getPortalURL() + - "/jukebox-portlet/icons/artists.png"; - } - - @Override - public String getTitle(Locale locale) { - return _artist.getName(); - } - - public String getType() { - return ArtistAssetRendererFactory.TYPE; - } - - @Override - public PortletURL getURLEdit( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse) - throws Exception { - - PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL( - getControlPanelPlid(liferayPortletRequest), - ArtistsPortlet.PORTLET_ID, PortletRequest.RENDER_PHASE); - - portletURL.setParameter("jspPage", "/html/artists/edit_artist.jsp"); - portletURL.setParameter( - "artistId", String.valueOf(_artist.getArtistId())); - - return portletURL; - } - - @Override - public String getURLViewInContext( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse, - String noSuchEntryRedirect) { - - try { - long plid = PortalUtil.getPlidFromPortletId( - _artist.getGroupId(), PortletKeys.ARTISTS); - - if (plid == LayoutConstants.DEFAULT_PLID) { - return StringPool.BLANK; - } - - PortletURL portletURL = PortletURLFactoryUtil.create( - liferayPortletRequest, PortletKeys.ARTISTS, plid, - PortletRequest.RENDER_PHASE); - - portletURL.setParameter("jspPage", "/html/artists/view_artist.jsp"); - portletURL.setParameter( - "artistId", String.valueOf(_artist.getArtistId())); - - return portletURL.toString(); - } - catch (Exception e) { - } - - return StringPool.BLANK; - } - - @Override - public long getUserId() { - return _artist.getUserId(); - } - - @Override - public String getUserName() { - return _artist.getUserName(); - } - - @Override - public String getUuid() { - return _artist.getUuid(); - } - - public boolean hasDeletePermission(PermissionChecker permissionChecker) - throws PortalException, SystemException { - - return ArtistPermission.contains( - permissionChecker, _artist.getArtistId(), ActionKeys.DELETE); - } - - @Override - public boolean hasEditPermission(PermissionChecker permissionChecker) - throws PortalException, SystemException { - - return ArtistPermission.contains( - permissionChecker, _artist.getArtistId(), ActionKeys.UPDATE); - } - - @Override - public boolean hasViewPermission(PermissionChecker permissionChecker) - throws PortalException, SystemException { - - return ArtistPermission.contains( - permissionChecker, _artist.getArtistId(), ActionKeys.VIEW); - } - - @Override - public boolean isPrintable() { - return true; - } - - @Override - public String render( - RenderRequest renderRequest, RenderResponse renderResponse, - String template) - throws Exception { - - if (template.equals(TEMPLATE_FULL_CONTENT)) { - renderRequest.setAttribute("jukebox_artist", _artist); - - return "/html/artists/asset/" + template + ".jsp"; - } - else { - return null; - } - } - - private Artist _artist; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/ArtistAssetRendererFactory.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/ArtistAssetRendererFactory.java deleted file mode 100644 index 531ca3a4fc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/ArtistAssetRendererFactory.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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 org.liferay.jukebox.asset; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.asset.model.AssetRenderer; -import com.liferay.portlet.asset.model.BaseAssetRendererFactory; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; -import org.liferay.jukebox.service.permission.ArtistPermission; - -/** - * @author Julio Camarero - */ -public class ArtistAssetRendererFactory extends BaseAssetRendererFactory { - - public static final String CLASS_NAME = Artist.class.getName(); - - public static final String TYPE = "artist"; - - public AssetRenderer getAssetRenderer(long classPK, int type) - throws PortalException, SystemException { - - Artist artist = ArtistLocalServiceUtil.getArtist(classPK); - - return new ArtistAssetRenderer(artist); - } - - public String getClassName() { - return CLASS_NAME; - } - - public String getType() { - return TYPE; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, long classPK, String actionId) - throws Exception { - - return ArtistPermission.contains(permissionChecker, classPK, actionId); - } - - @Override - public boolean isLinkable() { - return _LINKABLE; - } - - @Override - protected String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPortalURL() + - "/jukebox-portlet/icons/artists.png"; - } - - private static final boolean _LINKABLE = true; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/SongAssetRenderer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/SongAssetRenderer.java deleted file mode 100644 index 3c66677c6b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/SongAssetRenderer.java +++ /dev/null @@ -1,230 +0,0 @@ -/** - * 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 org.liferay.jukebox.asset; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.portlet.LiferayPortletRequest; -import com.liferay.portal.kernel.portlet.LiferayPortletResponse; -import com.liferay.portal.kernel.trash.TrashRenderer; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.LayoutConstants; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortletURLFactoryUtil; -import com.liferay.portlet.asset.model.AssetRendererFactory; -import com.liferay.portlet.asset.model.BaseAssetRenderer; -import com.liferay.portlet.trash.util.TrashUtil; - -import java.util.Locale; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.WindowState; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.portlet.SongsPortlet; -import org.liferay.jukebox.service.permission.SongPermission; -import org.liferay.jukebox.util.PortletKeys; - -/** - * @author Julio Camarero - */ - -public class SongAssetRenderer - extends BaseAssetRenderer implements TrashRenderer { - - public SongAssetRenderer(Song song) { - _song = song; - } - - @Override - public String getClassName() { - return Song.class.getName(); - } - - @Override - public long getClassPK() { - return _song.getSongId(); - } - - @Override - public long getGroupId() { - return _song.getGroupId(); - } - - @Override - public String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPortalURL() + - "/jukebox-portlet/icons/songs.png"; - } - - public String getPortletId() { - AssetRendererFactory assetRendererFactory = getAssetRendererFactory(); - - return assetRendererFactory.getPortletId(); - } - - @Override - public String getSummary(Locale locale) { - String summary = _song.getName(); - - return summary; - } - - @Override - public String getThumbnailPath(PortletRequest portletRequest) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String thumbnailSrc = _song.getImageURL(themeDisplay); - - if (Validator.isNotNull(thumbnailSrc)) { - return thumbnailSrc; - } - - return themeDisplay.getPortalURL() + - "/jukebox-portlet/icons/songs.png"; - } - - @Override - public String getTitle(Locale locale) { - if (!_song.isInTrash()) { - return _song.getName(); - } - - return TrashUtil.getOriginalTitle(_song.getName()); - } - - public String getType() { - return SongAssetRendererFactory.TYPE; - } - - @Override - public PortletURL getURLEdit( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse) - throws Exception { - - PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL( - getControlPanelPlid(liferayPortletRequest), SongsPortlet.PORTLET_ID, - PortletRequest.RENDER_PHASE); - - portletURL.setParameter("jspPage", "/html/songs/edit_song.jsp"); - portletURL.setParameter("songId", String.valueOf(_song.getSongId())); - - return portletURL; - } - - @Override - public String getURLViewInContext( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse, - String noSuchEntryRedirect) { - - try { - long plid = PortalUtil.getPlidFromPortletId( - _song.getGroupId(), PortletKeys.SONGS); - - if (plid == LayoutConstants.DEFAULT_PLID) { - return StringPool.BLANK; - } - - PortletURL portletURL = PortletURLFactoryUtil.create( - liferayPortletRequest, PortletKeys.SONGS, plid, - PortletRequest.RENDER_PHASE); - - portletURL.setParameter("jspPage", "/html/songs/view_song.jsp"); - portletURL.setParameter( - "songId", String.valueOf(_song.getSongId())); - - return portletURL.toString(); - } - catch (Exception e) { - } - - return StringPool.BLANK; - } - - @Override - public long getUserId() { - return _song.getUserId(); - } - - @Override - public String getUserName() { - return _song.getUserName(); - } - - @Override - public String getUuid() { - return _song.getUuid(); - } - - public boolean hasDeletePermission(PermissionChecker permissionChecker) - throws PortalException, SystemException { - - return SongPermission.contains( - permissionChecker, _song.getSongId(), ActionKeys.DELETE); - } - - @Override - public boolean hasEditPermission(PermissionChecker permissionChecker) - throws PortalException, SystemException { - - return SongPermission.contains( - permissionChecker, _song.getSongId(), ActionKeys.UPDATE); - } - - @Override - public boolean hasViewPermission(PermissionChecker permissionChecker) - throws PortalException, SystemException { - - return SongPermission.contains( - permissionChecker, _song.getSongId(), ActionKeys.VIEW); - } - - @Override - public boolean isPrintable() { - return true; - } - - @Override - public String render( - RenderRequest renderRequest, RenderResponse renderResponse, - String template) - throws Exception { - - if (template.equals(TEMPLATE_FULL_CONTENT)) { - renderRequest.setAttribute("jukebox_song", _song); - - return "/html/songs/asset/" + template + ".jsp"; - } - else { - return null; - } - } - - private Song _song; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/SongAssetRendererFactory.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/SongAssetRendererFactory.java deleted file mode 100644 index 938ce96954..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/asset/SongAssetRendererFactory.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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 org.liferay.jukebox.asset; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.asset.model.AssetRenderer; -import com.liferay.portlet.asset.model.BaseAssetRendererFactory; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.SongLocalServiceUtil; -import org.liferay.jukebox.service.permission.SongPermission; - -/** - * @author Julio Camarero - */ -public class SongAssetRendererFactory extends BaseAssetRendererFactory { - - public static final String CLASS_NAME = Song.class.getName(); - - public static final String TYPE = "song"; - - public AssetRenderer getAssetRenderer(long classPK, int type) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(classPK); - - return new SongAssetRenderer(song); - } - - public String getClassName() { - return CLASS_NAME; - } - - public String getType() { - return TYPE; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, long classPK, String actionId) - throws Exception { - - return SongPermission.contains(permissionChecker, classPK, actionId); - } - - @Override - public boolean isLinkable() { - return _LINKABLE; - } - - @Override - protected String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPortalURL() + - "/jukebox-portlet/icons/songs.png"; - } - - private static final boolean _LINKABLE = true; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/lar/AlbumStagedModelDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/lar/AlbumStagedModelDataHandler.java deleted file mode 100644 index ca32a183d4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/lar/AlbumStagedModelDataHandler.java +++ /dev/null @@ -1,278 +0,0 @@ -/** - * 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 org.liferay.jukebox.lar; - -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.lar.BaseStagedModelDataHandler; -import com.liferay.portal.kernel.lar.ExportImportPathUtil; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.util.MapUtil; -import com.liferay.portal.kernel.util.StreamUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.service.ServiceContext; - -import java.io.InputStream; -import java.util.List; -import java.util.Map; - -import com.liferay.portlet.documentlibrary.NoSuchFileException; -import com.liferay.portlet.documentlibrary.model.DLFileEntry; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.store.DLStoreUtil; -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; - -/** - * @author Mate Thurzo - */ -public class AlbumStagedModelDataHandler - extends BaseStagedModelDataHandler { - - public static final String[] CLASS_NAMES = {Album.class.getName()}; - - @Override - public void deleteStagedModel( - String uuid, long groupId, String className, String extraData) - throws PortalException, SystemException { - - Album album = AlbumLocalServiceUtil.fetchAlbumByUuidAndGroupId( - uuid, groupId); - - if (album != null) { - AlbumLocalServiceUtil.deleteAlbum(album); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getDisplayName(Album album) { - return album.getName(); - } - - @Override - public int[] getExportableStatuses() { - return new int[] {WorkflowConstants.STATUS_APPROVED}; - } - - @Override - protected void doExportStagedModel( - PortletDataContext portletDataContext, Album album) - throws Exception { - - Artist artist = ArtistLocalServiceUtil.getArtist(album.getArtistId()); - - Element albumElement = portletDataContext.getExportDataElement(album); - - if (portletDataContext.getBooleanParameter( - JukeboxPortletDataHandler.NAMESPACE, "artists")) { - - // Artists are selected to export, making sure this album's artist - // is going to be exported as well - - StagedModelDataHandlerUtil.exportReferenceStagedModel( - portletDataContext, album, artist, - PortletDataContext.REFERENCE_TYPE_DEPENDENCY); - } - else { - - // Artists are not exported - adding missing reference element to - // validate - - portletDataContext.addReferenceElement( - album, albumElement, artist, - PortletDataContext.REFERENCE_TYPE_DEPENDENCY, true); - } - - if (album.hasCustomImage()) { - FileEntry fileEntry = album.getCustomImage(); - - StagedModelDataHandlerUtil.exportReferenceStagedModel( - portletDataContext, album, Album.class, fileEntry, - FileEntry.class, PortletDataContext.REFERENCE_TYPE_WEAK); - } - - portletDataContext.addClassedModel( - albumElement, ExportImportPathUtil.getModelPath(album), album); - } - - @Override - protected void doImportStagedModel( - PortletDataContext portletDataContext, Album album) - throws Exception { - - long userId = portletDataContext.getUserId(album.getUserUuid()); - - ServiceContext serviceContext = portletDataContext.createServiceContext( - album); - - String artistPath = ExportImportPathUtil.getModelPath( - portletDataContext, Artist.class.getName(), album.getArtistId()); - - Artist artist = (Artist)portletDataContext.getZipEntryAsObject( - artistPath); - - if (artist != null) { - StagedModelDataHandlerUtil.importReferenceStagedModel( - portletDataContext, album, Artist.class, album.getArtistId()); - } - - Map artistIds = - (Map)portletDataContext.getNewPrimaryKeysMap( - Artist.class); - - long artistId = MapUtil.getLong( - artistIds, album.getArtistId(), album.getArtistId()); - - Album importedAlbum = null; - - if (portletDataContext.isDataStrategyMirror()) { - Album existingAlbum = - AlbumLocalServiceUtil.fetchAlbumByUuidAndGroupId( - album.getUuid(), portletDataContext.getScopeGroupId()); - - if (existingAlbum == null) { - serviceContext.setUuid(album.getUuid()); - - importedAlbum = AlbumLocalServiceUtil.addAlbum( - userId, artistId, album.getName(), album.getYear(), null, - serviceContext); - } - else { - importedAlbum = AlbumLocalServiceUtil.updateAlbum( - userId, existingAlbum.getAlbumId(), artistId, - album.getName(), album.getYear(), null, serviceContext); - } - } - else { - importedAlbum = AlbumLocalServiceUtil.addAlbum( - userId, artistId, album.getName(), album.getYear(), null, - serviceContext); - } - - Element albumElement = - portletDataContext.getImportDataStagedModelElement(album); - - List attachmentElements = - portletDataContext.getReferenceDataElements( - albumElement, FileEntry.class, - PortletDataContext.REFERENCE_TYPE_WEAK); - - for (Element attachmentElement : attachmentElements) { - String path = attachmentElement.attributeValue("path"); - - FileEntry fileEntry = - (FileEntry)portletDataContext.getZipEntryAsObject(path); - - InputStream inputStream = null; - - try { - String binPath = attachmentElement.attributeValue("bin-path"); - - if (Validator.isNull(binPath) && - portletDataContext.isPerformDirectBinaryImport()) { - - try { - inputStream = _getContentStream(fileEntry); - } - catch (NoSuchFileException nsfe) { - } - } - else { - inputStream = - portletDataContext.getZipEntryAsInputStream(binPath); - } - - if (inputStream == null) { - if (_log.isWarnEnabled()) { - _log.warn( - "Unable to import attachment for file entry " + - fileEntry.getFileEntryId()); - } - - continue; - } - - importedAlbum = AlbumLocalServiceUtil.updateAlbum( - userId, importedAlbum.getAlbumId(), - importedAlbum.getArtistId(), importedAlbum.getName(), - importedAlbum.getYear(), inputStream, serviceContext); - } - finally { - StreamUtil.cleanUp(inputStream); - } - } - - portletDataContext.importClassedModel(album, importedAlbum); - } - - @Override - protected void doRestoreStagedModel( - PortletDataContext portletDataContext, Album album) - throws Exception { - - long userId = portletDataContext.getUserId(album.getUserUuid()); - - Album existingAlbum = AlbumLocalServiceUtil.fetchAlbumByUuidAndGroupId( - album.getUuid(), portletDataContext.getScopeGroupId()); - - if ((existingAlbum == null) || !existingAlbum.isInTrash()) { - return; - } - - TrashHandler trashHandler = existingAlbum.getTrashHandler(); - - if (trashHandler.isRestorable(existingAlbum.getAlbumId())) { - trashHandler.restoreTrashEntry(userId, existingAlbum.getAlbumId()); - } - } - - private InputStream _getContentStream(FileEntry fileEntry) - throws PortalException, SystemException { - - long repositoryId = DLFolderConstants.getDataRepositoryId( - fileEntry.getRepositoryId(), fileEntry.getFolderId()); - - String name = ((DLFileEntry)fileEntry.getModel()).getName(); - - InputStream is = DLStoreUtil.getFileAsStream( - fileEntry.getCompanyId(), repositoryId, name, - fileEntry.getVersion()); - - if (is == null) { - is = new UnsyncByteArrayInputStream(new byte[0]); - } - - return is; - } - - private static Log _log = LogFactoryUtil.getLog( - AlbumStagedModelDataHandler.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/lar/ArtistStagedModelDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/lar/ArtistStagedModelDataHandler.java deleted file mode 100644 index 8e4b9e8af6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/lar/ArtistStagedModelDataHandler.java +++ /dev/null @@ -1,245 +0,0 @@ -/** - * 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 org.liferay.jukebox.lar; - -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.lar.BaseStagedModelDataHandler; -import com.liferay.portal.kernel.lar.ExportImportPathUtil; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.util.StreamUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.service.ServiceContext; - -import java.io.InputStream; -import java.util.List; - -import com.liferay.portlet.documentlibrary.NoSuchFileException; -import com.liferay.portlet.documentlibrary.model.DLFileEntry; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.store.DLStoreUtil; -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; - -/** - * @author Mate Thurzo - */ -public class ArtistStagedModelDataHandler - extends BaseStagedModelDataHandler { - - public static final String[] CLASS_NAMES = {Artist.class.getName()}; - - @Override - public void deleteStagedModel( - String uuid, long groupId, String className, String extraData) - throws PortalException, SystemException { - - Artist artist = ArtistLocalServiceUtil.fetchArtistByUuidAndGroupId( - uuid, groupId); - - if (artist != null) { - ArtistLocalServiceUtil.deleteArtist(artist); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getDisplayName(Artist artist) { - return artist.getName(); - } - - @Override - protected void doExportStagedModel( - PortletDataContext portletDataContext, Artist artist) - throws Exception { - - Element artistElement = portletDataContext.getExportDataElement(artist); - - if (artist.hasCustomImage()) { - FileEntry fileEntry = artist.getCustomImage(); - - StagedModelDataHandlerUtil.exportReferenceStagedModel( - portletDataContext, artist, Artist.class, fileEntry, - FileEntry.class, PortletDataContext.REFERENCE_TYPE_WEAK); - } - - portletDataContext.addClassedModel( - artistElement, ExportImportPathUtil.getModelPath(artist), artist); - } - - @Override - protected void doImportStagedModel( - PortletDataContext portletDataContext, Artist artist) - throws Exception { - - long userId = portletDataContext.getUserId(artist.getUserUuid()); - - ServiceContext serviceContext = portletDataContext.createServiceContext( - artist); - - Artist importedArtist = null; - - if (portletDataContext.isDataStrategyMirror()) { - Artist existingArtist = - ArtistLocalServiceUtil.fetchArtistByUuidAndGroupId( - artist.getUuid(), portletDataContext.getScopeGroupId()); - - if (existingArtist == null) { - serviceContext.setUuid(artist.getUuid()); - - importedArtist = ArtistLocalServiceUtil.addArtist( - userId, artist.getName(), artist.getBio(), null, - serviceContext); - } - else { - importedArtist = ArtistLocalServiceUtil.updateArtist( - userId, existingArtist.getArtistId(), artist.getName(), - artist.getBio(), null, serviceContext); - } - } - else { - importedArtist = ArtistLocalServiceUtil.addArtist( - userId, artist.getName(), artist.getBio(), null, - serviceContext); - } - - Element artistElement = - portletDataContext.getImportDataStagedModelElement(artist); - - List attachmentElements = - portletDataContext.getReferenceDataElements( - artistElement, FileEntry.class, - PortletDataContext.REFERENCE_TYPE_WEAK); - - for (Element attachmentElement : attachmentElements) { - String path = attachmentElement.attributeValue("path"); - - FileEntry fileEntry = - (FileEntry)portletDataContext.getZipEntryAsObject(path); - - InputStream inputStream = null; - - try { - String binPath = attachmentElement.attributeValue("bin-path"); - - if (Validator.isNull(binPath) && - portletDataContext.isPerformDirectBinaryImport()) { - - try { - inputStream = _getContentStream(fileEntry); - } - catch (NoSuchFileException nsfe) { - } - } - else { - inputStream = - portletDataContext.getZipEntryAsInputStream(binPath); - } - - if (inputStream == null) { - if (_log.isWarnEnabled()) { - _log.warn( - "Unable to import attachment for file entry " + - fileEntry.getFileEntryId()); - } - - continue; - } - - importedArtist = ArtistLocalServiceUtil.updateArtist( - userId, importedArtist.getArtistId(), - importedArtist.getName(), importedArtist.getBio(), - inputStream, serviceContext); - } - finally { - StreamUtil.cleanUp(inputStream); - } - } - - portletDataContext.importClassedModel(artist, importedArtist); - } - - @Override - protected void doRestoreStagedModel( - PortletDataContext portletDataContext, Artist artist) - throws Exception { - - long userId = portletDataContext.getUserId(artist.getUserUuid()); - - Artist existingArtist = - ArtistLocalServiceUtil.fetchArtistByUuidAndGroupId( - artist.getUuid(), portletDataContext.getScopeGroupId()); - - if ((existingArtist == null) || !existingArtist.isInTrash()) { - return; - } - - TrashHandler trashHandler = existingArtist.getTrashHandler(); - - if (trashHandler.isRestorable(existingArtist.getArtistId())) { - trashHandler.restoreTrashEntry( - userId, existingArtist.getArtistId()); - } - } - - @Override - protected boolean validateMissingReference( - String uuid, long companyId, long groupId) - throws Exception { - - Artist artist = ArtistLocalServiceUtil.fetchArtistByUuidAndGroupId( - uuid, groupId); - - if (artist == null) { - return false; - } - - return true; - } - - private InputStream _getContentStream(FileEntry fileEntry) - throws PortalException, SystemException { - - long repositoryId = DLFolderConstants.getDataRepositoryId( - fileEntry.getRepositoryId(), fileEntry.getFolderId()); - - String name = ((DLFileEntry)fileEntry.getModel()).getName(); - - InputStream is = DLStoreUtil.getFileAsStream( - fileEntry.getCompanyId(), repositoryId, name, - fileEntry.getVersion()); - - if (is == null) { - is = new UnsyncByteArrayInputStream(new byte[0]); - } - - return is; - } - - private static Log _log = LogFactoryUtil.getLog( - ArtistStagedModelDataHandler.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/lar/JukeboxPortletDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/lar/JukeboxPortletDataHandler.java deleted file mode 100644 index 80b005f5a2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/lar/JukeboxPortletDataHandler.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * 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 org.liferay.jukebox.lar; - -import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; -import com.liferay.portal.kernel.lar.BasePortletDataHandler; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.PortletDataHandlerBoolean; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.xml.Element; - -import java.util.List; - -import javax.portlet.PortletPreferences; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; -import org.liferay.jukebox.service.persistence.AlbumExportActionableDynamicQuery; -import org.liferay.jukebox.service.persistence.ArtistExportActionableDynamicQuery; - -/** - * @author Mate Thurzo - */ -public class JukeboxPortletDataHandler extends BasePortletDataHandler { - - public static final String NAMESPACE = "jukebox"; - - public JukeboxPortletDataHandler() { - setDeletionSystemEventStagedModelTypes( - new StagedModelType(Artist.class), - new StagedModelType(Album.class)); - setExportControls( - new PortletDataHandlerBoolean( - NAMESPACE, "albums", true, false, null, Album.class.getName()), - new PortletDataHandlerBoolean( - NAMESPACE, "artists", true, false, null, - Artist.class.getName())); - setImportControls(getExportControls()); - setPublishToLiveByDefault(true); - } - - @Override - protected PortletPreferences doDeleteData( - PortletDataContext portletDataContext, String portletId, - PortletPreferences portletPreferences) - throws Exception { - - AlbumLocalServiceUtil.deleteAlbums( - portletDataContext.getScopeGroupId()); - - ArtistLocalServiceUtil.deleteArtists( - portletDataContext.getScopeGroupId()); - - return portletPreferences; - } - - @Override - protected String doExportData( - PortletDataContext portletDataContext, String portletId, - PortletPreferences portletPreferences) - throws Exception { - - Element rootElement = addExportDataRootElement(portletDataContext); - - if (portletDataContext.getBooleanParameter(NAMESPACE, "albums")) { - ActionableDynamicQuery albumActionableDynamicQuery = - new AlbumExportActionableDynamicQuery(portletDataContext); - - albumActionableDynamicQuery.performActions(); - } - - if (portletDataContext.getBooleanParameter(NAMESPACE, "artists")) { - ActionableDynamicQuery artistActionableDynamicQuery = - new ArtistExportActionableDynamicQuery(portletDataContext); - - artistActionableDynamicQuery.performActions(); - } - - return getExportDataRootElementString(rootElement); - } - - @Override - protected PortletPreferences doImportData( - PortletDataContext portletDataContext, String portletId, - PortletPreferences portletPreferences, String data) - throws Exception { - - if (portletDataContext.getBooleanParameter(NAMESPACE, "albums")) { - Element albumsElement = - portletDataContext.getImportDataGroupElement(Album.class); - - List albumElements = albumsElement.elements(); - - for (Element albumElement : albumElements) { - StagedModelDataHandlerUtil.importStagedModel( - portletDataContext, albumElement); - } - } - - if (portletDataContext.getBooleanParameter(NAMESPACE, "artists")) { - Element artistsElement = - portletDataContext.getImportDataGroupElement(Artist.class); - - List artistElements = artistsElement.elements(); - - for (Element artistElement : artistElements) { - StagedModelDataHandlerUtil.importStagedModel( - portletDataContext, artistElement); - } - } - - return null; - } - - @Override - protected void doPrepareManifestSummary( - PortletDataContext portletDataContext, - PortletPreferences portletPreferences) - throws Exception { - - ActionableDynamicQuery albumActionableDynamicQuery = - new AlbumExportActionableDynamicQuery(portletDataContext); - - albumActionableDynamicQuery.performCount(); - - ActionableDynamicQuery artistActionableDynamicQuery = - new ArtistExportActionableDynamicQuery(portletDataContext); - - artistActionableDynamicQuery.performCount(); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumBaseImpl.java deleted file mode 100644 index 9cf95a73f7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumBaseImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.exception.SystemException; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; - -/** - * The extended model base implementation for the Album service. Represents a row in the "jukebox_Album" database table, with each column mapped to a property of this class. - * - *

- * 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 AlbumImpl}. - *

- * - * @author Julio Camarero - * @see AlbumImpl - * @see org.liferay.jukebox.model.Album - * @generated - */ -public abstract class AlbumBaseImpl extends AlbumModelImpl implements Album { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a album model instance should use the {@link Album} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - AlbumLocalServiceUtil.addAlbum(this); - } - else { - AlbumLocalServiceUtil.updateAlbum(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumCacheModel.java deleted file mode 100644 index 38ad785f4a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumCacheModel.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -import org.liferay.jukebox.model.Album; - -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 Album in entity cache. - * - * @author Julio Camarero - * @see Album - * @generated - */ -public class AlbumCacheModel implements CacheModel, Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(31); - - sb.append("{uuid="); - sb.append(uuid); - sb.append(", albumId="); - sb.append(albumId); - sb.append(", companyId="); - sb.append(companyId); - sb.append(", groupId="); - sb.append(groupId); - sb.append(", userId="); - sb.append(userId); - sb.append(", userName="); - sb.append(userName); - sb.append(", createDate="); - sb.append(createDate); - sb.append(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", artistId="); - sb.append(artistId); - sb.append(", name="); - sb.append(name); - sb.append(", year="); - sb.append(year); - sb.append(", status="); - sb.append(status); - sb.append(", statusByUserId="); - sb.append(statusByUserId); - sb.append(", statusByUserName="); - sb.append(statusByUserName); - sb.append(", statusDate="); - sb.append(statusDate); - sb.append("}"); - - return sb.toString(); - } - - @Override - public Album toEntityModel() { - AlbumImpl albumImpl = new AlbumImpl(); - - if (uuid == null) { - albumImpl.setUuid(StringPool.BLANK); - } - else { - albumImpl.setUuid(uuid); - } - - albumImpl.setAlbumId(albumId); - albumImpl.setCompanyId(companyId); - albumImpl.setGroupId(groupId); - albumImpl.setUserId(userId); - - if (userName == null) { - albumImpl.setUserName(StringPool.BLANK); - } - else { - albumImpl.setUserName(userName); - } - - if (createDate == Long.MIN_VALUE) { - albumImpl.setCreateDate(null); - } - else { - albumImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - albumImpl.setModifiedDate(null); - } - else { - albumImpl.setModifiedDate(new Date(modifiedDate)); - } - - albumImpl.setArtistId(artistId); - - if (name == null) { - albumImpl.setName(StringPool.BLANK); - } - else { - albumImpl.setName(name); - } - - albumImpl.setYear(year); - albumImpl.setStatus(status); - albumImpl.setStatusByUserId(statusByUserId); - - if (statusByUserName == null) { - albumImpl.setStatusByUserName(StringPool.BLANK); - } - else { - albumImpl.setStatusByUserName(statusByUserName); - } - - if (statusDate == Long.MIN_VALUE) { - albumImpl.setStatusDate(null); - } - else { - albumImpl.setStatusDate(new Date(statusDate)); - } - - albumImpl.resetOriginalValues(); - - return albumImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - uuid = objectInput.readUTF(); - albumId = objectInput.readLong(); - companyId = objectInput.readLong(); - groupId = objectInput.readLong(); - userId = objectInput.readLong(); - userName = objectInput.readUTF(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - artistId = objectInput.readLong(); - name = objectInput.readUTF(); - year = objectInput.readInt(); - status = objectInput.readInt(); - statusByUserId = objectInput.readLong(); - statusByUserName = objectInput.readUTF(); - statusDate = objectInput.readLong(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - if (uuid == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(uuid); - } - - objectOutput.writeLong(albumId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(groupId); - objectOutput.writeLong(userId); - - if (userName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(userName); - } - - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - objectOutput.writeLong(artistId); - - if (name == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(name); - } - - objectOutput.writeInt(year); - objectOutput.writeInt(status); - objectOutput.writeLong(statusByUserId); - - if (statusByUserName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(statusByUserName); - } - - objectOutput.writeLong(statusDate); - } - - public String uuid; - public long albumId; - public long companyId; - public long groupId; - public long userId; - public String userName; - public long createDate; - public long modifiedDate; - public long artistId; - public String name; - public int year; - public int status; - public long statusByUserId; - public String statusByUserName; - public long statusDate; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumImpl.java deleted file mode 100644 index 238974907a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.Repository; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.util.DLUtil; - -import org.liferay.jukebox.util.Constants; - -/** - * The extended model implementation for the Album service. Represents a row in the "jukebox_Album" database table, with each column mapped to a property of this class. - * - *

- * 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 org.liferay.jukebox.model.Album} interface. - *

- * - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - */ -public class AlbumImpl extends AlbumBaseImpl { - public FileEntry getCustomImage() throws SystemException { - Repository repository = - PortletFileRepositoryUtil.fetchPortletRepository( - getGroupId(), Constants.JUKEBOX_PORTLET_REPOSITORY); - - if (repository == null) { - return null; - } - - try { - return PortletFileRepositoryUtil.getPortletFileEntry( - repository.getRepositoryId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(getAlbumId())); - } - catch (Exception e) { - return null; - } - } - - public String getImageURL(ThemeDisplay themeDisplay) - throws PortalException, SystemException { - - FileEntry fileEntry = getCustomImage(); - - if (fileEntry != null) { - return DLUtil.getPreviewURL( - fileEntry, fileEntry.getLatestFileVersion(), themeDisplay, - StringPool.BLANK); - } - else { - return themeDisplay.getPortalURL() + - "/jukebox-portlet/images/vinilo.png"; - } - } - - public boolean hasCustomImage() throws PortalException, SystemException { - FileEntry fileEntry = getCustomImage(); - - if (fileEntry != null) { - return true; - } - - return false; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumModelImpl.java deleted file mode 100644 index 21afea1cd5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/AlbumModelImpl.java +++ /dev/null @@ -1,1162 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSON; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ContainerModel; -import com.liferay.portal.model.TrashedModel; -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 com.liferay.portlet.trash.model.TrashEntry; -import com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.AlbumModel; -import org.liferay.jukebox.model.AlbumSoap; - -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 Album service. Represents a row in the "jukebox_Album" database table, with each column mapped to a property of this class. - * - *

- * This implementation and its corresponding interface {@link org.liferay.jukebox.model.AlbumModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link AlbumImpl}. - *

- * - * @author Julio Camarero - * @see AlbumImpl - * @see org.liferay.jukebox.model.Album - * @see org.liferay.jukebox.model.AlbumModel - * @generated - */ -@JSON(strict = true) -public class AlbumModelImpl extends BaseModelImpl implements AlbumModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a album model instance should use the {@link org.liferay.jukebox.model.Album} interface instead. - */ - public static final String TABLE_NAME = "jukebox_Album"; - public static final Object[][] TABLE_COLUMNS = { - { "uuid_", Types.VARCHAR }, - { "albumId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "groupId", Types.BIGINT }, - { "userId", Types.BIGINT }, - { "userName", Types.VARCHAR }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "artistId", Types.BIGINT }, - { "name", Types.VARCHAR }, - { "year", Types.INTEGER }, - { "status", Types.INTEGER }, - { "statusByUserId", Types.BIGINT }, - { "statusByUserName", Types.VARCHAR }, - { "statusDate", Types.TIMESTAMP } - }; - public static final String TABLE_SQL_CREATE = "create table jukebox_Album (uuid_ VARCHAR(75) null,albumId LONG not null primary key,companyId LONG,groupId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,artistId LONG,name VARCHAR(75) null,year INTEGER,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null)"; - public static final String TABLE_SQL_DROP = "drop table jukebox_Album"; - public static final String ORDER_BY_JPQL = " ORDER BY album.albumId ASC"; - public static final String ORDER_BY_SQL = " ORDER BY jukebox_Album.albumId 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.org.liferay.jukebox.model.Album"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.org.liferay.jukebox.model.Album"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.org.liferay.jukebox.model.Album"), - true); - public static long ARTISTID_COLUMN_BITMASK = 1L; - public static long COMPANYID_COLUMN_BITMASK = 2L; - public static long GROUPID_COLUMN_BITMASK = 4L; - public static long NAME_COLUMN_BITMASK = 8L; - public static long STATUS_COLUMN_BITMASK = 16L; - public static long USERID_COLUMN_BITMASK = 32L; - public static long UUID_COLUMN_BITMASK = 64L; - public static long ALBUMID_COLUMN_BITMASK = 128L; - - /** - * 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 Album toModel(AlbumSoap soapModel) { - if (soapModel == null) { - return null; - } - - Album model = new AlbumImpl(); - - model.setUuid(soapModel.getUuid()); - model.setAlbumId(soapModel.getAlbumId()); - model.setCompanyId(soapModel.getCompanyId()); - model.setGroupId(soapModel.getGroupId()); - model.setUserId(soapModel.getUserId()); - model.setUserName(soapModel.getUserName()); - model.setCreateDate(soapModel.getCreateDate()); - model.setModifiedDate(soapModel.getModifiedDate()); - model.setArtistId(soapModel.getArtistId()); - model.setName(soapModel.getName()); - model.setYear(soapModel.getYear()); - model.setStatus(soapModel.getStatus()); - model.setStatusByUserId(soapModel.getStatusByUserId()); - model.setStatusByUserName(soapModel.getStatusByUserName()); - model.setStatusDate(soapModel.getStatusDate()); - - 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 toModels(AlbumSoap[] soapModels) { - if (soapModels == null) { - return null; - } - - List models = new ArrayList(soapModels.length); - - for (AlbumSoap 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.org.liferay.jukebox.model.Album")); - - public AlbumModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _albumId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setAlbumId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _albumId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return Album.class; - } - - @Override - public String getModelClassName() { - return Album.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("albumId", getAlbumId()); - attributes.put("companyId", getCompanyId()); - attributes.put("groupId", getGroupId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("artistId", getArtistId()); - attributes.put("name", getName()); - attributes.put("year", getYear()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long albumId = (Long)attributes.get("albumId"); - - if (albumId != null) { - setAlbumId(albumId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Long groupId = (Long)attributes.get("groupId"); - - if (groupId != null) { - setGroupId(groupId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long artistId = (Long)attributes.get("artistId"); - - if (artistId != null) { - setArtistId(artistId); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - Integer year = (Integer)attributes.get("year"); - - if (year != null) { - setYear(year); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - } - - @JSON - @Override - public String getUuid() { - if (_uuid == null) { - return StringPool.BLANK; - } - else { - return _uuid; - } - } - - @Override - public void setUuid(String uuid) { - if (_originalUuid == null) { - _originalUuid = _uuid; - } - - _uuid = uuid; - } - - public String getOriginalUuid() { - return GetterUtil.getString(_originalUuid); - } - - @JSON - @Override - public long getAlbumId() { - return _albumId; - } - - @Override - public void setAlbumId(long albumId) { - _albumId = albumId; - } - - @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 getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _columnBitmask |= GROUPID_COLUMN_BITMASK; - - if (!_setOriginalGroupId) { - _setOriginalGroupId = true; - - _originalGroupId = _groupId; - } - - _groupId = groupId; - } - - public long getOriginalGroupId() { - return _originalGroupId; - } - - @JSON - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _columnBitmask |= USERID_COLUMN_BITMASK; - - if (!_setOriginalUserId) { - _setOriginalUserId = true; - - _originalUserId = _userId; - } - - _userId = userId; - } - - @Override - public String getUserUuid() throws SystemException { - return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid); - } - - @Override - public void setUserUuid(String userUuid) { - _userUuid = userUuid; - } - - public long getOriginalUserId() { - return _originalUserId; - } - - @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 Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - @JSON - @Override - public long getArtistId() { - return _artistId; - } - - @Override - public void setArtistId(long artistId) { - _columnBitmask |= ARTISTID_COLUMN_BITMASK; - - if (!_setOriginalArtistId) { - _setOriginalArtistId = true; - - _originalArtistId = _artistId; - } - - _artistId = artistId; - } - - public long getOriginalArtistId() { - return _originalArtistId; - } - - @JSON - @Override - public String getName() { - if (_name == null) { - return StringPool.BLANK; - } - else { - return _name; - } - } - - @Override - public void setName(String name) { - _columnBitmask |= NAME_COLUMN_BITMASK; - - if (_originalName == null) { - _originalName = _name; - } - - _name = name; - } - - public String getOriginalName() { - return GetterUtil.getString(_originalName); - } - - @JSON - @Override - public int getYear() { - return _year; - } - - @Override - public void setYear(int year) { - _year = year; - } - - @JSON - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _columnBitmask |= STATUS_COLUMN_BITMASK; - - if (!_setOriginalStatus) { - _setOriginalStatus = true; - - _originalStatus = _status; - } - - _status = status; - } - - public int getOriginalStatus() { - return _originalStatus; - } - - @JSON - @Override - public long getStatusByUserId() { - return _statusByUserId; - } - - @Override - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - } - - @Override - public String getStatusByUserUuid() throws SystemException { - return PortalUtil.getUserValue(getStatusByUserId(), "uuid", - _statusByUserUuid); - } - - @Override - public void setStatusByUserUuid(String statusByUserUuid) { - _statusByUserUuid = statusByUserUuid; - } - - @JSON - @Override - public String getStatusByUserName() { - if (_statusByUserName == null) { - return StringPool.BLANK; - } - else { - return _statusByUserName; - } - } - - @Override - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - } - - @JSON - @Override - public Date getStatusDate() { - return _statusDate; - } - - @Override - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - } - - @Override - public long getContainerModelId() { - return getAlbumId(); - } - - @Override - public void setContainerModelId(long containerModelId) { - _albumId = containerModelId; - } - - @Override - public String getContainerModelName() { - return String.valueOf(getName()); - } - - @Override - public long getParentContainerModelId() { - return 0; - } - - @Override - public void setParentContainerModelId(long parentContainerModelId) { - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Album.class.getName())); - } - - @Override - public TrashEntry getTrashEntry() throws PortalException, SystemException { - if (!isInTrash()) { - return null; - } - - TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(), - getTrashEntryClassPK()); - - if (trashEntry != null) { - return trashEntry; - } - - TrashHandler trashHandler = getTrashHandler(); - - if (!Validator.isNull(trashHandler.getContainerModelClassName())) { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - while (containerModel != null) { - if (containerModel instanceof TrashedModel) { - TrashedModel trashedModel = (TrashedModel)containerModel; - - return trashedModel.getTrashEntry(); - } - - trashHandler = TrashHandlerRegistryUtil.getTrashHandler(trashHandler.getContainerModelClassName()); - - if (trashHandler == null) { - return null; - } - - containerModel = trashHandler.getContainerModel(containerModel.getParentContainerModelId()); - } - } - - return null; - } - - @Override - public long getTrashEntryClassPK() { - return getPrimaryKey(); - } - - @Override - public TrashHandler getTrashHandler() { - return TrashHandlerRegistryUtil.getTrashHandler(getModelClassName()); - } - - @Override - public boolean isInTrash() { - if (getStatus() == WorkflowConstants.STATUS_IN_TRASH) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInTrashContainer() { - TrashHandler trashHandler = getTrashHandler(); - - if ((trashHandler == null) || - Validator.isNull(trashHandler.getContainerModelClassName())) { - return false; - } - - try { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - if (containerModel == null) { - return false; - } - - if (containerModel instanceof TrashedModel) { - return ((TrashedModel)containerModel).isInTrash(); - } - } - catch (Exception e) { - } - - return false; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved} - */ - @Override - public boolean getApproved() { - return isApproved(); - } - - @Override - public boolean isApproved() { - if (getStatus() == WorkflowConstants.STATUS_APPROVED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDenied() { - if (getStatus() == WorkflowConstants.STATUS_DENIED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDraft() { - if (getStatus() == WorkflowConstants.STATUS_DRAFT) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isExpired() { - if (getStatus() == WorkflowConstants.STATUS_EXPIRED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInactive() { - if (getStatus() == WorkflowConstants.STATUS_INACTIVE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isIncomplete() { - if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isPending() { - if (getStatus() == WorkflowConstants.STATUS_PENDING) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isScheduled() { - if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) { - return true; - } - else { - return false; - } - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - Album.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public Album toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (Album)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - AlbumImpl albumImpl = new AlbumImpl(); - - albumImpl.setUuid(getUuid()); - albumImpl.setAlbumId(getAlbumId()); - albumImpl.setCompanyId(getCompanyId()); - albumImpl.setGroupId(getGroupId()); - albumImpl.setUserId(getUserId()); - albumImpl.setUserName(getUserName()); - albumImpl.setCreateDate(getCreateDate()); - albumImpl.setModifiedDate(getModifiedDate()); - albumImpl.setArtistId(getArtistId()); - albumImpl.setName(getName()); - albumImpl.setYear(getYear()); - albumImpl.setStatus(getStatus()); - albumImpl.setStatusByUserId(getStatusByUserId()); - albumImpl.setStatusByUserName(getStatusByUserName()); - albumImpl.setStatusDate(getStatusDate()); - - albumImpl.resetOriginalValues(); - - return albumImpl; - } - - @Override - public int compareTo(Album album) { - long primaryKey = album.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof Album)) { - return false; - } - - Album album = (Album)obj; - - long primaryKey = album.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - AlbumModelImpl albumModelImpl = this; - - albumModelImpl._originalUuid = albumModelImpl._uuid; - - albumModelImpl._originalCompanyId = albumModelImpl._companyId; - - albumModelImpl._setOriginalCompanyId = false; - - albumModelImpl._originalGroupId = albumModelImpl._groupId; - - albumModelImpl._setOriginalGroupId = false; - - albumModelImpl._originalUserId = albumModelImpl._userId; - - albumModelImpl._setOriginalUserId = false; - - albumModelImpl._originalArtistId = albumModelImpl._artistId; - - albumModelImpl._setOriginalArtistId = false; - - albumModelImpl._originalName = albumModelImpl._name; - - albumModelImpl._originalStatus = albumModelImpl._status; - - albumModelImpl._setOriginalStatus = false; - - albumModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - AlbumCacheModel albumCacheModel = new AlbumCacheModel(); - - albumCacheModel.uuid = getUuid(); - - String uuid = albumCacheModel.uuid; - - if ((uuid != null) && (uuid.length() == 0)) { - albumCacheModel.uuid = null; - } - - albumCacheModel.albumId = getAlbumId(); - - albumCacheModel.companyId = getCompanyId(); - - albumCacheModel.groupId = getGroupId(); - - albumCacheModel.userId = getUserId(); - - albumCacheModel.userName = getUserName(); - - String userName = albumCacheModel.userName; - - if ((userName != null) && (userName.length() == 0)) { - albumCacheModel.userName = null; - } - - Date createDate = getCreateDate(); - - if (createDate != null) { - albumCacheModel.createDate = createDate.getTime(); - } - else { - albumCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - albumCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - albumCacheModel.modifiedDate = Long.MIN_VALUE; - } - - albumCacheModel.artistId = getArtistId(); - - albumCacheModel.name = getName(); - - String name = albumCacheModel.name; - - if ((name != null) && (name.length() == 0)) { - albumCacheModel.name = null; - } - - albumCacheModel.year = getYear(); - - albumCacheModel.status = getStatus(); - - albumCacheModel.statusByUserId = getStatusByUserId(); - - albumCacheModel.statusByUserName = getStatusByUserName(); - - String statusByUserName = albumCacheModel.statusByUserName; - - if ((statusByUserName != null) && (statusByUserName.length() == 0)) { - albumCacheModel.statusByUserName = null; - } - - Date statusDate = getStatusDate(); - - if (statusDate != null) { - albumCacheModel.statusDate = statusDate.getTime(); - } - else { - albumCacheModel.statusDate = Long.MIN_VALUE; - } - - return albumCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(31); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", albumId="); - sb.append(getAlbumId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", groupId="); - sb.append(getGroupId()); - sb.append(", userId="); - sb.append(getUserId()); - sb.append(", userName="); - sb.append(getUserName()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", artistId="); - sb.append(getArtistId()); - sb.append(", name="); - sb.append(getName()); - sb.append(", year="); - sb.append(getYear()); - sb.append(", status="); - sb.append(getStatus()); - sb.append(", statusByUserId="); - sb.append(getStatusByUserId()); - sb.append(", statusByUserName="); - sb.append(getStatusByUserName()); - sb.append(", statusDate="); - sb.append(getStatusDate()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(49); - - sb.append(""); - sb.append("org.liferay.jukebox.model.Album"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "albumId"); - sb.append( - "companyId"); - sb.append( - "groupId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "artistId"); - sb.append( - "name"); - sb.append( - "year"); - sb.append( - "status"); - sb.append( - "statusByUserId"); - sb.append( - "statusByUserName"); - sb.append( - "statusDate"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = Album.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { Album.class }; - private String _uuid; - private String _originalUuid; - private long _albumId; - private long _companyId; - private long _originalCompanyId; - private boolean _setOriginalCompanyId; - private long _groupId; - private long _originalGroupId; - private boolean _setOriginalGroupId; - private long _userId; - private String _userUuid; - private long _originalUserId; - private boolean _setOriginalUserId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _artistId; - private long _originalArtistId; - private boolean _setOriginalArtistId; - private String _name; - private String _originalName; - private int _year; - private int _status; - private int _originalStatus; - private boolean _setOriginalStatus; - private long _statusByUserId; - private String _statusByUserUuid; - private String _statusByUserName; - private Date _statusDate; - private long _columnBitmask; - private Album _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistBaseImpl.java deleted file mode 100644 index 8a7ab2f9f1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistBaseImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.exception.SystemException; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; - -/** - * The extended model base implementation for the Artist service. Represents a row in the "jukebox_Artist" database table, with each column mapped to a property of this class. - * - *

- * 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 ArtistImpl}. - *

- * - * @author Julio Camarero - * @see ArtistImpl - * @see org.liferay.jukebox.model.Artist - * @generated - */ -public abstract class ArtistBaseImpl extends ArtistModelImpl implements Artist { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a artist model instance should use the {@link Artist} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - ArtistLocalServiceUtil.addArtist(this); - } - else { - ArtistLocalServiceUtil.updateArtist(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistCacheModel.java deleted file mode 100644 index e9e389a26a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistCacheModel.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -import org.liferay.jukebox.model.Artist; - -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 Artist in entity cache. - * - * @author Julio Camarero - * @see Artist - * @generated - */ -public class ArtistCacheModel implements CacheModel, Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(29); - - sb.append("{uuid="); - sb.append(uuid); - sb.append(", artistId="); - sb.append(artistId); - sb.append(", companyId="); - sb.append(companyId); - sb.append(", groupId="); - sb.append(groupId); - sb.append(", userId="); - sb.append(userId); - sb.append(", userName="); - sb.append(userName); - sb.append(", createDate="); - sb.append(createDate); - sb.append(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", status="); - sb.append(status); - sb.append(", statusByUserId="); - sb.append(statusByUserId); - sb.append(", statusByUserName="); - sb.append(statusByUserName); - sb.append(", statusDate="); - sb.append(statusDate); - sb.append(", name="); - sb.append(name); - sb.append(", bio="); - sb.append(bio); - sb.append("}"); - - return sb.toString(); - } - - @Override - public Artist toEntityModel() { - ArtistImpl artistImpl = new ArtistImpl(); - - if (uuid == null) { - artistImpl.setUuid(StringPool.BLANK); - } - else { - artistImpl.setUuid(uuid); - } - - artistImpl.setArtistId(artistId); - artistImpl.setCompanyId(companyId); - artistImpl.setGroupId(groupId); - artistImpl.setUserId(userId); - - if (userName == null) { - artistImpl.setUserName(StringPool.BLANK); - } - else { - artistImpl.setUserName(userName); - } - - if (createDate == Long.MIN_VALUE) { - artistImpl.setCreateDate(null); - } - else { - artistImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - artistImpl.setModifiedDate(null); - } - else { - artistImpl.setModifiedDate(new Date(modifiedDate)); - } - - artistImpl.setStatus(status); - artistImpl.setStatusByUserId(statusByUserId); - - if (statusByUserName == null) { - artistImpl.setStatusByUserName(StringPool.BLANK); - } - else { - artistImpl.setStatusByUserName(statusByUserName); - } - - if (statusDate == Long.MIN_VALUE) { - artistImpl.setStatusDate(null); - } - else { - artistImpl.setStatusDate(new Date(statusDate)); - } - - if (name == null) { - artistImpl.setName(StringPool.BLANK); - } - else { - artistImpl.setName(name); - } - - if (bio == null) { - artistImpl.setBio(StringPool.BLANK); - } - else { - artistImpl.setBio(bio); - } - - artistImpl.resetOriginalValues(); - - return artistImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - uuid = objectInput.readUTF(); - artistId = objectInput.readLong(); - companyId = objectInput.readLong(); - groupId = objectInput.readLong(); - userId = objectInput.readLong(); - userName = objectInput.readUTF(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - status = objectInput.readInt(); - statusByUserId = objectInput.readLong(); - statusByUserName = objectInput.readUTF(); - statusDate = objectInput.readLong(); - name = objectInput.readUTF(); - bio = objectInput.readUTF(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - if (uuid == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(uuid); - } - - objectOutput.writeLong(artistId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(groupId); - objectOutput.writeLong(userId); - - if (userName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(userName); - } - - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - objectOutput.writeInt(status); - objectOutput.writeLong(statusByUserId); - - if (statusByUserName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(statusByUserName); - } - - objectOutput.writeLong(statusDate); - - if (name == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(name); - } - - if (bio == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(bio); - } - } - - public String uuid; - public long artistId; - public long companyId; - public long groupId; - public long userId; - public String userName; - public long createDate; - public long modifiedDate; - public int status; - public long statusByUserId; - public String statusByUserName; - public long statusDate; - public String name; - public String bio; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistImpl.java deleted file mode 100644 index 8a8caa3025..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.Repository; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.util.DLUtil; - -import org.liferay.jukebox.util.Constants; - -/** - * The extended model implementation for the Artist service. Represents a row in the "jukebox_Artist" database table, with each column mapped to a property of this class. - * - *

- * 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 org.liferay.jukebox.model.Artist} interface. - *

- * - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - */ -public class ArtistImpl extends ArtistBaseImpl { - - public FileEntry getCustomImage() throws SystemException { - Repository repository = - PortletFileRepositoryUtil.fetchPortletRepository( - getGroupId(), Constants.JUKEBOX_PORTLET_REPOSITORY); - - if (repository == null) { - return null; - } - - try { - return PortletFileRepositoryUtil.getPortletFileEntry( - repository.getRepositoryId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(getArtistId())); - } - catch (Exception e) { - return null; - } - } - - public String getImageURL(ThemeDisplay themeDisplay) - throws PortalException, SystemException { - - FileEntry fileEntry = getCustomImage(); - - if (fileEntry != null) { - return DLUtil.getPreviewURL( - fileEntry, fileEntry.getLatestFileVersion(), themeDisplay, - StringPool.BLANK); - } - else { - return themeDisplay.getPortalURL() + - "/jukebox-portlet/images/singer2.jpeg"; - } - } - - public boolean hasCustomImage() throws PortalException, SystemException { - FileEntry fileEntry = getCustomImage(); - - if (fileEntry != null) { - return true; - } - - return false; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistModelImpl.java deleted file mode 100644 index 266c339fd2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/ArtistModelImpl.java +++ /dev/null @@ -1,1101 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSON; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ContainerModel; -import com.liferay.portal.model.TrashedModel; -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 com.liferay.portlet.trash.model.TrashEntry; -import com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.model.ArtistModel; -import org.liferay.jukebox.model.ArtistSoap; - -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 Artist service. Represents a row in the "jukebox_Artist" database table, with each column mapped to a property of this class. - * - *

- * This implementation and its corresponding interface {@link org.liferay.jukebox.model.ArtistModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ArtistImpl}. - *

- * - * @author Julio Camarero - * @see ArtistImpl - * @see org.liferay.jukebox.model.Artist - * @see org.liferay.jukebox.model.ArtistModel - * @generated - */ -@JSON(strict = true) -public class ArtistModelImpl extends BaseModelImpl - implements ArtistModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a artist model instance should use the {@link org.liferay.jukebox.model.Artist} interface instead. - */ - public static final String TABLE_NAME = "jukebox_Artist"; - public static final Object[][] TABLE_COLUMNS = { - { "uuid_", Types.VARCHAR }, - { "artistId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "groupId", Types.BIGINT }, - { "userId", Types.BIGINT }, - { "userName", Types.VARCHAR }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "status", Types.INTEGER }, - { "statusByUserId", Types.BIGINT }, - { "statusByUserName", Types.VARCHAR }, - { "statusDate", Types.TIMESTAMP }, - { "name", Types.VARCHAR }, - { "bio", Types.VARCHAR } - }; - public static final String TABLE_SQL_CREATE = "create table jukebox_Artist (uuid_ VARCHAR(75) null,artistId LONG not null primary key,companyId LONG,groupId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null,name VARCHAR(75) null,bio STRING null)"; - public static final String TABLE_SQL_DROP = "drop table jukebox_Artist"; - public static final String ORDER_BY_JPQL = " ORDER BY artist.artistId ASC"; - public static final String ORDER_BY_SQL = " ORDER BY jukebox_Artist.artistId 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.org.liferay.jukebox.model.Artist"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.org.liferay.jukebox.model.Artist"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.org.liferay.jukebox.model.Artist"), - true); - public static long COMPANYID_COLUMN_BITMASK = 1L; - public static long GROUPID_COLUMN_BITMASK = 2L; - public static long NAME_COLUMN_BITMASK = 4L; - public static long STATUS_COLUMN_BITMASK = 8L; - public static long USERID_COLUMN_BITMASK = 16L; - public static long UUID_COLUMN_BITMASK = 32L; - public static long ARTISTID_COLUMN_BITMASK = 64L; - - /** - * 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 Artist toModel(ArtistSoap soapModel) { - if (soapModel == null) { - return null; - } - - Artist model = new ArtistImpl(); - - model.setUuid(soapModel.getUuid()); - model.setArtistId(soapModel.getArtistId()); - model.setCompanyId(soapModel.getCompanyId()); - model.setGroupId(soapModel.getGroupId()); - model.setUserId(soapModel.getUserId()); - model.setUserName(soapModel.getUserName()); - model.setCreateDate(soapModel.getCreateDate()); - model.setModifiedDate(soapModel.getModifiedDate()); - model.setStatus(soapModel.getStatus()); - model.setStatusByUserId(soapModel.getStatusByUserId()); - model.setStatusByUserName(soapModel.getStatusByUserName()); - model.setStatusDate(soapModel.getStatusDate()); - model.setName(soapModel.getName()); - model.setBio(soapModel.getBio()); - - 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 toModels(ArtistSoap[] soapModels) { - if (soapModels == null) { - return null; - } - - List models = new ArrayList(soapModels.length); - - for (ArtistSoap 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.org.liferay.jukebox.model.Artist")); - - public ArtistModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _artistId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setArtistId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _artistId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return Artist.class; - } - - @Override - public String getModelClassName() { - return Artist.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("artistId", getArtistId()); - attributes.put("companyId", getCompanyId()); - attributes.put("groupId", getGroupId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - attributes.put("name", getName()); - attributes.put("bio", getBio()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long artistId = (Long)attributes.get("artistId"); - - if (artistId != null) { - setArtistId(artistId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Long groupId = (Long)attributes.get("groupId"); - - if (groupId != null) { - setGroupId(groupId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - String bio = (String)attributes.get("bio"); - - if (bio != null) { - setBio(bio); - } - } - - @JSON - @Override - public String getUuid() { - if (_uuid == null) { - return StringPool.BLANK; - } - else { - return _uuid; - } - } - - @Override - public void setUuid(String uuid) { - if (_originalUuid == null) { - _originalUuid = _uuid; - } - - _uuid = uuid; - } - - public String getOriginalUuid() { - return GetterUtil.getString(_originalUuid); - } - - @JSON - @Override - public long getArtistId() { - return _artistId; - } - - @Override - public void setArtistId(long artistId) { - _artistId = artistId; - } - - @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 getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _columnBitmask |= GROUPID_COLUMN_BITMASK; - - if (!_setOriginalGroupId) { - _setOriginalGroupId = true; - - _originalGroupId = _groupId; - } - - _groupId = groupId; - } - - public long getOriginalGroupId() { - return _originalGroupId; - } - - @JSON - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _columnBitmask |= USERID_COLUMN_BITMASK; - - if (!_setOriginalUserId) { - _setOriginalUserId = true; - - _originalUserId = _userId; - } - - _userId = userId; - } - - @Override - public String getUserUuid() throws SystemException { - return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid); - } - - @Override - public void setUserUuid(String userUuid) { - _userUuid = userUuid; - } - - public long getOriginalUserId() { - return _originalUserId; - } - - @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 Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - @JSON - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _columnBitmask |= STATUS_COLUMN_BITMASK; - - if (!_setOriginalStatus) { - _setOriginalStatus = true; - - _originalStatus = _status; - } - - _status = status; - } - - public int getOriginalStatus() { - return _originalStatus; - } - - @JSON - @Override - public long getStatusByUserId() { - return _statusByUserId; - } - - @Override - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - } - - @Override - public String getStatusByUserUuid() throws SystemException { - return PortalUtil.getUserValue(getStatusByUserId(), "uuid", - _statusByUserUuid); - } - - @Override - public void setStatusByUserUuid(String statusByUserUuid) { - _statusByUserUuid = statusByUserUuid; - } - - @JSON - @Override - public String getStatusByUserName() { - if (_statusByUserName == null) { - return StringPool.BLANK; - } - else { - return _statusByUserName; - } - } - - @Override - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - } - - @JSON - @Override - public Date getStatusDate() { - return _statusDate; - } - - @Override - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - } - - @JSON - @Override - public String getName() { - if (_name == null) { - return StringPool.BLANK; - } - else { - return _name; - } - } - - @Override - public void setName(String name) { - _columnBitmask |= NAME_COLUMN_BITMASK; - - if (_originalName == null) { - _originalName = _name; - } - - _name = name; - } - - public String getOriginalName() { - return GetterUtil.getString(_originalName); - } - - @JSON - @Override - public String getBio() { - if (_bio == null) { - return StringPool.BLANK; - } - else { - return _bio; - } - } - - @Override - public void setBio(String bio) { - _bio = bio; - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Artist.class.getName())); - } - - @Override - public TrashEntry getTrashEntry() throws PortalException, SystemException { - if (!isInTrash()) { - return null; - } - - TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(), - getTrashEntryClassPK()); - - if (trashEntry != null) { - return trashEntry; - } - - TrashHandler trashHandler = getTrashHandler(); - - if (!Validator.isNull(trashHandler.getContainerModelClassName())) { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - while (containerModel != null) { - if (containerModel instanceof TrashedModel) { - TrashedModel trashedModel = (TrashedModel)containerModel; - - return trashedModel.getTrashEntry(); - } - - trashHandler = TrashHandlerRegistryUtil.getTrashHandler(trashHandler.getContainerModelClassName()); - - if (trashHandler == null) { - return null; - } - - containerModel = trashHandler.getContainerModel(containerModel.getParentContainerModelId()); - } - } - - return null; - } - - @Override - public long getTrashEntryClassPK() { - return getPrimaryKey(); - } - - @Override - public TrashHandler getTrashHandler() { - return TrashHandlerRegistryUtil.getTrashHandler(getModelClassName()); - } - - @Override - public boolean isInTrash() { - if (getStatus() == WorkflowConstants.STATUS_IN_TRASH) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInTrashContainer() { - TrashHandler trashHandler = getTrashHandler(); - - if ((trashHandler == null) || - Validator.isNull(trashHandler.getContainerModelClassName())) { - return false; - } - - try { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - if (containerModel == null) { - return false; - } - - if (containerModel instanceof TrashedModel) { - return ((TrashedModel)containerModel).isInTrash(); - } - } - catch (Exception e) { - } - - return false; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved} - */ - @Override - public boolean getApproved() { - return isApproved(); - } - - @Override - public boolean isApproved() { - if (getStatus() == WorkflowConstants.STATUS_APPROVED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDenied() { - if (getStatus() == WorkflowConstants.STATUS_DENIED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDraft() { - if (getStatus() == WorkflowConstants.STATUS_DRAFT) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isExpired() { - if (getStatus() == WorkflowConstants.STATUS_EXPIRED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInactive() { - if (getStatus() == WorkflowConstants.STATUS_INACTIVE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isIncomplete() { - if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isPending() { - if (getStatus() == WorkflowConstants.STATUS_PENDING) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isScheduled() { - if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) { - return true; - } - else { - return false; - } - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - Artist.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public Artist toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (Artist)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - ArtistImpl artistImpl = new ArtistImpl(); - - artistImpl.setUuid(getUuid()); - artistImpl.setArtistId(getArtistId()); - artistImpl.setCompanyId(getCompanyId()); - artistImpl.setGroupId(getGroupId()); - artistImpl.setUserId(getUserId()); - artistImpl.setUserName(getUserName()); - artistImpl.setCreateDate(getCreateDate()); - artistImpl.setModifiedDate(getModifiedDate()); - artistImpl.setStatus(getStatus()); - artistImpl.setStatusByUserId(getStatusByUserId()); - artistImpl.setStatusByUserName(getStatusByUserName()); - artistImpl.setStatusDate(getStatusDate()); - artistImpl.setName(getName()); - artistImpl.setBio(getBio()); - - artistImpl.resetOriginalValues(); - - return artistImpl; - } - - @Override - public int compareTo(Artist artist) { - long primaryKey = artist.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof Artist)) { - return false; - } - - Artist artist = (Artist)obj; - - long primaryKey = artist.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - ArtistModelImpl artistModelImpl = this; - - artistModelImpl._originalUuid = artistModelImpl._uuid; - - artistModelImpl._originalCompanyId = artistModelImpl._companyId; - - artistModelImpl._setOriginalCompanyId = false; - - artistModelImpl._originalGroupId = artistModelImpl._groupId; - - artistModelImpl._setOriginalGroupId = false; - - artistModelImpl._originalUserId = artistModelImpl._userId; - - artistModelImpl._setOriginalUserId = false; - - artistModelImpl._originalStatus = artistModelImpl._status; - - artistModelImpl._setOriginalStatus = false; - - artistModelImpl._originalName = artistModelImpl._name; - - artistModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - ArtistCacheModel artistCacheModel = new ArtistCacheModel(); - - artistCacheModel.uuid = getUuid(); - - String uuid = artistCacheModel.uuid; - - if ((uuid != null) && (uuid.length() == 0)) { - artistCacheModel.uuid = null; - } - - artistCacheModel.artistId = getArtistId(); - - artistCacheModel.companyId = getCompanyId(); - - artistCacheModel.groupId = getGroupId(); - - artistCacheModel.userId = getUserId(); - - artistCacheModel.userName = getUserName(); - - String userName = artistCacheModel.userName; - - if ((userName != null) && (userName.length() == 0)) { - artistCacheModel.userName = null; - } - - Date createDate = getCreateDate(); - - if (createDate != null) { - artistCacheModel.createDate = createDate.getTime(); - } - else { - artistCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - artistCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - artistCacheModel.modifiedDate = Long.MIN_VALUE; - } - - artistCacheModel.status = getStatus(); - - artistCacheModel.statusByUserId = getStatusByUserId(); - - artistCacheModel.statusByUserName = getStatusByUserName(); - - String statusByUserName = artistCacheModel.statusByUserName; - - if ((statusByUserName != null) && (statusByUserName.length() == 0)) { - artistCacheModel.statusByUserName = null; - } - - Date statusDate = getStatusDate(); - - if (statusDate != null) { - artistCacheModel.statusDate = statusDate.getTime(); - } - else { - artistCacheModel.statusDate = Long.MIN_VALUE; - } - - artistCacheModel.name = getName(); - - String name = artistCacheModel.name; - - if ((name != null) && (name.length() == 0)) { - artistCacheModel.name = null; - } - - artistCacheModel.bio = getBio(); - - String bio = artistCacheModel.bio; - - if ((bio != null) && (bio.length() == 0)) { - artistCacheModel.bio = null; - } - - return artistCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(29); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", artistId="); - sb.append(getArtistId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", groupId="); - sb.append(getGroupId()); - sb.append(", userId="); - sb.append(getUserId()); - sb.append(", userName="); - sb.append(getUserName()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", status="); - sb.append(getStatus()); - sb.append(", statusByUserId="); - sb.append(getStatusByUserId()); - sb.append(", statusByUserName="); - sb.append(getStatusByUserName()); - sb.append(", statusDate="); - sb.append(getStatusDate()); - sb.append(", name="); - sb.append(getName()); - sb.append(", bio="); - sb.append(getBio()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(46); - - sb.append(""); - sb.append("org.liferay.jukebox.model.Artist"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "artistId"); - sb.append( - "companyId"); - sb.append( - "groupId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "status"); - sb.append( - "statusByUserId"); - sb.append( - "statusByUserName"); - sb.append( - "statusDate"); - sb.append( - "name"); - sb.append( - "bio"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = Artist.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { Artist.class }; - private String _uuid; - private String _originalUuid; - private long _artistId; - private long _companyId; - private long _originalCompanyId; - private boolean _setOriginalCompanyId; - private long _groupId; - private long _originalGroupId; - private boolean _setOriginalGroupId; - private long _userId; - private String _userUuid; - private long _originalUserId; - private boolean _setOriginalUserId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private int _status; - private int _originalStatus; - private boolean _setOriginalStatus; - private long _statusByUserId; - private String _statusByUserUuid; - private String _statusByUserName; - private Date _statusDate; - private String _name; - private String _originalName; - private String _bio; - private long _columnBitmask; - private Artist _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongBaseImpl.java deleted file mode 100644 index 028e6dabc5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongBaseImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.exception.SystemException; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.SongLocalServiceUtil; - -/** - * The extended model base implementation for the Song service. Represents a row in the "jukebox_Song" database table, with each column mapped to a property of this class. - * - *

- * 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 SongImpl}. - *

- * - * @author Julio Camarero - * @see SongImpl - * @see org.liferay.jukebox.model.Song - * @generated - */ -public abstract class SongBaseImpl extends SongModelImpl implements Song { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a song model instance should use the {@link Song} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - SongLocalServiceUtil.addSong(this); - } - else { - SongLocalServiceUtil.updateSong(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongCacheModel.java deleted file mode 100644 index 812f959bb5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongCacheModel.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -import org.liferay.jukebox.model.Song; - -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 Song in entity cache. - * - * @author Julio Camarero - * @see Song - * @generated - */ -public class SongCacheModel implements CacheModel, Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(31); - - sb.append("{uuid="); - sb.append(uuid); - sb.append(", songId="); - sb.append(songId); - sb.append(", companyId="); - sb.append(companyId); - sb.append(", groupId="); - sb.append(groupId); - sb.append(", userId="); - sb.append(userId); - sb.append(", userName="); - sb.append(userName); - sb.append(", createDate="); - sb.append(createDate); - sb.append(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", artistId="); - sb.append(artistId); - sb.append(", albumId="); - sb.append(albumId); - sb.append(", name="); - sb.append(name); - sb.append(", status="); - sb.append(status); - sb.append(", statusByUserId="); - sb.append(statusByUserId); - sb.append(", statusByUserName="); - sb.append(statusByUserName); - sb.append(", statusDate="); - sb.append(statusDate); - sb.append("}"); - - return sb.toString(); - } - - @Override - public Song toEntityModel() { - SongImpl songImpl = new SongImpl(); - - if (uuid == null) { - songImpl.setUuid(StringPool.BLANK); - } - else { - songImpl.setUuid(uuid); - } - - songImpl.setSongId(songId); - songImpl.setCompanyId(companyId); - songImpl.setGroupId(groupId); - songImpl.setUserId(userId); - - if (userName == null) { - songImpl.setUserName(StringPool.BLANK); - } - else { - songImpl.setUserName(userName); - } - - if (createDate == Long.MIN_VALUE) { - songImpl.setCreateDate(null); - } - else { - songImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - songImpl.setModifiedDate(null); - } - else { - songImpl.setModifiedDate(new Date(modifiedDate)); - } - - songImpl.setArtistId(artistId); - songImpl.setAlbumId(albumId); - - if (name == null) { - songImpl.setName(StringPool.BLANK); - } - else { - songImpl.setName(name); - } - - songImpl.setStatus(status); - songImpl.setStatusByUserId(statusByUserId); - - if (statusByUserName == null) { - songImpl.setStatusByUserName(StringPool.BLANK); - } - else { - songImpl.setStatusByUserName(statusByUserName); - } - - if (statusDate == Long.MIN_VALUE) { - songImpl.setStatusDate(null); - } - else { - songImpl.setStatusDate(new Date(statusDate)); - } - - songImpl.resetOriginalValues(); - - return songImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - uuid = objectInput.readUTF(); - songId = objectInput.readLong(); - companyId = objectInput.readLong(); - groupId = objectInput.readLong(); - userId = objectInput.readLong(); - userName = objectInput.readUTF(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - artistId = objectInput.readLong(); - albumId = objectInput.readLong(); - name = objectInput.readUTF(); - status = objectInput.readInt(); - statusByUserId = objectInput.readLong(); - statusByUserName = objectInput.readUTF(); - statusDate = objectInput.readLong(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - if (uuid == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(uuid); - } - - objectOutput.writeLong(songId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(groupId); - objectOutput.writeLong(userId); - - if (userName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(userName); - } - - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - objectOutput.writeLong(artistId); - objectOutput.writeLong(albumId); - - if (name == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(name); - } - - objectOutput.writeInt(status); - objectOutput.writeLong(statusByUserId); - - if (statusByUserName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(statusByUserName); - } - - objectOutput.writeLong(statusDate); - } - - public String uuid; - public long songId; - public long companyId; - public long groupId; - public long userId; - public String userName; - public long createDate; - public long modifiedDate; - public long artistId; - public long albumId; - public String name; - public int status; - public long statusByUserId; - public String statusByUserName; - public long statusDate; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongImpl.java deleted file mode 100644 index 6f9021d234..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.repository.model.Folder; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.Repository; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.util.AudioProcessorUtil; -import com.liferay.portlet.documentlibrary.util.DLUtil; - -import java.util.List; - -import org.liferay.jukebox.util.Constants; - -/** - * The extended model implementation for the Song service. Represents a row in the "jukebox_Song" database table, with each column mapped to a property of this class. - * - *

- * 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 org.liferay.jukebox.model.Song} interface. - *

- * - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - */ -public class SongImpl extends SongBaseImpl { - - public String getImageURL(ThemeDisplay themeDisplay) - throws SystemException { - - return themeDisplay.getPortalURL() + - "/jukebox-portlet/images/song.png"; - } - - public String getLyricsURL(ThemeDisplay themeDisplay) - throws PortalException, SystemException { - - FileEntry fileEntry = getFileEntry( - themeDisplay, Constants.LYRICS_FOLDER_NAME); - - if (fileEntry == null) { - return StringPool.BLANK; - } - - return DLUtil.getPreviewURL( - fileEntry, fileEntry.getLatestFileVersion(), themeDisplay, - StringPool.BLANK); - } - - public String getSongURL(ThemeDisplay themeDisplay, String audioContainer) - throws PortalException, SystemException { - - FileEntry fileEntry = getFileEntry( - themeDisplay, Constants.SONGS_FOLDER_NAME); - - if (fileEntry == null) { - return StringPool.BLANK; - } - - if (!AudioProcessorUtil.hasAudio(fileEntry.getLatestFileVersion())) { - return StringPool.BLANK; - } - - if (Validator.isNull(audioContainer)) { - audioContainer = "mp3"; - } - - String queryString = "&audioPreview=1&type=" + audioContainer; - - return DLUtil.getPreviewURL( - fileEntry, fileEntry.getLatestFileVersion(), themeDisplay, - queryString); - } - - protected FileEntry getFileEntry( - ThemeDisplay themeDisplay, String folderName) - throws SystemException { - - Repository repository = - PortletFileRepositoryUtil.fetchPortletRepository( - getGroupId(), Constants.JUKEBOX_PORTLET_REPOSITORY); - - if (repository == null) { - return null; - } - - try { - Folder folder = PortletFileRepositoryUtil.getPortletFolder( - 0, repository.getRepositoryId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(getSongId()), null); - - Folder songFolder = PortletFileRepositoryUtil.getPortletFolder( - 0, repository.getRepositoryId(), folder.getFolderId(), - folderName, null); - - List fileEntries = - PortletFileRepositoryUtil.getPortletFileEntries( - themeDisplay.getScopeGroupId(), songFolder.getFolderId()); - - if (fileEntries.isEmpty()) { - return null; - } - - return fileEntries.get(0); - } - catch (Exception e) { - return null; - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongModelImpl.java deleted file mode 100644 index 6e7f662013..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/model/impl/SongModelImpl.java +++ /dev/null @@ -1,1157 +0,0 @@ -/** - * 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 org.liferay.jukebox.model.impl; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSON; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ContainerModel; -import com.liferay.portal.model.TrashedModel; -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 com.liferay.portlet.trash.model.TrashEntry; -import com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.model.SongModel; -import org.liferay.jukebox.model.SongSoap; - -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 Song service. Represents a row in the "jukebox_Song" database table, with each column mapped to a property of this class. - * - *

- * This implementation and its corresponding interface {@link org.liferay.jukebox.model.SongModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link SongImpl}. - *

- * - * @author Julio Camarero - * @see SongImpl - * @see org.liferay.jukebox.model.Song - * @see org.liferay.jukebox.model.SongModel - * @generated - */ -@JSON(strict = true) -public class SongModelImpl extends BaseModelImpl implements SongModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a song model instance should use the {@link org.liferay.jukebox.model.Song} interface instead. - */ - public static final String TABLE_NAME = "jukebox_Song"; - public static final Object[][] TABLE_COLUMNS = { - { "uuid_", Types.VARCHAR }, - { "songId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "groupId", Types.BIGINT }, - { "userId", Types.BIGINT }, - { "userName", Types.VARCHAR }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "artistId", Types.BIGINT }, - { "albumId", Types.BIGINT }, - { "name", Types.VARCHAR }, - { "status", Types.INTEGER }, - { "statusByUserId", Types.BIGINT }, - { "statusByUserName", Types.VARCHAR }, - { "statusDate", Types.TIMESTAMP } - }; - public static final String TABLE_SQL_CREATE = "create table jukebox_Song (uuid_ VARCHAR(75) null,songId LONG not null primary key,companyId LONG,groupId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,artistId LONG,albumId LONG,name VARCHAR(75) null,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null)"; - public static final String TABLE_SQL_DROP = "drop table jukebox_Song"; - public static final String ORDER_BY_JPQL = " ORDER BY song.songId ASC"; - public static final String ORDER_BY_SQL = " ORDER BY jukebox_Song.songId 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.org.liferay.jukebox.model.Song"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.org.liferay.jukebox.model.Song"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.org.liferay.jukebox.model.Song"), - true); - public static long ALBUMID_COLUMN_BITMASK = 1L; - public static long ARTISTID_COLUMN_BITMASK = 2L; - public static long COMPANYID_COLUMN_BITMASK = 4L; - public static long GROUPID_COLUMN_BITMASK = 8L; - public static long NAME_COLUMN_BITMASK = 16L; - public static long STATUS_COLUMN_BITMASK = 32L; - public static long USERID_COLUMN_BITMASK = 64L; - public static long UUID_COLUMN_BITMASK = 128L; - public static long SONGID_COLUMN_BITMASK = 256L; - - /** - * 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 Song toModel(SongSoap soapModel) { - if (soapModel == null) { - return null; - } - - Song model = new SongImpl(); - - model.setUuid(soapModel.getUuid()); - model.setSongId(soapModel.getSongId()); - model.setCompanyId(soapModel.getCompanyId()); - model.setGroupId(soapModel.getGroupId()); - model.setUserId(soapModel.getUserId()); - model.setUserName(soapModel.getUserName()); - model.setCreateDate(soapModel.getCreateDate()); - model.setModifiedDate(soapModel.getModifiedDate()); - model.setArtistId(soapModel.getArtistId()); - model.setAlbumId(soapModel.getAlbumId()); - model.setName(soapModel.getName()); - model.setStatus(soapModel.getStatus()); - model.setStatusByUserId(soapModel.getStatusByUserId()); - model.setStatusByUserName(soapModel.getStatusByUserName()); - model.setStatusDate(soapModel.getStatusDate()); - - 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 toModels(SongSoap[] soapModels) { - if (soapModels == null) { - return null; - } - - List models = new ArrayList(soapModels.length); - - for (SongSoap 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.org.liferay.jukebox.model.Song")); - - public SongModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _songId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setSongId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _songId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return Song.class; - } - - @Override - public String getModelClassName() { - return Song.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("songId", getSongId()); - attributes.put("companyId", getCompanyId()); - attributes.put("groupId", getGroupId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("artistId", getArtistId()); - attributes.put("albumId", getAlbumId()); - attributes.put("name", getName()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long songId = (Long)attributes.get("songId"); - - if (songId != null) { - setSongId(songId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Long groupId = (Long)attributes.get("groupId"); - - if (groupId != null) { - setGroupId(groupId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long artistId = (Long)attributes.get("artistId"); - - if (artistId != null) { - setArtistId(artistId); - } - - Long albumId = (Long)attributes.get("albumId"); - - if (albumId != null) { - setAlbumId(albumId); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - } - - @JSON - @Override - public String getUuid() { - if (_uuid == null) { - return StringPool.BLANK; - } - else { - return _uuid; - } - } - - @Override - public void setUuid(String uuid) { - if (_originalUuid == null) { - _originalUuid = _uuid; - } - - _uuid = uuid; - } - - public String getOriginalUuid() { - return GetterUtil.getString(_originalUuid); - } - - @JSON - @Override - public long getSongId() { - return _songId; - } - - @Override - public void setSongId(long songId) { - _songId = songId; - } - - @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 getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _columnBitmask |= GROUPID_COLUMN_BITMASK; - - if (!_setOriginalGroupId) { - _setOriginalGroupId = true; - - _originalGroupId = _groupId; - } - - _groupId = groupId; - } - - public long getOriginalGroupId() { - return _originalGroupId; - } - - @JSON - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _columnBitmask |= USERID_COLUMN_BITMASK; - - if (!_setOriginalUserId) { - _setOriginalUserId = true; - - _originalUserId = _userId; - } - - _userId = userId; - } - - @Override - public String getUserUuid() throws SystemException { - return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid); - } - - @Override - public void setUserUuid(String userUuid) { - _userUuid = userUuid; - } - - public long getOriginalUserId() { - return _originalUserId; - } - - @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 Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - @JSON - @Override - public long getArtistId() { - return _artistId; - } - - @Override - public void setArtistId(long artistId) { - _columnBitmask |= ARTISTID_COLUMN_BITMASK; - - if (!_setOriginalArtistId) { - _setOriginalArtistId = true; - - _originalArtistId = _artistId; - } - - _artistId = artistId; - } - - public long getOriginalArtistId() { - return _originalArtistId; - } - - @JSON - @Override - public long getAlbumId() { - return _albumId; - } - - @Override - public void setAlbumId(long albumId) { - _columnBitmask |= ALBUMID_COLUMN_BITMASK; - - if (!_setOriginalAlbumId) { - _setOriginalAlbumId = true; - - _originalAlbumId = _albumId; - } - - _albumId = albumId; - } - - public long getOriginalAlbumId() { - return _originalAlbumId; - } - - @JSON - @Override - public String getName() { - if (_name == null) { - return StringPool.BLANK; - } - else { - return _name; - } - } - - @Override - public void setName(String name) { - _columnBitmask |= NAME_COLUMN_BITMASK; - - if (_originalName == null) { - _originalName = _name; - } - - _name = name; - } - - public String getOriginalName() { - return GetterUtil.getString(_originalName); - } - - @JSON - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _columnBitmask |= STATUS_COLUMN_BITMASK; - - if (!_setOriginalStatus) { - _setOriginalStatus = true; - - _originalStatus = _status; - } - - _status = status; - } - - public int getOriginalStatus() { - return _originalStatus; - } - - @JSON - @Override - public long getStatusByUserId() { - return _statusByUserId; - } - - @Override - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - } - - @Override - public String getStatusByUserUuid() throws SystemException { - return PortalUtil.getUserValue(getStatusByUserId(), "uuid", - _statusByUserUuid); - } - - @Override - public void setStatusByUserUuid(String statusByUserUuid) { - _statusByUserUuid = statusByUserUuid; - } - - @JSON - @Override - public String getStatusByUserName() { - if (_statusByUserName == null) { - return StringPool.BLANK; - } - else { - return _statusByUserName; - } - } - - @Override - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - } - - @JSON - @Override - public Date getStatusDate() { - return _statusDate; - } - - @Override - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Song.class.getName())); - } - - @Override - public TrashEntry getTrashEntry() throws PortalException, SystemException { - if (!isInTrash()) { - return null; - } - - TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(), - getTrashEntryClassPK()); - - if (trashEntry != null) { - return trashEntry; - } - - TrashHandler trashHandler = getTrashHandler(); - - if (!Validator.isNull(trashHandler.getContainerModelClassName())) { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - while (containerModel != null) { - if (containerModel instanceof TrashedModel) { - TrashedModel trashedModel = (TrashedModel)containerModel; - - return trashedModel.getTrashEntry(); - } - - trashHandler = TrashHandlerRegistryUtil.getTrashHandler(trashHandler.getContainerModelClassName()); - - if (trashHandler == null) { - return null; - } - - containerModel = trashHandler.getContainerModel(containerModel.getParentContainerModelId()); - } - } - - return null; - } - - @Override - public long getTrashEntryClassPK() { - return getPrimaryKey(); - } - - @Override - public TrashHandler getTrashHandler() { - return TrashHandlerRegistryUtil.getTrashHandler(getModelClassName()); - } - - @Override - public boolean isInTrash() { - if (getStatus() == WorkflowConstants.STATUS_IN_TRASH) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInTrashContainer() { - TrashHandler trashHandler = getTrashHandler(); - - if ((trashHandler == null) || - Validator.isNull(trashHandler.getContainerModelClassName())) { - return false; - } - - try { - ContainerModel containerModel = trashHandler.getParentContainerModel(this); - - if (containerModel == null) { - return false; - } - - if (containerModel instanceof TrashedModel) { - return ((TrashedModel)containerModel).isInTrash(); - } - } - catch (Exception e) { - } - - return false; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved} - */ - @Override - public boolean getApproved() { - return isApproved(); - } - - @Override - public boolean isApproved() { - if (getStatus() == WorkflowConstants.STATUS_APPROVED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDenied() { - if (getStatus() == WorkflowConstants.STATUS_DENIED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDraft() { - if (getStatus() == WorkflowConstants.STATUS_DRAFT) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isExpired() { - if (getStatus() == WorkflowConstants.STATUS_EXPIRED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInactive() { - if (getStatus() == WorkflowConstants.STATUS_INACTIVE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isIncomplete() { - if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isPending() { - if (getStatus() == WorkflowConstants.STATUS_PENDING) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isScheduled() { - if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) { - return true; - } - else { - return false; - } - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - Song.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public Song toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (Song)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - SongImpl songImpl = new SongImpl(); - - songImpl.setUuid(getUuid()); - songImpl.setSongId(getSongId()); - songImpl.setCompanyId(getCompanyId()); - songImpl.setGroupId(getGroupId()); - songImpl.setUserId(getUserId()); - songImpl.setUserName(getUserName()); - songImpl.setCreateDate(getCreateDate()); - songImpl.setModifiedDate(getModifiedDate()); - songImpl.setArtistId(getArtistId()); - songImpl.setAlbumId(getAlbumId()); - songImpl.setName(getName()); - songImpl.setStatus(getStatus()); - songImpl.setStatusByUserId(getStatusByUserId()); - songImpl.setStatusByUserName(getStatusByUserName()); - songImpl.setStatusDate(getStatusDate()); - - songImpl.resetOriginalValues(); - - return songImpl; - } - - @Override - public int compareTo(Song song) { - long primaryKey = song.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof Song)) { - return false; - } - - Song song = (Song)obj; - - long primaryKey = song.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - SongModelImpl songModelImpl = this; - - songModelImpl._originalUuid = songModelImpl._uuid; - - songModelImpl._originalCompanyId = songModelImpl._companyId; - - songModelImpl._setOriginalCompanyId = false; - - songModelImpl._originalGroupId = songModelImpl._groupId; - - songModelImpl._setOriginalGroupId = false; - - songModelImpl._originalUserId = songModelImpl._userId; - - songModelImpl._setOriginalUserId = false; - - songModelImpl._originalArtistId = songModelImpl._artistId; - - songModelImpl._setOriginalArtistId = false; - - songModelImpl._originalAlbumId = songModelImpl._albumId; - - songModelImpl._setOriginalAlbumId = false; - - songModelImpl._originalName = songModelImpl._name; - - songModelImpl._originalStatus = songModelImpl._status; - - songModelImpl._setOriginalStatus = false; - - songModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - SongCacheModel songCacheModel = new SongCacheModel(); - - songCacheModel.uuid = getUuid(); - - String uuid = songCacheModel.uuid; - - if ((uuid != null) && (uuid.length() == 0)) { - songCacheModel.uuid = null; - } - - songCacheModel.songId = getSongId(); - - songCacheModel.companyId = getCompanyId(); - - songCacheModel.groupId = getGroupId(); - - songCacheModel.userId = getUserId(); - - songCacheModel.userName = getUserName(); - - String userName = songCacheModel.userName; - - if ((userName != null) && (userName.length() == 0)) { - songCacheModel.userName = null; - } - - Date createDate = getCreateDate(); - - if (createDate != null) { - songCacheModel.createDate = createDate.getTime(); - } - else { - songCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - songCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - songCacheModel.modifiedDate = Long.MIN_VALUE; - } - - songCacheModel.artistId = getArtistId(); - - songCacheModel.albumId = getAlbumId(); - - songCacheModel.name = getName(); - - String name = songCacheModel.name; - - if ((name != null) && (name.length() == 0)) { - songCacheModel.name = null; - } - - songCacheModel.status = getStatus(); - - songCacheModel.statusByUserId = getStatusByUserId(); - - songCacheModel.statusByUserName = getStatusByUserName(); - - String statusByUserName = songCacheModel.statusByUserName; - - if ((statusByUserName != null) && (statusByUserName.length() == 0)) { - songCacheModel.statusByUserName = null; - } - - Date statusDate = getStatusDate(); - - if (statusDate != null) { - songCacheModel.statusDate = statusDate.getTime(); - } - else { - songCacheModel.statusDate = Long.MIN_VALUE; - } - - return songCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(31); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", songId="); - sb.append(getSongId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", groupId="); - sb.append(getGroupId()); - sb.append(", userId="); - sb.append(getUserId()); - sb.append(", userName="); - sb.append(getUserName()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", artistId="); - sb.append(getArtistId()); - sb.append(", albumId="); - sb.append(getAlbumId()); - sb.append(", name="); - sb.append(getName()); - sb.append(", status="); - sb.append(getStatus()); - sb.append(", statusByUserId="); - sb.append(getStatusByUserId()); - sb.append(", statusByUserName="); - sb.append(getStatusByUserName()); - sb.append(", statusDate="); - sb.append(getStatusDate()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(49); - - sb.append(""); - sb.append("org.liferay.jukebox.model.Song"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "songId"); - sb.append( - "companyId"); - sb.append( - "groupId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "artistId"); - sb.append( - "albumId"); - sb.append( - "name"); - sb.append( - "status"); - sb.append( - "statusByUserId"); - sb.append( - "statusByUserName"); - sb.append( - "statusDate"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = Song.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { Song.class }; - private String _uuid; - private String _originalUuid; - private long _songId; - private long _companyId; - private long _originalCompanyId; - private boolean _setOriginalCompanyId; - private long _groupId; - private long _originalGroupId; - private boolean _setOriginalGroupId; - private long _userId; - private String _userUuid; - private long _originalUserId; - private boolean _setOriginalUserId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _artistId; - private long _originalArtistId; - private boolean _setOriginalArtistId; - private long _albumId; - private long _originalAlbumId; - private boolean _setOriginalAlbumId; - private String _name; - private String _originalName; - private int _status; - private int _originalStatus; - private boolean _setOriginalStatus; - private long _statusByUserId; - private String _statusByUserUuid; - private String _statusByUserName; - private Date _statusDate; - private long _columnBitmask; - private Song _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/AlbumsPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/AlbumsPortlet.java deleted file mode 100644 index 521f8b706a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/AlbumsPortlet.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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 org.liferay.jukebox.portlet; - -/** - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - */ -public class AlbumsPortlet extends JukeboxPortlet { - - public final static String PORTLET_ID = "albums_WAR_jukeboxportlet"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/ArtistsPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/ArtistsPortlet.java deleted file mode 100644 index fb18951995..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/ArtistsPortlet.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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 org.liferay.jukebox.portlet; - -/** - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - */ -public class ArtistsPortlet extends JukeboxPortlet { - - public final static String PORTLET_ID = "artists_WAR_jukeboxportlet"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/JukeboxPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/JukeboxPortlet.java deleted file mode 100644 index 39acfc2579..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/JukeboxPortlet.java +++ /dev/null @@ -1,467 +0,0 @@ -/** - * 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 org.liferay.jukebox.portlet; - -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.servlet.SessionMessages; -import com.liferay.portal.kernel.upload.UploadPortletRequest; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.trash.util.TrashUtil; -import com.liferay.util.bridges.mvc.MVCPortlet; - -import java.io.InputStream; - -import java.util.HashMap; -import java.util.Map; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; - -import org.liferay.jukebox.AlbumNameException; -import org.liferay.jukebox.ArtistNameException; -import org.liferay.jukebox.DuplicatedSongException; -import org.liferay.jukebox.SongNameException; -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.AlbumServiceUtil; -import org.liferay.jukebox.service.ArtistServiceUtil; -import org.liferay.jukebox.service.SongServiceUtil; - -/** - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - */ -public class JukeboxPortlet extends MVCPortlet { - - public void addAlbum(ActionRequest request, ActionResponse response) - throws Exception { - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(request); - - long artistId = ParamUtil.getLong(uploadPortletRequest, "artistId"); - String name = ParamUtil.getString(uploadPortletRequest, "name"); - int year = ParamUtil.getInteger(uploadPortletRequest, "year"); - - InputStream inputStream = uploadPortletRequest.getFileAsStream("file"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Album.class.getName(), uploadPortletRequest); - - try { - AlbumServiceUtil.addAlbum( - artistId, name, year, inputStream, serviceContext); - - SessionMessages.add(request, "albumAdded"); - - String redirect = ParamUtil.getString( - uploadPortletRequest, "redirect"); - - response.sendRedirect(redirect); - } - catch (Exception e) { - SessionErrors.add(request, e.getClass().getName()); - - if (e instanceof AlbumNameException || - e instanceof PrincipalException) { - - response.setRenderParameter( - "jspPage", "/html/albums/edit_album.jsp"); - } - else { - response.setRenderParameter("jspPage", "/html/error.jsp"); - } - } - } - - public void addArtist(ActionRequest request, ActionResponse response) - throws Exception { - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(request); - - String name = ParamUtil.getString(uploadPortletRequest, "name"); - - String bio = ParamUtil.getString(uploadPortletRequest, "bio"); - - InputStream inputStream = uploadPortletRequest.getFileAsStream( - "file"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Artist.class.getName(), uploadPortletRequest); - - try { - ArtistServiceUtil.addArtist( - name, bio, inputStream, serviceContext); - - SessionMessages.add(request, "artistAdded"); - - String redirect = ParamUtil.getString( - uploadPortletRequest, "redirect"); - - response.sendRedirect(redirect); } - catch (Exception e) { - SessionErrors.add(request, e.getClass().getName()); - - if (e instanceof ArtistNameException || - e instanceof PrincipalException) { - - response.setRenderParameter( - "jspPage", "/html/artists/edit_artist.jsp"); - } - else { - response.setRenderParameter("jspPage", "/html/error.jsp"); - } - } - } - - public void deleteArtist(ActionRequest request, ActionResponse response) - throws Exception { - - long artistId = ParamUtil.getLong(request, "artistId"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Artist.class.getName(), request); - - try { - ArtistServiceUtil.deleteArtist(artistId, serviceContext); - - SessionMessages.add(request, "artistDeleted"); - - sendRedirect(request, response); - } - catch (Exception e) { - SessionErrors.add(request, e.getClass().getName()); - - response.setRenderParameter("jspPage", "/html/error.jsp"); - } - } - - public void updateArtist(ActionRequest request, ActionResponse response) - throws Exception { - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(request); - - long artistId = ParamUtil.getLong(uploadPortletRequest, "artistId"); - String name = ParamUtil.getString(uploadPortletRequest, "name"); - String bio = ParamUtil.getString(uploadPortletRequest, "bio"); - - InputStream inputStream = uploadPortletRequest.getFileAsStream( - "file"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Artist.class.getName(), uploadPortletRequest); - - try { - ArtistServiceUtil.updateArtist( - artistId, name, bio, inputStream, serviceContext); - - SessionMessages.add(request, "artistUpdated"); - - String redirect = ParamUtil.getString( - uploadPortletRequest, "redirect"); - - response.sendRedirect(redirect); - } - catch (Exception e) { - SessionErrors.add(request, e.getClass().getName()); - - if (e instanceof ArtistNameException || - e instanceof PrincipalException) { - - response.setRenderParameter( - "jspPage", "/html/artists/edit_artist.jsp"); - } - else { - response.setRenderParameter("jspPage", "/html/error.jsp"); - } - } - } - - public void addSong(ActionRequest request, ActionResponse response) - throws Exception { - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(request); - - long albumId = ParamUtil.getLong(uploadPortletRequest, "albumId"); - String name = ParamUtil.getString(uploadPortletRequest, "name"); - - InputStream songInputStream = uploadPortletRequest.getFileAsStream( - "songFile"); - String songFileName = uploadPortletRequest.getFileName("songFile"); - - InputStream lyricsInputStream = - uploadPortletRequest.getFileAsStream("lyricsFile"); - String lyricsFileName = uploadPortletRequest.getFileName( - "lyricsFile"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Song.class.getName(), uploadPortletRequest); - - try { - SongServiceUtil.addSong( - albumId, name, songFileName, songInputStream, - lyricsFileName, lyricsInputStream, serviceContext); - - SessionMessages.add(request, "songAdded"); - - String redirect = ParamUtil.getString( - uploadPortletRequest, "redirect"); - - response.sendRedirect(redirect); - } - catch (Exception e) { - SessionErrors.add(request, e.getClass().getName()); - - if (e instanceof SongNameException || - e instanceof DuplicatedSongException || - e instanceof PrincipalException) { - - response.setRenderParameter( - "jspPage", "/html/songs/edit_song.jsp"); - } - else { - response.setRenderParameter("jspPage", "/html/error.jsp"); - } - } - } - - public void deleteSong(ActionRequest request, ActionResponse response) - throws Exception { - - long songId = ParamUtil.getLong(request, "songId"); - - boolean moveToTrash = ParamUtil.getBoolean(request, "moveToTrash"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Song.class.getName(), request); - - try { - if (moveToTrash) { - Song song = SongServiceUtil.moveSongToTrash(songId); - - Map data = - new HashMap(); - - data.put( - "deleteEntryClassName", - new String[] {Song.class.getName()}); - data.put( - "deleteEntryTitle", - new String[] { - TrashUtil.getOriginalTitle(song.getName())}); - data.put( - "restoreEntryIds", - new String[] {String.valueOf(songId)}); - - SessionMessages.add( - request, - PortalUtil.getPortletId(request) + - SessionMessages.KEY_SUFFIX_DELETE_SUCCESS_DATA, - data); - - SessionMessages.add( - request, - PortalUtil.getPortletId(request) + - SessionMessages. - KEY_SUFFIX_HIDE_DEFAULT_SUCCESS_MESSAGE); - } - else { - SongServiceUtil.deleteSong(songId, serviceContext); - - SessionMessages.add(request, "songDeleted"); - } - - sendRedirect(request, response); - } - catch (Exception e) { - SessionErrors.add(request, e.getClass().getName()); - - response.setRenderParameter("jspPage", "/html/error.jsp"); - } - } - - public void restoreSong(ActionRequest request, ActionResponse response) - throws Exception { - - long[] restoreEntryIds = StringUtil.split( - ParamUtil.getString(request, "restoreEntryIds"), 0L); - - for (long restoreEntryId : restoreEntryIds) { - SongServiceUtil.restoreSongFromTrash(restoreEntryId); - } - } - - public void updateSong(ActionRequest request, ActionResponse response) - throws Exception { - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(request); - - long albumId = ParamUtil.getLong(uploadPortletRequest, "albumId"); - long songId = ParamUtil.getLong(uploadPortletRequest, "songId"); - String name = ParamUtil.getString(uploadPortletRequest, "name"); - - InputStream songInputStream = uploadPortletRequest.getFileAsStream( - "songFile"); - String songFileName = uploadPortletRequest.getFileName("songFile"); - - InputStream lyricsInputStream = - uploadPortletRequest.getFileAsStream("lyricsFile"); - String lyricsFileName = uploadPortletRequest.getFileName( - "lyricsFile"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Song.class.getName(), uploadPortletRequest); - - try { - SongServiceUtil.updateSong( - songId, albumId, name, songFileName, songInputStream, - lyricsFileName, lyricsInputStream, serviceContext); - - SessionMessages.add(request, "songUpdated"); - - String redirect = ParamUtil.getString( - uploadPortletRequest, "redirect"); - - response.sendRedirect(redirect); - } - catch (Exception e) { - SessionErrors.add(request, e.getClass().getName()); - - if (e instanceof SongNameException || - e instanceof PrincipalException) { - - response.setRenderParameter( - "jspPage", "/html/songs/edit_song.jsp"); - } - else { - response.setRenderParameter("jspPage", "/html/error.jsp"); - } - } - } - - public void deleteAlbum(ActionRequest request, ActionResponse response) - throws Exception { - - long albumId = ParamUtil.getLong(request, "albumId"); - - boolean moveToTrash = ParamUtil.getBoolean(request, "moveToTrash"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Album.class.getName(), request); - - try { - if (moveToTrash) { - Album album = AlbumServiceUtil.moveAlbumToTrash(albumId); - - Map data = new HashMap(); - - data.put( - "deleteEntryClassName", - new String[] {Album.class.getName()}); - data.put("deleteEntryTitle", new String[] {album.getName()}); - data.put( - "restoreEntryIds", new String[] {String.valueOf(albumId)}); - - SessionMessages.add( - request, - PortalUtil.getPortletId(request) + - SessionMessages.KEY_SUFFIX_DELETE_SUCCESS_DATA, data); - - SessionMessages.add( - request, - PortalUtil.getPortletId(request) + - SessionMessages. - KEY_SUFFIX_HIDE_DEFAULT_SUCCESS_MESSAGE); - } - else { - AlbumServiceUtil.deleteAlbum(albumId, serviceContext); - - SessionMessages.add(request, "albumDeleted"); - } - - sendRedirect(request, response); - } - catch (Exception e) { - SessionErrors.add(request, e.getClass().getName()); - - response.setRenderParameter("jspPage", "/html/error.jsp"); - } - } - - public void restoreAlbum(ActionRequest request, ActionResponse response) - throws Exception { - - long[] restoreEntryIds = StringUtil.split( - ParamUtil.getString(request, "restoreEntryIds"), 0L); - - for (long restoreEntryId : restoreEntryIds) { - AlbumServiceUtil.restoreAlbumFromTrash(restoreEntryId); - } - } - - public void updateAlbum(ActionRequest request, ActionResponse response) - throws Exception { - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(request); - - long albumId = ParamUtil.getLong(uploadPortletRequest, "albumId"); - long artistId = ParamUtil.getLong(uploadPortletRequest, "artistId"); - String name = ParamUtil.getString(uploadPortletRequest, "name"); - int year = ParamUtil.getInteger(uploadPortletRequest, "year"); - - InputStream inputStream = uploadPortletRequest.getFileAsStream("file"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Album.class.getName(), uploadPortletRequest); - - try { - AlbumServiceUtil.updateAlbum( - albumId, artistId, name, year, inputStream, serviceContext); - - SessionMessages.add(request, "albumUpdated"); - - String redirect = ParamUtil.getString( - uploadPortletRequest, "redirect"); - - response.sendRedirect(redirect); - } - catch (Exception e) { - SessionErrors.add(request, e.getClass().getName()); - - if (e instanceof AlbumNameException || - e instanceof PrincipalException) { - - response.setRenderParameter( - "jspPage", "/html/albums/edit_album.jsp"); - } - else { - response.setRenderParameter("jspPage", "/html/error.jsp"); - } - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/SongsPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/SongsPortlet.java deleted file mode 100644 index d3507dc075..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/portlet/SongsPortlet.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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 org.liferay.jukebox.portlet; - -/** - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - */ -public class SongsPortlet extends JukeboxPortlet { - - public final static String PORTLET_ID = "songs_WAR_jukeboxportlet"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/AlbumDisplayTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/AlbumDisplayTerms.java deleted file mode 100644 index 847e9af1f7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/AlbumDisplayTerms.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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 org.liferay.jukebox.search; - -import com.liferay.portal.kernel.dao.search.DisplayTerms; -import com.liferay.portal.kernel.util.ParamUtil; - -import javax.portlet.PortletRequest; - -/** - * @author Eudaldo Alonso - */ -public class AlbumDisplayTerms extends DisplayTerms { - - public static final String ARTIST = "artist"; - - public static final String GROUP_ID = "groupId"; - - public static final String TITLE = "title"; - - public static final String YEAR = "year"; - - public AlbumDisplayTerms(PortletRequest portletRequest) { - super(portletRequest); - - artist = ParamUtil.getString(portletRequest, ARTIST); - groupId = ParamUtil.getLong(portletRequest, GROUP_ID); - title = ParamUtil.getString(portletRequest, TITLE); - year = ParamUtil.getInteger(portletRequest, YEAR); - } - - public String getArtist() { - return artist; - } - - public long getGroupId() { - return groupId; - } - - public String getTitle() { - return title; - } - - public int getYear() { - return year; - } - - protected String artist; - protected long groupId; - protected String title; - protected int year; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/AlbumSearch.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/AlbumSearch.java deleted file mode 100644 index 083fb93f41..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/AlbumSearch.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 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 org.liferay.jukebox.search; - -import com.liferay.portal.kernel.dao.search.SearchContainer; -import com.liferay.portlet.asset.model.AssetEntry; - -import java.util.ArrayList; -import java.util.List; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -/** - * @author Eudaldo Alonso - */ -public class AlbumSearch extends SearchContainer { - - static List headerNames = new ArrayList(); - - static { - headerNames.add("title"); - headerNames.add("year"); - } - - public static final String EMPTY_RESULTS_MESSAGE = "there-are-no-results"; - - public AlbumSearch( - PortletRequest portletRequest, int delta, PortletURL iteratorURL) { - - super( - portletRequest, new AlbumDisplayTerms(portletRequest), - new AlbumSearchTerms(portletRequest), DEFAULT_CUR_PARAM, delta, - iteratorURL, headerNames, EMPTY_RESULTS_MESSAGE); - - AlbumDisplayTerms displayTerms = (AlbumDisplayTerms)getDisplayTerms(); - - iteratorURL.setParameter( - AlbumDisplayTerms.ARTIST, displayTerms.getTitle()); - iteratorURL.setParameter( - AlbumDisplayTerms.TITLE, displayTerms.getTitle()); - iteratorURL.setParameter( - AlbumDisplayTerms.YEAR, String.valueOf(displayTerms.getYear())); - } - - public AlbumSearch(PortletRequest portletRequest, PortletURL iteratorURL) { - this(portletRequest, DEFAULT_DELTA, iteratorURL); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/AlbumSearchTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/AlbumSearchTerms.java deleted file mode 100644 index fc23a57bed..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/AlbumSearchTerms.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox.search; - -import com.liferay.portal.kernel.dao.search.DAOParamUtil; -import com.liferay.portal.kernel.util.ParamUtil; - -import javax.portlet.PortletRequest; - -/** - * @author Eudaldo Alonso - */ -public class AlbumSearchTerms extends AlbumDisplayTerms { - - public AlbumSearchTerms(PortletRequest portletRequest) { - super(portletRequest); - - artist = ParamUtil.getString(portletRequest, ARTIST); - groupId = ParamUtil.getLong(portletRequest, GROUP_ID); - title = DAOParamUtil.getString(portletRequest, TITLE); - year = ParamUtil.getInteger(portletRequest, YEAR); - } - - public void setGroupId(long groupId) { - this.groupId = groupId; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/ArtistDisplayTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/ArtistDisplayTerms.java deleted file mode 100644 index 89e777c497..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/ArtistDisplayTerms.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * 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 org.liferay.jukebox.search; - -import com.liferay.portal.kernel.dao.search.DisplayTerms; -import com.liferay.portal.kernel.util.ParamUtil; - -import javax.portlet.PortletRequest; - -/** - * @author Eudaldo Alonso - */ -public class ArtistDisplayTerms extends DisplayTerms { - - public static final String BIO = "bio"; - - public static final String GROUP_ID = "groupId"; - - public static final String TITLE = "title"; - - public ArtistDisplayTerms(PortletRequest portletRequest) { - super(portletRequest); - - bio = ParamUtil.getString(portletRequest, BIO); - groupId = ParamUtil.getLong(portletRequest, GROUP_ID); - title = ParamUtil.getString(portletRequest, TITLE); - } - - public String getBio() { - return bio; - } - - public long getGroupId() { - return groupId; - } - - public String getTitle() { - return title; - } - - protected String bio; - protected long groupId; - protected String title; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/ArtistSearch.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/ArtistSearch.java deleted file mode 100644 index 28836f9799..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/ArtistSearch.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * 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 org.liferay.jukebox.search; - -import com.liferay.portal.kernel.dao.search.SearchContainer; -import com.liferay.portlet.asset.model.AssetEntry; - -import java.util.ArrayList; -import java.util.List; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -/** - * @author Eudaldo Alonso - */ -public class ArtistSearch extends SearchContainer { - - static List headerNames = new ArrayList(); - - static { - headerNames.add("bio"); - headerNames.add("title"); - } - - public static final String EMPTY_RESULTS_MESSAGE = "there-are-no-results"; - - public ArtistSearch( - PortletRequest portletRequest, int delta, PortletURL iteratorURL) { - - super( - portletRequest, new ArtistDisplayTerms(portletRequest), - new ArtistSearchTerms(portletRequest), DEFAULT_CUR_PARAM, delta, - iteratorURL, headerNames, EMPTY_RESULTS_MESSAGE); - - ArtistDisplayTerms displayTerms = (ArtistDisplayTerms)getDisplayTerms(); - - iteratorURL.setParameter(ArtistDisplayTerms.BIO, displayTerms.getBio()); - iteratorURL.setParameter( - ArtistDisplayTerms.TITLE, displayTerms.getTitle()); - } - - public ArtistSearch(PortletRequest portletRequest, PortletURL iteratorURL) { - this(portletRequest, DEFAULT_DELTA, iteratorURL); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/ArtistSearchTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/ArtistSearchTerms.java deleted file mode 100644 index 5772cbb39a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/ArtistSearchTerms.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 org.liferay.jukebox.search; - -import com.liferay.portal.kernel.dao.search.DAOParamUtil; -import com.liferay.portal.kernel.util.ParamUtil; - -import javax.portlet.PortletRequest; - -/** - * @author Eudaldo Alonso - */ -public class ArtistSearchTerms extends ArtistDisplayTerms { - - public ArtistSearchTerms(PortletRequest portletRequest) { - super(portletRequest); - - bio = DAOParamUtil.getString(portletRequest, BIO); - groupId = ParamUtil.getLong(portletRequest, GROUP_ID); - title = DAOParamUtil.getString(portletRequest, TITLE); - } - - public void setGroupId(long groupId) { - this.groupId = groupId; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/SongDisplayTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/SongDisplayTerms.java deleted file mode 100644 index 38b1e39672..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/SongDisplayTerms.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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 org.liferay.jukebox.search; - -import com.liferay.portal.kernel.dao.search.DisplayTerms; -import com.liferay.portal.kernel.util.ParamUtil; - -import javax.portlet.PortletRequest; - -/** - * @author Eudaldo Alonso - */ -public class SongDisplayTerms extends DisplayTerms { - - public static final String ALBUM = "album"; - - public static final String ARTIST = "artist"; - - public static final String GROUP_ID = "groupId"; - - public static final String TITLE = "title"; - - public SongDisplayTerms(PortletRequest portletRequest) { - super(portletRequest); - - album = ParamUtil.getString(portletRequest, ALBUM); - artist = ParamUtil.getString(portletRequest, ARTIST); - groupId = ParamUtil.getLong(portletRequest, GROUP_ID); - title = ParamUtil.getString(portletRequest, TITLE); - } - - public String getAlbum() { - return album; - } - - public String getArtist() { - return artist; - } - - public long getGroupId() { - return groupId; - } - - public String getTitle() { - return title; - } - - protected String album; - protected String artist; - protected long groupId; - protected String title; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/SongSearch.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/SongSearch.java deleted file mode 100644 index 85cd0de6ec..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/SongSearch.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 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 org.liferay.jukebox.search; - -import com.liferay.portal.kernel.dao.search.SearchContainer; -import com.liferay.portlet.asset.model.AssetEntry; - -import java.util.ArrayList; -import java.util.List; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -/** - * @author Eudaldo Alonso - */ -public class SongSearch extends SearchContainer { - - static List headerNames = new ArrayList(); - - static { - headerNames.add("artist"); - headerNames.add("title"); - } - - public static final String EMPTY_RESULTS_MESSAGE = "there-are-no-results"; - - public SongSearch( - PortletRequest portletRequest, int delta, PortletURL iteratorURL) { - - super( - portletRequest, new SongDisplayTerms(portletRequest), - new SongSearchTerms(portletRequest), DEFAULT_CUR_PARAM, delta, - iteratorURL, headerNames, EMPTY_RESULTS_MESSAGE); - - SongDisplayTerms displayTerms = (SongDisplayTerms)getDisplayTerms(); - - iteratorURL.setParameter( - SongDisplayTerms.ALBUM, displayTerms.getAlbum()); - iteratorURL.setParameter( - SongDisplayTerms.ARTIST, displayTerms.getArtist()); - iteratorURL.setParameter( - SongDisplayTerms.TITLE, displayTerms.getTitle()); - } - - public SongSearch(PortletRequest portletRequest, PortletURL iteratorURL) { - this(portletRequest, DEFAULT_DELTA, iteratorURL); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/SongSearchTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/SongSearchTerms.java deleted file mode 100644 index 927e390634..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/search/SongSearchTerms.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 org.liferay.jukebox.search; - -import com.liferay.portal.kernel.dao.search.DAOParamUtil; -import com.liferay.portal.kernel.util.ParamUtil; - -import javax.portlet.PortletRequest; - -/** - * @author Eudaldo Alonso - */ -public class SongSearchTerms extends SongDisplayTerms { - - public SongSearchTerms(PortletRequest portletRequest) { - super(portletRequest); - - album = DAOParamUtil.getString(portletRequest, ALBUM); - artist = DAOParamUtil.getString(portletRequest, ARTIST); - groupId = ParamUtil.getLong(portletRequest, GROUP_ID); - title = DAOParamUtil.getString(portletRequest, TITLE); - } - - public void setGroupId(long groupId) { - this.groupId = groupId; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumLocalServiceBaseImpl.java deleted file mode 100644 index 60cb81208f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumLocalServiceBaseImpl.java +++ /dev/null @@ -1,1242 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.CompanyPersistence; -import com.liferay.portal.service.persistence.GroupPersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence; -import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence; -import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; -import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence; -import com.liferay.portlet.trash.service.persistence.TrashVersionPersistence; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.service.AlbumLocalService; -import org.liferay.jukebox.service.persistence.AlbumPersistence; -import org.liferay.jukebox.service.persistence.ArtistPersistence; -import org.liferay.jukebox.service.persistence.SongPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the album local service. - * - *

- * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.liferay.jukebox.service.impl.AlbumLocalServiceImpl}. - *

- * - * @author Julio Camarero - * @see org.liferay.jukebox.service.impl.AlbumLocalServiceImpl - * @see org.liferay.jukebox.service.AlbumLocalServiceUtil - * @generated - */ -public abstract class AlbumLocalServiceBaseImpl extends BaseLocalServiceImpl - implements AlbumLocalService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link org.liferay.jukebox.service.AlbumLocalServiceUtil} to access the album local service. - */ - - /** - * Adds the album to the database. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public Album addAlbum(Album album) throws SystemException { - album.setNew(true); - - return albumPersistence.update(album); - } - - /** - * Creates a new album with the primary key. Does not add the album to the database. - * - * @param albumId the primary key for the new album - * @return the new album - */ - @Override - public Album createAlbum(long albumId) { - return albumPersistence.create(albumId); - } - - /** - * Deletes the album with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param albumId the primary key of the album - * @return the album that was removed - * @throws PortalException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public Album deleteAlbum(long albumId) - throws PortalException, SystemException { - return albumPersistence.remove(albumId); - } - - /** - * Deletes the album from the database. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was removed - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public Album deleteAlbum(Album album) throws SystemException { - return albumPersistence.remove(album); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(Album.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 albumPersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @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 albumPersistence.findWithDynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 albumPersistence.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 albumPersistence.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 albumPersistence.countWithDynamicQuery(dynamicQuery, projection); - } - - @Override - public Album fetchAlbum(long albumId) throws SystemException { - return albumPersistence.fetchByPrimaryKey(albumId); - } - - /** - * Returns the album with the matching UUID and company. - * - * @param uuid the album's UUID - * @param companyId the primary key of the company - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchAlbumByUuidAndCompanyId(String uuid, long companyId) - throws SystemException { - return albumPersistence.fetchByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the album matching the UUID and group. - * - * @param uuid the album's UUID - * @param groupId the primary key of the group - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchAlbumByUuidAndGroupId(String uuid, long groupId) - throws SystemException { - return albumPersistence.fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the album with the primary key. - * - * @param albumId the primary key of the album - * @return the album - * @throws PortalException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album getAlbum(long albumId) throws PortalException, SystemException { - return albumPersistence.findByPrimaryKey(albumId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return albumPersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns the album with the matching UUID and company. - * - * @param uuid the album's UUID - * @param companyId the primary key of the company - * @return the matching album - * @throws PortalException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album getAlbumByUuidAndCompanyId(String uuid, long companyId) - throws PortalException, SystemException { - return albumPersistence.findByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the album matching the UUID and group. - * - * @param uuid the album's UUID - * @param groupId the primary key of the group - * @return the matching album - * @throws PortalException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album getAlbumByUuidAndGroupId(String uuid, long groupId) - throws PortalException, SystemException { - return albumPersistence.findByUUID_G(uuid, groupId); - } - - /** - * Returns a range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of albums - * @throws SystemException if a system exception occurred - */ - @Override - public List getAlbums(int start, int end) throws SystemException { - return albumPersistence.findAll(start, end); - } - - /** - * Returns the number of albums. - * - * @return the number of albums - * @throws SystemException if a system exception occurred - */ - @Override - public int getAlbumsCount() throws SystemException { - return albumPersistence.countAll(); - } - - /** - * Updates the album in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param album the album - * @return the album that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public Album updateAlbum(Album album) throws SystemException { - return albumPersistence.update(album); - } - - /** - * Returns the album local service. - * - * @return the album local service - */ - public org.liferay.jukebox.service.AlbumLocalService getAlbumLocalService() { - return albumLocalService; - } - - /** - * Sets the album local service. - * - * @param albumLocalService the album local service - */ - public void setAlbumLocalService( - org.liferay.jukebox.service.AlbumLocalService albumLocalService) { - this.albumLocalService = albumLocalService; - } - - /** - * Returns the album remote service. - * - * @return the album remote service - */ - public org.liferay.jukebox.service.AlbumService getAlbumService() { - return albumService; - } - - /** - * Sets the album remote service. - * - * @param albumService the album remote service - */ - public void setAlbumService( - org.liferay.jukebox.service.AlbumService albumService) { - this.albumService = albumService; - } - - /** - * Returns the album persistence. - * - * @return the album persistence - */ - public AlbumPersistence getAlbumPersistence() { - return albumPersistence; - } - - /** - * Sets the album persistence. - * - * @param albumPersistence the album persistence - */ - public void setAlbumPersistence(AlbumPersistence albumPersistence) { - this.albumPersistence = albumPersistence; - } - - /** - * Returns the artist local service. - * - * @return the artist local service - */ - public org.liferay.jukebox.service.ArtistLocalService getArtistLocalService() { - return artistLocalService; - } - - /** - * Sets the artist local service. - * - * @param artistLocalService the artist local service - */ - public void setArtistLocalService( - org.liferay.jukebox.service.ArtistLocalService artistLocalService) { - this.artistLocalService = artistLocalService; - } - - /** - * Returns the artist remote service. - * - * @return the artist remote service - */ - public org.liferay.jukebox.service.ArtistService getArtistService() { - return artistService; - } - - /** - * Sets the artist remote service. - * - * @param artistService the artist remote service - */ - public void setArtistService( - org.liferay.jukebox.service.ArtistService artistService) { - this.artistService = artistService; - } - - /** - * Returns the artist persistence. - * - * @return the artist persistence - */ - public ArtistPersistence getArtistPersistence() { - return artistPersistence; - } - - /** - * Sets the artist persistence. - * - * @param artistPersistence the artist persistence - */ - public void setArtistPersistence(ArtistPersistence artistPersistence) { - this.artistPersistence = artistPersistence; - } - - /** - * Returns the song local service. - * - * @return the song local service - */ - public org.liferay.jukebox.service.SongLocalService getSongLocalService() { - return songLocalService; - } - - /** - * Sets the song local service. - * - * @param songLocalService the song local service - */ - public void setSongLocalService( - org.liferay.jukebox.service.SongLocalService songLocalService) { - this.songLocalService = songLocalService; - } - - /** - * Returns the song remote service. - * - * @return the song remote service - */ - public org.liferay.jukebox.service.SongService getSongService() { - return songService; - } - - /** - * Sets the song remote service. - * - * @param songService the song remote service - */ - public void setSongService( - org.liferay.jukebox.service.SongService songService) { - this.songService = songService; - } - - /** - * Returns the song persistence. - * - * @return the song persistence - */ - public SongPersistence getSongPersistence() { - return songPersistence; - } - - /** - * Sets the song persistence. - * - * @param songPersistence the song persistence - */ - public void setSongPersistence(SongPersistence songPersistence) { - this.songPersistence = songPersistence; - } - - /** - * 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 company local service. - * - * @return the company local service - */ - public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { - return companyLocalService; - } - - /** - * Sets the company local service. - * - * @param companyLocalService the company local service - */ - public void setCompanyLocalService( - com.liferay.portal.service.CompanyLocalService companyLocalService) { - this.companyLocalService = companyLocalService; - } - - /** - * Returns the company remote service. - * - * @return the company remote service - */ - public com.liferay.portal.service.CompanyService getCompanyService() { - return companyService; - } - - /** - * Sets the company remote service. - * - * @param companyService the company remote service - */ - public void setCompanyService( - com.liferay.portal.service.CompanyService companyService) { - this.companyService = companyService; - } - - /** - * Returns the company persistence. - * - * @return the company persistence - */ - public CompanyPersistence getCompanyPersistence() { - return companyPersistence; - } - - /** - * Sets the company persistence. - * - * @param companyPersistence the company persistence - */ - public void setCompanyPersistence(CompanyPersistence companyPersistence) { - this.companyPersistence = companyPersistence; - } - - /** - * Returns the group local service. - * - * @return the group local service - */ - public com.liferay.portal.service.GroupLocalService getGroupLocalService() { - return groupLocalService; - } - - /** - * Sets the group local service. - * - * @param groupLocalService the group local service - */ - public void setGroupLocalService( - com.liferay.portal.service.GroupLocalService groupLocalService) { - this.groupLocalService = groupLocalService; - } - - /** - * Returns the group remote service. - * - * @return the group remote service - */ - public com.liferay.portal.service.GroupService getGroupService() { - return groupService; - } - - /** - * Sets the group remote service. - * - * @param groupService the group remote service - */ - public void setGroupService( - com.liferay.portal.service.GroupService groupService) { - this.groupService = groupService; - } - - /** - * Returns the group persistence. - * - * @return the group persistence - */ - public GroupPersistence getGroupPersistence() { - return groupPersistence; - } - - /** - * Sets the group persistence. - * - * @param groupPersistence the group persistence - */ - public void setGroupPersistence(GroupPersistence groupPersistence) { - this.groupPersistence = groupPersistence; - } - - /** - * 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; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the asset link local service. - * - * @return the asset link local service - */ - public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() { - return assetLinkLocalService; - } - - /** - * Sets the asset link local service. - * - * @param assetLinkLocalService the asset link local service - */ - public void setAssetLinkLocalService( - com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) { - this.assetLinkLocalService = assetLinkLocalService; - } - - /** - * Returns the asset link persistence. - * - * @return the asset link persistence - */ - public AssetLinkPersistence getAssetLinkPersistence() { - return assetLinkPersistence; - } - - /** - * Sets the asset link persistence. - * - * @param assetLinkPersistence the asset link persistence - */ - public void setAssetLinkPersistence( - AssetLinkPersistence assetLinkPersistence) { - this.assetLinkPersistence = assetLinkPersistence; - } - - /** - * Returns the expando value local service. - * - * @return the expando value local service - */ - public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() { - return expandoValueLocalService; - } - - /** - * Sets the expando value local service. - * - * @param expandoValueLocalService the expando value local service - */ - public void setExpandoValueLocalService( - com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) { - this.expandoValueLocalService = expandoValueLocalService; - } - - /** - * Returns the expando value remote service. - * - * @return the expando value remote service - */ - public com.liferay.portlet.expando.service.ExpandoValueService getExpandoValueService() { - return expandoValueService; - } - - /** - * Sets the expando value remote service. - * - * @param expandoValueService the expando value remote service - */ - public void setExpandoValueService( - com.liferay.portlet.expando.service.ExpandoValueService expandoValueService) { - this.expandoValueService = expandoValueService; - } - - /** - * Returns the expando value persistence. - * - * @return the expando value persistence - */ - public ExpandoValuePersistence getExpandoValuePersistence() { - return expandoValuePersistence; - } - - /** - * Sets the expando value persistence. - * - * @param expandoValuePersistence the expando value persistence - */ - public void setExpandoValuePersistence( - ExpandoValuePersistence expandoValuePersistence) { - this.expandoValuePersistence = expandoValuePersistence; - } - - /** - * Returns the message-boards message local service. - * - * @return the message-boards message local service - */ - public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() { - return mbMessageLocalService; - } - - /** - * Sets the message-boards message local service. - * - * @param mbMessageLocalService the message-boards message local service - */ - public void setMBMessageLocalService( - com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) { - this.mbMessageLocalService = mbMessageLocalService; - } - - /** - * Returns the message-boards message remote service. - * - * @return the message-boards message remote service - */ - public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() { - return mbMessageService; - } - - /** - * Sets the message-boards message remote service. - * - * @param mbMessageService the message-boards message remote service - */ - public void setMBMessageService( - com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) { - this.mbMessageService = mbMessageService; - } - - /** - * Returns the message-boards message persistence. - * - * @return the message-boards message persistence - */ - public MBMessagePersistence getMBMessagePersistence() { - return mbMessagePersistence; - } - - /** - * Sets the message-boards message persistence. - * - * @param mbMessagePersistence the message-boards message persistence - */ - public void setMBMessagePersistence( - MBMessagePersistence mbMessagePersistence) { - this.mbMessagePersistence = mbMessagePersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - /** - * Returns the trash entry local service. - * - * @return the trash entry local service - */ - public com.liferay.portlet.trash.service.TrashEntryLocalService getTrashEntryLocalService() { - return trashEntryLocalService; - } - - /** - * Sets the trash entry local service. - * - * @param trashEntryLocalService the trash entry local service - */ - public void setTrashEntryLocalService( - com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService) { - this.trashEntryLocalService = trashEntryLocalService; - } - - /** - * Returns the trash entry remote service. - * - * @return the trash entry remote service - */ - public com.liferay.portlet.trash.service.TrashEntryService getTrashEntryService() { - return trashEntryService; - } - - /** - * Sets the trash entry remote service. - * - * @param trashEntryService the trash entry remote service - */ - public void setTrashEntryService( - com.liferay.portlet.trash.service.TrashEntryService trashEntryService) { - this.trashEntryService = trashEntryService; - } - - /** - * Returns the trash entry persistence. - * - * @return the trash entry persistence - */ - public TrashEntryPersistence getTrashEntryPersistence() { - return trashEntryPersistence; - } - - /** - * Sets the trash entry persistence. - * - * @param trashEntryPersistence the trash entry persistence - */ - public void setTrashEntryPersistence( - TrashEntryPersistence trashEntryPersistence) { - this.trashEntryPersistence = trashEntryPersistence; - } - - /** - * Returns the trash version local service. - * - * @return the trash version local service - */ - public com.liferay.portlet.trash.service.TrashVersionLocalService getTrashVersionLocalService() { - return trashVersionLocalService; - } - - /** - * Sets the trash version local service. - * - * @param trashVersionLocalService the trash version local service - */ - public void setTrashVersionLocalService( - com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService) { - this.trashVersionLocalService = trashVersionLocalService; - } - - /** - * Returns the trash version persistence. - * - * @return the trash version persistence - */ - public TrashVersionPersistence getTrashVersionPersistence() { - return trashVersionPersistence; - } - - /** - * Sets the trash version persistence. - * - * @param trashVersionPersistence the trash version persistence - */ - public void setTrashVersionPersistence( - TrashVersionPersistence trashVersionPersistence) { - this.trashVersionPersistence = trashVersionPersistence; - } - - public void afterPropertiesSet() { - Class clazz = getClass(); - - _classLoader = clazz.getClassLoader(); - - PersistedModelLocalServiceRegistryUtil.register("org.liferay.jukebox.model.Album", - albumLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "org.liferay.jukebox.model.Album"); - } - - /** - * 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 Album.class; - } - - protected String getModelClassName() { - return Album.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = albumPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = org.liferay.jukebox.service.AlbumLocalService.class) - protected org.liferay.jukebox.service.AlbumLocalService albumLocalService; - @BeanReference(type = org.liferay.jukebox.service.AlbumService.class) - protected org.liferay.jukebox.service.AlbumService albumService; - @BeanReference(type = AlbumPersistence.class) - protected AlbumPersistence albumPersistence; - @BeanReference(type = org.liferay.jukebox.service.ArtistLocalService.class) - protected org.liferay.jukebox.service.ArtistLocalService artistLocalService; - @BeanReference(type = org.liferay.jukebox.service.ArtistService.class) - protected org.liferay.jukebox.service.ArtistService artistService; - @BeanReference(type = ArtistPersistence.class) - protected ArtistPersistence artistPersistence; - @BeanReference(type = org.liferay.jukebox.service.SongLocalService.class) - protected org.liferay.jukebox.service.SongLocalService songLocalService; - @BeanReference(type = org.liferay.jukebox.service.SongService.class) - protected org.liferay.jukebox.service.SongService songService; - @BeanReference(type = SongPersistence.class) - protected SongPersistence songPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) - protected com.liferay.portal.service.CompanyLocalService companyLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyService.class) - protected com.liferay.portal.service.CompanyService companyService; - @BeanReference(type = CompanyPersistence.class) - protected CompanyPersistence companyPersistence; - @BeanReference(type = com.liferay.portal.service.GroupLocalService.class) - protected com.liferay.portal.service.GroupLocalService groupLocalService; - @BeanReference(type = com.liferay.portal.service.GroupService.class) - protected com.liferay.portal.service.GroupService groupService; - @BeanReference(type = GroupPersistence.class) - protected GroupPersistence groupPersistence; - @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; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class) - protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService; - @BeanReference(type = AssetLinkPersistence.class) - protected AssetLinkPersistence assetLinkPersistence; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class) - protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class) - protected com.liferay.portlet.expando.service.ExpandoValueService expandoValueService; - @BeanReference(type = ExpandoValuePersistence.class) - protected ExpandoValuePersistence expandoValuePersistence; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class) - protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class) - protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService; - @BeanReference(type = MBMessagePersistence.class) - protected MBMessagePersistence mbMessagePersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class) - protected com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService; - @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryService.class) - protected com.liferay.portlet.trash.service.TrashEntryService trashEntryService; - @BeanReference(type = TrashEntryPersistence.class) - protected TrashEntryPersistence trashEntryPersistence; - @BeanReference(type = com.liferay.portlet.trash.service.TrashVersionLocalService.class) - protected com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService; - @BeanReference(type = TrashVersionPersistence.class) - protected TrashVersionPersistence trashVersionPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private AlbumLocalServiceClpInvoker _clpInvoker = new AlbumLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumLocalServiceClpInvoker.java deleted file mode 100644 index aed348e347..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumLocalServiceClpInvoker.java +++ /dev/null @@ -1,488 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.base; - -import org.liferay.jukebox.service.AlbumLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Julio Camarero - * @generated - */ -public class AlbumLocalServiceClpInvoker { - public AlbumLocalServiceClpInvoker() { - _methodName0 = "addAlbum"; - - _methodParameterTypes0 = new String[] { "org.liferay.jukebox.model.Album" }; - - _methodName1 = "createAlbum"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteAlbum"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteAlbum"; - - _methodParameterTypes3 = new String[] { "org.liferay.jukebox.model.Album" }; - - _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 = "fetchAlbum"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchAlbumByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchAlbumByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getAlbum"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getAlbumByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getAlbumByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getAlbums"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getAlbumsCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateAlbum"; - - _methodParameterTypes19 = new String[] { "org.liferay.jukebox.model.Album" }; - - _methodName100 = "getBeanIdentifier"; - - _methodParameterTypes100 = new String[] { }; - - _methodName101 = "setBeanIdentifier"; - - _methodParameterTypes101 = new String[] { "java.lang.String" }; - - _methodName106 = "addAlbum"; - - _methodParameterTypes106 = new String[] { - "long", "long", "java.lang.String", "int", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName107 = "addEntryResources"; - - _methodParameterTypes107 = new String[] { - "org.liferay.jukebox.model.Album", "boolean", "boolean" - }; - - _methodName108 = "addEntryResources"; - - _methodParameterTypes108 = new String[] { - "org.liferay.jukebox.model.Album", "java.lang.String[][]", - "java.lang.String[][]" - }; - - _methodName109 = "deleteAlbum"; - - _methodParameterTypes109 = new String[] { "long" }; - - _methodName110 = "deleteAlbums"; - - _methodParameterTypes110 = new String[] { "long" }; - - _methodName111 = "getAlbums"; - - _methodParameterTypes111 = new String[] { "long" }; - - _methodName112 = "getAlbums"; - - _methodParameterTypes112 = new String[] { "long", "int", "int" }; - - _methodName113 = "getAlbumsByArtistId"; - - _methodParameterTypes113 = new String[] { "long" }; - - _methodName114 = "getAlbumsCount"; - - _methodParameterTypes114 = new String[] { "long" }; - - _methodName115 = "moveAlbumToTrash"; - - _methodParameterTypes115 = new String[] { "long", "long" }; - - _methodName116 = "restoreAlbumFromTrash"; - - _methodParameterTypes116 = new String[] { "long", "long" }; - - _methodName117 = "updateAlbum"; - - _methodParameterTypes117 = new String[] { - "long", "long", "long", "java.lang.String", "int", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName118 = "updateAsset"; - - _methodParameterTypes118 = new String[] { - "long", "org.liferay.jukebox.model.Album", "long[][]", - "java.lang.String[][]", "long[][]" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return AlbumLocalServiceUtil.addAlbum((org.liferay.jukebox.model.Album)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return AlbumLocalServiceUtil.createAlbum(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return AlbumLocalServiceUtil.deleteAlbum(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return AlbumLocalServiceUtil.deleteAlbum((org.liferay.jukebox.model.Album)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return AlbumLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return AlbumLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return AlbumLocalServiceUtil.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 AlbumLocalServiceUtil.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 AlbumLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return AlbumLocalServiceUtil.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 AlbumLocalServiceUtil.fetchAlbum(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return AlbumLocalServiceUtil.fetchAlbumByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return AlbumLocalServiceUtil.fetchAlbumByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return AlbumLocalServiceUtil.getAlbum(((Long)arguments[0]).longValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return AlbumLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return AlbumLocalServiceUtil.getAlbumByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName16.equals(name) && - Arrays.deepEquals(_methodParameterTypes16, parameterTypes)) { - return AlbumLocalServiceUtil.getAlbumByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName17.equals(name) && - Arrays.deepEquals(_methodParameterTypes17, parameterTypes)) { - return AlbumLocalServiceUtil.getAlbums(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName18.equals(name) && - Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) { - return AlbumLocalServiceUtil.getAlbumsCount(); - } - - if (_methodName19.equals(name) && - Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) { - return AlbumLocalServiceUtil.updateAlbum((org.liferay.jukebox.model.Album)arguments[0]); - } - - if (_methodName100.equals(name) && - Arrays.deepEquals(_methodParameterTypes100, parameterTypes)) { - return AlbumLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName101.equals(name) && - Arrays.deepEquals(_methodParameterTypes101, parameterTypes)) { - AlbumLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName106.equals(name) && - Arrays.deepEquals(_methodParameterTypes106, parameterTypes)) { - return AlbumLocalServiceUtil.addAlbum(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], - ((Integer)arguments[3]).intValue(), - (java.io.InputStream)arguments[4], - (com.liferay.portal.service.ServiceContext)arguments[5]); - } - - if (_methodName107.equals(name) && - Arrays.deepEquals(_methodParameterTypes107, parameterTypes)) { - AlbumLocalServiceUtil.addEntryResources((org.liferay.jukebox.model.Album)arguments[0], - ((Boolean)arguments[1]).booleanValue(), - ((Boolean)arguments[2]).booleanValue()); - - return null; - } - - if (_methodName108.equals(name) && - Arrays.deepEquals(_methodParameterTypes108, parameterTypes)) { - AlbumLocalServiceUtil.addEntryResources((org.liferay.jukebox.model.Album)arguments[0], - (java.lang.String[])arguments[1], - (java.lang.String[])arguments[2]); - - return null; - } - - if (_methodName109.equals(name) && - Arrays.deepEquals(_methodParameterTypes109, parameterTypes)) { - return AlbumLocalServiceUtil.deleteAlbum(((Long)arguments[0]).longValue()); - } - - if (_methodName110.equals(name) && - Arrays.deepEquals(_methodParameterTypes110, parameterTypes)) { - AlbumLocalServiceUtil.deleteAlbums(((Long)arguments[0]).longValue()); - - return null; - } - - if (_methodName111.equals(name) && - Arrays.deepEquals(_methodParameterTypes111, parameterTypes)) { - return AlbumLocalServiceUtil.getAlbums(((Long)arguments[0]).longValue()); - } - - if (_methodName112.equals(name) && - Arrays.deepEquals(_methodParameterTypes112, parameterTypes)) { - return AlbumLocalServiceUtil.getAlbums(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName113.equals(name) && - Arrays.deepEquals(_methodParameterTypes113, parameterTypes)) { - return AlbumLocalServiceUtil.getAlbumsByArtistId(((Long)arguments[0]).longValue()); - } - - if (_methodName114.equals(name) && - Arrays.deepEquals(_methodParameterTypes114, parameterTypes)) { - return AlbumLocalServiceUtil.getAlbumsCount(((Long)arguments[0]).longValue()); - } - - if (_methodName115.equals(name) && - Arrays.deepEquals(_methodParameterTypes115, parameterTypes)) { - return AlbumLocalServiceUtil.moveAlbumToTrash(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName116.equals(name) && - Arrays.deepEquals(_methodParameterTypes116, parameterTypes)) { - return AlbumLocalServiceUtil.restoreAlbumFromTrash(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName117.equals(name) && - Arrays.deepEquals(_methodParameterTypes117, parameterTypes)) { - return AlbumLocalServiceUtil.updateAlbum(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], - ((Integer)arguments[4]).intValue(), - (java.io.InputStream)arguments[5], - (com.liferay.portal.service.ServiceContext)arguments[6]); - } - - if (_methodName118.equals(name) && - Arrays.deepEquals(_methodParameterTypes118, parameterTypes)) { - AlbumLocalServiceUtil.updateAsset(((Long)arguments[0]).longValue(), - (org.liferay.jukebox.model.Album)arguments[1], - (long[])arguments[2], (java.lang.String[])arguments[3], - (long[])arguments[4]); - - 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 _methodName16; - private String[] _methodParameterTypes16; - private String _methodName17; - private String[] _methodParameterTypes17; - private String _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName100; - private String[] _methodParameterTypes100; - private String _methodName101; - private String[] _methodParameterTypes101; - private String _methodName106; - private String[] _methodParameterTypes106; - private String _methodName107; - private String[] _methodParameterTypes107; - private String _methodName108; - private String[] _methodParameterTypes108; - private String _methodName109; - private String[] _methodParameterTypes109; - private String _methodName110; - private String[] _methodParameterTypes110; - private String _methodName111; - private String[] _methodParameterTypes111; - private String _methodName112; - private String[] _methodParameterTypes112; - private String _methodName113; - private String[] _methodParameterTypes113; - private String _methodName114; - private String[] _methodParameterTypes114; - private String _methodName115; - private String[] _methodParameterTypes115; - private String _methodName116; - private String[] _methodParameterTypes116; - private String _methodName117; - private String[] _methodParameterTypes117; - private String _methodName118; - private String[] _methodParameterTypes118; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumServiceBaseImpl.java deleted file mode 100644 index 3a06829738..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumServiceBaseImpl.java +++ /dev/null @@ -1,956 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.CompanyPersistence; -import com.liferay.portal.service.persistence.GroupPersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence; -import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence; -import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; -import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence; -import com.liferay.portlet.trash.service.persistence.TrashVersionPersistence; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.service.AlbumService; -import org.liferay.jukebox.service.persistence.AlbumPersistence; -import org.liferay.jukebox.service.persistence.ArtistPersistence; -import org.liferay.jukebox.service.persistence.SongPersistence; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the album remote service. - * - *

- * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.liferay.jukebox.service.impl.AlbumServiceImpl}. - *

- * - * @author Julio Camarero - * @see org.liferay.jukebox.service.impl.AlbumServiceImpl - * @see org.liferay.jukebox.service.AlbumServiceUtil - * @generated - */ -public abstract class AlbumServiceBaseImpl extends BaseServiceImpl - implements AlbumService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link org.liferay.jukebox.service.AlbumServiceUtil} to access the album remote service. - */ - - /** - * Returns the album local service. - * - * @return the album local service - */ - public org.liferay.jukebox.service.AlbumLocalService getAlbumLocalService() { - return albumLocalService; - } - - /** - * Sets the album local service. - * - * @param albumLocalService the album local service - */ - public void setAlbumLocalService( - org.liferay.jukebox.service.AlbumLocalService albumLocalService) { - this.albumLocalService = albumLocalService; - } - - /** - * Returns the album remote service. - * - * @return the album remote service - */ - public org.liferay.jukebox.service.AlbumService getAlbumService() { - return albumService; - } - - /** - * Sets the album remote service. - * - * @param albumService the album remote service - */ - public void setAlbumService( - org.liferay.jukebox.service.AlbumService albumService) { - this.albumService = albumService; - } - - /** - * Returns the album persistence. - * - * @return the album persistence - */ - public AlbumPersistence getAlbumPersistence() { - return albumPersistence; - } - - /** - * Sets the album persistence. - * - * @param albumPersistence the album persistence - */ - public void setAlbumPersistence(AlbumPersistence albumPersistence) { - this.albumPersistence = albumPersistence; - } - - /** - * Returns the artist local service. - * - * @return the artist local service - */ - public org.liferay.jukebox.service.ArtistLocalService getArtistLocalService() { - return artistLocalService; - } - - /** - * Sets the artist local service. - * - * @param artistLocalService the artist local service - */ - public void setArtistLocalService( - org.liferay.jukebox.service.ArtistLocalService artistLocalService) { - this.artistLocalService = artistLocalService; - } - - /** - * Returns the artist remote service. - * - * @return the artist remote service - */ - public org.liferay.jukebox.service.ArtistService getArtistService() { - return artistService; - } - - /** - * Sets the artist remote service. - * - * @param artistService the artist remote service - */ - public void setArtistService( - org.liferay.jukebox.service.ArtistService artistService) { - this.artistService = artistService; - } - - /** - * Returns the artist persistence. - * - * @return the artist persistence - */ - public ArtistPersistence getArtistPersistence() { - return artistPersistence; - } - - /** - * Sets the artist persistence. - * - * @param artistPersistence the artist persistence - */ - public void setArtistPersistence(ArtistPersistence artistPersistence) { - this.artistPersistence = artistPersistence; - } - - /** - * Returns the song local service. - * - * @return the song local service - */ - public org.liferay.jukebox.service.SongLocalService getSongLocalService() { - return songLocalService; - } - - /** - * Sets the song local service. - * - * @param songLocalService the song local service - */ - public void setSongLocalService( - org.liferay.jukebox.service.SongLocalService songLocalService) { - this.songLocalService = songLocalService; - } - - /** - * Returns the song remote service. - * - * @return the song remote service - */ - public org.liferay.jukebox.service.SongService getSongService() { - return songService; - } - - /** - * Sets the song remote service. - * - * @param songService the song remote service - */ - public void setSongService( - org.liferay.jukebox.service.SongService songService) { - this.songService = songService; - } - - /** - * Returns the song persistence. - * - * @return the song persistence - */ - public SongPersistence getSongPersistence() { - return songPersistence; - } - - /** - * Sets the song persistence. - * - * @param songPersistence the song persistence - */ - public void setSongPersistence(SongPersistence songPersistence) { - this.songPersistence = songPersistence; - } - - /** - * 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 company local service. - * - * @return the company local service - */ - public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { - return companyLocalService; - } - - /** - * Sets the company local service. - * - * @param companyLocalService the company local service - */ - public void setCompanyLocalService( - com.liferay.portal.service.CompanyLocalService companyLocalService) { - this.companyLocalService = companyLocalService; - } - - /** - * Returns the company remote service. - * - * @return the company remote service - */ - public com.liferay.portal.service.CompanyService getCompanyService() { - return companyService; - } - - /** - * Sets the company remote service. - * - * @param companyService the company remote service - */ - public void setCompanyService( - com.liferay.portal.service.CompanyService companyService) { - this.companyService = companyService; - } - - /** - * Returns the company persistence. - * - * @return the company persistence - */ - public CompanyPersistence getCompanyPersistence() { - return companyPersistence; - } - - /** - * Sets the company persistence. - * - * @param companyPersistence the company persistence - */ - public void setCompanyPersistence(CompanyPersistence companyPersistence) { - this.companyPersistence = companyPersistence; - } - - /** - * Returns the group local service. - * - * @return the group local service - */ - public com.liferay.portal.service.GroupLocalService getGroupLocalService() { - return groupLocalService; - } - - /** - * Sets the group local service. - * - * @param groupLocalService the group local service - */ - public void setGroupLocalService( - com.liferay.portal.service.GroupLocalService groupLocalService) { - this.groupLocalService = groupLocalService; - } - - /** - * Returns the group remote service. - * - * @return the group remote service - */ - public com.liferay.portal.service.GroupService getGroupService() { - return groupService; - } - - /** - * Sets the group remote service. - * - * @param groupService the group remote service - */ - public void setGroupService( - com.liferay.portal.service.GroupService groupService) { - this.groupService = groupService; - } - - /** - * Returns the group persistence. - * - * @return the group persistence - */ - public GroupPersistence getGroupPersistence() { - return groupPersistence; - } - - /** - * Sets the group persistence. - * - * @param groupPersistence the group persistence - */ - public void setGroupPersistence(GroupPersistence groupPersistence) { - this.groupPersistence = groupPersistence; - } - - /** - * 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; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the asset link local service. - * - * @return the asset link local service - */ - public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() { - return assetLinkLocalService; - } - - /** - * Sets the asset link local service. - * - * @param assetLinkLocalService the asset link local service - */ - public void setAssetLinkLocalService( - com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) { - this.assetLinkLocalService = assetLinkLocalService; - } - - /** - * Returns the asset link persistence. - * - * @return the asset link persistence - */ - public AssetLinkPersistence getAssetLinkPersistence() { - return assetLinkPersistence; - } - - /** - * Sets the asset link persistence. - * - * @param assetLinkPersistence the asset link persistence - */ - public void setAssetLinkPersistence( - AssetLinkPersistence assetLinkPersistence) { - this.assetLinkPersistence = assetLinkPersistence; - } - - /** - * Returns the expando value local service. - * - * @return the expando value local service - */ - public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() { - return expandoValueLocalService; - } - - /** - * Sets the expando value local service. - * - * @param expandoValueLocalService the expando value local service - */ - public void setExpandoValueLocalService( - com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) { - this.expandoValueLocalService = expandoValueLocalService; - } - - /** - * Returns the expando value remote service. - * - * @return the expando value remote service - */ - public com.liferay.portlet.expando.service.ExpandoValueService getExpandoValueService() { - return expandoValueService; - } - - /** - * Sets the expando value remote service. - * - * @param expandoValueService the expando value remote service - */ - public void setExpandoValueService( - com.liferay.portlet.expando.service.ExpandoValueService expandoValueService) { - this.expandoValueService = expandoValueService; - } - - /** - * Returns the expando value persistence. - * - * @return the expando value persistence - */ - public ExpandoValuePersistence getExpandoValuePersistence() { - return expandoValuePersistence; - } - - /** - * Sets the expando value persistence. - * - * @param expandoValuePersistence the expando value persistence - */ - public void setExpandoValuePersistence( - ExpandoValuePersistence expandoValuePersistence) { - this.expandoValuePersistence = expandoValuePersistence; - } - - /** - * Returns the message-boards message local service. - * - * @return the message-boards message local service - */ - public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() { - return mbMessageLocalService; - } - - /** - * Sets the message-boards message local service. - * - * @param mbMessageLocalService the message-boards message local service - */ - public void setMBMessageLocalService( - com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) { - this.mbMessageLocalService = mbMessageLocalService; - } - - /** - * Returns the message-boards message remote service. - * - * @return the message-boards message remote service - */ - public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() { - return mbMessageService; - } - - /** - * Sets the message-boards message remote service. - * - * @param mbMessageService the message-boards message remote service - */ - public void setMBMessageService( - com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) { - this.mbMessageService = mbMessageService; - } - - /** - * Returns the message-boards message persistence. - * - * @return the message-boards message persistence - */ - public MBMessagePersistence getMBMessagePersistence() { - return mbMessagePersistence; - } - - /** - * Sets the message-boards message persistence. - * - * @param mbMessagePersistence the message-boards message persistence - */ - public void setMBMessagePersistence( - MBMessagePersistence mbMessagePersistence) { - this.mbMessagePersistence = mbMessagePersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - /** - * Returns the trash entry local service. - * - * @return the trash entry local service - */ - public com.liferay.portlet.trash.service.TrashEntryLocalService getTrashEntryLocalService() { - return trashEntryLocalService; - } - - /** - * Sets the trash entry local service. - * - * @param trashEntryLocalService the trash entry local service - */ - public void setTrashEntryLocalService( - com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService) { - this.trashEntryLocalService = trashEntryLocalService; - } - - /** - * Returns the trash entry remote service. - * - * @return the trash entry remote service - */ - public com.liferay.portlet.trash.service.TrashEntryService getTrashEntryService() { - return trashEntryService; - } - - /** - * Sets the trash entry remote service. - * - * @param trashEntryService the trash entry remote service - */ - public void setTrashEntryService( - com.liferay.portlet.trash.service.TrashEntryService trashEntryService) { - this.trashEntryService = trashEntryService; - } - - /** - * Returns the trash entry persistence. - * - * @return the trash entry persistence - */ - public TrashEntryPersistence getTrashEntryPersistence() { - return trashEntryPersistence; - } - - /** - * Sets the trash entry persistence. - * - * @param trashEntryPersistence the trash entry persistence - */ - public void setTrashEntryPersistence( - TrashEntryPersistence trashEntryPersistence) { - this.trashEntryPersistence = trashEntryPersistence; - } - - /** - * Returns the trash version local service. - * - * @return the trash version local service - */ - public com.liferay.portlet.trash.service.TrashVersionLocalService getTrashVersionLocalService() { - return trashVersionLocalService; - } - - /** - * Sets the trash version local service. - * - * @param trashVersionLocalService the trash version local service - */ - public void setTrashVersionLocalService( - com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService) { - this.trashVersionLocalService = trashVersionLocalService; - } - - /** - * Returns the trash version persistence. - * - * @return the trash version persistence - */ - public TrashVersionPersistence getTrashVersionPersistence() { - return trashVersionPersistence; - } - - /** - * Sets the trash version persistence. - * - * @param trashVersionPersistence the trash version persistence - */ - public void setTrashVersionPersistence( - TrashVersionPersistence trashVersionPersistence) { - this.trashVersionPersistence = trashVersionPersistence; - } - - 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 Album.class; - } - - protected String getModelClassName() { - return Album.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = albumPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = org.liferay.jukebox.service.AlbumLocalService.class) - protected org.liferay.jukebox.service.AlbumLocalService albumLocalService; - @BeanReference(type = org.liferay.jukebox.service.AlbumService.class) - protected org.liferay.jukebox.service.AlbumService albumService; - @BeanReference(type = AlbumPersistence.class) - protected AlbumPersistence albumPersistence; - @BeanReference(type = org.liferay.jukebox.service.ArtistLocalService.class) - protected org.liferay.jukebox.service.ArtistLocalService artistLocalService; - @BeanReference(type = org.liferay.jukebox.service.ArtistService.class) - protected org.liferay.jukebox.service.ArtistService artistService; - @BeanReference(type = ArtistPersistence.class) - protected ArtistPersistence artistPersistence; - @BeanReference(type = org.liferay.jukebox.service.SongLocalService.class) - protected org.liferay.jukebox.service.SongLocalService songLocalService; - @BeanReference(type = org.liferay.jukebox.service.SongService.class) - protected org.liferay.jukebox.service.SongService songService; - @BeanReference(type = SongPersistence.class) - protected SongPersistence songPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) - protected com.liferay.portal.service.CompanyLocalService companyLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyService.class) - protected com.liferay.portal.service.CompanyService companyService; - @BeanReference(type = CompanyPersistence.class) - protected CompanyPersistence companyPersistence; - @BeanReference(type = com.liferay.portal.service.GroupLocalService.class) - protected com.liferay.portal.service.GroupLocalService groupLocalService; - @BeanReference(type = com.liferay.portal.service.GroupService.class) - protected com.liferay.portal.service.GroupService groupService; - @BeanReference(type = GroupPersistence.class) - protected GroupPersistence groupPersistence; - @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; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class) - protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService; - @BeanReference(type = AssetLinkPersistence.class) - protected AssetLinkPersistence assetLinkPersistence; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class) - protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class) - protected com.liferay.portlet.expando.service.ExpandoValueService expandoValueService; - @BeanReference(type = ExpandoValuePersistence.class) - protected ExpandoValuePersistence expandoValuePersistence; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class) - protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class) - protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService; - @BeanReference(type = MBMessagePersistence.class) - protected MBMessagePersistence mbMessagePersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class) - protected com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService; - @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryService.class) - protected com.liferay.portlet.trash.service.TrashEntryService trashEntryService; - @BeanReference(type = TrashEntryPersistence.class) - protected TrashEntryPersistence trashEntryPersistence; - @BeanReference(type = com.liferay.portlet.trash.service.TrashVersionLocalService.class) - protected com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService; - @BeanReference(type = TrashVersionPersistence.class) - protected TrashVersionPersistence trashVersionPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private AlbumServiceClpInvoker _clpInvoker = new AlbumServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumServiceClpInvoker.java deleted file mode 100644 index cf6a1664f8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/AlbumServiceClpInvoker.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.base; - -import org.liferay.jukebox.service.AlbumServiceUtil; - -import java.util.Arrays; - -/** - * @author Julio Camarero - * @generated - */ -public class AlbumServiceClpInvoker { - public AlbumServiceClpInvoker() { - _methodName80 = "getBeanIdentifier"; - - _methodParameterTypes80 = new String[] { }; - - _methodName81 = "setBeanIdentifier"; - - _methodParameterTypes81 = new String[] { "java.lang.String" }; - - _methodName86 = "addAlbum"; - - _methodParameterTypes86 = new String[] { - "long", "java.lang.String", "int", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName87 = "deleteAlbum"; - - _methodParameterTypes87 = new String[] { - "long", "com.liferay.portal.service.ServiceContext" - }; - - _methodName88 = "getAlbums"; - - _methodParameterTypes88 = new String[] { "long" }; - - _methodName89 = "getAlbums"; - - _methodParameterTypes89 = new String[] { "long", "int", "int" }; - - _methodName90 = "getAlbums"; - - _methodParameterTypes90 = new String[] { "long", "java.lang.String" }; - - _methodName91 = "getAlbumsByArtistId"; - - _methodParameterTypes91 = new String[] { "long", "long" }; - - _methodName92 = "getAlbumsCount"; - - _methodParameterTypes92 = new String[] { "long" }; - - _methodName93 = "getAlbumsCount"; - - _methodParameterTypes93 = new String[] { "long", "java.lang.String" }; - - _methodName94 = "getAlbumsCountByArtistId"; - - _methodParameterTypes94 = new String[] { "long", "long" }; - - _methodName95 = "moveAlbumToTrash"; - - _methodParameterTypes95 = new String[] { "long" }; - - _methodName96 = "restoreAlbumFromTrash"; - - _methodParameterTypes96 = new String[] { "long" }; - - _methodName97 = "updateAlbum"; - - _methodParameterTypes97 = new String[] { - "long", "long", "java.lang.String", "int", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName80.equals(name) && - Arrays.deepEquals(_methodParameterTypes80, parameterTypes)) { - return AlbumServiceUtil.getBeanIdentifier(); - } - - if (_methodName81.equals(name) && - Arrays.deepEquals(_methodParameterTypes81, parameterTypes)) { - AlbumServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName86.equals(name) && - Arrays.deepEquals(_methodParameterTypes86, parameterTypes)) { - return AlbumServiceUtil.addAlbum(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], - ((Integer)arguments[2]).intValue(), - (java.io.InputStream)arguments[3], - (com.liferay.portal.service.ServiceContext)arguments[4]); - } - - if (_methodName87.equals(name) && - Arrays.deepEquals(_methodParameterTypes87, parameterTypes)) { - return AlbumServiceUtil.deleteAlbum(((Long)arguments[0]).longValue(), - (com.liferay.portal.service.ServiceContext)arguments[1]); - } - - if (_methodName88.equals(name) && - Arrays.deepEquals(_methodParameterTypes88, parameterTypes)) { - return AlbumServiceUtil.getAlbums(((Long)arguments[0]).longValue()); - } - - if (_methodName89.equals(name) && - Arrays.deepEquals(_methodParameterTypes89, parameterTypes)) { - return AlbumServiceUtil.getAlbums(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName90.equals(name) && - Arrays.deepEquals(_methodParameterTypes90, parameterTypes)) { - return AlbumServiceUtil.getAlbums(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - if (_methodName91.equals(name) && - Arrays.deepEquals(_methodParameterTypes91, parameterTypes)) { - return AlbumServiceUtil.getAlbumsByArtistId(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName92.equals(name) && - Arrays.deepEquals(_methodParameterTypes92, parameterTypes)) { - return AlbumServiceUtil.getAlbumsCount(((Long)arguments[0]).longValue()); - } - - if (_methodName93.equals(name) && - Arrays.deepEquals(_methodParameterTypes93, parameterTypes)) { - return AlbumServiceUtil.getAlbumsCount(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - if (_methodName94.equals(name) && - Arrays.deepEquals(_methodParameterTypes94, parameterTypes)) { - return AlbumServiceUtil.getAlbumsCountByArtistId(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName95.equals(name) && - Arrays.deepEquals(_methodParameterTypes95, parameterTypes)) { - return AlbumServiceUtil.moveAlbumToTrash(((Long)arguments[0]).longValue()); - } - - if (_methodName96.equals(name) && - Arrays.deepEquals(_methodParameterTypes96, parameterTypes)) { - return AlbumServiceUtil.restoreAlbumFromTrash(((Long)arguments[0]).longValue()); - } - - if (_methodName97.equals(name) && - Arrays.deepEquals(_methodParameterTypes97, parameterTypes)) { - return AlbumServiceUtil.updateAlbum(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], - ((Integer)arguments[3]).intValue(), - (java.io.InputStream)arguments[4], - (com.liferay.portal.service.ServiceContext)arguments[5]); - } - - throw new UnsupportedOperationException(); - } - - private String _methodName80; - private String[] _methodParameterTypes80; - private String _methodName81; - private String[] _methodParameterTypes81; - private String _methodName86; - private String[] _methodParameterTypes86; - private String _methodName87; - private String[] _methodParameterTypes87; - private String _methodName88; - private String[] _methodParameterTypes88; - private String _methodName89; - private String[] _methodParameterTypes89; - private String _methodName90; - private String[] _methodParameterTypes90; - private String _methodName91; - private String[] _methodParameterTypes91; - private String _methodName92; - private String[] _methodParameterTypes92; - private String _methodName93; - private String[] _methodParameterTypes93; - private String _methodName94; - private String[] _methodParameterTypes94; - private String _methodName95; - private String[] _methodParameterTypes95; - private String _methodName96; - private String[] _methodParameterTypes96; - private String _methodName97; - private String[] _methodParameterTypes97; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistLocalServiceBaseImpl.java deleted file mode 100644 index def99f070d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistLocalServiceBaseImpl.java +++ /dev/null @@ -1,1137 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.CompanyPersistence; -import com.liferay.portal.service.persistence.GroupPersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence; -import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence; -import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.ArtistLocalService; -import org.liferay.jukebox.service.persistence.AlbumPersistence; -import org.liferay.jukebox.service.persistence.ArtistPersistence; -import org.liferay.jukebox.service.persistence.SongPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the artist local service. - * - *

- * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.liferay.jukebox.service.impl.ArtistLocalServiceImpl}. - *

- * - * @author Julio Camarero - * @see org.liferay.jukebox.service.impl.ArtistLocalServiceImpl - * @see org.liferay.jukebox.service.ArtistLocalServiceUtil - * @generated - */ -public abstract class ArtistLocalServiceBaseImpl extends BaseLocalServiceImpl - implements ArtistLocalService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link org.liferay.jukebox.service.ArtistLocalServiceUtil} to access the artist local service. - */ - - /** - * Adds the artist to the database. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public Artist addArtist(Artist artist) throws SystemException { - artist.setNew(true); - - return artistPersistence.update(artist); - } - - /** - * Creates a new artist with the primary key. Does not add the artist to the database. - * - * @param artistId the primary key for the new artist - * @return the new artist - */ - @Override - public Artist createArtist(long artistId) { - return artistPersistence.create(artistId); - } - - /** - * Deletes the artist with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param artistId the primary key of the artist - * @return the artist that was removed - * @throws PortalException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public Artist deleteArtist(long artistId) - throws PortalException, SystemException { - return artistPersistence.remove(artistId); - } - - /** - * Deletes the artist from the database. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was removed - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public Artist deleteArtist(Artist artist) throws SystemException { - return artistPersistence.remove(artist); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(Artist.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 artistPersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @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 artistPersistence.findWithDynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 artistPersistence.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 artistPersistence.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 artistPersistence.countWithDynamicQuery(dynamicQuery, projection); - } - - @Override - public Artist fetchArtist(long artistId) throws SystemException { - return artistPersistence.fetchByPrimaryKey(artistId); - } - - /** - * Returns the artist with the matching UUID and company. - * - * @param uuid the artist's UUID - * @param companyId the primary key of the company - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchArtistByUuidAndCompanyId(String uuid, long companyId) - throws SystemException { - return artistPersistence.fetchByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the artist matching the UUID and group. - * - * @param uuid the artist's UUID - * @param groupId the primary key of the group - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchArtistByUuidAndGroupId(String uuid, long groupId) - throws SystemException { - return artistPersistence.fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the artist with the primary key. - * - * @param artistId the primary key of the artist - * @return the artist - * @throws PortalException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist getArtist(long artistId) - throws PortalException, SystemException { - return artistPersistence.findByPrimaryKey(artistId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return artistPersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns the artist with the matching UUID and company. - * - * @param uuid the artist's UUID - * @param companyId the primary key of the company - * @return the matching artist - * @throws PortalException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist getArtistByUuidAndCompanyId(String uuid, long companyId) - throws PortalException, SystemException { - return artistPersistence.findByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the artist matching the UUID and group. - * - * @param uuid the artist's UUID - * @param groupId the primary key of the group - * @return the matching artist - * @throws PortalException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist getArtistByUuidAndGroupId(String uuid, long groupId) - throws PortalException, SystemException { - return artistPersistence.findByUUID_G(uuid, groupId); - } - - /** - * Returns a range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of artists - * @throws SystemException if a system exception occurred - */ - @Override - public List getArtists(int start, int end) - throws SystemException { - return artistPersistence.findAll(start, end); - } - - /** - * Returns the number of artists. - * - * @return the number of artists - * @throws SystemException if a system exception occurred - */ - @Override - public int getArtistsCount() throws SystemException { - return artistPersistence.countAll(); - } - - /** - * Updates the artist in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param artist the artist - * @return the artist that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public Artist updateArtist(Artist artist) throws SystemException { - return artistPersistence.update(artist); - } - - /** - * Returns the album local service. - * - * @return the album local service - */ - public org.liferay.jukebox.service.AlbumLocalService getAlbumLocalService() { - return albumLocalService; - } - - /** - * Sets the album local service. - * - * @param albumLocalService the album local service - */ - public void setAlbumLocalService( - org.liferay.jukebox.service.AlbumLocalService albumLocalService) { - this.albumLocalService = albumLocalService; - } - - /** - * Returns the album remote service. - * - * @return the album remote service - */ - public org.liferay.jukebox.service.AlbumService getAlbumService() { - return albumService; - } - - /** - * Sets the album remote service. - * - * @param albumService the album remote service - */ - public void setAlbumService( - org.liferay.jukebox.service.AlbumService albumService) { - this.albumService = albumService; - } - - /** - * Returns the album persistence. - * - * @return the album persistence - */ - public AlbumPersistence getAlbumPersistence() { - return albumPersistence; - } - - /** - * Sets the album persistence. - * - * @param albumPersistence the album persistence - */ - public void setAlbumPersistence(AlbumPersistence albumPersistence) { - this.albumPersistence = albumPersistence; - } - - /** - * Returns the artist local service. - * - * @return the artist local service - */ - public org.liferay.jukebox.service.ArtistLocalService getArtistLocalService() { - return artistLocalService; - } - - /** - * Sets the artist local service. - * - * @param artistLocalService the artist local service - */ - public void setArtistLocalService( - org.liferay.jukebox.service.ArtistLocalService artistLocalService) { - this.artistLocalService = artistLocalService; - } - - /** - * Returns the artist remote service. - * - * @return the artist remote service - */ - public org.liferay.jukebox.service.ArtistService getArtistService() { - return artistService; - } - - /** - * Sets the artist remote service. - * - * @param artistService the artist remote service - */ - public void setArtistService( - org.liferay.jukebox.service.ArtistService artistService) { - this.artistService = artistService; - } - - /** - * Returns the artist persistence. - * - * @return the artist persistence - */ - public ArtistPersistence getArtistPersistence() { - return artistPersistence; - } - - /** - * Sets the artist persistence. - * - * @param artistPersistence the artist persistence - */ - public void setArtistPersistence(ArtistPersistence artistPersistence) { - this.artistPersistence = artistPersistence; - } - - /** - * Returns the song local service. - * - * @return the song local service - */ - public org.liferay.jukebox.service.SongLocalService getSongLocalService() { - return songLocalService; - } - - /** - * Sets the song local service. - * - * @param songLocalService the song local service - */ - public void setSongLocalService( - org.liferay.jukebox.service.SongLocalService songLocalService) { - this.songLocalService = songLocalService; - } - - /** - * Returns the song remote service. - * - * @return the song remote service - */ - public org.liferay.jukebox.service.SongService getSongService() { - return songService; - } - - /** - * Sets the song remote service. - * - * @param songService the song remote service - */ - public void setSongService( - org.liferay.jukebox.service.SongService songService) { - this.songService = songService; - } - - /** - * Returns the song persistence. - * - * @return the song persistence - */ - public SongPersistence getSongPersistence() { - return songPersistence; - } - - /** - * Sets the song persistence. - * - * @param songPersistence the song persistence - */ - public void setSongPersistence(SongPersistence songPersistence) { - this.songPersistence = songPersistence; - } - - /** - * 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 company local service. - * - * @return the company local service - */ - public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { - return companyLocalService; - } - - /** - * Sets the company local service. - * - * @param companyLocalService the company local service - */ - public void setCompanyLocalService( - com.liferay.portal.service.CompanyLocalService companyLocalService) { - this.companyLocalService = companyLocalService; - } - - /** - * Returns the company remote service. - * - * @return the company remote service - */ - public com.liferay.portal.service.CompanyService getCompanyService() { - return companyService; - } - - /** - * Sets the company remote service. - * - * @param companyService the company remote service - */ - public void setCompanyService( - com.liferay.portal.service.CompanyService companyService) { - this.companyService = companyService; - } - - /** - * Returns the company persistence. - * - * @return the company persistence - */ - public CompanyPersistence getCompanyPersistence() { - return companyPersistence; - } - - /** - * Sets the company persistence. - * - * @param companyPersistence the company persistence - */ - public void setCompanyPersistence(CompanyPersistence companyPersistence) { - this.companyPersistence = companyPersistence; - } - - /** - * Returns the group local service. - * - * @return the group local service - */ - public com.liferay.portal.service.GroupLocalService getGroupLocalService() { - return groupLocalService; - } - - /** - * Sets the group local service. - * - * @param groupLocalService the group local service - */ - public void setGroupLocalService( - com.liferay.portal.service.GroupLocalService groupLocalService) { - this.groupLocalService = groupLocalService; - } - - /** - * Returns the group remote service. - * - * @return the group remote service - */ - public com.liferay.portal.service.GroupService getGroupService() { - return groupService; - } - - /** - * Sets the group remote service. - * - * @param groupService the group remote service - */ - public void setGroupService( - com.liferay.portal.service.GroupService groupService) { - this.groupService = groupService; - } - - /** - * Returns the group persistence. - * - * @return the group persistence - */ - public GroupPersistence getGroupPersistence() { - return groupPersistence; - } - - /** - * Sets the group persistence. - * - * @param groupPersistence the group persistence - */ - public void setGroupPersistence(GroupPersistence groupPersistence) { - this.groupPersistence = groupPersistence; - } - - /** - * 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; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the asset link local service. - * - * @return the asset link local service - */ - public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() { - return assetLinkLocalService; - } - - /** - * Sets the asset link local service. - * - * @param assetLinkLocalService the asset link local service - */ - public void setAssetLinkLocalService( - com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) { - this.assetLinkLocalService = assetLinkLocalService; - } - - /** - * Returns the asset link persistence. - * - * @return the asset link persistence - */ - public AssetLinkPersistence getAssetLinkPersistence() { - return assetLinkPersistence; - } - - /** - * Sets the asset link persistence. - * - * @param assetLinkPersistence the asset link persistence - */ - public void setAssetLinkPersistence( - AssetLinkPersistence assetLinkPersistence) { - this.assetLinkPersistence = assetLinkPersistence; - } - - /** - * Returns the expando value local service. - * - * @return the expando value local service - */ - public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() { - return expandoValueLocalService; - } - - /** - * Sets the expando value local service. - * - * @param expandoValueLocalService the expando value local service - */ - public void setExpandoValueLocalService( - com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) { - this.expandoValueLocalService = expandoValueLocalService; - } - - /** - * Returns the expando value remote service. - * - * @return the expando value remote service - */ - public com.liferay.portlet.expando.service.ExpandoValueService getExpandoValueService() { - return expandoValueService; - } - - /** - * Sets the expando value remote service. - * - * @param expandoValueService the expando value remote service - */ - public void setExpandoValueService( - com.liferay.portlet.expando.service.ExpandoValueService expandoValueService) { - this.expandoValueService = expandoValueService; - } - - /** - * Returns the expando value persistence. - * - * @return the expando value persistence - */ - public ExpandoValuePersistence getExpandoValuePersistence() { - return expandoValuePersistence; - } - - /** - * Sets the expando value persistence. - * - * @param expandoValuePersistence the expando value persistence - */ - public void setExpandoValuePersistence( - ExpandoValuePersistence expandoValuePersistence) { - this.expandoValuePersistence = expandoValuePersistence; - } - - /** - * Returns the message-boards message local service. - * - * @return the message-boards message local service - */ - public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() { - return mbMessageLocalService; - } - - /** - * Sets the message-boards message local service. - * - * @param mbMessageLocalService the message-boards message local service - */ - public void setMBMessageLocalService( - com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) { - this.mbMessageLocalService = mbMessageLocalService; - } - - /** - * Returns the message-boards message remote service. - * - * @return the message-boards message remote service - */ - public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() { - return mbMessageService; - } - - /** - * Sets the message-boards message remote service. - * - * @param mbMessageService the message-boards message remote service - */ - public void setMBMessageService( - com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) { - this.mbMessageService = mbMessageService; - } - - /** - * Returns the message-boards message persistence. - * - * @return the message-boards message persistence - */ - public MBMessagePersistence getMBMessagePersistence() { - return mbMessagePersistence; - } - - /** - * Sets the message-boards message persistence. - * - * @param mbMessagePersistence the message-boards message persistence - */ - public void setMBMessagePersistence( - MBMessagePersistence mbMessagePersistence) { - this.mbMessagePersistence = mbMessagePersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - public void afterPropertiesSet() { - Class clazz = getClass(); - - _classLoader = clazz.getClassLoader(); - - PersistedModelLocalServiceRegistryUtil.register("org.liferay.jukebox.model.Artist", - artistLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "org.liferay.jukebox.model.Artist"); - } - - /** - * 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 Artist.class; - } - - protected String getModelClassName() { - return Artist.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = artistPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = org.liferay.jukebox.service.AlbumLocalService.class) - protected org.liferay.jukebox.service.AlbumLocalService albumLocalService; - @BeanReference(type = org.liferay.jukebox.service.AlbumService.class) - protected org.liferay.jukebox.service.AlbumService albumService; - @BeanReference(type = AlbumPersistence.class) - protected AlbumPersistence albumPersistence; - @BeanReference(type = org.liferay.jukebox.service.ArtistLocalService.class) - protected org.liferay.jukebox.service.ArtistLocalService artistLocalService; - @BeanReference(type = org.liferay.jukebox.service.ArtistService.class) - protected org.liferay.jukebox.service.ArtistService artistService; - @BeanReference(type = ArtistPersistence.class) - protected ArtistPersistence artistPersistence; - @BeanReference(type = org.liferay.jukebox.service.SongLocalService.class) - protected org.liferay.jukebox.service.SongLocalService songLocalService; - @BeanReference(type = org.liferay.jukebox.service.SongService.class) - protected org.liferay.jukebox.service.SongService songService; - @BeanReference(type = SongPersistence.class) - protected SongPersistence songPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) - protected com.liferay.portal.service.CompanyLocalService companyLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyService.class) - protected com.liferay.portal.service.CompanyService companyService; - @BeanReference(type = CompanyPersistence.class) - protected CompanyPersistence companyPersistence; - @BeanReference(type = com.liferay.portal.service.GroupLocalService.class) - protected com.liferay.portal.service.GroupLocalService groupLocalService; - @BeanReference(type = com.liferay.portal.service.GroupService.class) - protected com.liferay.portal.service.GroupService groupService; - @BeanReference(type = GroupPersistence.class) - protected GroupPersistence groupPersistence; - @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; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class) - protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService; - @BeanReference(type = AssetLinkPersistence.class) - protected AssetLinkPersistence assetLinkPersistence; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class) - protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class) - protected com.liferay.portlet.expando.service.ExpandoValueService expandoValueService; - @BeanReference(type = ExpandoValuePersistence.class) - protected ExpandoValuePersistence expandoValuePersistence; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class) - protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class) - protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService; - @BeanReference(type = MBMessagePersistence.class) - protected MBMessagePersistence mbMessagePersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private ArtistLocalServiceClpInvoker _clpInvoker = new ArtistLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistLocalServiceClpInvoker.java deleted file mode 100644 index 7841da83f4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistLocalServiceClpInvoker.java +++ /dev/null @@ -1,452 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.base; - -import org.liferay.jukebox.service.ArtistLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Julio Camarero - * @generated - */ -public class ArtistLocalServiceClpInvoker { - public ArtistLocalServiceClpInvoker() { - _methodName0 = "addArtist"; - - _methodParameterTypes0 = new String[] { "org.liferay.jukebox.model.Artist" }; - - _methodName1 = "createArtist"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteArtist"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteArtist"; - - _methodParameterTypes3 = new String[] { "org.liferay.jukebox.model.Artist" }; - - _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 = "fetchArtist"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchArtistByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchArtistByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getArtist"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getArtistByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getArtistByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getArtists"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getArtistsCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateArtist"; - - _methodParameterTypes19 = new String[] { - "org.liferay.jukebox.model.Artist" - }; - - _methodName90 = "getBeanIdentifier"; - - _methodParameterTypes90 = new String[] { }; - - _methodName91 = "setBeanIdentifier"; - - _methodParameterTypes91 = new String[] { "java.lang.String" }; - - _methodName96 = "addArtist"; - - _methodParameterTypes96 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName97 = "addEntryResources"; - - _methodParameterTypes97 = new String[] { - "org.liferay.jukebox.model.Artist", "boolean", "boolean" - }; - - _methodName98 = "addEntryResources"; - - _methodParameterTypes98 = new String[] { - "org.liferay.jukebox.model.Artist", "java.lang.String[][]", - "java.lang.String[][]" - }; - - _methodName99 = "deleteArtist"; - - _methodParameterTypes99 = new String[] { "long" }; - - _methodName100 = "deleteArtists"; - - _methodParameterTypes100 = new String[] { "long" }; - - _methodName101 = "getArtists"; - - _methodParameterTypes101 = new String[] { "long" }; - - _methodName102 = "getArtists"; - - _methodParameterTypes102 = new String[] { "long", "int", "int" }; - - _methodName103 = "getArtistsCount"; - - _methodParameterTypes103 = new String[] { "long" }; - - _methodName104 = "updateArtist"; - - _methodParameterTypes104 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName105 = "updateAsset"; - - _methodParameterTypes105 = new String[] { - "long", "org.liferay.jukebox.model.Artist", "long[][]", - "java.lang.String[][]", "long[][]" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return ArtistLocalServiceUtil.addArtist((org.liferay.jukebox.model.Artist)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return ArtistLocalServiceUtil.createArtist(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return ArtistLocalServiceUtil.deleteArtist(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return ArtistLocalServiceUtil.deleteArtist((org.liferay.jukebox.model.Artist)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return ArtistLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return ArtistLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return ArtistLocalServiceUtil.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 ArtistLocalServiceUtil.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 ArtistLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return ArtistLocalServiceUtil.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 ArtistLocalServiceUtil.fetchArtist(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return ArtistLocalServiceUtil.fetchArtistByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return ArtistLocalServiceUtil.fetchArtistByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return ArtistLocalServiceUtil.getArtist(((Long)arguments[0]).longValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return ArtistLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return ArtistLocalServiceUtil.getArtistByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName16.equals(name) && - Arrays.deepEquals(_methodParameterTypes16, parameterTypes)) { - return ArtistLocalServiceUtil.getArtistByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName17.equals(name) && - Arrays.deepEquals(_methodParameterTypes17, parameterTypes)) { - return ArtistLocalServiceUtil.getArtists(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName18.equals(name) && - Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) { - return ArtistLocalServiceUtil.getArtistsCount(); - } - - if (_methodName19.equals(name) && - Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) { - return ArtistLocalServiceUtil.updateArtist((org.liferay.jukebox.model.Artist)arguments[0]); - } - - if (_methodName90.equals(name) && - Arrays.deepEquals(_methodParameterTypes90, parameterTypes)) { - return ArtistLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName91.equals(name) && - Arrays.deepEquals(_methodParameterTypes91, parameterTypes)) { - ArtistLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName96.equals(name) && - Arrays.deepEquals(_methodParameterTypes96, parameterTypes)) { - return ArtistLocalServiceUtil.addArtist(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (java.io.InputStream)arguments[3], - (com.liferay.portal.service.ServiceContext)arguments[4]); - } - - if (_methodName97.equals(name) && - Arrays.deepEquals(_methodParameterTypes97, parameterTypes)) { - ArtistLocalServiceUtil.addEntryResources((org.liferay.jukebox.model.Artist)arguments[0], - ((Boolean)arguments[1]).booleanValue(), - ((Boolean)arguments[2]).booleanValue()); - - return null; - } - - if (_methodName98.equals(name) && - Arrays.deepEquals(_methodParameterTypes98, parameterTypes)) { - ArtistLocalServiceUtil.addEntryResources((org.liferay.jukebox.model.Artist)arguments[0], - (java.lang.String[])arguments[1], - (java.lang.String[])arguments[2]); - - return null; - } - - if (_methodName99.equals(name) && - Arrays.deepEquals(_methodParameterTypes99, parameterTypes)) { - return ArtistLocalServiceUtil.deleteArtist(((Long)arguments[0]).longValue()); - } - - if (_methodName100.equals(name) && - Arrays.deepEquals(_methodParameterTypes100, parameterTypes)) { - ArtistLocalServiceUtil.deleteArtists(((Long)arguments[0]).longValue()); - - return null; - } - - if (_methodName101.equals(name) && - Arrays.deepEquals(_methodParameterTypes101, parameterTypes)) { - return ArtistLocalServiceUtil.getArtists(((Long)arguments[0]).longValue()); - } - - if (_methodName102.equals(name) && - Arrays.deepEquals(_methodParameterTypes102, parameterTypes)) { - return ArtistLocalServiceUtil.getArtists(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName103.equals(name) && - Arrays.deepEquals(_methodParameterTypes103, parameterTypes)) { - return ArtistLocalServiceUtil.getArtistsCount(((Long)arguments[0]).longValue()); - } - - if (_methodName104.equals(name) && - Arrays.deepEquals(_methodParameterTypes104, parameterTypes)) { - return ArtistLocalServiceUtil.updateArtist(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], (java.lang.String)arguments[3], - (java.io.InputStream)arguments[4], - (com.liferay.portal.service.ServiceContext)arguments[5]); - } - - if (_methodName105.equals(name) && - Arrays.deepEquals(_methodParameterTypes105, parameterTypes)) { - ArtistLocalServiceUtil.updateAsset(((Long)arguments[0]).longValue(), - (org.liferay.jukebox.model.Artist)arguments[1], - (long[])arguments[2], (java.lang.String[])arguments[3], - (long[])arguments[4]); - - 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 _methodName16; - private String[] _methodParameterTypes16; - private String _methodName17; - private String[] _methodParameterTypes17; - private String _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName90; - private String[] _methodParameterTypes90; - private String _methodName91; - private String[] _methodParameterTypes91; - private String _methodName96; - private String[] _methodParameterTypes96; - private String _methodName97; - private String[] _methodParameterTypes97; - private String _methodName98; - private String[] _methodParameterTypes98; - private String _methodName99; - private String[] _methodParameterTypes99; - private String _methodName100; - private String[] _methodParameterTypes100; - private String _methodName101; - private String[] _methodParameterTypes101; - private String _methodName102; - private String[] _methodParameterTypes102; - private String _methodName103; - private String[] _methodParameterTypes103; - private String _methodName104; - private String[] _methodParameterTypes104; - private String _methodName105; - private String[] _methodParameterTypes105; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistServiceBaseImpl.java deleted file mode 100644 index 197589f9a3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistServiceBaseImpl.java +++ /dev/null @@ -1,849 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.CompanyPersistence; -import com.liferay.portal.service.persistence.GroupPersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence; -import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence; -import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.ArtistService; -import org.liferay.jukebox.service.persistence.AlbumPersistence; -import org.liferay.jukebox.service.persistence.ArtistPersistence; -import org.liferay.jukebox.service.persistence.SongPersistence; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the artist remote service. - * - *

- * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.liferay.jukebox.service.impl.ArtistServiceImpl}. - *

- * - * @author Julio Camarero - * @see org.liferay.jukebox.service.impl.ArtistServiceImpl - * @see org.liferay.jukebox.service.ArtistServiceUtil - * @generated - */ -public abstract class ArtistServiceBaseImpl extends BaseServiceImpl - implements ArtistService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link org.liferay.jukebox.service.ArtistServiceUtil} to access the artist remote service. - */ - - /** - * Returns the album local service. - * - * @return the album local service - */ - public org.liferay.jukebox.service.AlbumLocalService getAlbumLocalService() { - return albumLocalService; - } - - /** - * Sets the album local service. - * - * @param albumLocalService the album local service - */ - public void setAlbumLocalService( - org.liferay.jukebox.service.AlbumLocalService albumLocalService) { - this.albumLocalService = albumLocalService; - } - - /** - * Returns the album remote service. - * - * @return the album remote service - */ - public org.liferay.jukebox.service.AlbumService getAlbumService() { - return albumService; - } - - /** - * Sets the album remote service. - * - * @param albumService the album remote service - */ - public void setAlbumService( - org.liferay.jukebox.service.AlbumService albumService) { - this.albumService = albumService; - } - - /** - * Returns the album persistence. - * - * @return the album persistence - */ - public AlbumPersistence getAlbumPersistence() { - return albumPersistence; - } - - /** - * Sets the album persistence. - * - * @param albumPersistence the album persistence - */ - public void setAlbumPersistence(AlbumPersistence albumPersistence) { - this.albumPersistence = albumPersistence; - } - - /** - * Returns the artist local service. - * - * @return the artist local service - */ - public org.liferay.jukebox.service.ArtistLocalService getArtistLocalService() { - return artistLocalService; - } - - /** - * Sets the artist local service. - * - * @param artistLocalService the artist local service - */ - public void setArtistLocalService( - org.liferay.jukebox.service.ArtistLocalService artistLocalService) { - this.artistLocalService = artistLocalService; - } - - /** - * Returns the artist remote service. - * - * @return the artist remote service - */ - public org.liferay.jukebox.service.ArtistService getArtistService() { - return artistService; - } - - /** - * Sets the artist remote service. - * - * @param artistService the artist remote service - */ - public void setArtistService( - org.liferay.jukebox.service.ArtistService artistService) { - this.artistService = artistService; - } - - /** - * Returns the artist persistence. - * - * @return the artist persistence - */ - public ArtistPersistence getArtistPersistence() { - return artistPersistence; - } - - /** - * Sets the artist persistence. - * - * @param artistPersistence the artist persistence - */ - public void setArtistPersistence(ArtistPersistence artistPersistence) { - this.artistPersistence = artistPersistence; - } - - /** - * Returns the song local service. - * - * @return the song local service - */ - public org.liferay.jukebox.service.SongLocalService getSongLocalService() { - return songLocalService; - } - - /** - * Sets the song local service. - * - * @param songLocalService the song local service - */ - public void setSongLocalService( - org.liferay.jukebox.service.SongLocalService songLocalService) { - this.songLocalService = songLocalService; - } - - /** - * Returns the song remote service. - * - * @return the song remote service - */ - public org.liferay.jukebox.service.SongService getSongService() { - return songService; - } - - /** - * Sets the song remote service. - * - * @param songService the song remote service - */ - public void setSongService( - org.liferay.jukebox.service.SongService songService) { - this.songService = songService; - } - - /** - * Returns the song persistence. - * - * @return the song persistence - */ - public SongPersistence getSongPersistence() { - return songPersistence; - } - - /** - * Sets the song persistence. - * - * @param songPersistence the song persistence - */ - public void setSongPersistence(SongPersistence songPersistence) { - this.songPersistence = songPersistence; - } - - /** - * 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 company local service. - * - * @return the company local service - */ - public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { - return companyLocalService; - } - - /** - * Sets the company local service. - * - * @param companyLocalService the company local service - */ - public void setCompanyLocalService( - com.liferay.portal.service.CompanyLocalService companyLocalService) { - this.companyLocalService = companyLocalService; - } - - /** - * Returns the company remote service. - * - * @return the company remote service - */ - public com.liferay.portal.service.CompanyService getCompanyService() { - return companyService; - } - - /** - * Sets the company remote service. - * - * @param companyService the company remote service - */ - public void setCompanyService( - com.liferay.portal.service.CompanyService companyService) { - this.companyService = companyService; - } - - /** - * Returns the company persistence. - * - * @return the company persistence - */ - public CompanyPersistence getCompanyPersistence() { - return companyPersistence; - } - - /** - * Sets the company persistence. - * - * @param companyPersistence the company persistence - */ - public void setCompanyPersistence(CompanyPersistence companyPersistence) { - this.companyPersistence = companyPersistence; - } - - /** - * Returns the group local service. - * - * @return the group local service - */ - public com.liferay.portal.service.GroupLocalService getGroupLocalService() { - return groupLocalService; - } - - /** - * Sets the group local service. - * - * @param groupLocalService the group local service - */ - public void setGroupLocalService( - com.liferay.portal.service.GroupLocalService groupLocalService) { - this.groupLocalService = groupLocalService; - } - - /** - * Returns the group remote service. - * - * @return the group remote service - */ - public com.liferay.portal.service.GroupService getGroupService() { - return groupService; - } - - /** - * Sets the group remote service. - * - * @param groupService the group remote service - */ - public void setGroupService( - com.liferay.portal.service.GroupService groupService) { - this.groupService = groupService; - } - - /** - * Returns the group persistence. - * - * @return the group persistence - */ - public GroupPersistence getGroupPersistence() { - return groupPersistence; - } - - /** - * Sets the group persistence. - * - * @param groupPersistence the group persistence - */ - public void setGroupPersistence(GroupPersistence groupPersistence) { - this.groupPersistence = groupPersistence; - } - - /** - * 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; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the asset link local service. - * - * @return the asset link local service - */ - public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() { - return assetLinkLocalService; - } - - /** - * Sets the asset link local service. - * - * @param assetLinkLocalService the asset link local service - */ - public void setAssetLinkLocalService( - com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) { - this.assetLinkLocalService = assetLinkLocalService; - } - - /** - * Returns the asset link persistence. - * - * @return the asset link persistence - */ - public AssetLinkPersistence getAssetLinkPersistence() { - return assetLinkPersistence; - } - - /** - * Sets the asset link persistence. - * - * @param assetLinkPersistence the asset link persistence - */ - public void setAssetLinkPersistence( - AssetLinkPersistence assetLinkPersistence) { - this.assetLinkPersistence = assetLinkPersistence; - } - - /** - * Returns the expando value local service. - * - * @return the expando value local service - */ - public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() { - return expandoValueLocalService; - } - - /** - * Sets the expando value local service. - * - * @param expandoValueLocalService the expando value local service - */ - public void setExpandoValueLocalService( - com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) { - this.expandoValueLocalService = expandoValueLocalService; - } - - /** - * Returns the expando value remote service. - * - * @return the expando value remote service - */ - public com.liferay.portlet.expando.service.ExpandoValueService getExpandoValueService() { - return expandoValueService; - } - - /** - * Sets the expando value remote service. - * - * @param expandoValueService the expando value remote service - */ - public void setExpandoValueService( - com.liferay.portlet.expando.service.ExpandoValueService expandoValueService) { - this.expandoValueService = expandoValueService; - } - - /** - * Returns the expando value persistence. - * - * @return the expando value persistence - */ - public ExpandoValuePersistence getExpandoValuePersistence() { - return expandoValuePersistence; - } - - /** - * Sets the expando value persistence. - * - * @param expandoValuePersistence the expando value persistence - */ - public void setExpandoValuePersistence( - ExpandoValuePersistence expandoValuePersistence) { - this.expandoValuePersistence = expandoValuePersistence; - } - - /** - * Returns the message-boards message local service. - * - * @return the message-boards message local service - */ - public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() { - return mbMessageLocalService; - } - - /** - * Sets the message-boards message local service. - * - * @param mbMessageLocalService the message-boards message local service - */ - public void setMBMessageLocalService( - com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) { - this.mbMessageLocalService = mbMessageLocalService; - } - - /** - * Returns the message-boards message remote service. - * - * @return the message-boards message remote service - */ - public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() { - return mbMessageService; - } - - /** - * Sets the message-boards message remote service. - * - * @param mbMessageService the message-boards message remote service - */ - public void setMBMessageService( - com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) { - this.mbMessageService = mbMessageService; - } - - /** - * Returns the message-boards message persistence. - * - * @return the message-boards message persistence - */ - public MBMessagePersistence getMBMessagePersistence() { - return mbMessagePersistence; - } - - /** - * Sets the message-boards message persistence. - * - * @param mbMessagePersistence the message-boards message persistence - */ - public void setMBMessagePersistence( - MBMessagePersistence mbMessagePersistence) { - this.mbMessagePersistence = mbMessagePersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - 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 Artist.class; - } - - protected String getModelClassName() { - return Artist.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = artistPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = org.liferay.jukebox.service.AlbumLocalService.class) - protected org.liferay.jukebox.service.AlbumLocalService albumLocalService; - @BeanReference(type = org.liferay.jukebox.service.AlbumService.class) - protected org.liferay.jukebox.service.AlbumService albumService; - @BeanReference(type = AlbumPersistence.class) - protected AlbumPersistence albumPersistence; - @BeanReference(type = org.liferay.jukebox.service.ArtistLocalService.class) - protected org.liferay.jukebox.service.ArtistLocalService artistLocalService; - @BeanReference(type = org.liferay.jukebox.service.ArtistService.class) - protected org.liferay.jukebox.service.ArtistService artistService; - @BeanReference(type = ArtistPersistence.class) - protected ArtistPersistence artistPersistence; - @BeanReference(type = org.liferay.jukebox.service.SongLocalService.class) - protected org.liferay.jukebox.service.SongLocalService songLocalService; - @BeanReference(type = org.liferay.jukebox.service.SongService.class) - protected org.liferay.jukebox.service.SongService songService; - @BeanReference(type = SongPersistence.class) - protected SongPersistence songPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) - protected com.liferay.portal.service.CompanyLocalService companyLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyService.class) - protected com.liferay.portal.service.CompanyService companyService; - @BeanReference(type = CompanyPersistence.class) - protected CompanyPersistence companyPersistence; - @BeanReference(type = com.liferay.portal.service.GroupLocalService.class) - protected com.liferay.portal.service.GroupLocalService groupLocalService; - @BeanReference(type = com.liferay.portal.service.GroupService.class) - protected com.liferay.portal.service.GroupService groupService; - @BeanReference(type = GroupPersistence.class) - protected GroupPersistence groupPersistence; - @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; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class) - protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService; - @BeanReference(type = AssetLinkPersistence.class) - protected AssetLinkPersistence assetLinkPersistence; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class) - protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class) - protected com.liferay.portlet.expando.service.ExpandoValueService expandoValueService; - @BeanReference(type = ExpandoValuePersistence.class) - protected ExpandoValuePersistence expandoValuePersistence; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class) - protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class) - protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService; - @BeanReference(type = MBMessagePersistence.class) - protected MBMessagePersistence mbMessagePersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private ArtistServiceClpInvoker _clpInvoker = new ArtistServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistServiceClpInvoker.java deleted file mode 100644 index 9d4175255d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/ArtistServiceClpInvoker.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.base; - -import org.liferay.jukebox.service.ArtistServiceUtil; - -import java.util.Arrays; - -/** - * @author Julio Camarero - * @generated - */ -public class ArtistServiceClpInvoker { - public ArtistServiceClpInvoker() { - _methodName70 = "getBeanIdentifier"; - - _methodParameterTypes70 = new String[] { }; - - _methodName71 = "setBeanIdentifier"; - - _methodParameterTypes71 = new String[] { "java.lang.String" }; - - _methodName76 = "addArtist"; - - _methodParameterTypes76 = new String[] { - "java.lang.String", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName77 = "deleteArtist"; - - _methodParameterTypes77 = new String[] { - "long", "com.liferay.portal.service.ServiceContext" - }; - - _methodName78 = "getArtists"; - - _methodParameterTypes78 = new String[] { "long" }; - - _methodName79 = "getArtists"; - - _methodParameterTypes79 = new String[] { "long", "int", "int" }; - - _methodName80 = "getArtists"; - - _methodParameterTypes80 = new String[] { "long", "java.lang.String" }; - - _methodName81 = "getArtistsCount"; - - _methodParameterTypes81 = new String[] { "long" }; - - _methodName82 = "getArtistsCount"; - - _methodParameterTypes82 = new String[] { "long", "java.lang.String" }; - - _methodName83 = "updateArtist"; - - _methodParameterTypes83 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName70.equals(name) && - Arrays.deepEquals(_methodParameterTypes70, parameterTypes)) { - return ArtistServiceUtil.getBeanIdentifier(); - } - - if (_methodName71.equals(name) && - Arrays.deepEquals(_methodParameterTypes71, parameterTypes)) { - ArtistServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName76.equals(name) && - Arrays.deepEquals(_methodParameterTypes76, parameterTypes)) { - return ArtistServiceUtil.addArtist((java.lang.String)arguments[0], - (java.lang.String)arguments[1], - (java.io.InputStream)arguments[2], - (com.liferay.portal.service.ServiceContext)arguments[3]); - } - - if (_methodName77.equals(name) && - Arrays.deepEquals(_methodParameterTypes77, parameterTypes)) { - return ArtistServiceUtil.deleteArtist(((Long)arguments[0]).longValue(), - (com.liferay.portal.service.ServiceContext)arguments[1]); - } - - if (_methodName78.equals(name) && - Arrays.deepEquals(_methodParameterTypes78, parameterTypes)) { - return ArtistServiceUtil.getArtists(((Long)arguments[0]).longValue()); - } - - if (_methodName79.equals(name) && - Arrays.deepEquals(_methodParameterTypes79, parameterTypes)) { - return ArtistServiceUtil.getArtists(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName80.equals(name) && - Arrays.deepEquals(_methodParameterTypes80, parameterTypes)) { - return ArtistServiceUtil.getArtists(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - if (_methodName81.equals(name) && - Arrays.deepEquals(_methodParameterTypes81, parameterTypes)) { - return ArtistServiceUtil.getArtistsCount(((Long)arguments[0]).longValue()); - } - - if (_methodName82.equals(name) && - Arrays.deepEquals(_methodParameterTypes82, parameterTypes)) { - return ArtistServiceUtil.getArtistsCount(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - if (_methodName83.equals(name) && - Arrays.deepEquals(_methodParameterTypes83, parameterTypes)) { - return ArtistServiceUtil.updateArtist(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (java.io.InputStream)arguments[3], - (com.liferay.portal.service.ServiceContext)arguments[4]); - } - - throw new UnsupportedOperationException(); - } - - private String _methodName70; - private String[] _methodParameterTypes70; - private String _methodName71; - private String[] _methodParameterTypes71; - private String _methodName76; - private String[] _methodParameterTypes76; - private String _methodName77; - private String[] _methodParameterTypes77; - private String _methodName78; - private String[] _methodParameterTypes78; - private String _methodName79; - private String[] _methodParameterTypes79; - private String _methodName80; - private String[] _methodParameterTypes80; - private String _methodName81; - private String[] _methodParameterTypes81; - private String _methodName82; - private String[] _methodParameterTypes82; - private String _methodName83; - private String[] _methodParameterTypes83; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongLocalServiceBaseImpl.java deleted file mode 100644 index 8ae2048ade..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongLocalServiceBaseImpl.java +++ /dev/null @@ -1,1241 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.CompanyPersistence; -import com.liferay.portal.service.persistence.GroupPersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence; -import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence; -import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; -import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence; -import com.liferay.portlet.trash.service.persistence.TrashVersionPersistence; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.SongLocalService; -import org.liferay.jukebox.service.persistence.AlbumPersistence; -import org.liferay.jukebox.service.persistence.ArtistPersistence; -import org.liferay.jukebox.service.persistence.SongPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the song local service. - * - *

- * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.liferay.jukebox.service.impl.SongLocalServiceImpl}. - *

- * - * @author Julio Camarero - * @see org.liferay.jukebox.service.impl.SongLocalServiceImpl - * @see org.liferay.jukebox.service.SongLocalServiceUtil - * @generated - */ -public abstract class SongLocalServiceBaseImpl extends BaseLocalServiceImpl - implements SongLocalService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link org.liferay.jukebox.service.SongLocalServiceUtil} to access the song local service. - */ - - /** - * Adds the song to the database. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public Song addSong(Song song) throws SystemException { - song.setNew(true); - - return songPersistence.update(song); - } - - /** - * Creates a new song with the primary key. Does not add the song to the database. - * - * @param songId the primary key for the new song - * @return the new song - */ - @Override - public Song createSong(long songId) { - return songPersistence.create(songId); - } - - /** - * Deletes the song with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param songId the primary key of the song - * @return the song that was removed - * @throws PortalException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public Song deleteSong(long songId) throws PortalException, SystemException { - return songPersistence.remove(songId); - } - - /** - * Deletes the song from the database. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public Song deleteSong(Song song) throws SystemException { - return songPersistence.remove(song); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(Song.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 songPersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @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 songPersistence.findWithDynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @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 null) - * @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 songPersistence.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 songPersistence.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 songPersistence.countWithDynamicQuery(dynamicQuery, projection); - } - - @Override - public Song fetchSong(long songId) throws SystemException { - return songPersistence.fetchByPrimaryKey(songId); - } - - /** - * Returns the song with the matching UUID and company. - * - * @param uuid the song's UUID - * @param companyId the primary key of the company - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchSongByUuidAndCompanyId(String uuid, long companyId) - throws SystemException { - return songPersistence.fetchByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the song matching the UUID and group. - * - * @param uuid the song's UUID - * @param groupId the primary key of the group - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchSongByUuidAndGroupId(String uuid, long groupId) - throws SystemException { - return songPersistence.fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the song with the primary key. - * - * @param songId the primary key of the song - * @return the song - * @throws PortalException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song getSong(long songId) throws PortalException, SystemException { - return songPersistence.findByPrimaryKey(songId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return songPersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns the song with the matching UUID and company. - * - * @param uuid the song's UUID - * @param companyId the primary key of the company - * @return the matching song - * @throws PortalException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song getSongByUuidAndCompanyId(String uuid, long companyId) - throws PortalException, SystemException { - return songPersistence.findByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the song matching the UUID and group. - * - * @param uuid the song's UUID - * @param groupId the primary key of the group - * @return the matching song - * @throws PortalException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song getSongByUuidAndGroupId(String uuid, long groupId) - throws PortalException, SystemException { - return songPersistence.findByUUID_G(uuid, groupId); - } - - /** - * Returns a range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of songs - * @throws SystemException if a system exception occurred - */ - @Override - public List getSongs(int start, int end) throws SystemException { - return songPersistence.findAll(start, end); - } - - /** - * Returns the number of songs. - * - * @return the number of songs - * @throws SystemException if a system exception occurred - */ - @Override - public int getSongsCount() throws SystemException { - return songPersistence.countAll(); - } - - /** - * Updates the song in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param song the song - * @return the song that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public Song updateSong(Song song) throws SystemException { - return songPersistence.update(song); - } - - /** - * Returns the album local service. - * - * @return the album local service - */ - public org.liferay.jukebox.service.AlbumLocalService getAlbumLocalService() { - return albumLocalService; - } - - /** - * Sets the album local service. - * - * @param albumLocalService the album local service - */ - public void setAlbumLocalService( - org.liferay.jukebox.service.AlbumLocalService albumLocalService) { - this.albumLocalService = albumLocalService; - } - - /** - * Returns the album remote service. - * - * @return the album remote service - */ - public org.liferay.jukebox.service.AlbumService getAlbumService() { - return albumService; - } - - /** - * Sets the album remote service. - * - * @param albumService the album remote service - */ - public void setAlbumService( - org.liferay.jukebox.service.AlbumService albumService) { - this.albumService = albumService; - } - - /** - * Returns the album persistence. - * - * @return the album persistence - */ - public AlbumPersistence getAlbumPersistence() { - return albumPersistence; - } - - /** - * Sets the album persistence. - * - * @param albumPersistence the album persistence - */ - public void setAlbumPersistence(AlbumPersistence albumPersistence) { - this.albumPersistence = albumPersistence; - } - - /** - * Returns the artist local service. - * - * @return the artist local service - */ - public org.liferay.jukebox.service.ArtistLocalService getArtistLocalService() { - return artistLocalService; - } - - /** - * Sets the artist local service. - * - * @param artistLocalService the artist local service - */ - public void setArtistLocalService( - org.liferay.jukebox.service.ArtistLocalService artistLocalService) { - this.artistLocalService = artistLocalService; - } - - /** - * Returns the artist remote service. - * - * @return the artist remote service - */ - public org.liferay.jukebox.service.ArtistService getArtistService() { - return artistService; - } - - /** - * Sets the artist remote service. - * - * @param artistService the artist remote service - */ - public void setArtistService( - org.liferay.jukebox.service.ArtistService artistService) { - this.artistService = artistService; - } - - /** - * Returns the artist persistence. - * - * @return the artist persistence - */ - public ArtistPersistence getArtistPersistence() { - return artistPersistence; - } - - /** - * Sets the artist persistence. - * - * @param artistPersistence the artist persistence - */ - public void setArtistPersistence(ArtistPersistence artistPersistence) { - this.artistPersistence = artistPersistence; - } - - /** - * Returns the song local service. - * - * @return the song local service - */ - public org.liferay.jukebox.service.SongLocalService getSongLocalService() { - return songLocalService; - } - - /** - * Sets the song local service. - * - * @param songLocalService the song local service - */ - public void setSongLocalService( - org.liferay.jukebox.service.SongLocalService songLocalService) { - this.songLocalService = songLocalService; - } - - /** - * Returns the song remote service. - * - * @return the song remote service - */ - public org.liferay.jukebox.service.SongService getSongService() { - return songService; - } - - /** - * Sets the song remote service. - * - * @param songService the song remote service - */ - public void setSongService( - org.liferay.jukebox.service.SongService songService) { - this.songService = songService; - } - - /** - * Returns the song persistence. - * - * @return the song persistence - */ - public SongPersistence getSongPersistence() { - return songPersistence; - } - - /** - * Sets the song persistence. - * - * @param songPersistence the song persistence - */ - public void setSongPersistence(SongPersistence songPersistence) { - this.songPersistence = songPersistence; - } - - /** - * 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 company local service. - * - * @return the company local service - */ - public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { - return companyLocalService; - } - - /** - * Sets the company local service. - * - * @param companyLocalService the company local service - */ - public void setCompanyLocalService( - com.liferay.portal.service.CompanyLocalService companyLocalService) { - this.companyLocalService = companyLocalService; - } - - /** - * Returns the company remote service. - * - * @return the company remote service - */ - public com.liferay.portal.service.CompanyService getCompanyService() { - return companyService; - } - - /** - * Sets the company remote service. - * - * @param companyService the company remote service - */ - public void setCompanyService( - com.liferay.portal.service.CompanyService companyService) { - this.companyService = companyService; - } - - /** - * Returns the company persistence. - * - * @return the company persistence - */ - public CompanyPersistence getCompanyPersistence() { - return companyPersistence; - } - - /** - * Sets the company persistence. - * - * @param companyPersistence the company persistence - */ - public void setCompanyPersistence(CompanyPersistence companyPersistence) { - this.companyPersistence = companyPersistence; - } - - /** - * Returns the group local service. - * - * @return the group local service - */ - public com.liferay.portal.service.GroupLocalService getGroupLocalService() { - return groupLocalService; - } - - /** - * Sets the group local service. - * - * @param groupLocalService the group local service - */ - public void setGroupLocalService( - com.liferay.portal.service.GroupLocalService groupLocalService) { - this.groupLocalService = groupLocalService; - } - - /** - * Returns the group remote service. - * - * @return the group remote service - */ - public com.liferay.portal.service.GroupService getGroupService() { - return groupService; - } - - /** - * Sets the group remote service. - * - * @param groupService the group remote service - */ - public void setGroupService( - com.liferay.portal.service.GroupService groupService) { - this.groupService = groupService; - } - - /** - * Returns the group persistence. - * - * @return the group persistence - */ - public GroupPersistence getGroupPersistence() { - return groupPersistence; - } - - /** - * Sets the group persistence. - * - * @param groupPersistence the group persistence - */ - public void setGroupPersistence(GroupPersistence groupPersistence) { - this.groupPersistence = groupPersistence; - } - - /** - * 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; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the asset link local service. - * - * @return the asset link local service - */ - public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() { - return assetLinkLocalService; - } - - /** - * Sets the asset link local service. - * - * @param assetLinkLocalService the asset link local service - */ - public void setAssetLinkLocalService( - com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) { - this.assetLinkLocalService = assetLinkLocalService; - } - - /** - * Returns the asset link persistence. - * - * @return the asset link persistence - */ - public AssetLinkPersistence getAssetLinkPersistence() { - return assetLinkPersistence; - } - - /** - * Sets the asset link persistence. - * - * @param assetLinkPersistence the asset link persistence - */ - public void setAssetLinkPersistence( - AssetLinkPersistence assetLinkPersistence) { - this.assetLinkPersistence = assetLinkPersistence; - } - - /** - * Returns the expando value local service. - * - * @return the expando value local service - */ - public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() { - return expandoValueLocalService; - } - - /** - * Sets the expando value local service. - * - * @param expandoValueLocalService the expando value local service - */ - public void setExpandoValueLocalService( - com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) { - this.expandoValueLocalService = expandoValueLocalService; - } - - /** - * Returns the expando value remote service. - * - * @return the expando value remote service - */ - public com.liferay.portlet.expando.service.ExpandoValueService getExpandoValueService() { - return expandoValueService; - } - - /** - * Sets the expando value remote service. - * - * @param expandoValueService the expando value remote service - */ - public void setExpandoValueService( - com.liferay.portlet.expando.service.ExpandoValueService expandoValueService) { - this.expandoValueService = expandoValueService; - } - - /** - * Returns the expando value persistence. - * - * @return the expando value persistence - */ - public ExpandoValuePersistence getExpandoValuePersistence() { - return expandoValuePersistence; - } - - /** - * Sets the expando value persistence. - * - * @param expandoValuePersistence the expando value persistence - */ - public void setExpandoValuePersistence( - ExpandoValuePersistence expandoValuePersistence) { - this.expandoValuePersistence = expandoValuePersistence; - } - - /** - * Returns the message-boards message local service. - * - * @return the message-boards message local service - */ - public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() { - return mbMessageLocalService; - } - - /** - * Sets the message-boards message local service. - * - * @param mbMessageLocalService the message-boards message local service - */ - public void setMBMessageLocalService( - com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) { - this.mbMessageLocalService = mbMessageLocalService; - } - - /** - * Returns the message-boards message remote service. - * - * @return the message-boards message remote service - */ - public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() { - return mbMessageService; - } - - /** - * Sets the message-boards message remote service. - * - * @param mbMessageService the message-boards message remote service - */ - public void setMBMessageService( - com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) { - this.mbMessageService = mbMessageService; - } - - /** - * Returns the message-boards message persistence. - * - * @return the message-boards message persistence - */ - public MBMessagePersistence getMBMessagePersistence() { - return mbMessagePersistence; - } - - /** - * Sets the message-boards message persistence. - * - * @param mbMessagePersistence the message-boards message persistence - */ - public void setMBMessagePersistence( - MBMessagePersistence mbMessagePersistence) { - this.mbMessagePersistence = mbMessagePersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - /** - * Returns the trash entry local service. - * - * @return the trash entry local service - */ - public com.liferay.portlet.trash.service.TrashEntryLocalService getTrashEntryLocalService() { - return trashEntryLocalService; - } - - /** - * Sets the trash entry local service. - * - * @param trashEntryLocalService the trash entry local service - */ - public void setTrashEntryLocalService( - com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService) { - this.trashEntryLocalService = trashEntryLocalService; - } - - /** - * Returns the trash entry remote service. - * - * @return the trash entry remote service - */ - public com.liferay.portlet.trash.service.TrashEntryService getTrashEntryService() { - return trashEntryService; - } - - /** - * Sets the trash entry remote service. - * - * @param trashEntryService the trash entry remote service - */ - public void setTrashEntryService( - com.liferay.portlet.trash.service.TrashEntryService trashEntryService) { - this.trashEntryService = trashEntryService; - } - - /** - * Returns the trash entry persistence. - * - * @return the trash entry persistence - */ - public TrashEntryPersistence getTrashEntryPersistence() { - return trashEntryPersistence; - } - - /** - * Sets the trash entry persistence. - * - * @param trashEntryPersistence the trash entry persistence - */ - public void setTrashEntryPersistence( - TrashEntryPersistence trashEntryPersistence) { - this.trashEntryPersistence = trashEntryPersistence; - } - - /** - * Returns the trash version local service. - * - * @return the trash version local service - */ - public com.liferay.portlet.trash.service.TrashVersionLocalService getTrashVersionLocalService() { - return trashVersionLocalService; - } - - /** - * Sets the trash version local service. - * - * @param trashVersionLocalService the trash version local service - */ - public void setTrashVersionLocalService( - com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService) { - this.trashVersionLocalService = trashVersionLocalService; - } - - /** - * Returns the trash version persistence. - * - * @return the trash version persistence - */ - public TrashVersionPersistence getTrashVersionPersistence() { - return trashVersionPersistence; - } - - /** - * Sets the trash version persistence. - * - * @param trashVersionPersistence the trash version persistence - */ - public void setTrashVersionPersistence( - TrashVersionPersistence trashVersionPersistence) { - this.trashVersionPersistence = trashVersionPersistence; - } - - public void afterPropertiesSet() { - Class clazz = getClass(); - - _classLoader = clazz.getClassLoader(); - - PersistedModelLocalServiceRegistryUtil.register("org.liferay.jukebox.model.Song", - songLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "org.liferay.jukebox.model.Song"); - } - - /** - * 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 Song.class; - } - - protected String getModelClassName() { - return Song.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = songPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = org.liferay.jukebox.service.AlbumLocalService.class) - protected org.liferay.jukebox.service.AlbumLocalService albumLocalService; - @BeanReference(type = org.liferay.jukebox.service.AlbumService.class) - protected org.liferay.jukebox.service.AlbumService albumService; - @BeanReference(type = AlbumPersistence.class) - protected AlbumPersistence albumPersistence; - @BeanReference(type = org.liferay.jukebox.service.ArtistLocalService.class) - protected org.liferay.jukebox.service.ArtistLocalService artistLocalService; - @BeanReference(type = org.liferay.jukebox.service.ArtistService.class) - protected org.liferay.jukebox.service.ArtistService artistService; - @BeanReference(type = ArtistPersistence.class) - protected ArtistPersistence artistPersistence; - @BeanReference(type = org.liferay.jukebox.service.SongLocalService.class) - protected org.liferay.jukebox.service.SongLocalService songLocalService; - @BeanReference(type = org.liferay.jukebox.service.SongService.class) - protected org.liferay.jukebox.service.SongService songService; - @BeanReference(type = SongPersistence.class) - protected SongPersistence songPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) - protected com.liferay.portal.service.CompanyLocalService companyLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyService.class) - protected com.liferay.portal.service.CompanyService companyService; - @BeanReference(type = CompanyPersistence.class) - protected CompanyPersistence companyPersistence; - @BeanReference(type = com.liferay.portal.service.GroupLocalService.class) - protected com.liferay.portal.service.GroupLocalService groupLocalService; - @BeanReference(type = com.liferay.portal.service.GroupService.class) - protected com.liferay.portal.service.GroupService groupService; - @BeanReference(type = GroupPersistence.class) - protected GroupPersistence groupPersistence; - @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; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class) - protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService; - @BeanReference(type = AssetLinkPersistence.class) - protected AssetLinkPersistence assetLinkPersistence; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class) - protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class) - protected com.liferay.portlet.expando.service.ExpandoValueService expandoValueService; - @BeanReference(type = ExpandoValuePersistence.class) - protected ExpandoValuePersistence expandoValuePersistence; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class) - protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class) - protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService; - @BeanReference(type = MBMessagePersistence.class) - protected MBMessagePersistence mbMessagePersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class) - protected com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService; - @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryService.class) - protected com.liferay.portlet.trash.service.TrashEntryService trashEntryService; - @BeanReference(type = TrashEntryPersistence.class) - protected TrashEntryPersistence trashEntryPersistence; - @BeanReference(type = com.liferay.portlet.trash.service.TrashVersionLocalService.class) - protected com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService; - @BeanReference(type = TrashVersionPersistence.class) - protected TrashVersionPersistence trashVersionPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private SongLocalServiceClpInvoker _clpInvoker = new SongLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongLocalServiceClpInvoker.java deleted file mode 100644 index 82bf1db0c8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongLocalServiceClpInvoker.java +++ /dev/null @@ -1,557 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.base; - -import org.liferay.jukebox.service.SongLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Julio Camarero - * @generated - */ -public class SongLocalServiceClpInvoker { - public SongLocalServiceClpInvoker() { - _methodName0 = "addSong"; - - _methodParameterTypes0 = new String[] { "org.liferay.jukebox.model.Song" }; - - _methodName1 = "createSong"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteSong"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteSong"; - - _methodParameterTypes3 = new String[] { "org.liferay.jukebox.model.Song" }; - - _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 = "fetchSong"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchSongByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchSongByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getSong"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getSongByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getSongByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getSongs"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getSongsCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateSong"; - - _methodParameterTypes19 = new String[] { "org.liferay.jukebox.model.Song" }; - - _methodName100 = "getBeanIdentifier"; - - _methodParameterTypes100 = new String[] { }; - - _methodName101 = "setBeanIdentifier"; - - _methodParameterTypes101 = new String[] { "java.lang.String" }; - - _methodName106 = "addEntryResources"; - - _methodParameterTypes106 = new String[] { - "org.liferay.jukebox.model.Song", "boolean", "boolean" - }; - - _methodName107 = "addEntryResources"; - - _methodParameterTypes107 = new String[] { - "org.liferay.jukebox.model.Song", "java.lang.String[][]", - "java.lang.String[][]" - }; - - _methodName108 = "addSong"; - - _methodParameterTypes108 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName109 = "deleteSong"; - - _methodParameterTypes109 = new String[] { "long" }; - - _methodName110 = "getSong"; - - _methodParameterTypes110 = new String[] { - "long", "long", "long", "java.lang.String" - }; - - _methodName111 = "getSongs"; - - _methodParameterTypes111 = new String[] { "long" }; - - _methodName112 = "getSongs"; - - _methodParameterTypes112 = new String[] { "long", "int", "int" }; - - _methodName113 = "getSongsByAlbumId"; - - _methodParameterTypes113 = new String[] { "long" }; - - _methodName114 = "getSongsByAlbumId"; - - _methodParameterTypes114 = new String[] { "long", "int", "int" }; - - _methodName115 = "getSongsByAlbumId"; - - _methodParameterTypes115 = new String[] { "long", "long", "int" }; - - _methodName116 = "getSongsByAlbumIdCount"; - - _methodParameterTypes116 = new String[] { "long" }; - - _methodName117 = "getSongsCount"; - - _methodParameterTypes117 = new String[] { "long" }; - - _methodName118 = "moveSong"; - - _methodParameterTypes118 = new String[] { "long", "long" }; - - _methodName119 = "moveSongFromTrash"; - - _methodParameterTypes119 = new String[] { "long", "long", "long" }; - - _methodName120 = "moveSongToTrash"; - - _methodParameterTypes120 = new String[] { - "long", "org.liferay.jukebox.model.Song" - }; - - _methodName121 = "restoreSongFromTrash"; - - _methodParameterTypes121 = new String[] { "long", "long" }; - - _methodName122 = "updateAsset"; - - _methodParameterTypes122 = new String[] { - "long", "org.liferay.jukebox.model.Song", "long[][]", - "java.lang.String[][]", "long[][]" - }; - - _methodName123 = "updateSong"; - - _methodParameterTypes123 = new String[] { - "long", "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return SongLocalServiceUtil.addSong((org.liferay.jukebox.model.Song)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return SongLocalServiceUtil.createSong(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return SongLocalServiceUtil.deleteSong(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return SongLocalServiceUtil.deleteSong((org.liferay.jukebox.model.Song)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return SongLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return SongLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return SongLocalServiceUtil.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 SongLocalServiceUtil.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 SongLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return SongLocalServiceUtil.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 SongLocalServiceUtil.fetchSong(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return SongLocalServiceUtil.fetchSongByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return SongLocalServiceUtil.fetchSongByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return SongLocalServiceUtil.getSong(((Long)arguments[0]).longValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return SongLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return SongLocalServiceUtil.getSongByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName16.equals(name) && - Arrays.deepEquals(_methodParameterTypes16, parameterTypes)) { - return SongLocalServiceUtil.getSongByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName17.equals(name) && - Arrays.deepEquals(_methodParameterTypes17, parameterTypes)) { - return SongLocalServiceUtil.getSongs(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName18.equals(name) && - Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) { - return SongLocalServiceUtil.getSongsCount(); - } - - if (_methodName19.equals(name) && - Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) { - return SongLocalServiceUtil.updateSong((org.liferay.jukebox.model.Song)arguments[0]); - } - - if (_methodName100.equals(name) && - Arrays.deepEquals(_methodParameterTypes100, parameterTypes)) { - return SongLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName101.equals(name) && - Arrays.deepEquals(_methodParameterTypes101, parameterTypes)) { - SongLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName106.equals(name) && - Arrays.deepEquals(_methodParameterTypes106, parameterTypes)) { - SongLocalServiceUtil.addEntryResources((org.liferay.jukebox.model.Song)arguments[0], - ((Boolean)arguments[1]).booleanValue(), - ((Boolean)arguments[2]).booleanValue()); - - return null; - } - - if (_methodName107.equals(name) && - Arrays.deepEquals(_methodParameterTypes107, parameterTypes)) { - SongLocalServiceUtil.addEntryResources((org.liferay.jukebox.model.Song)arguments[0], - (java.lang.String[])arguments[1], - (java.lang.String[])arguments[2]); - - return null; - } - - if (_methodName108.equals(name) && - Arrays.deepEquals(_methodParameterTypes108, parameterTypes)) { - return SongLocalServiceUtil.addSong(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], (java.lang.String)arguments[3], - (java.io.InputStream)arguments[4], - (java.lang.String)arguments[5], - (java.io.InputStream)arguments[6], - (com.liferay.portal.service.ServiceContext)arguments[7]); - } - - if (_methodName109.equals(name) && - Arrays.deepEquals(_methodParameterTypes109, parameterTypes)) { - return SongLocalServiceUtil.deleteSong(((Long)arguments[0]).longValue()); - } - - if (_methodName110.equals(name) && - Arrays.deepEquals(_methodParameterTypes110, parameterTypes)) { - return SongLocalServiceUtil.getSong(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]); - } - - if (_methodName111.equals(name) && - Arrays.deepEquals(_methodParameterTypes111, parameterTypes)) { - return SongLocalServiceUtil.getSongs(((Long)arguments[0]).longValue()); - } - - if (_methodName112.equals(name) && - Arrays.deepEquals(_methodParameterTypes112, parameterTypes)) { - return SongLocalServiceUtil.getSongs(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName113.equals(name) && - Arrays.deepEquals(_methodParameterTypes113, parameterTypes)) { - return SongLocalServiceUtil.getSongsByAlbumId(((Long)arguments[0]).longValue()); - } - - if (_methodName114.equals(name) && - Arrays.deepEquals(_methodParameterTypes114, parameterTypes)) { - return SongLocalServiceUtil.getSongsByAlbumId(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName115.equals(name) && - Arrays.deepEquals(_methodParameterTypes115, parameterTypes)) { - return SongLocalServiceUtil.getSongsByAlbumId(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName116.equals(name) && - Arrays.deepEquals(_methodParameterTypes116, parameterTypes)) { - return SongLocalServiceUtil.getSongsByAlbumIdCount(((Long)arguments[0]).longValue()); - } - - if (_methodName117.equals(name) && - Arrays.deepEquals(_methodParameterTypes117, parameterTypes)) { - return SongLocalServiceUtil.getSongsCount(((Long)arguments[0]).longValue()); - } - - if (_methodName118.equals(name) && - Arrays.deepEquals(_methodParameterTypes118, parameterTypes)) { - return SongLocalServiceUtil.moveSong(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName119.equals(name) && - Arrays.deepEquals(_methodParameterTypes119, parameterTypes)) { - return SongLocalServiceUtil.moveSongFromTrash(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue()); - } - - if (_methodName120.equals(name) && - Arrays.deepEquals(_methodParameterTypes120, parameterTypes)) { - return SongLocalServiceUtil.moveSongToTrash(((Long)arguments[0]).longValue(), - (org.liferay.jukebox.model.Song)arguments[1]); - } - - if (_methodName121.equals(name) && - Arrays.deepEquals(_methodParameterTypes121, parameterTypes)) { - return SongLocalServiceUtil.restoreSongFromTrash(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName122.equals(name) && - Arrays.deepEquals(_methodParameterTypes122, parameterTypes)) { - SongLocalServiceUtil.updateAsset(((Long)arguments[0]).longValue(), - (org.liferay.jukebox.model.Song)arguments[1], - (long[])arguments[2], (java.lang.String[])arguments[3], - (long[])arguments[4]); - - return null; - } - - if (_methodName123.equals(name) && - Arrays.deepEquals(_methodParameterTypes123, parameterTypes)) { - return SongLocalServiceUtil.updateSong(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], (java.lang.String)arguments[4], - (java.io.InputStream)arguments[5], - (java.lang.String)arguments[6], - (java.io.InputStream)arguments[7], - (com.liferay.portal.service.ServiceContext)arguments[8]); - } - - 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 _methodName16; - private String[] _methodParameterTypes16; - private String _methodName17; - private String[] _methodParameterTypes17; - private String _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName100; - private String[] _methodParameterTypes100; - private String _methodName101; - private String[] _methodParameterTypes101; - private String _methodName106; - private String[] _methodParameterTypes106; - private String _methodName107; - private String[] _methodParameterTypes107; - private String _methodName108; - private String[] _methodParameterTypes108; - private String _methodName109; - private String[] _methodParameterTypes109; - private String _methodName110; - private String[] _methodParameterTypes110; - private String _methodName111; - private String[] _methodParameterTypes111; - private String _methodName112; - private String[] _methodParameterTypes112; - private String _methodName113; - private String[] _methodParameterTypes113; - private String _methodName114; - private String[] _methodParameterTypes114; - private String _methodName115; - private String[] _methodParameterTypes115; - private String _methodName116; - private String[] _methodParameterTypes116; - private String _methodName117; - private String[] _methodParameterTypes117; - private String _methodName118; - private String[] _methodParameterTypes118; - private String _methodName119; - private String[] _methodParameterTypes119; - private String _methodName120; - private String[] _methodParameterTypes120; - private String _methodName121; - private String[] _methodParameterTypes121; - private String _methodName122; - private String[] _methodParameterTypes122; - private String _methodName123; - private String[] _methodParameterTypes123; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongServiceBaseImpl.java deleted file mode 100644 index a46687b938..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongServiceBaseImpl.java +++ /dev/null @@ -1,956 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.CompanyPersistence; -import com.liferay.portal.service.persistence.GroupPersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence; -import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence; -import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; -import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence; -import com.liferay.portlet.trash.service.persistence.TrashVersionPersistence; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.SongService; -import org.liferay.jukebox.service.persistence.AlbumPersistence; -import org.liferay.jukebox.service.persistence.ArtistPersistence; -import org.liferay.jukebox.service.persistence.SongPersistence; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the song remote service. - * - *

- * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.liferay.jukebox.service.impl.SongServiceImpl}. - *

- * - * @author Julio Camarero - * @see org.liferay.jukebox.service.impl.SongServiceImpl - * @see org.liferay.jukebox.service.SongServiceUtil - * @generated - */ -public abstract class SongServiceBaseImpl extends BaseServiceImpl - implements SongService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link org.liferay.jukebox.service.SongServiceUtil} to access the song remote service. - */ - - /** - * Returns the album local service. - * - * @return the album local service - */ - public org.liferay.jukebox.service.AlbumLocalService getAlbumLocalService() { - return albumLocalService; - } - - /** - * Sets the album local service. - * - * @param albumLocalService the album local service - */ - public void setAlbumLocalService( - org.liferay.jukebox.service.AlbumLocalService albumLocalService) { - this.albumLocalService = albumLocalService; - } - - /** - * Returns the album remote service. - * - * @return the album remote service - */ - public org.liferay.jukebox.service.AlbumService getAlbumService() { - return albumService; - } - - /** - * Sets the album remote service. - * - * @param albumService the album remote service - */ - public void setAlbumService( - org.liferay.jukebox.service.AlbumService albumService) { - this.albumService = albumService; - } - - /** - * Returns the album persistence. - * - * @return the album persistence - */ - public AlbumPersistence getAlbumPersistence() { - return albumPersistence; - } - - /** - * Sets the album persistence. - * - * @param albumPersistence the album persistence - */ - public void setAlbumPersistence(AlbumPersistence albumPersistence) { - this.albumPersistence = albumPersistence; - } - - /** - * Returns the artist local service. - * - * @return the artist local service - */ - public org.liferay.jukebox.service.ArtistLocalService getArtistLocalService() { - return artistLocalService; - } - - /** - * Sets the artist local service. - * - * @param artistLocalService the artist local service - */ - public void setArtistLocalService( - org.liferay.jukebox.service.ArtistLocalService artistLocalService) { - this.artistLocalService = artistLocalService; - } - - /** - * Returns the artist remote service. - * - * @return the artist remote service - */ - public org.liferay.jukebox.service.ArtistService getArtistService() { - return artistService; - } - - /** - * Sets the artist remote service. - * - * @param artistService the artist remote service - */ - public void setArtistService( - org.liferay.jukebox.service.ArtistService artistService) { - this.artistService = artistService; - } - - /** - * Returns the artist persistence. - * - * @return the artist persistence - */ - public ArtistPersistence getArtistPersistence() { - return artistPersistence; - } - - /** - * Sets the artist persistence. - * - * @param artistPersistence the artist persistence - */ - public void setArtistPersistence(ArtistPersistence artistPersistence) { - this.artistPersistence = artistPersistence; - } - - /** - * Returns the song local service. - * - * @return the song local service - */ - public org.liferay.jukebox.service.SongLocalService getSongLocalService() { - return songLocalService; - } - - /** - * Sets the song local service. - * - * @param songLocalService the song local service - */ - public void setSongLocalService( - org.liferay.jukebox.service.SongLocalService songLocalService) { - this.songLocalService = songLocalService; - } - - /** - * Returns the song remote service. - * - * @return the song remote service - */ - public org.liferay.jukebox.service.SongService getSongService() { - return songService; - } - - /** - * Sets the song remote service. - * - * @param songService the song remote service - */ - public void setSongService( - org.liferay.jukebox.service.SongService songService) { - this.songService = songService; - } - - /** - * Returns the song persistence. - * - * @return the song persistence - */ - public SongPersistence getSongPersistence() { - return songPersistence; - } - - /** - * Sets the song persistence. - * - * @param songPersistence the song persistence - */ - public void setSongPersistence(SongPersistence songPersistence) { - this.songPersistence = songPersistence; - } - - /** - * 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 company local service. - * - * @return the company local service - */ - public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { - return companyLocalService; - } - - /** - * Sets the company local service. - * - * @param companyLocalService the company local service - */ - public void setCompanyLocalService( - com.liferay.portal.service.CompanyLocalService companyLocalService) { - this.companyLocalService = companyLocalService; - } - - /** - * Returns the company remote service. - * - * @return the company remote service - */ - public com.liferay.portal.service.CompanyService getCompanyService() { - return companyService; - } - - /** - * Sets the company remote service. - * - * @param companyService the company remote service - */ - public void setCompanyService( - com.liferay.portal.service.CompanyService companyService) { - this.companyService = companyService; - } - - /** - * Returns the company persistence. - * - * @return the company persistence - */ - public CompanyPersistence getCompanyPersistence() { - return companyPersistence; - } - - /** - * Sets the company persistence. - * - * @param companyPersistence the company persistence - */ - public void setCompanyPersistence(CompanyPersistence companyPersistence) { - this.companyPersistence = companyPersistence; - } - - /** - * Returns the group local service. - * - * @return the group local service - */ - public com.liferay.portal.service.GroupLocalService getGroupLocalService() { - return groupLocalService; - } - - /** - * Sets the group local service. - * - * @param groupLocalService the group local service - */ - public void setGroupLocalService( - com.liferay.portal.service.GroupLocalService groupLocalService) { - this.groupLocalService = groupLocalService; - } - - /** - * Returns the group remote service. - * - * @return the group remote service - */ - public com.liferay.portal.service.GroupService getGroupService() { - return groupService; - } - - /** - * Sets the group remote service. - * - * @param groupService the group remote service - */ - public void setGroupService( - com.liferay.portal.service.GroupService groupService) { - this.groupService = groupService; - } - - /** - * Returns the group persistence. - * - * @return the group persistence - */ - public GroupPersistence getGroupPersistence() { - return groupPersistence; - } - - /** - * Sets the group persistence. - * - * @param groupPersistence the group persistence - */ - public void setGroupPersistence(GroupPersistence groupPersistence) { - this.groupPersistence = groupPersistence; - } - - /** - * 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; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the asset link local service. - * - * @return the asset link local service - */ - public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() { - return assetLinkLocalService; - } - - /** - * Sets the asset link local service. - * - * @param assetLinkLocalService the asset link local service - */ - public void setAssetLinkLocalService( - com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) { - this.assetLinkLocalService = assetLinkLocalService; - } - - /** - * Returns the asset link persistence. - * - * @return the asset link persistence - */ - public AssetLinkPersistence getAssetLinkPersistence() { - return assetLinkPersistence; - } - - /** - * Sets the asset link persistence. - * - * @param assetLinkPersistence the asset link persistence - */ - public void setAssetLinkPersistence( - AssetLinkPersistence assetLinkPersistence) { - this.assetLinkPersistence = assetLinkPersistence; - } - - /** - * Returns the expando value local service. - * - * @return the expando value local service - */ - public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() { - return expandoValueLocalService; - } - - /** - * Sets the expando value local service. - * - * @param expandoValueLocalService the expando value local service - */ - public void setExpandoValueLocalService( - com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) { - this.expandoValueLocalService = expandoValueLocalService; - } - - /** - * Returns the expando value remote service. - * - * @return the expando value remote service - */ - public com.liferay.portlet.expando.service.ExpandoValueService getExpandoValueService() { - return expandoValueService; - } - - /** - * Sets the expando value remote service. - * - * @param expandoValueService the expando value remote service - */ - public void setExpandoValueService( - com.liferay.portlet.expando.service.ExpandoValueService expandoValueService) { - this.expandoValueService = expandoValueService; - } - - /** - * Returns the expando value persistence. - * - * @return the expando value persistence - */ - public ExpandoValuePersistence getExpandoValuePersistence() { - return expandoValuePersistence; - } - - /** - * Sets the expando value persistence. - * - * @param expandoValuePersistence the expando value persistence - */ - public void setExpandoValuePersistence( - ExpandoValuePersistence expandoValuePersistence) { - this.expandoValuePersistence = expandoValuePersistence; - } - - /** - * Returns the message-boards message local service. - * - * @return the message-boards message local service - */ - public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() { - return mbMessageLocalService; - } - - /** - * Sets the message-boards message local service. - * - * @param mbMessageLocalService the message-boards message local service - */ - public void setMBMessageLocalService( - com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) { - this.mbMessageLocalService = mbMessageLocalService; - } - - /** - * Returns the message-boards message remote service. - * - * @return the message-boards message remote service - */ - public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() { - return mbMessageService; - } - - /** - * Sets the message-boards message remote service. - * - * @param mbMessageService the message-boards message remote service - */ - public void setMBMessageService( - com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) { - this.mbMessageService = mbMessageService; - } - - /** - * Returns the message-boards message persistence. - * - * @return the message-boards message persistence - */ - public MBMessagePersistence getMBMessagePersistence() { - return mbMessagePersistence; - } - - /** - * Sets the message-boards message persistence. - * - * @param mbMessagePersistence the message-boards message persistence - */ - public void setMBMessagePersistence( - MBMessagePersistence mbMessagePersistence) { - this.mbMessagePersistence = mbMessagePersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - /** - * Returns the trash entry local service. - * - * @return the trash entry local service - */ - public com.liferay.portlet.trash.service.TrashEntryLocalService getTrashEntryLocalService() { - return trashEntryLocalService; - } - - /** - * Sets the trash entry local service. - * - * @param trashEntryLocalService the trash entry local service - */ - public void setTrashEntryLocalService( - com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService) { - this.trashEntryLocalService = trashEntryLocalService; - } - - /** - * Returns the trash entry remote service. - * - * @return the trash entry remote service - */ - public com.liferay.portlet.trash.service.TrashEntryService getTrashEntryService() { - return trashEntryService; - } - - /** - * Sets the trash entry remote service. - * - * @param trashEntryService the trash entry remote service - */ - public void setTrashEntryService( - com.liferay.portlet.trash.service.TrashEntryService trashEntryService) { - this.trashEntryService = trashEntryService; - } - - /** - * Returns the trash entry persistence. - * - * @return the trash entry persistence - */ - public TrashEntryPersistence getTrashEntryPersistence() { - return trashEntryPersistence; - } - - /** - * Sets the trash entry persistence. - * - * @param trashEntryPersistence the trash entry persistence - */ - public void setTrashEntryPersistence( - TrashEntryPersistence trashEntryPersistence) { - this.trashEntryPersistence = trashEntryPersistence; - } - - /** - * Returns the trash version local service. - * - * @return the trash version local service - */ - public com.liferay.portlet.trash.service.TrashVersionLocalService getTrashVersionLocalService() { - return trashVersionLocalService; - } - - /** - * Sets the trash version local service. - * - * @param trashVersionLocalService the trash version local service - */ - public void setTrashVersionLocalService( - com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService) { - this.trashVersionLocalService = trashVersionLocalService; - } - - /** - * Returns the trash version persistence. - * - * @return the trash version persistence - */ - public TrashVersionPersistence getTrashVersionPersistence() { - return trashVersionPersistence; - } - - /** - * Sets the trash version persistence. - * - * @param trashVersionPersistence the trash version persistence - */ - public void setTrashVersionPersistence( - TrashVersionPersistence trashVersionPersistence) { - this.trashVersionPersistence = trashVersionPersistence; - } - - 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 Song.class; - } - - protected String getModelClassName() { - return Song.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = songPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = org.liferay.jukebox.service.AlbumLocalService.class) - protected org.liferay.jukebox.service.AlbumLocalService albumLocalService; - @BeanReference(type = org.liferay.jukebox.service.AlbumService.class) - protected org.liferay.jukebox.service.AlbumService albumService; - @BeanReference(type = AlbumPersistence.class) - protected AlbumPersistence albumPersistence; - @BeanReference(type = org.liferay.jukebox.service.ArtistLocalService.class) - protected org.liferay.jukebox.service.ArtistLocalService artistLocalService; - @BeanReference(type = org.liferay.jukebox.service.ArtistService.class) - protected org.liferay.jukebox.service.ArtistService artistService; - @BeanReference(type = ArtistPersistence.class) - protected ArtistPersistence artistPersistence; - @BeanReference(type = org.liferay.jukebox.service.SongLocalService.class) - protected org.liferay.jukebox.service.SongLocalService songLocalService; - @BeanReference(type = org.liferay.jukebox.service.SongService.class) - protected org.liferay.jukebox.service.SongService songService; - @BeanReference(type = SongPersistence.class) - protected SongPersistence songPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) - protected com.liferay.portal.service.CompanyLocalService companyLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyService.class) - protected com.liferay.portal.service.CompanyService companyService; - @BeanReference(type = CompanyPersistence.class) - protected CompanyPersistence companyPersistence; - @BeanReference(type = com.liferay.portal.service.GroupLocalService.class) - protected com.liferay.portal.service.GroupLocalService groupLocalService; - @BeanReference(type = com.liferay.portal.service.GroupService.class) - protected com.liferay.portal.service.GroupService groupService; - @BeanReference(type = GroupPersistence.class) - protected GroupPersistence groupPersistence; - @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; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class) - protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService; - @BeanReference(type = AssetLinkPersistence.class) - protected AssetLinkPersistence assetLinkPersistence; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class) - protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService; - @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class) - protected com.liferay.portlet.expando.service.ExpandoValueService expandoValueService; - @BeanReference(type = ExpandoValuePersistence.class) - protected ExpandoValuePersistence expandoValuePersistence; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class) - protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService; - @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class) - protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService; - @BeanReference(type = MBMessagePersistence.class) - protected MBMessagePersistence mbMessagePersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class) - protected com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService; - @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryService.class) - protected com.liferay.portlet.trash.service.TrashEntryService trashEntryService; - @BeanReference(type = TrashEntryPersistence.class) - protected TrashEntryPersistence trashEntryPersistence; - @BeanReference(type = com.liferay.portlet.trash.service.TrashVersionLocalService.class) - protected com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService; - @BeanReference(type = TrashVersionPersistence.class) - protected TrashVersionPersistence trashVersionPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private SongServiceClpInvoker _clpInvoker = new SongServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongServiceClpInvoker.java deleted file mode 100644 index b1d91fca55..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongServiceClpInvoker.java +++ /dev/null @@ -1,243 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.base; - -import org.liferay.jukebox.service.SongServiceUtil; - -import java.util.Arrays; - -/** - * @author Julio Camarero - * @generated - */ -public class SongServiceClpInvoker { - public SongServiceClpInvoker() { - _methodName80 = "getBeanIdentifier"; - - _methodParameterTypes80 = new String[] { }; - - _methodName81 = "setBeanIdentifier"; - - _methodParameterTypes81 = new String[] { "java.lang.String" }; - - _methodName86 = "addSong"; - - _methodParameterTypes86 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName87 = "deleteSong"; - - _methodParameterTypes87 = new String[] { - "long", "com.liferay.portal.service.ServiceContext" - }; - - _methodName88 = "getSongs"; - - _methodParameterTypes88 = new String[] { "long" }; - - _methodName89 = "getSongs"; - - _methodParameterTypes89 = new String[] { "long", "int", "int" }; - - _methodName90 = "getSongs"; - - _methodParameterTypes90 = new String[] { "long", "java.lang.String" }; - - _methodName91 = "getSongsByAlbumId"; - - _methodParameterTypes91 = new String[] { "long", "long" }; - - _methodName92 = "getSongsByAlbumId"; - - _methodParameterTypes92 = new String[] { "long", "long", "int" }; - - _methodName93 = "getSongsCount"; - - _methodParameterTypes93 = new String[] { "long" }; - - _methodName94 = "getSongsCount"; - - _methodParameterTypes94 = new String[] { "long", "java.lang.String" }; - - _methodName95 = "getSongsCountByAlbumId"; - - _methodParameterTypes95 = new String[] { "long", "long" }; - - _methodName96 = "getSongsCountByAlbumId"; - - _methodParameterTypes96 = new String[] { "long", "long", "int" }; - - _methodName97 = "moveSongToTrash"; - - _methodParameterTypes97 = new String[] { "long" }; - - _methodName98 = "restoreSongFromTrash"; - - _methodParameterTypes98 = new String[] { "long" }; - - _methodName99 = "updateSong"; - - _methodParameterTypes99 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String", "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName80.equals(name) && - Arrays.deepEquals(_methodParameterTypes80, parameterTypes)) { - return SongServiceUtil.getBeanIdentifier(); - } - - if (_methodName81.equals(name) && - Arrays.deepEquals(_methodParameterTypes81, parameterTypes)) { - SongServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName86.equals(name) && - Arrays.deepEquals(_methodParameterTypes86, parameterTypes)) { - return SongServiceUtil.addSong(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (java.io.InputStream)arguments[3], - (java.lang.String)arguments[4], - (java.io.InputStream)arguments[5], - (com.liferay.portal.service.ServiceContext)arguments[6]); - } - - if (_methodName87.equals(name) && - Arrays.deepEquals(_methodParameterTypes87, parameterTypes)) { - return SongServiceUtil.deleteSong(((Long)arguments[0]).longValue(), - (com.liferay.portal.service.ServiceContext)arguments[1]); - } - - if (_methodName88.equals(name) && - Arrays.deepEquals(_methodParameterTypes88, parameterTypes)) { - return SongServiceUtil.getSongs(((Long)arguments[0]).longValue()); - } - - if (_methodName89.equals(name) && - Arrays.deepEquals(_methodParameterTypes89, parameterTypes)) { - return SongServiceUtil.getSongs(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName90.equals(name) && - Arrays.deepEquals(_methodParameterTypes90, parameterTypes)) { - return SongServiceUtil.getSongs(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - if (_methodName91.equals(name) && - Arrays.deepEquals(_methodParameterTypes91, parameterTypes)) { - return SongServiceUtil.getSongsByAlbumId(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName92.equals(name) && - Arrays.deepEquals(_methodParameterTypes92, parameterTypes)) { - return SongServiceUtil.getSongsByAlbumId(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName93.equals(name) && - Arrays.deepEquals(_methodParameterTypes93, parameterTypes)) { - return SongServiceUtil.getSongsCount(((Long)arguments[0]).longValue()); - } - - if (_methodName94.equals(name) && - Arrays.deepEquals(_methodParameterTypes94, parameterTypes)) { - return SongServiceUtil.getSongsCount(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - if (_methodName95.equals(name) && - Arrays.deepEquals(_methodParameterTypes95, parameterTypes)) { - return SongServiceUtil.getSongsCountByAlbumId(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName96.equals(name) && - Arrays.deepEquals(_methodParameterTypes96, parameterTypes)) { - return SongServiceUtil.getSongsCountByAlbumId(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName97.equals(name) && - Arrays.deepEquals(_methodParameterTypes97, parameterTypes)) { - return SongServiceUtil.moveSongToTrash(((Long)arguments[0]).longValue()); - } - - if (_methodName98.equals(name) && - Arrays.deepEquals(_methodParameterTypes98, parameterTypes)) { - return SongServiceUtil.restoreSongFromTrash(((Long)arguments[0]).longValue()); - } - - if (_methodName99.equals(name) && - Arrays.deepEquals(_methodParameterTypes99, parameterTypes)) { - return SongServiceUtil.updateSong(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], (java.lang.String)arguments[3], - (java.io.InputStream)arguments[4], - (java.lang.String)arguments[5], - (java.io.InputStream)arguments[6], - (com.liferay.portal.service.ServiceContext)arguments[7]); - } - - throw new UnsupportedOperationException(); - } - - private String _methodName80; - private String[] _methodParameterTypes80; - private String _methodName81; - private String[] _methodParameterTypes81; - private String _methodName86; - private String[] _methodParameterTypes86; - private String _methodName87; - private String[] _methodParameterTypes87; - private String _methodName88; - private String[] _methodParameterTypes88; - private String _methodName89; - private String[] _methodParameterTypes89; - private String _methodName90; - private String[] _methodParameterTypes90; - private String _methodName91; - private String[] _methodParameterTypes91; - private String _methodName92; - private String[] _methodParameterTypes92; - private String _methodName93; - private String[] _methodParameterTypes93; - private String _methodName94; - private String[] _methodParameterTypes94; - private String _methodName95; - private String[] _methodParameterTypes95; - private String _methodName96; - private String[] _methodParameterTypes96; - private String _methodName97; - private String[] _methodParameterTypes97; - private String _methodName98; - private String[] _methodParameterTypes98; - private String _methodName99; - private String[] _methodParameterTypes99; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/http/AlbumServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/http/AlbumServiceSoap.java deleted file mode 100644 index 57f2b13a56..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/http/AlbumServiceSoap.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.http; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import org.liferay.jukebox.service.AlbumServiceUtil; - -import java.rmi.RemoteException; - -/** - * Provides the SOAP utility for the - * {@link org.liferay.jukebox.service.AlbumServiceUtil} 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. - * - *

- * 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 org.liferay.jukebox.model.AlbumSoap}. - * If the method in the service utility returns a - * {@link org.liferay.jukebox.model.Album}, that is translated to a - * {@link org.liferay.jukebox.model.AlbumSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

- * - *

- * 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). - *

- * - *

- * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

- * - *

- * The SOAP utility is only generated for remote services. - *

- * - * @author Julio Camarero - * @see AlbumServiceHttp - * @see org.liferay.jukebox.model.AlbumSoap - * @see org.liferay.jukebox.service.AlbumServiceUtil - * @generated - */ -public class AlbumServiceSoap { - public static org.liferay.jukebox.model.AlbumSoap deleteAlbum( - long albumId, com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - org.liferay.jukebox.model.Album returnValue = AlbumServiceUtil.deleteAlbum(albumId, - serviceContext); - - return org.liferay.jukebox.model.AlbumSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.AlbumSoap[] getAlbums(long groupId) - throws RemoteException { - try { - java.util.List returnValue = AlbumServiceUtil.getAlbums(groupId); - - return org.liferay.jukebox.model.AlbumSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.AlbumSoap[] getAlbums( - long groupId, int start, int end) throws RemoteException { - try { - java.util.List returnValue = AlbumServiceUtil.getAlbums(groupId, - start, end); - - return org.liferay.jukebox.model.AlbumSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.AlbumSoap[] getAlbums( - long groupId, java.lang.String keywords) throws RemoteException { - try { - java.util.List returnValue = AlbumServiceUtil.getAlbums(groupId, - keywords); - - return org.liferay.jukebox.model.AlbumSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.AlbumSoap[] getAlbumsByArtistId( - long groupId, long artistId) throws RemoteException { - try { - java.util.List returnValue = AlbumServiceUtil.getAlbumsByArtistId(groupId, - artistId); - - return org.liferay.jukebox.model.AlbumSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getAlbumsCount(long groupId) throws RemoteException { - try { - int returnValue = AlbumServiceUtil.getAlbumsCount(groupId); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getAlbumsCount(long groupId, java.lang.String keywords) - throws RemoteException { - try { - int returnValue = AlbumServiceUtil.getAlbumsCount(groupId, keywords); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getAlbumsCountByArtistId(long groupId, long artistId) - throws RemoteException { - try { - int returnValue = AlbumServiceUtil.getAlbumsCountByArtistId(groupId, - artistId); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.AlbumSoap moveAlbumToTrash( - long albumId) throws RemoteException { - try { - org.liferay.jukebox.model.Album returnValue = AlbumServiceUtil.moveAlbumToTrash(albumId); - - return org.liferay.jukebox.model.AlbumSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.AlbumSoap restoreAlbumFromTrash( - long albumId) throws RemoteException { - try { - org.liferay.jukebox.model.Album returnValue = AlbumServiceUtil.restoreAlbumFromTrash(albumId); - - return org.liferay.jukebox.model.AlbumSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(AlbumServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/http/ArtistServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/http/ArtistServiceSoap.java deleted file mode 100644 index 569440a4ab..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/http/ArtistServiceSoap.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.http; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import org.liferay.jukebox.service.ArtistServiceUtil; - -import java.rmi.RemoteException; - -/** - * Provides the SOAP utility for the - * {@link org.liferay.jukebox.service.ArtistServiceUtil} 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. - * - *

- * 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 org.liferay.jukebox.model.ArtistSoap}. - * If the method in the service utility returns a - * {@link org.liferay.jukebox.model.Artist}, that is translated to a - * {@link org.liferay.jukebox.model.ArtistSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

- * - *

- * 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). - *

- * - *

- * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

- * - *

- * The SOAP utility is only generated for remote services. - *

- * - * @author Julio Camarero - * @see ArtistServiceHttp - * @see org.liferay.jukebox.model.ArtistSoap - * @see org.liferay.jukebox.service.ArtistServiceUtil - * @generated - */ -public class ArtistServiceSoap { - public static org.liferay.jukebox.model.ArtistSoap deleteArtist( - long artistId, com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - org.liferay.jukebox.model.Artist returnValue = ArtistServiceUtil.deleteArtist(artistId, - serviceContext); - - return org.liferay.jukebox.model.ArtistSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.ArtistSoap[] getArtists( - long groupId) throws RemoteException { - try { - java.util.List returnValue = ArtistServiceUtil.getArtists(groupId); - - return org.liferay.jukebox.model.ArtistSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.ArtistSoap[] getArtists( - long groupId, int start, int end) throws RemoteException { - try { - java.util.List returnValue = ArtistServiceUtil.getArtists(groupId, - start, end); - - return org.liferay.jukebox.model.ArtistSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.ArtistSoap[] getArtists( - long groupId, java.lang.String keywords) throws RemoteException { - try { - java.util.List returnValue = ArtistServiceUtil.getArtists(groupId, - keywords); - - return org.liferay.jukebox.model.ArtistSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getArtistsCount(long groupId) throws RemoteException { - try { - int returnValue = ArtistServiceUtil.getArtistsCount(groupId); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getArtistsCount(long groupId, java.lang.String keywords) - throws RemoteException { - try { - int returnValue = ArtistServiceUtil.getArtistsCount(groupId, - keywords); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(ArtistServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/http/SongServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/http/SongServiceSoap.java deleted file mode 100644 index 53da71ae9c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/http/SongServiceSoap.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.http; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import org.liferay.jukebox.service.SongServiceUtil; - -import java.rmi.RemoteException; - -/** - * Provides the SOAP utility for the - * {@link org.liferay.jukebox.service.SongServiceUtil} 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. - * - *

- * 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 org.liferay.jukebox.model.SongSoap}. - * If the method in the service utility returns a - * {@link org.liferay.jukebox.model.Song}, that is translated to a - * {@link org.liferay.jukebox.model.SongSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

- * - *

- * 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). - *

- * - *

- * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

- * - *

- * The SOAP utility is only generated for remote services. - *

- * - * @author Julio Camarero - * @see SongServiceHttp - * @see org.liferay.jukebox.model.SongSoap - * @see org.liferay.jukebox.service.SongServiceUtil - * @generated - */ -public class SongServiceSoap { - public static org.liferay.jukebox.model.SongSoap deleteSong(long songId, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - org.liferay.jukebox.model.Song returnValue = SongServiceUtil.deleteSong(songId, - serviceContext); - - return org.liferay.jukebox.model.SongSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.SongSoap[] getSongs(long groupId) - throws RemoteException { - try { - java.util.List returnValue = SongServiceUtil.getSongs(groupId); - - return org.liferay.jukebox.model.SongSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.SongSoap[] getSongs(long groupId, - int start, int end) throws RemoteException { - try { - java.util.List returnValue = SongServiceUtil.getSongs(groupId, - start, end); - - return org.liferay.jukebox.model.SongSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.SongSoap[] getSongs(long groupId, - java.lang.String keywords) throws RemoteException { - try { - java.util.List returnValue = SongServiceUtil.getSongs(groupId, - keywords); - - return org.liferay.jukebox.model.SongSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.SongSoap[] getSongsByAlbumId( - long groupId, long albumId) throws RemoteException { - try { - java.util.List returnValue = SongServiceUtil.getSongsByAlbumId(groupId, - albumId); - - return org.liferay.jukebox.model.SongSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.SongSoap[] getSongsByAlbumId( - long groupId, long albumId, int status) throws RemoteException { - try { - java.util.List returnValue = SongServiceUtil.getSongsByAlbumId(groupId, - albumId, status); - - return org.liferay.jukebox.model.SongSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getSongsCount(long groupId) throws RemoteException { - try { - int returnValue = SongServiceUtil.getSongsCount(groupId); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getSongsCount(long groupId, java.lang.String keywords) - throws RemoteException { - try { - int returnValue = SongServiceUtil.getSongsCount(groupId, keywords); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getSongsCountByAlbumId(long groupId, long albumId) - throws RemoteException { - try { - int returnValue = SongServiceUtil.getSongsCountByAlbumId(groupId, - albumId); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getSongsCountByAlbumId(long groupId, long albumId, - int status) throws RemoteException { - try { - int returnValue = SongServiceUtil.getSongsCountByAlbumId(groupId, - albumId, status); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.SongSoap moveSongToTrash( - long songId) throws RemoteException { - try { - org.liferay.jukebox.model.Song returnValue = SongServiceUtil.moveSongToTrash(songId); - - return org.liferay.jukebox.model.SongSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static org.liferay.jukebox.model.SongSoap restoreSongFromTrash( - long songId) throws RemoteException { - try { - org.liferay.jukebox.model.Song returnValue = SongServiceUtil.restoreSongFromTrash(songId); - - return org.liferay.jukebox.model.SongSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(SongServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/AlbumLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/AlbumLocalServiceImpl.java deleted file mode 100644 index 259ff3c8c3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/AlbumLocalServiceImpl.java +++ /dev/null @@ -1,483 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.impl; - -import com.liferay.portal.kernel.exception.PortalException; -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.search.Indexable; -import com.liferay.portal.kernel.search.IndexableType; -import com.liferay.portal.kernel.search.Indexer; -import com.liferay.portal.kernel.search.IndexerRegistryUtil; -import com.liferay.portal.kernel.util.ContentTypes; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.Repository; -import com.liferay.portal.model.User; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portlet.asset.model.AssetEntry; -import com.liferay.portlet.asset.model.AssetLinkConstants; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.trash.model.TrashEntry; -import com.liferay.portlet.trash.model.TrashVersion; - -import java.io.InputStream; - -import java.util.Date; -import java.util.List; - -import org.liferay.jukebox.AlbumNameException; -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.base.AlbumLocalServiceBaseImpl; -import org.liferay.jukebox.util.Constants; - -/** - * The implementation of the album local service. - * - *

- * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.liferay.jukebox.service.AlbumLocalService} interface. - * - *

- * 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. - *

- * - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - * @see org.liferay.jukebox.service.base.AlbumLocalServiceBaseImpl - * @see org.liferay.jukebox.service.AlbumLocalServiceUtil - */ -public class AlbumLocalServiceImpl extends AlbumLocalServiceBaseImpl { - - @Indexable(type = IndexableType.REINDEX) - public Album addAlbum( - long userId, long artistId, String name, int year, - InputStream inputStream, ServiceContext serviceContext) - throws PortalException, SystemException { - - long groupId = serviceContext.getScopeGroupId(); - - User user = userPersistence.findByPrimaryKey(userId); - - Date now = new Date(); - - validate(name); - - long albumId = counterLocalService.increment(); - - Album album = albumPersistence.create(albumId); - - album.setUuid(serviceContext.getUuid()); - album.setGroupId(groupId); - album.setCompanyId(user.getCompanyId()); - album.setUserId(user.getUserId()); - album.setUserName(user.getFullName()); - album.setCreateDate(serviceContext.getCreateDate(now)); - album.setModifiedDate(serviceContext.getModifiedDate(now)); - album.setArtistId(artistId); - album.setName(name); - album.setYear(year); - album.setExpandoBridgeAttributes(serviceContext); - - albumPersistence.update(album); - - if (inputStream != null) { - PortletFileRepositoryUtil.addPortletFileEntry( - groupId, userId, Album.class.getName(), album.getAlbumId(), - Constants.JUKEBOX_PORTLET_REPOSITORY, - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, inputStream, - String.valueOf(album.getAlbumId()), StringPool.BLANK, true); - } - - // Resources - - if (serviceContext.isAddGroupPermissions() || - serviceContext.isAddGuestPermissions()) { - - addEntryResources( - album, serviceContext.isAddGroupPermissions(), - serviceContext.isAddGuestPermissions()); - } - else { - addEntryResources( - album, serviceContext.getGroupPermissions(), - serviceContext.getGuestPermissions()); - } - - // Message boards - - mbMessageLocalService.addDiscussionMessage( - userId, album.getUserName(), groupId, Album.class.getName(), - albumId, WorkflowConstants.ACTION_PUBLISH); - - // Asset - - updateAsset( - userId, album, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames(), - serviceContext.getAssetLinkEntryIds()); - - return album; - } - - @Override - public void addEntryResources( - Album album, boolean addGroupPermissions, - boolean addGuestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addResources( - album.getCompanyId(), album.getGroupId(), album.getUserId(), - Album.class.getName(), album.getAlbumId(), false, - addGroupPermissions, addGuestPermissions); - } - - @Override - public void addEntryResources( - Album album, String[] groupPermissions, String[] guestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addModelResources( - album.getCompanyId(), album.getGroupId(), album.getUserId(), - Album.class.getName(), album.getAlbumId(), groupPermissions, - guestPermissions); - } - - @Indexable(type = IndexableType.DELETE) - public Album deleteAlbum(long albumId) - throws PortalException, SystemException { - - Album album = albumPersistence.findByPrimaryKey(albumId); - - List songs = songLocalService.getSongsByAlbumId(albumId); - - for (Song song : songs) { - songLocalService.deleteSong(song.getSongId()); - } - - try { - PortletFileRepositoryUtil.deletePortletFileEntry( - album.getGroupId(), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(albumId)); - } - catch (Exception e) { - } - - return albumPersistence.remove(albumId); - } - - public void deleteAlbums(long groupId) - throws PortalException, SystemException { - - List albums = getAlbums(groupId); - - for (Album album : albums) { - albumLocalService.deleteAlbum(album.getAlbumId()); - } - } - - public List getAlbums(long groupId) throws SystemException { - return albumPersistence.findByGroupId(groupId); - } - - public List getAlbums(long groupId, int start, int end) - throws SystemException { - - return albumPersistence.findByGroupId(groupId, start, end); - } - - public List getAlbumsByArtistId(long artistId) - throws SystemException { - - return albumPersistence.findByArtistId(artistId); - } - - public int getAlbumsCount(long groupId) throws SystemException { - return albumPersistence.countByGroupId(groupId); - } - - @Indexable(type = IndexableType.REINDEX) - @Override - public Album moveAlbumToTrash(long userId, long albumId) - throws PortalException, SystemException { - - ServiceContext serviceContext = new ServiceContext(); - - // Folder - - User user = userPersistence.findByPrimaryKey(userId); - Date now = new Date(); - - Album album = albumPersistence.findByPrimaryKey(albumId); - - int oldStatus = album.getStatus(); - - album.setModifiedDate(serviceContext.getModifiedDate(now)); - album.setStatus(WorkflowConstants.STATUS_IN_TRASH); - album.setStatusByUserId(user.getUserId()); - album.setStatusByUserName(user.getFullName()); - album.setStatusDate(serviceContext.getModifiedDate(now)); - - albumPersistence.update(album); - - // Asset - - assetEntryLocalService.updateVisible( - Album.class.getName(), album.getAlbumId(), false); - - // Trash - - TrashEntry trashEntry = trashEntryLocalService.addTrashEntry( - userId, album.getGroupId(), Album.class.getName(), - album.getAlbumId(), album.getUuid(), null, oldStatus, null, null); - - // Folders and entries - - List songs = songLocalService.getSongsByAlbumId( - album.getAlbumId()); - - moveDependentsToTrash(songs, trashEntry.getEntryId()); - - return album; - } - - @Indexable(type = IndexableType.REINDEX) - @Override - public Album restoreAlbumFromTrash(long userId, long albumId) - throws PortalException, SystemException { - - ServiceContext serviceContext = new ServiceContext(); - - // Folder - - User user = userPersistence.findByPrimaryKey(userId); - Date now = new Date(); - - Album album = albumPersistence.findByPrimaryKey(albumId); - - TrashEntry trashEntry = trashEntryLocalService.getEntry( - Album.class.getName(), albumId); - - album.setModifiedDate(serviceContext.getModifiedDate(now)); - album.setStatus(trashEntry.getStatus()); - album.setStatusByUserId(user.getUserId()); - album.setStatusByUserName(user.getFullName()); - album.setStatusDate(serviceContext.getModifiedDate(now)); - - albumPersistence.update(album); - - assetEntryLocalService.updateVisible( - Album.class.getName(), album.getAlbumId(), true); - - // Songs - - List songs = songLocalService.getSongsByAlbumId( - album.getGroupId(), album.getAlbumId(), - WorkflowConstants.STATUS_IN_TRASH); - - restoreDependentsFromTrash(songs, trashEntry.getEntryId()); - - // Trash - - trashEntryLocalService.deleteEntry(trashEntry.getEntryId()); - - return album; - } - - @Indexable(type = IndexableType.REINDEX) - public Album updateAlbum( - long userId, long albumId, long artistId, String name, int year, - InputStream inputStream, ServiceContext serviceContext) - throws PortalException, SystemException { - - // Event - - User user = userPersistence.findByPrimaryKey(userId); - - validate(name); - - Album album = albumPersistence.findByPrimaryKey(albumId); - - album.setModifiedDate(serviceContext.getModifiedDate(null)); - album.setArtistId(artistId); - album.setName(name); - album.setYear(year); - album.setExpandoBridgeAttributes(serviceContext); - - albumPersistence.update(album); - - if (inputStream != null) { - Repository repository = - PortletFileRepositoryUtil.fetchPortletRepository( - serviceContext.getScopeGroupId(), - Constants.JUKEBOX_PORTLET_REPOSITORY); - - if (repository != null) { - try { - PortletFileRepositoryUtil.deletePortletFileEntry( - repository.getRepositoryId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(album.getAlbumId())); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug("Cannot delete album cover"); - } - } - } - - PortletFileRepositoryUtil.addPortletFileEntry( - serviceContext.getScopeGroupId(), userId, Album.class.getName(), - album.getAlbumId(), Constants.JUKEBOX_PORTLET_REPOSITORY, - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, inputStream, - String.valueOf(album.getAlbumId()), StringPool.BLANK, true); - } - - // Asset - - updateAsset( - userId, album, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames(), - serviceContext.getAssetLinkEntryIds()); - - return album; - } - - public void updateAsset( - long userId, Album album, long[] assetCategoryIds, - String[] assetTagNames, long[] assetLinkEntryIds) - throws PortalException, SystemException { - - AssetEntry assetEntry = assetEntryLocalService.updateEntry( - userId, album.getGroupId(), album.getCreateDate(), - album.getModifiedDate(), Album.class.getName(), album.getAlbumId(), - album.getUuid(), 0, assetCategoryIds, assetTagNames, true, null, - null, null, ContentTypes.TEXT_HTML, album.getName(), null, null, - null, null, 0, 0, null, false); - - assetLinkLocalService.updateLinks( - userId, assetEntry.getEntryId(), assetLinkEntryIds, - AssetLinkConstants.TYPE_RELATED); - } - - protected void moveDependentsToTrash(List songs, long trashEntryId) - throws PortalException, SystemException { - - for (Song song : songs) { - - // Entry - - if (song.isInTrash()) { - continue; - } - - int oldStatus = song.getStatus(); - - song.setStatus(WorkflowConstants.STATUS_IN_TRASH); - - songPersistence.update(song); - - // Trash - - int status = oldStatus; - - if (oldStatus == WorkflowConstants.STATUS_PENDING) { - status = WorkflowConstants.STATUS_DRAFT; - } - - if (oldStatus != WorkflowConstants.STATUS_APPROVED) { - trashVersionLocalService.addTrashVersion( - trashEntryId, Song.class.getName(), song.getSongId(), - status, null); - } - - // Asset - - assetEntryLocalService.updateVisible( - Song.class.getName(), song.getSongId(), false); - - // Indexer - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer( - Song.class); - - indexer.reindex(song); - } - } - - protected void restoreDependentsFromTrash( - List songs, long trashEntryId) - throws PortalException, SystemException { - - for (Song song : songs) { - - // Song - - TrashEntry trashEntry = trashEntryLocalService.fetchEntry( - Song.class.getName(), song.getSongId()); - - if (trashEntry != null) { - continue; - } - - TrashVersion trashVersion = trashVersionLocalService.fetchVersion( - trashEntryId, Song.class.getName(), song.getSongId()); - - int oldStatus = WorkflowConstants.STATUS_APPROVED; - - if (trashVersion != null) { - oldStatus = trashVersion.getStatus(); - } - - song.setStatus(oldStatus); - - songPersistence.update(song); - - // Trash - - if (trashVersion != null) { - trashVersionLocalService.deleteTrashVersion(trashVersion); - } - - // Asset - - if (oldStatus == WorkflowConstants.STATUS_APPROVED) { - assetEntryLocalService.updateVisible( - Song.class.getName(), song.getSongId(), true); - } - - // Indexer - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer( - Song.class); - - indexer.reindex(song); - } - } - - protected void validate(String name) throws PortalException { - if (Validator.isNull(name)) { - throw new AlbumNameException(); - } - } - - private static Log _log = LogFactoryUtil.getLog( - AlbumLocalServiceImpl.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/AlbumServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/AlbumServiceImpl.java deleted file mode 100644 index 707f134750..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/AlbumServiceImpl.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.impl; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.service.ServiceContext; - -import java.io.InputStream; - -import java.util.List; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.service.base.AlbumServiceBaseImpl; -import org.liferay.jukebox.service.permission.AlbumPermission; -import org.liferay.jukebox.service.permission.JukeBoxPermission; - -/** - * The implementation of the album remote service. - * - *

- * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.liferay.jukebox.service.AlbumService} interface. - * - *

- * 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. - *

- * - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - * @see org.liferay.jukebox.service.base.AlbumServiceBaseImpl - * @see org.liferay.jukebox.service.AlbumServiceUtil - */ -public class AlbumServiceImpl extends AlbumServiceBaseImpl { - - public Album addAlbum( - long artistId, String name, int year, InputStream inputStream, - ServiceContext serviceContext) - throws PortalException, SystemException { - - JukeBoxPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), - "ADD_ALBUM"); - - return albumLocalService.addAlbum( - getUserId(), artistId, name, year, inputStream, serviceContext); - } - - public Album deleteAlbum(long albumId, ServiceContext serviceContext) - throws PortalException, SystemException { - - AlbumPermission.check( - getPermissionChecker(), albumId, ActionKeys.DELETE); - - return albumLocalService.deleteAlbum(albumId); - } - - public List getAlbums(long groupId) throws SystemException { - return albumPersistence.filterFindByG_S( - groupId, WorkflowConstants.STATUS_APPROVED); - } - - public List getAlbums(long groupId, int start, int end) - throws SystemException { - - return albumPersistence.filterFindByG_S( - groupId, WorkflowConstants.STATUS_APPROVED, start, end); - } - - public List getAlbums(long groupId, String keywords) - throws SystemException { - - return albumPersistence.filterFindByG_LikeN_S( - groupId, keywords, WorkflowConstants.STATUS_APPROVED); - } - - public List getAlbumsByArtistId(long groupId, long artistId) - throws SystemException { - - return albumPersistence.filterFindByG_A_S( - groupId, artistId, WorkflowConstants.STATUS_APPROVED); - } - - public int getAlbumsCount(long groupId) throws SystemException { - return albumPersistence.filterCountByG_S( - groupId, WorkflowConstants.STATUS_APPROVED); - } - - public int getAlbumsCount(long groupId, String keywords) - throws SystemException { - - return albumPersistence.filterCountByG_LikeN_S( - groupId, keywords, WorkflowConstants.STATUS_APPROVED); - } - - public int getAlbumsCountByArtistId(long groupId, long artistId) - throws SystemException { - - return albumPersistence.filterCountByG_A_S( - groupId, artistId, WorkflowConstants.STATUS_APPROVED); - } - - @Override - public Album moveAlbumToTrash(long albumId) - throws PortalException, SystemException { - - Album album = albumPersistence.findByPrimaryKey(albumId); - - AlbumPermission.check(getPermissionChecker(), album, ActionKeys.DELETE); - - return albumLocalService.moveAlbumToTrash(getUserId(), albumId); - } - - @Override - public Album restoreAlbumFromTrash(long albumId) - throws PortalException, SystemException { - - AlbumPermission.check( - getPermissionChecker(), albumId, ActionKeys.DELETE); - - return albumLocalService.restoreAlbumFromTrash(getUserId(), albumId); - } - - public Album updateAlbum( - long albumId, long artistId, String name, int year, - InputStream inputStream, ServiceContext serviceContext) - throws PortalException, SystemException { - - AlbumPermission.check( - getPermissionChecker(), albumId, ActionKeys.UPDATE); - - return albumLocalService.updateAlbum( - getUserId(), albumId, artistId, name, year, inputStream, - serviceContext); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/ArtistLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/ArtistLocalServiceImpl.java deleted file mode 100644 index 17542b71ef..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/ArtistLocalServiceImpl.java +++ /dev/null @@ -1,289 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.impl; - -import com.liferay.portal.kernel.exception.PortalException; -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.search.Indexable; -import com.liferay.portal.kernel.search.IndexableType; -import com.liferay.portal.kernel.util.ContentTypes; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.Repository; -import com.liferay.portal.model.User; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portlet.asset.model.AssetEntry; -import com.liferay.portlet.asset.model.AssetLinkConstants; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; - -import java.io.InputStream; - -import java.util.Date; -import java.util.List; - -import org.liferay.jukebox.ArtistNameException; -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.base.ArtistLocalServiceBaseImpl; -import org.liferay.jukebox.util.Constants; - -/** - * The implementation of the artist local service. - * - *

- * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.liferay.jukebox.service.ArtistLocalService} interface. - * - *

- * 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. - *

- * - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - * @see org.liferay.jukebox.service.base.ArtistLocalServiceBaseImpl - * @see org.liferay.jukebox.service.ArtistLocalServiceUtil - */ -public class ArtistLocalServiceImpl extends ArtistLocalServiceBaseImpl { - - @Indexable(type = IndexableType.REINDEX) - public Artist addArtist( - long userId, String name, String bio, InputStream inputStream, - ServiceContext serviceContext) - throws PortalException, SystemException { - - long groupId = serviceContext.getScopeGroupId(); - - User user = userPersistence.findByPrimaryKey(userId); - - Date now = new Date(); - - validate(name); - - long artistId = counterLocalService.increment(); - - Artist artist = artistPersistence.create(artistId); - - artist.setUuid(serviceContext.getUuid()); - artist.setGroupId(groupId); - artist.setCompanyId(user.getCompanyId()); - artist.setUserId(user.getUserId()); - artist.setUserName(user.getFullName()); - artist.setCreateDate(serviceContext.getCreateDate(now)); - artist.setModifiedDate(serviceContext.getModifiedDate(now)); - artist.setName(name); - artist.setBio(bio); - artist.setExpandoBridgeAttributes(serviceContext); - - artistPersistence.update(artist); - - if (inputStream != null) { - PortletFileRepositoryUtil.addPortletFileEntry( - groupId, userId, Artist.class.getName(), artist.getArtistId(), - Constants.JUKEBOX_PORTLET_REPOSITORY, - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, inputStream, - String.valueOf(artist.getArtistId()), StringPool.BLANK, true); - } - - // Resources - - if (serviceContext.isAddGroupPermissions() || - serviceContext.isAddGuestPermissions()) { - - addEntryResources( - artist, serviceContext.isAddGroupPermissions(), - serviceContext.isAddGuestPermissions()); - } - else { - addEntryResources( - artist, serviceContext.getGroupPermissions(), - serviceContext.getGuestPermissions()); - } - - // Message boards - - mbMessageLocalService.addDiscussionMessage( - userId, artist.getUserName(), groupId, Artist.class.getName(), - artistId, WorkflowConstants.ACTION_PUBLISH); - - // Asset - - updateAsset( - userId, artist, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames(), - serviceContext.getAssetLinkEntryIds()); - - return artist; - } - - @Override - public void addEntryResources( - Artist artist, boolean addGroupPermissions, - boolean addGuestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addResources( - artist.getCompanyId(), artist.getGroupId(), artist.getUserId(), - Artist.class.getName(), artist.getArtistId(), false, - addGroupPermissions, addGuestPermissions); - } - - @Override - public void addEntryResources( - Artist artist, String[] groupPermissions, String[] guestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addModelResources( - artist.getCompanyId(), artist.getGroupId(), artist.getUserId(), - Artist.class.getName(), artist.getArtistId(), groupPermissions, - guestPermissions); - } - - @Indexable(type = IndexableType.DELETE) - public Artist deleteArtist(long artistId) - throws PortalException, SystemException { - - Artist artist = artistPersistence.findByPrimaryKey(artistId); - - List albums = albumLocalService.getAlbumsByArtistId(artistId); - - for (Album album : albums) { - albumLocalService.deleteAlbum(album.getAlbumId()); - } - - try { - PortletFileRepositoryUtil.deletePortletFileEntry( - artist.getGroupId(), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(artistId)); - } - catch (Exception e) { - } - - return artistPersistence.remove(artistId); - } - - public void deleteArtists(long groupId) - throws PortalException, SystemException { - - List artists = getArtists(groupId); - - for (Artist artist : artists) { - artistLocalService.deleteArtist(artist.getArtistId()); - } - } - - public List getArtists(long groupId) throws SystemException { - return artistPersistence.findByGroupId(groupId); - } - - public List getArtists(long groupId, int start, int end) - throws SystemException { - - return artistPersistence.findByGroupId(groupId, start, end); - } - - public int getArtistsCount(long groupId) throws SystemException { - return artistPersistence.countByGroupId(groupId); - } - - @Indexable(type = IndexableType.REINDEX) - public Artist updateArtist( - long userId, long artistId, String name, String bio, - InputStream inputStream, ServiceContext serviceContext) - throws PortalException, SystemException { - - // Event - - User user = userPersistence.findByPrimaryKey(userId); - - validate(name); - - Artist artist = artistPersistence.findByPrimaryKey(artistId); - - artist.setModifiedDate(serviceContext.getModifiedDate(null)); - artist.setName(name); - artist.setBio(bio); - artist.setExpandoBridgeAttributes(serviceContext); - - artistPersistence.update(artist); - - if (inputStream != null) { - Repository repository = - PortletFileRepositoryUtil.fetchPortletRepository( - serviceContext.getScopeGroupId(), - Constants.JUKEBOX_PORTLET_REPOSITORY); - - if (repository != null) { - try { - PortletFileRepositoryUtil.deletePortletFileEntry( - repository.getRepositoryId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(artist.getArtistId())); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug("Cannot delete artist image"); - } - } - } - - PortletFileRepositoryUtil.addPortletFileEntry( - serviceContext.getScopeGroupId(), userId, - Artist.class.getName(), artist.getArtistId(), - Constants.JUKEBOX_PORTLET_REPOSITORY, - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, inputStream, - String.valueOf(artist.getArtistId()), StringPool.BLANK, true); - } - - // Asset - - updateAsset( - userId, artist, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames(), - serviceContext.getAssetLinkEntryIds()); - - return artist; - } - - public void updateAsset( - long userId, Artist artist, long[] assetCategoryIds, - String[] assetTagNames, long[] assetLinkEntryIds) - throws PortalException, SystemException { - - AssetEntry assetEntry = assetEntryLocalService.updateEntry( - userId, artist.getGroupId(), artist.getCreateDate(), - artist.getModifiedDate(), Artist.class.getName(), - artist.getArtistId(), artist.getUuid(), 0, assetCategoryIds, - assetTagNames, true, null, null, null, ContentTypes.TEXT_HTML, - artist.getName(), null, null, null, null, 0, 0, null, false); - - assetLinkLocalService.updateLinks( - userId, assetEntry.getEntryId(), assetLinkEntryIds, - AssetLinkConstants.TYPE_RELATED); - } - - protected void validate(String name) throws PortalException { - if (Validator.isNull(name)) { - throw new ArtistNameException(); - } - } - - private static Log _log = LogFactoryUtil.getLog( - ArtistLocalServiceImpl.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/ArtistServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/ArtistServiceImpl.java deleted file mode 100644 index 4cccb86f2f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/ArtistServiceImpl.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.impl; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.service.ServiceContext; - -import java.io.InputStream; - -import java.util.List; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.base.ArtistServiceBaseImpl; -import org.liferay.jukebox.service.permission.ArtistPermission; -import org.liferay.jukebox.service.permission.JukeBoxPermission; - -/** - * The implementation of the artist remote service. - * - *

- * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.liferay.jukebox.service.ArtistService} interface. - * - *

- * 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. - *

- * - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - * @see org.liferay.jukebox.service.base.ArtistServiceBaseImpl - * @see org.liferay.jukebox.service.ArtistServiceUtil - */ -public class ArtistServiceImpl extends ArtistServiceBaseImpl { - - public Artist addArtist( - String name, String bio, InputStream inputStream, - ServiceContext serviceContext) - throws PortalException, SystemException { - - JukeBoxPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), - "ADD_ARTIST"); - - return artistLocalService.addArtist( - getUserId(), name, bio, inputStream, serviceContext); - } - - public Artist deleteArtist(long artistId, ServiceContext serviceContext) - throws PortalException, SystemException { - - ArtistPermission.check( - getPermissionChecker(), artistId, ActionKeys.DELETE); - - return artistLocalService.deleteArtist(artistId); - } - - public List getArtists(long groupId) throws SystemException { - return artistPersistence.filterFindByG_S( - groupId, WorkflowConstants.STATUS_APPROVED); - } - - public List getArtists(long groupId, int start, int end) - throws SystemException { - - return artistPersistence.filterFindByG_S( - groupId, start, end, WorkflowConstants.STATUS_APPROVED); - } - - public List getArtists(long groupId, String keywords) - throws SystemException { - - return artistPersistence.filterFindByG_LikeN_S( - groupId, keywords, WorkflowConstants.STATUS_APPROVED); - } - - public int getArtistsCount(long groupId) throws SystemException { - return artistPersistence.filterCountByG_S( - groupId, WorkflowConstants.STATUS_APPROVED); - } - - public int getArtistsCount(long groupId, String keywords) - throws SystemException { - - return artistPersistence.filterCountByG_LikeN_S( - groupId, keywords, WorkflowConstants.STATUS_APPROVED); - } - - public Artist updateArtist( - long artistId, String name, String bio, InputStream inputStream, - ServiceContext serviceContext) - throws PortalException, SystemException { - - ArtistPermission.check( - getPermissionChecker(), artistId, ActionKeys.UPDATE); - - return artistLocalService.updateArtist( - getUserId(), artistId, name, bio, inputStream, serviceContext); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/SongLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/SongLocalServiceImpl.java deleted file mode 100644 index b3ed67880b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/SongLocalServiceImpl.java +++ /dev/null @@ -1,577 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.impl; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.repository.model.Folder; -import com.liferay.portal.kernel.search.Indexable; -import com.liferay.portal.kernel.search.IndexableType; -import com.liferay.portal.kernel.search.Indexer; -import com.liferay.portal.kernel.search.IndexerRegistryUtil; -import com.liferay.portal.kernel.transaction.TransactionCommitCallbackRegistryUtil; -import com.liferay.portal.kernel.util.ContentTypes; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.UnicodeProperties; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.Repository; -import com.liferay.portal.model.User; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portlet.asset.model.AssetEntry; -import com.liferay.portlet.asset.model.AssetLinkConstants; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.util.DLProcessorRegistryUtil; -import com.liferay.portlet.trash.model.TrashEntry; -import com.liferay.portlet.trash.model.TrashVersion; -import com.liferay.portlet.trash.util.TrashUtil; - -import java.io.InputStream; - -import java.util.Date; -import java.util.List; -import java.util.concurrent.Callable; - -import org.liferay.jukebox.DuplicatedSongException; -import org.liferay.jukebox.SongNameException; -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.base.SongLocalServiceBaseImpl; -import org.liferay.jukebox.util.Constants; - -/** - * The implementation of the song local service. - * - *

- * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.liferay.jukebox.service.SongLocalService} interface. - * - *

- * 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. - *

- * - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - * @see org.liferay.jukebox.service.base.SongLocalServiceBaseImpl - * @see org.liferay.jukebox.service.SongLocalServiceUtil - */ -public class SongLocalServiceImpl extends SongLocalServiceBaseImpl { - - @Override - public void addEntryResources( - Song song, boolean addGroupPermissions, boolean addGuestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addResources( - song.getCompanyId(), song.getGroupId(), song.getUserId(), - Song.class.getName(), song.getSongId(), false, addGroupPermissions, - addGuestPermissions); - } - - @Override - public void addEntryResources( - Song song, String[] groupPermissions, String[] guestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addModelResources( - song.getCompanyId(), song.getGroupId(), song.getUserId(), - Song.class.getName(), song.getSongId(), groupPermissions, - guestPermissions); - } - - @Indexable(type = IndexableType.REINDEX) - public Song addSong( - long userId, long albumId, String name, String songFileName, - InputStream songInputStream, String lyricsFileName, - InputStream lyricsInputStream, ServiceContext serviceContext) - throws PortalException, SystemException { - - long groupId = serviceContext.getScopeGroupId(); - - User user = userPersistence.findByPrimaryKey(userId); - - Date now = new Date(); - - long songId = counterLocalService.increment(); - Album album = albumPersistence.findByPrimaryKey(albumId); - - validate(songId, groupId, album.getArtistId(), albumId, name); - - Song song = songPersistence.create(songId); - - song.setUuid(serviceContext.getUuid()); - song.setGroupId(groupId); - song.setCompanyId(user.getCompanyId()); - song.setUserId(user.getUserId()); - song.setUserName(user.getFullName()); - song.setCreateDate(serviceContext.getCreateDate(now)); - song.setModifiedDate(serviceContext.getModifiedDate(now)); - - song.setArtistId(album.getArtistId()); - song.setAlbumId(albumId); - song.setName(name); - song.setExpandoBridgeAttributes(serviceContext); - - songPersistence.update(song); - - if ((songInputStream != null) || (lyricsInputStream != null)) { - Repository repository = - PortletFileRepositoryUtil.addPortletRepository( - groupId, Constants.JUKEBOX_PORTLET_REPOSITORY, - serviceContext); - - Folder folder = PortletFileRepositoryUtil.addPortletFolder( - userId, repository.getRepositoryId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(song.getSongId()), serviceContext); - - if (songInputStream != null) { - Folder songFolder = PortletFileRepositoryUtil.addPortletFolder( - userId, repository.getRepositoryId(), folder.getFolderId(), - Constants.SONGS_FOLDER_NAME, serviceContext); - - FileEntry fileEntry = - PortletFileRepositoryUtil.addPortletFileEntry( - groupId, userId, Song.class.getName(), song.getSongId(), - Constants.JUKEBOX_PORTLET_REPOSITORY, - songFolder.getFolderId(), songInputStream, songFileName, - StringPool.BLANK, true); - - DLProcessorRegistryUtil.trigger(fileEntry, null, true); - } - - if (lyricsInputStream != null) { - Folder lyricsFolder = - PortletFileRepositoryUtil.addPortletFolder( - userId, repository.getRepositoryId(), - folder.getFolderId(), Constants.LYRICS_FOLDER_NAME, - serviceContext); - - FileEntry fileEntry = - PortletFileRepositoryUtil.addPortletFileEntry( - groupId, userId, Song.class.getName(), song.getSongId(), - Constants.JUKEBOX_PORTLET_REPOSITORY, - lyricsFolder.getFolderId(), lyricsInputStream, - lyricsFileName, StringPool.BLANK, true); - - DLProcessorRegistryUtil.trigger(fileEntry, null, true); - } - } - - // Resources - - if (serviceContext.isAddGroupPermissions() || - serviceContext.isAddGuestPermissions()) { - - addEntryResources( - song, serviceContext.isAddGroupPermissions(), - serviceContext.isAddGuestPermissions()); - } - else { - addEntryResources( - song, serviceContext.getGroupPermissions(), - serviceContext.getGuestPermissions()); - } - - // Message boards - - mbMessageLocalService.addDiscussionMessage( - userId, album.getUserName(), groupId, Song.class.getName(), songId, - WorkflowConstants.ACTION_PUBLISH); - - // Asset - - updateAsset( - userId, song, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames(), - serviceContext.getAssetLinkEntryIds()); - - return song; - } - - @Indexable(type = IndexableType.DELETE) - public Song deleteSong(long songId) - throws PortalException, SystemException { - - Song song = songPersistence.findByPrimaryKey(songId); - - Repository repository = - PortletFileRepositoryUtil.fetchPortletRepository( - song.getGroupId(), Constants.JUKEBOX_PORTLET_REPOSITORY); - - if (repository != null) { - try { - Folder folder = PortletFileRepositoryUtil.getPortletFolder( - 0, repository.getRepositoryId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(songId), null); - - PortletFileRepositoryUtil.deleteFolder(folder.getFolderId()); - } - catch (Exception e) { - } - } - - return songPersistence.remove(songId); - } - - public Song getSong(long groupId, long artistId, long albumId, String name) - throws SystemException { - - return songPersistence.fetchByG_A_A_N(groupId, artistId, albumId, name); - } - - public List getSongs(long groupId) throws SystemException { - return songPersistence.findByGroupId(groupId); - } - - public List getSongs(long groupId, int start, int end) - throws SystemException { - - return songPersistence.findByGroupId(groupId, start, end); - } - - public List getSongsByAlbumId(long albumId) throws SystemException { - return songPersistence.findByAlbumId(albumId); - } - - public List getSongsByAlbumId(long albumId, int start, int end) - throws SystemException { - - return songPersistence.findByAlbumId(albumId, start, end); - } - - public List getSongsByAlbumId(long groupId, long albumId, int status) - throws SystemException { - - return songPersistence.findByG_A_S(groupId, albumId, status); - } - - public int getSongsByAlbumIdCount(long albumId) throws SystemException { - return songPersistence.countByAlbumId(albumId); - } - - public int getSongsCount(long groupId) throws SystemException { - return songPersistence.countByGroupId(groupId); - } - - @Indexable(type = IndexableType.REINDEX) - @Override - public Song moveSong(long songId, long albumId) - throws PortalException, SystemException { - - Song song = getSong(songId); - - song.setAlbumId(albumId); - - songPersistence.update(song); - - return song; - } - - @Override - public Song moveSongFromTrash(long userId, long songId, long albumId) - throws PortalException, SystemException { - - Song song = getSong(songId); - - TrashEntry trashEntry = song.getTrashEntry(); - - if (trashEntry.isTrashEntry(Song.class, songId)) { - restoreSongFromTrash(userId, songId); - } - else { - - // Entry - - TrashVersion trashVersion = - trashVersionLocalService.fetchVersion( - trashEntry.getEntryId(), Song.class.getName(), songId); - - int status = WorkflowConstants.STATUS_APPROVED; - - if (trashVersion != null) { - status = trashVersion.getStatus(); - } - - ServiceContext serviceContext = new ServiceContext(); - - // Entry - - User user = userPersistence.findByPrimaryKey(userId); - Date now = new Date(); - - song.setModifiedDate(serviceContext.getModifiedDate(now)); - song.setStatus(status); - song.setStatusByUserId(user.getUserId()); - song.setStatusByUserName(user.getFullName()); - song.setStatusDate(serviceContext.getModifiedDate(now)); - - songPersistence.update(song); - - // Asset - - assetEntryLocalService.updateVisible( - Song.class.getName(), song.getSongId(), false); - - // Indexer - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer( - Song.class); - - indexer.reindex(song); - - // Trash - - if (trashVersion != null) { - trashVersionLocalService.deleteTrashVersion(trashVersion); - } - } - - return songLocalService.moveSong(songId, albumId); - } - - @Indexable(type = IndexableType.REINDEX) - public Song moveSongToTrash(long userId, Song song) - throws PortalException, SystemException { - - ServiceContext serviceContext = new ServiceContext(); - - // Entry - - User user = userPersistence.findByPrimaryKey(userId); - Date now = new Date(); - - int oldStatus = song.getStatus(); - - song.setModifiedDate(serviceContext.getModifiedDate(now)); - song.setStatus(WorkflowConstants.STATUS_IN_TRASH); - song.setStatusByUserId(user.getUserId()); - song.setStatusByUserName(user.getFullName()); - song.setStatusDate(serviceContext.getModifiedDate(now)); - - // Asset - - assetEntryLocalService.updateVisible( - Song.class.getName(), song.getSongId(), false); - - // Trash - - UnicodeProperties typeSettingsProperties = new UnicodeProperties(); - - typeSettingsProperties.put("title", song.getName()); - - TrashEntry trashEntry = trashEntryLocalService.addTrashEntry( - userId, song.getGroupId(), Song.class.getName(), song.getSongId(), - song.getUuid(), null, oldStatus, null, typeSettingsProperties); - - song.setName(TrashUtil.getTrashTitle(trashEntry.getEntryId())); - - songPersistence.update(song); - - return song; - } - - @Indexable(type = IndexableType.REINDEX) - @Override - public Song restoreSongFromTrash(long userId, long songId) - throws PortalException, SystemException { - - ServiceContext serviceContext = new ServiceContext(); - - // Entry - - User user = userPersistence.findByPrimaryKey(userId); - Date now = new Date(); - - TrashEntry trashEntry = trashEntryLocalService.getEntry( - Song.class.getName(), songId); - - Song song = songPersistence.findByPrimaryKey(songId); - - song.setName(TrashUtil.getOriginalTitle(song.getName())); - song.setModifiedDate(serviceContext.getModifiedDate(now)); - song.setStatus(trashEntry.getStatus()); - song.setStatusByUserId(user.getUserId()); - song.setStatusByUserName(user.getFullName()); - song.setStatusDate(serviceContext.getModifiedDate(now)); - - songPersistence.update(song); - - assetEntryLocalService.updateVisible( - Song.class.getName(), song.getSongId(), true); - - trashEntryLocalService.deleteEntry(Song.class.getName(), songId); - - return song; - } - - public void updateAsset( - long userId, Song song, long[] assetCategoryIds, - String[] assetTagNames, long[] assetLinkEntryIds) - throws PortalException, SystemException { - - AssetEntry assetEntry = assetEntryLocalService.updateEntry( - userId, song.getGroupId(), song.getCreateDate(), - song.getModifiedDate(), Song.class.getName(), song.getSongId(), - song.getUuid(), 0, assetCategoryIds, assetTagNames, true, null, - null, null, ContentTypes.TEXT_HTML, song.getName(), null, null, - null, null, 0, 0, null, false); - - assetLinkLocalService.updateLinks( - userId, assetEntry.getEntryId(), assetLinkEntryIds, - AssetLinkConstants.TYPE_RELATED); - } - - @Indexable(type = IndexableType.REINDEX) - public Song updateSong( - long userId, long songId, long albumId, String name, - String songFileName, InputStream songInputStream, - String lyricsFileName, InputStream lyricsInputStream, - ServiceContext serviceContext) - throws PortalException, SystemException { - - // Event - - User user = userPersistence.findByPrimaryKey(userId); - - Song song = songPersistence.findByPrimaryKey(songId); - Album album = albumPersistence.findByPrimaryKey(albumId); - - validate(songId, song.getGroupId(), album.getArtistId(), albumId, name); - - song.setModifiedDate(serviceContext.getModifiedDate(null)); - - song.setArtistId(album.getArtistId()); - song.setAlbumId(albumId); - - song.setName(name); - song.setExpandoBridgeAttributes(serviceContext); - - songPersistence.update(song); - - if ((songInputStream != null) || (lyricsInputStream != null)) { - Repository repository = - PortletFileRepositoryUtil.addPortletRepository( - serviceContext.getScopeGroupId(), - Constants.JUKEBOX_PORTLET_REPOSITORY, serviceContext); - - Folder folder = PortletFileRepositoryUtil.addPortletFolder( - userId, repository.getRepositoryId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(song.getSongId()), serviceContext); - - if (songInputStream != null) { - Folder songFolder = PortletFileRepositoryUtil.addPortletFolder( - userId, repository.getRepositoryId(), folder.getFolderId(), - Constants.SONGS_FOLDER_NAME, serviceContext); - - List fileEntries = - PortletFileRepositoryUtil.getPortletFileEntries( - serviceContext.getScopeGroupId(), - songFolder.getFolderId()); - - for (FileEntry fileEntry : fileEntries) { - PortletFileRepositoryUtil.deletePortletFileEntry( - fileEntry.getFileEntryId()); - - DLProcessorRegistryUtil.cleanUp(fileEntry); - } - - FileEntry fileEntry = - PortletFileRepositoryUtil.addPortletFileEntry( - serviceContext.getScopeGroupId(), userId, - Song.class.getName(), song.getSongId(), - Constants.JUKEBOX_PORTLET_REPOSITORY, - songFolder.getFolderId(), songInputStream, songFileName, - StringPool.BLANK, true); - - triggerDLProcessors(fileEntry); - } - - if (lyricsInputStream != null) { - Folder lyricsFolder = - PortletFileRepositoryUtil.addPortletFolder( - userId, repository.getRepositoryId(), - folder.getFolderId(), Constants.LYRICS_FOLDER_NAME, - serviceContext); - - List fileEntries = - PortletFileRepositoryUtil.getPortletFileEntries( - serviceContext.getScopeGroupId(), - lyricsFolder.getFolderId()); - - for (FileEntry fileEntry : fileEntries) { - PortletFileRepositoryUtil.deletePortletFileEntry( - fileEntry.getFileEntryId()); - - DLProcessorRegistryUtil.cleanUp(fileEntry); - } - - FileEntry fileEntry = - PortletFileRepositoryUtil.addPortletFileEntry( - serviceContext.getScopeGroupId(), userId, - Song.class.getName(), song.getSongId(), - Constants.JUKEBOX_PORTLET_REPOSITORY, - lyricsFolder.getFolderId(), lyricsInputStream, - lyricsFileName, StringPool.BLANK, true); - - triggerDLProcessors(fileEntry); - } - } - - // Asset - - updateAsset( - userId, song, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames(), - serviceContext.getAssetLinkEntryIds()); - - return song; - } - - protected void triggerDLProcessors(final FileEntry fileEntry) { - TransactionCommitCallbackRegistryUtil.registerCallback( - new Callable() { - - @Override - public Void call() throws Exception { - DLProcessorRegistryUtil.trigger(fileEntry, null, true); - - return null; - } - - }); - } - - protected void validate( - long songId, long groupId, long artistId, long albumId, String name) - throws PortalException, SystemException { - - if (Validator.isNull(name)) { - throw new SongNameException(); - } - - Song song = songPersistence.fetchByG_A_A_N( - groupId, artistId, albumId, name); - - if ((song != null) && (song.getSongId() != songId)) { - throw new DuplicatedSongException(); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/SongServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/SongServiceImpl.java deleted file mode 100644 index 5a9a5d3064..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/impl/SongServiceImpl.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.impl; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.service.ServiceContext; - -import java.io.InputStream; - -import java.util.List; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.base.SongServiceBaseImpl; -import org.liferay.jukebox.service.permission.JukeBoxPermission; -import org.liferay.jukebox.service.permission.SongPermission; - -/** - * The implementation of the song remote service. - * - *

- * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.liferay.jukebox.service.SongService} interface. - * - *

- * 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. - *

- * - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - * @see org.liferay.jukebox.service.base.SongServiceBaseImpl - * @see org.liferay.jukebox.service.SongServiceUtil - */ -public class SongServiceImpl extends SongServiceBaseImpl { - - public Song addSong( - long albumId, String name, String songFileName, - InputStream songInputStream, String lyricsFileName, - InputStream lyricsInputStream, ServiceContext serviceContext) - throws PortalException, SystemException { - - JukeBoxPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), - "ADD_SONG"); - - return songLocalService.addSong( - getUserId(), albumId, name, songFileName, songInputStream, - lyricsFileName, lyricsInputStream, serviceContext); - } - - public Song deleteSong(long songId, ServiceContext serviceContext) - throws PortalException, SystemException { - - SongPermission.check(getPermissionChecker(), songId, ActionKeys.DELETE); - - return songLocalService.deleteSong(songId); - } - - public List getSongs(long groupId) throws SystemException { - return songPersistence.filterFindByG_S( - groupId, WorkflowConstants.STATUS_APPROVED); - } - - public List getSongs(long groupId, int start, int end) - throws SystemException { - - return songPersistence.filterFindByG_S( - groupId, WorkflowConstants.STATUS_APPROVED, start, end); - } - - public List getSongs(long groupId, String keywords) - throws SystemException { - - return songPersistence.filterFindByG_LikeN_S( - groupId, keywords, WorkflowConstants.STATUS_APPROVED); - } - - public List getSongsByAlbumId(long groupId, long albumId) - throws SystemException { - - return songPersistence.filterFindByG_A_S( - groupId, albumId, WorkflowConstants.STATUS_APPROVED); - } - - public List getSongsByAlbumId(long groupId, long albumId, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_APPROVED) { - return songPersistence.filterFindByG_A(groupId, albumId); - } - - return songPersistence.filterFindByG_A_S(groupId, albumId, status); - } - - public int getSongsCount(long groupId) throws SystemException { - return songPersistence.filterCountByG_S( - groupId, WorkflowConstants.STATUS_APPROVED); - } - - public int getSongsCount(long groupId, String keywords) - throws SystemException { - - return songPersistence.filterCountByG_LikeN_S( - groupId, keywords, WorkflowConstants.STATUS_APPROVED); - } - - public int getSongsCountByAlbumId(long groupId, long albumId) - throws SystemException { - - return songPersistence.filterCountByG_A_S( - groupId, albumId, WorkflowConstants.STATUS_APPROVED); - } - - public int getSongsCountByAlbumId(long groupId, long albumId, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_APPROVED) { - return songPersistence.filterCountByG_A(groupId, albumId); - } - - return songPersistence.filterCountByG_A_S(groupId, albumId, status); - } - - @Override - public Song moveSongToTrash(long songId) - throws PortalException, SystemException { - - Song song = songPersistence.findByPrimaryKey(songId); - - SongPermission.check(getPermissionChecker(), song, ActionKeys.DELETE); - - return songLocalService.moveSongToTrash(getUserId(), song); - } - - @Override - public Song restoreSongFromTrash(long songId) - throws PortalException, SystemException { - - SongPermission.check(getPermissionChecker(), songId, ActionKeys.DELETE); - - return songLocalService.restoreSongFromTrash(getUserId(), songId); - } - - public Song updateSong( - long songId, long albumId, String name, String songFileName, - InputStream songInputStream, String lyricsFileName, - InputStream lyricsInputStream, ServiceContext serviceContext) - throws PortalException, SystemException { - - SongPermission.check(getPermissionChecker(), songId, ActionKeys.UPDATE); - - return songLocalService.updateSong( - getUserId(), songId, albumId, name, songFileName, songInputStream, - lyricsFileName, lyricsInputStream, serviceContext); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/AlbumPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/AlbumPermission.java deleted file mode 100644 index d0bdd5917c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/AlbumPermission.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.permission; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.staging.permission.StagingPermissionUtil; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.portlet.AlbumsPortlet; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; - -/** - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - */ -public class AlbumPermission { - - public static void check( - PermissionChecker permissionChecker, Album album, String actionId) - throws PortalException, SystemException { - - if (!contains(permissionChecker, album, actionId)) { - throw new PrincipalException(); - } - } - - public static void check( - PermissionChecker permissionChecker, long albumId, String actionId) - throws PortalException, SystemException { - - Album album = AlbumLocalServiceUtil.getAlbum(albumId); - - check(permissionChecker, album, actionId); - } - - public static boolean contains( - PermissionChecker permissionChecker, Album album, String actionId) - throws PortalException, SystemException { - - Boolean hasPermission = StagingPermissionUtil.hasPermission( - permissionChecker, album.getGroupId(), Album.class.getName(), - album.getAlbumId(), AlbumsPortlet.PORTLET_ID, actionId); - - if (hasPermission != null) { - return hasPermission.booleanValue(); - } - - return permissionChecker.hasPermission( - album.getGroupId(), Album.class.getName(), album.getAlbumId(), - actionId); - } - - public static boolean contains( - PermissionChecker permissionChecker, long albumId, String actionId) - throws PortalException, SystemException { - - Album album = AlbumLocalServiceUtil.getAlbum(albumId); - - return contains(permissionChecker, album, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/ArtistPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/ArtistPermission.java deleted file mode 100644 index 5f0660d74f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/ArtistPermission.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.permission; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.staging.permission.StagingPermissionUtil; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.portlet.AlbumsPortlet; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; - -/** - * @author Julio Camarero - */ -public class ArtistPermission { - - public static void check( - PermissionChecker permissionChecker, long artistId, String actionId) - throws PortalException, SystemException { - - if (!contains(permissionChecker, artistId, actionId)) { - throw new PrincipalException(); - } - } - - public static boolean contains( - PermissionChecker permissionChecker, long artistId, String actionId) - throws PortalException, SystemException { - - Artist artist = ArtistLocalServiceUtil.getArtist(artistId); - - Boolean hasPermission = StagingPermissionUtil.hasPermission( - permissionChecker, artist.getGroupId(), Artist.class.getName(), - artist.getArtistId(), AlbumsPortlet.PORTLET_ID, actionId); - - if (hasPermission != null) { - return hasPermission.booleanValue(); - } - - return permissionChecker.hasPermission( - artist.getGroupId(), Artist.class.getName(), artist.getArtistId(), - actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/JukeBoxPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/JukeBoxPermission.java deleted file mode 100644 index 48a2ab471c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/JukeBoxPermission.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.permission; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.staging.permission.StagingPermissionUtil; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -import org.liferay.jukebox.portlet.AlbumsPortlet; - -/** - * @author Julio Camarero - */ -public class JukeBoxPermission { - - public static final String RESOURCE_NAME = "org.liferay.jukebox.model"; - - public static void check( - PermissionChecker permissionChecker, long groupId, String actionId) - throws PortalException { - - if (!contains(permissionChecker, groupId, actionId)) { - throw new PrincipalException(); - } - } - - public static boolean contains( - PermissionChecker permissionChecker, long groupId, String actionId) { - - Boolean hasPermission = StagingPermissionUtil.hasPermission( - permissionChecker, groupId, RESOURCE_NAME, groupId, - AlbumsPortlet.PORTLET_ID, actionId); - - if (hasPermission != null) { - return hasPermission.booleanValue(); - } - - return permissionChecker.hasPermission( - groupId, RESOURCE_NAME, groupId, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/SongPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/SongPermission.java deleted file mode 100644 index c1b89a95b7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/permission/SongPermission.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * 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 org.liferay.jukebox.service.permission; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.staging.permission.StagingPermissionUtil; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.portlet.AlbumsPortlet; -import org.liferay.jukebox.service.SongLocalServiceUtil; - -/** - * @author Julio Camarero - * @author Sergio González - * @author Eudaldo Alonso - */ -public class SongPermission { - - public static void check( - PermissionChecker permissionChecker, long songId, String actionId) - throws PortalException, SystemException { - - if (!contains(permissionChecker, songId, actionId)) { - throw new PrincipalException(); - } - } - - public static void check( - PermissionChecker permissionChecker, Song song, String actionId) - throws PortalException, SystemException { - - if (!contains(permissionChecker, song, actionId)) { - throw new PrincipalException(); - } - } - - public static boolean contains( - PermissionChecker permissionChecker, long songId, String actionId) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(songId); - - Boolean hasPermission = StagingPermissionUtil.hasPermission( - permissionChecker, song.getGroupId(), Song.class.getName(), - song.getSongId(), AlbumsPortlet.PORTLET_ID, actionId); - - if (hasPermission != null) { - return hasPermission.booleanValue(); - } - - return permissionChecker.hasPermission( - song.getGroupId(), Song.class.getName(), song.getSongId(), - actionId); - } - - public static boolean contains( - PermissionChecker permissionChecker, Song song, String actionId) - throws PortalException, SystemException { - - return permissionChecker.hasPermission( - song.getGroupId(), Song.class.getName(), song.getSongId(), - actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/persistence/AlbumPersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/persistence/AlbumPersistenceImpl.java deleted file mode 100644 index 22c7bd2709..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/persistence/AlbumPersistenceImpl.java +++ /dev/null @@ -1,8401 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.SQLQuery; -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.CharPool; -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.SetUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.security.permission.InlineSQLHelperUtil; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import org.liferay.jukebox.NoSuchAlbumException; -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.impl.AlbumImpl; -import org.liferay.jukebox.model.impl.AlbumModelImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * The persistence implementation for the album service. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author Julio Camarero - * @see AlbumPersistence - * @see AlbumUtil - * @generated - */ -public class AlbumPersistenceImpl extends BasePersistenceImpl - implements AlbumPersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link AlbumUtil} to access the album persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = AlbumImpl.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(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.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_UUID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", - new String[] { String.class.getName() }, - AlbumModelImpl.UUID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", - new String[] { String.class.getName() }); - - /** - * Returns all the albums where uuid = ?. - * - * @param uuid the uuid - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid) throws SystemException { - return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, int start, int end) - throws SystemException { - return findByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the albums where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, 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_UUID; - finderArgs = new Object[] { uuid }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; - finderArgs = new Object[] { uuid, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if (!Validator.equals(uuid, album.getUuid())) { - 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_ALBUM_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByUuid_First(String uuid, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByUuid_First(uuid, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByUuid_First(String uuid, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid(uuid, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByUuid_Last(String uuid, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByUuid_Last(uuid, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByUuid_Last(String uuid, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid(uuid); - - if (count == 0) { - return null; - } - - List list = findByUuid(uuid, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where uuid = ?. - * - * @param albumId the primary key of the current album - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByUuid_PrevAndNext(long albumId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByUuid_PrevAndNext(session, album, uuid, - orderByComparator, true); - - array[1] = album; - - array[2] = getByUuid_PrevAndNext(session, album, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByUuid_PrevAndNext(Session session, Album album, - String uuid, 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_ALBUM_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_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(AlbumModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid(String uuid) throws SystemException { - for (Album album : findByUuid(uuid, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid(String uuid) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; - - Object[] finderArgs = new Object[] { uuid }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_UUID_1 = "album.uuid IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2 = "album.uuid = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3 = "(album.uuid IS NULL OR album.uuid = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }, - AlbumModelImpl.UUID_COLUMN_BITMASK | - AlbumModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns the album where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchAlbumException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByUUID_G(String uuid, long groupId) - throws NoSuchAlbumException, SystemException { - Album album = fetchByUUID_G(uuid, groupId); - - if (album == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchAlbumException(msg.toString()); - } - - return album; - } - - /** - * Returns the album where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByUUID_G(String uuid, long groupId) - throws SystemException { - return fetchByUUID_G(uuid, groupId, true); - } - - /** - * Returns the album where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByUUID_G(String uuid, long groupId, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { uuid, groupId }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, this); - } - - if (result instanceof Album) { - Album album = (Album)result; - - if (!Validator.equals(uuid, album.getUuid()) || - (groupId != album.getGroupId())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_ALBUM_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, list); - } - else { - Album album = list.get(0); - - result = album; - - cacheResult(album); - - if ((album.getUuid() == null) || - !album.getUuid().equals(uuid) || - (album.getGroupId() != groupId)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, album); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (Album)result; - } - } - - /** - * Removes the album where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the album that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public Album removeByUUID_G(String uuid, long groupId) - throws NoSuchAlbumException, SystemException { - Album album = findByUUID_G(uuid, groupId); - - return remove(album); - } - - /** - * Returns the number of albums where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUUID_G(String uuid, long groupId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; - - Object[] finderArgs = new Object[] { uuid, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - 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_UUID_G_UUID_1 = "album.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "album.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(album.uuid IS NULL OR album.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "album.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", - new String[] { - String.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = - new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }, - AlbumModelImpl.UUID_COLUMN_BITMASK | - AlbumModelImpl.COMPANYID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns all the albums where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId) - throws SystemException { - return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId, int start, - int end) throws SystemException { - return findByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the albums where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, 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_UUID_C; - finderArgs = new Object[] { uuid, companyId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; - finderArgs = new Object[] { - uuid, companyId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if (!Validator.equals(uuid, album.getUuid()) || - (companyId != album.getCompanyId())) { - 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_ALBUM_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByUuid_C_First(uuid, companyId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid_C(uuid, companyId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByUuid_C_Last(uuid, companyId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid_C(uuid, companyId); - - if (count == 0) { - return null; - } - - List list = findByUuid_C(uuid, companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where uuid = ? and companyId = ?. - * - * @param albumId the primary key of the current album - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByUuid_C_PrevAndNext(long albumId, String uuid, - long companyId, OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByUuid_C_PrevAndNext(session, album, uuid, companyId, - orderByComparator, true); - - array[1] = album; - - array[2] = getByUuid_C_PrevAndNext(session, album, uuid, companyId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByUuid_C_PrevAndNext(Session session, Album album, - String uuid, 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_ALBUM_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_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(AlbumModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid_C(String uuid, long companyId) - throws SystemException { - for (Album album : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid_C(String uuid, long companyId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; - - Object[] finderArgs = new Object[] { uuid, companyId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_C_UUID_1 = "album.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "album.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(album.uuid IS NULL OR album.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "album.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByGroupId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID = - new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByGroupId", - new String[] { Long.class.getName() }, - AlbumModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_GROUPID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByGroupId", - new String[] { Long.class.getName() }); - - /** - * Returns all the albums where groupId = ?. - * - * @param groupId the group ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId) throws SystemException { - return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, int start, int end) - throws SystemException { - return findByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the albums where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, 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_GROUPID; - finderArgs = new Object[] { groupId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID; - finderArgs = new Object[] { groupId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if ((groupId != album.getGroupId())) { - 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.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(groupId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByGroupId_First(long groupId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByGroupId_First(groupId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByGroupId_First(long groupId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByGroupId(groupId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByGroupId_Last(long groupId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByGroupId_Last(groupId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByGroupId_Last(long groupId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByGroupId(groupId); - - if (count == 0) { - return null; - } - - List list = findByGroupId(groupId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByGroupId_PrevAndNext(long albumId, long groupId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByGroupId_PrevAndNext(session, album, groupId, - orderByComparator, true); - - array[1] = album; - - array[2] = getByGroupId_PrevAndNext(session, album, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByGroupId_PrevAndNext(Session session, Album album, - long groupId, 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_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(AlbumModelImpl.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(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the albums that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId) - throws SystemException { - return filterFindByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, int end) - throws SystemException { - return filterFindByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId(groupId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(3 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] filterFindByGroupId_PrevAndNext(long albumId, long groupId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId_PrevAndNext(albumId, groupId, orderByComparator); - } - - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = filterGetByGroupId_PrevAndNext(session, album, groupId, - orderByComparator, true); - - array[1] = album; - - array[2] = filterGetByGroupId_PrevAndNext(session, album, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album filterGetByGroupId_PrevAndNext(Session session, - Album album, long groupId, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByGroupId(long groupId) throws SystemException { - for (Album album : findByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByGroupId(long groupId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_GROUPID; - - Object[] finderArgs = new Object[] { groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - 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(); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByGroupId(long groupId) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByGroupId(groupId); - } - - StringBundler query = new StringBundler(2); - - query.append(_FILTER_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 = "album.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_USERID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUserId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID = - new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUserId", - new String[] { Long.class.getName() }, - AlbumModelImpl.USERID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_USERID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUserId", - new String[] { Long.class.getName() }); - - /** - * Returns all the albums where userId = ?. - * - * @param userId the user ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUserId(long userId) throws SystemException { - return findByUserId(userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUserId(long userId, int start, int end) - throws SystemException { - return findByUserId(userId, start, end, null); - } - - /** - * Returns an ordered range of all the albums where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUserId(long userId, 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_USERID; - finderArgs = new Object[] { userId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_USERID; - finderArgs = new Object[] { userId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if ((userId != album.getUserId())) { - 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_USERID_USERID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.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(userId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByUserId_First(long userId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByUserId_First(userId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByUserId_First(long userId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUserId(userId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByUserId_Last(long userId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByUserId_Last(userId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByUserId_Last(long userId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUserId(userId); - - if (count == 0) { - return null; - } - - List list = findByUserId(userId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where userId = ?. - * - * @param albumId the primary key of the current album - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByUserId_PrevAndNext(long albumId, long userId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByUserId_PrevAndNext(session, album, userId, - orderByComparator, true); - - array[1] = album; - - array[2] = getByUserId_PrevAndNext(session, album, userId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByUserId_PrevAndNext(Session session, Album album, - long userId, 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_USERID_USERID_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(AlbumModelImpl.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(userId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums where userId = ? from the database. - * - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUserId(long userId) throws SystemException { - for (Album album : findByUserId(userId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where userId = ?. - * - * @param userId the user ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUserId(long userId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_USERID; - - Object[] finderArgs = new Object[] { userId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_USERID_USERID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - 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_USERID_USERID_2 = "album.userId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_COMPANYID = - new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.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(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByCompanyId", - new String[] { Long.class.getName() }, - AlbumModelImpl.COMPANYID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByCompanyId", - new String[] { Long.class.getName() }); - - /** - * Returns all the albums where companyId = ?. - * - * @param companyId the company ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId) - throws SystemException { - return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the albums where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId, int start, int end) - throws SystemException { - return findByCompanyId(companyId, start, end, null); - } - - /** - * Returns an ordered range of all the albums where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if ((companyId != album.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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.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)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByCompanyId_First(long companyId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByCompanyId_First(companyId, orderByComparator); - - if (album != null) { - return album; - } - - 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 NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByCompanyId_First(long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByCompanyId(companyId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByCompanyId_Last(companyId, orderByComparator); - - if (album != null) { - return album; - } - - 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 NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByCompanyId(companyId); - - if (count == 0) { - return null; - } - - List list = findByCompanyId(companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where companyId = ?. - * - * @param albumId the primary key of the current album - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByCompanyId_PrevAndNext(long albumId, long companyId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByCompanyId_PrevAndNext(session, album, companyId, - orderByComparator, true); - - array[1] = album; - - array[2] = getByCompanyId_PrevAndNext(session, album, companyId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByCompanyId_PrevAndNext(Session session, Album album, - 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_ALBUM_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(AlbumModelImpl.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(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums 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 (Album album : findByCompanyId(companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching albums - * @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_ALBUM_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 = "album.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_ARTISTID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByArtistId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ARTISTID = - new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByArtistId", - new String[] { Long.class.getName() }, - AlbumModelImpl.ARTISTID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_ARTISTID = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByArtistId", - new String[] { Long.class.getName() }); - - /** - * Returns all the albums where artistId = ?. - * - * @param artistId the artist ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByArtistId(long artistId) throws SystemException { - return findByArtistId(artistId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the albums where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByArtistId(long artistId, int start, int end) - throws SystemException { - return findByArtistId(artistId, start, end, null); - } - - /** - * Returns an ordered range of all the albums where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByArtistId(long artistId, 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_ARTISTID; - finderArgs = new Object[] { artistId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ARTISTID; - finderArgs = new Object[] { artistId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if ((artistId != album.getArtistId())) { - 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_ARTISTID_ARTISTID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.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(artistId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByArtistId_First(long artistId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByArtistId_First(artistId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("artistId="); - msg.append(artistId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByArtistId_First(long artistId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByArtistId(artistId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByArtistId_Last(long artistId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByArtistId_Last(artistId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("artistId="); - msg.append(artistId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByArtistId_Last(long artistId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByArtistId(artistId); - - if (count == 0) { - return null; - } - - List list = findByArtistId(artistId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where artistId = ?. - * - * @param albumId the primary key of the current album - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByArtistId_PrevAndNext(long albumId, long artistId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByArtistId_PrevAndNext(session, album, artistId, - orderByComparator, true); - - array[1] = album; - - array[2] = getByArtistId_PrevAndNext(session, album, artistId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByArtistId_PrevAndNext(Session session, Album album, - long artistId, 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_ARTISTID_ARTISTID_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(AlbumModelImpl.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(artistId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums where artistId = ? from the database. - * - * @param artistId the artist ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByArtistId(long artistId) throws SystemException { - for (Album album : findByArtistId(artistId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where artistId = ?. - * - * @param artistId the artist ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByArtistId(long artistId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_ARTISTID; - - Object[] finderArgs = new Object[] { artistId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_ARTISTID_ARTISTID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(artistId); - - 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_ARTISTID_ARTISTID_2 = "album.artistId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_U = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_U", - new String[] { - Long.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_U = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_U", - new String[] { Long.class.getName(), Long.class.getName() }, - AlbumModelImpl.GROUPID_COLUMN_BITMASK | - AlbumModelImpl.USERID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_U = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_U", - new String[] { Long.class.getName(), Long.class.getName() }); - - /** - * Returns all the albums where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_U(long groupId, long userId) - throws SystemException { - return findByG_U(groupId, userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the albums where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_U(long groupId, long userId, int start, int end) - throws SystemException { - return findByG_U(groupId, userId, start, end, null); - } - - /** - * Returns an ordered range of all the albums where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_U(long groupId, long userId, 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_G_U; - finderArgs = new Object[] { groupId, userId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_U; - finderArgs = new Object[] { - groupId, userId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if ((groupId != album.getGroupId()) || - (userId != album.getUserId())) { - 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_U_GROUPID_2); - - query.append(_FINDER_COLUMN_G_U_USERID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.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(groupId); - - qPos.add(userId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByG_U_First(long groupId, long userId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByG_U_First(groupId, userId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", userId="); - msg.append(userId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByG_U_First(long groupId, long userId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_U(groupId, userId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByG_U_Last(long groupId, long userId, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByG_U_Last(groupId, userId, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", userId="); - msg.append(userId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByG_U_Last(long groupId, long userId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_U(groupId, userId); - - if (count == 0) { - return null; - } - - List list = findByG_U(groupId, userId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and userId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByG_U_PrevAndNext(long albumId, long groupId, - long userId, OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByG_U_PrevAndNext(session, album, groupId, userId, - orderByComparator, true); - - array[1] = album; - - array[2] = getByG_U_PrevAndNext(session, album, groupId, userId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByG_U_PrevAndNext(Session session, Album album, - long groupId, long userId, 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_U_GROUPID_2); - - query.append(_FINDER_COLUMN_G_U_USERID_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(AlbumModelImpl.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(groupId); - - qPos.add(userId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the albums that the user has permission to view where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_U(long groupId, long userId) - throws SystemException { - return filterFindByG_U(groupId, userId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_U(long groupId, long userId, int start, - int end) throws SystemException { - return filterFindByG_U(groupId, userId, start, end, null); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param userId the user ID - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_U(long groupId, long userId, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_U(groupId, userId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_U_GROUPID_2); - - query.append(_FINDER_COLUMN_G_U_USERID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(userId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and userId = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] filterFindByG_U_PrevAndNext(long albumId, long groupId, - long userId, OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_U_PrevAndNext(albumId, groupId, userId, - orderByComparator); - } - - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = filterGetByG_U_PrevAndNext(session, album, groupId, - userId, orderByComparator, true); - - array[1] = album; - - array[2] = filterGetByG_U_PrevAndNext(session, album, groupId, - userId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album filterGetByG_U_PrevAndNext(Session session, Album album, - long groupId, long userId, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_U_GROUPID_2); - - query.append(_FINDER_COLUMN_G_U_USERID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(userId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums where groupId = ? and userId = ? from the database. - * - * @param groupId the group ID - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_U(long groupId, long userId) - throws SystemException { - for (Album album : findByG_U(groupId, userId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_U(long groupId, long userId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_U; - - Object[] finderArgs = new Object[] { groupId, userId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_U_GROUPID_2); - - query.append(_FINDER_COLUMN_G_U_USERID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(userId); - - 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(); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and userId = ?. - * - * @param groupId the group ID - * @param userId the user ID - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_U(long groupId, long userId) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_U(groupId, userId); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_U_GROUPID_2); - - query.append(_FINDER_COLUMN_G_U_USERID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(userId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_U_GROUPID_2 = "album.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_U_USERID_2 = "album.userId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - AlbumModelImpl.GROUPID_COLUMN_BITMASK | - AlbumModelImpl.STATUS_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_S = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the albums where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status) - throws SystemException { - return findByG_S(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the albums where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, int start, int end) - throws SystemException { - return findByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the albums where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, 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_G_S; - finderArgs = new Object[] { groupId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S; - finderArgs = new Object[] { - groupId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if ((groupId != album.getGroupId()) || - (status != album.getStatus())) { - 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.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(groupId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByG_S_First(groupId, status, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_S(groupId, status, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByG_S_Last(groupId, status, orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_S(groupId, status); - - if (count == 0) { - return null; - } - - List list = findByG_S(groupId, status, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByG_S_PrevAndNext(long albumId, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByG_S_PrevAndNext(session, album, groupId, status, - orderByComparator, true); - - array[1] = album; - - array[2] = getByG_S_PrevAndNext(session, album, groupId, status, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByG_S_PrevAndNext(Session session, Album album, - long groupId, int status, 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_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(AlbumModelImpl.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(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the albums that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status) - throws SystemException { - return filterFindByG_S(groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end) throws SystemException { - return filterFindByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S(groupId, status, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] filterFindByG_S_PrevAndNext(long albumId, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S_PrevAndNext(albumId, groupId, status, - orderByComparator); - } - - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = filterGetByG_S_PrevAndNext(session, album, groupId, - status, orderByComparator, true); - - array[1] = album; - - array[2] = filterGetByG_S_PrevAndNext(session, album, groupId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album filterGetByG_S_PrevAndNext(Session session, Album album, - long groupId, int status, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_S(long groupId, int status) throws SystemException { - for (Album album : findByG_S(groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_S(long groupId, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_S; - - Object[] finderArgs = new Object[] { groupId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_S(long groupId, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_S(groupId, status); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_S_GROUPID_2 = "album.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_S_STATUS_2 = "album.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_A_S = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_A_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A_S = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_A_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }, - AlbumModelImpl.GROUPID_COLUMN_BITMASK | - AlbumModelImpl.ARTISTID_COLUMN_BITMASK | - AlbumModelImpl.STATUS_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_A_S = new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_A_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }); - - /** - * Returns all the albums where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_A_S(long groupId, long artistId, int status) - throws SystemException { - return findByG_A_S(groupId, artistId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_A_S(long groupId, long artistId, int status, - int start, int end) throws SystemException { - return findByG_A_S(groupId, artistId, status, start, end, null); - } - - /** - * Returns an ordered range of all the albums where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_A_S(long groupId, long artistId, int status, - 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_G_A_S; - finderArgs = new Object[] { groupId, artistId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_A_S; - finderArgs = new Object[] { - groupId, artistId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if ((groupId != album.getGroupId()) || - (artistId != album.getArtistId()) || - (status != album.getStatus())) { - 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ARTISTID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.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(groupId); - - qPos.add(artistId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByG_A_S_First(long groupId, long artistId, int status, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByG_A_S_First(groupId, artistId, status, - orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", artistId="); - msg.append(artistId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByG_A_S_First(long groupId, long artistId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_A_S(groupId, artistId, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByG_A_S_Last(long groupId, long artistId, int status, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByG_A_S_Last(groupId, artistId, status, - orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", artistId="); - msg.append(artistId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByG_A_S_Last(long groupId, long artistId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_A_S(groupId, artistId, status); - - if (count == 0) { - return null; - } - - List list = findByG_A_S(groupId, artistId, status, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and artistId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByG_A_S_PrevAndNext(long albumId, long groupId, - long artistId, int status, OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByG_A_S_PrevAndNext(session, album, groupId, - artistId, status, orderByComparator, true); - - array[1] = album; - - array[2] = getByG_A_S_PrevAndNext(session, album, groupId, - artistId, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByG_A_S_PrevAndNext(Session session, Album album, - long groupId, long artistId, int status, - 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ARTISTID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_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(AlbumModelImpl.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(groupId); - - qPos.add(artistId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_A_S(long groupId, long artistId, int status) - throws SystemException { - return filterFindByG_A_S(groupId, artistId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_A_S(long groupId, long artistId, - int status, int start, int end) throws SystemException { - return filterFindByG_A_S(groupId, artistId, status, start, end, null); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and artistId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_A_S(long groupId, long artistId, - int status, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_A_S(groupId, artistId, status, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ARTISTID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(artistId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] filterFindByG_A_S_PrevAndNext(long albumId, long groupId, - long artistId, int status, OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_A_S_PrevAndNext(albumId, groupId, artistId, status, - orderByComparator); - } - - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = filterGetByG_A_S_PrevAndNext(session, album, groupId, - artistId, status, orderByComparator, true); - - array[1] = album; - - array[2] = filterGetByG_A_S_PrevAndNext(session, album, groupId, - artistId, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album filterGetByG_A_S_PrevAndNext(Session session, Album album, - long groupId, long artistId, int status, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ARTISTID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(artistId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums where groupId = ? and artistId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_A_S(long groupId, long artistId, int status) - throws SystemException { - for (Album album : findByG_A_S(groupId, artistId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_A_S(long groupId, long artistId, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_A_S; - - Object[] finderArgs = new Object[] { groupId, artistId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ARTISTID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(artistId); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and artistId = ? and status = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param status the status - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_A_S(long groupId, long artistId, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_A_S(groupId, artistId, status); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ARTISTID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(artistId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_A_S_GROUPID_2 = "album.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_A_S_ARTISTID_2 = "album.artistId = ? AND "; - private static final String _FINDER_COLUMN_G_A_S_STATUS_2 = "album.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_LIKEN_S = - new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, AlbumImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_LikeN_S", - new String[] { - Long.class.getName(), String.class.getName(), - Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_LIKEN_S = - new FinderPath(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_LikeN_S", - new String[] { - Long.class.getName(), String.class.getName(), - Integer.class.getName() - }); - - /** - * Returns all the albums where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - return findByG_LikeN_S(groupId, name, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_LikeN_S(long groupId, String name, int status, - int start, int end) throws SystemException { - return findByG_LikeN_S(groupId, name, status, start, end, null); - } - - /** - * Returns an ordered range of all the albums where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_LikeN_S(long groupId, String name, int status, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - boolean pagination = true; - FinderPath finderPath = null; - Object[] finderArgs = null; - - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_LIKEN_S; - finderArgs = new Object[] { - groupId, name, status, - - start, end, orderByComparator - }; - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Album album : list) { - if ((groupId != album.getGroupId()) || - !StringUtil.wildcardMatches(album.getName(), name, - CharPool.UNDERLINE, CharPool.PERCENT, - CharPool.BACK_SLASH, false) || - (status != album.getStatus())) { - 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(AlbumModelImpl.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(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByG_LikeN_S_First(long groupId, String name, int status, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByG_LikeN_S_First(groupId, name, status, - orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", name="); - msg.append(name); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the first album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByG_LikeN_S_First(long groupId, String name, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_LikeN_S(groupId, name, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album - * @throws org.liferay.jukebox.NoSuchAlbumException if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByG_LikeN_S_Last(long groupId, String name, int status, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = fetchByG_LikeN_S_Last(groupId, name, status, - orderByComparator); - - if (album != null) { - return album; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", name="); - msg.append(name); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchAlbumException(msg.toString()); - } - - /** - * Returns the last album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching album, or null if a matching album could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByG_LikeN_S_Last(long groupId, String name, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_LikeN_S(groupId, name, status); - - if (count == 0) { - return null; - } - - List list = findByG_LikeN_S(groupId, name, status, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the albums before and after the current album in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] findByG_LikeN_S_PrevAndNext(long albumId, long groupId, - String name, int status, OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = getByG_LikeN_S_PrevAndNext(session, album, groupId, - name, status, orderByComparator, true); - - array[1] = album; - - array[2] = getByG_LikeN_S_PrevAndNext(session, album, groupId, - name, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album getByG_LikeN_S_PrevAndNext(Session session, Album album, - long groupId, String name, int status, - 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_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_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(AlbumModelImpl.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(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_LikeN_S(long groupId, String name, - int status) throws SystemException { - return filterFindByG_LikeN_S(groupId, name, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_LikeN_S(long groupId, String name, - int status, int start, int end) throws SystemException { - return filterFindByG_LikeN_S(groupId, name, status, start, end, null); - } - - /** - * Returns an ordered range of all the albums that the user has permissions to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_LikeN_S(long groupId, String name, - int status, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_LikeN_S(groupId, name, status, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param albumId the primary key of the current album - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album[] filterFindByG_LikeN_S_PrevAndNext(long albumId, - long groupId, String name, int status, - OrderByComparator orderByComparator) - throws NoSuchAlbumException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_LikeN_S_PrevAndNext(albumId, groupId, name, status, - orderByComparator); - } - - Album album = findByPrimaryKey(albumId); - - Session session = null; - - try { - session = openSession(); - - Album[] array = new AlbumImpl[3]; - - array[0] = filterGetByG_LikeN_S_PrevAndNext(session, album, - groupId, name, status, orderByComparator, true); - - array[1] = album; - - array[2] = filterGetByG_LikeN_S_PrevAndNext(session, album, - groupId, name, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Album filterGetByG_LikeN_S_PrevAndNext(Session session, - Album album, long groupId, String name, int status, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(AlbumModelImpl.ORDER_BY_JPQL); - } - else { - query.append(AlbumModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, AlbumImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, AlbumImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(album); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the albums where groupId = ? and name LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - for (Album album : findByG_LikeN_S(groupId, name, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(album); - } - } - - /** - * Returns the number of albums where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching albums - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_LIKEN_S; - - Object[] finderArgs = new Object[] { groupId, name, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of albums that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching albums that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_LikeN_S(groupId, name, status); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_ALBUM_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Album.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_LIKEN_S_GROUPID_2 = "album.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_NAME_1 = "album.name LIKE NULL AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_NAME_2 = "lower(album.name) LIKE ? AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_NAME_3 = "(album.name IS NULL OR album.name LIKE '') AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_STATUS_2 = "album.status = ?"; - - public AlbumPersistenceImpl() { - setModelClass(Album.class); - } - - /** - * Caches the album in the entity cache if it is enabled. - * - * @param album the album - */ - @Override - public void cacheResult(Album album) { - EntityCacheUtil.putResult(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumImpl.class, album.getPrimaryKey(), album); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - new Object[] { album.getUuid(), album.getGroupId() }, album); - - album.resetOriginalValues(); - } - - /** - * Caches the albums in the entity cache if it is enabled. - * - * @param albums the albums - */ - @Override - public void cacheResult(List albums) { - for (Album album : albums) { - if (EntityCacheUtil.getResult(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumImpl.class, album.getPrimaryKey()) == null) { - cacheResult(album); - } - else { - album.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all albums. - * - *

- * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

- */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(AlbumImpl.class.getName()); - } - - EntityCacheUtil.clearCache(AlbumImpl.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 album. - * - *

- * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

- */ - @Override - public void clearCache(Album album) { - EntityCacheUtil.removeResult(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumImpl.class, album.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(album); - } - - @Override - public void clearCache(List albums) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (Album album : albums) { - EntityCacheUtil.removeResult(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumImpl.class, album.getPrimaryKey()); - - clearUniqueFindersCache(album); - } - } - - protected void cacheUniqueFindersCache(Album album) { - if (album.isNew()) { - Object[] args = new Object[] { album.getUuid(), album.getGroupId() }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, album); - } - else { - AlbumModelImpl albumModelImpl = (AlbumModelImpl)album; - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { album.getUuid(), album.getGroupId() }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - album); - } - } - } - - protected void clearUniqueFindersCache(Album album) { - AlbumModelImpl albumModelImpl = (AlbumModelImpl)album; - - Object[] args = new Object[] { album.getUuid(), album.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - args = new Object[] { - albumModelImpl.getOriginalUuid(), - albumModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - } - } - - /** - * Creates a new album with the primary key. Does not add the album to the database. - * - * @param albumId the primary key for the new album - * @return the new album - */ - @Override - public Album create(long albumId) { - Album album = new AlbumImpl(); - - album.setNew(true); - album.setPrimaryKey(albumId); - - String uuid = PortalUUIDUtil.generate(); - - album.setUuid(uuid); - - return album; - } - - /** - * Removes the album with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param albumId the primary key of the album - * @return the album that was removed - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album remove(long albumId) - throws NoSuchAlbumException, SystemException { - return remove((Serializable)albumId); - } - - /** - * Removes the album with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the album - * @return the album that was removed - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album remove(Serializable primaryKey) - throws NoSuchAlbumException, SystemException { - Session session = null; - - try { - session = openSession(); - - Album album = (Album)session.get(AlbumImpl.class, primaryKey); - - if (album == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchAlbumException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(album); - } - catch (NoSuchAlbumException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected Album removeImpl(Album album) throws SystemException { - album = toUnwrappedModel(album); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(album)) { - album = (Album)session.get(AlbumImpl.class, - album.getPrimaryKeyObj()); - } - - if (album != null) { - session.delete(album); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (album != null) { - clearCache(album); - } - - return album; - } - - @Override - public Album updateImpl(org.liferay.jukebox.model.Album album) - throws SystemException { - album = toUnwrappedModel(album); - - boolean isNew = album.isNew(); - - AlbumModelImpl albumModelImpl = (AlbumModelImpl)album; - - if (Validator.isNull(album.getUuid())) { - String uuid = PortalUUIDUtil.generate(); - - album.setUuid(uuid); - } - - Session session = null; - - try { - session = openSession(); - - if (album.isNew()) { - session.save(album); - - album.setNew(false); - } - else { - session.merge(album); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !AlbumModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { albumModelImpl.getOriginalUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - - args = new Object[] { albumModelImpl.getUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - } - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - albumModelImpl.getOriginalUuid(), - albumModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - - args = new Object[] { - albumModelImpl.getUuid(), albumModelImpl.getCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - } - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { albumModelImpl.getOriginalGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - - args = new Object[] { albumModelImpl.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - } - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { albumModelImpl.getOriginalUserId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, - args); - - args = new Object[] { albumModelImpl.getUserId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, - args); - } - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - albumModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - - args = new Object[] { albumModelImpl.getCompanyId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - } - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ARTISTID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - albumModelImpl.getOriginalArtistId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ARTISTID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ARTISTID, - args); - - args = new Object[] { albumModelImpl.getArtistId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ARTISTID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ARTISTID, - args); - } - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_U.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - albumModelImpl.getOriginalGroupId(), - albumModelImpl.getOriginalUserId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_U, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_U, - args); - - args = new Object[] { - albumModelImpl.getGroupId(), albumModelImpl.getUserId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_U, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_U, - args); - } - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - albumModelImpl.getOriginalGroupId(), - albumModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - - args = new Object[] { - albumModelImpl.getGroupId(), albumModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - } - - if ((albumModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - albumModelImpl.getOriginalGroupId(), - albumModelImpl.getOriginalArtistId(), - albumModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_A_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A_S, - args); - - args = new Object[] { - albumModelImpl.getGroupId(), - albumModelImpl.getArtistId(), albumModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_A_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A_S, - args); - } - } - - EntityCacheUtil.putResult(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumImpl.class, album.getPrimaryKey(), album); - - clearUniqueFindersCache(album); - cacheUniqueFindersCache(album); - - return album; - } - - protected Album toUnwrappedModel(Album album) { - if (album instanceof AlbumImpl) { - return album; - } - - AlbumImpl albumImpl = new AlbumImpl(); - - albumImpl.setNew(album.isNew()); - albumImpl.setPrimaryKey(album.getPrimaryKey()); - - albumImpl.setUuid(album.getUuid()); - albumImpl.setAlbumId(album.getAlbumId()); - albumImpl.setCompanyId(album.getCompanyId()); - albumImpl.setGroupId(album.getGroupId()); - albumImpl.setUserId(album.getUserId()); - albumImpl.setUserName(album.getUserName()); - albumImpl.setCreateDate(album.getCreateDate()); - albumImpl.setModifiedDate(album.getModifiedDate()); - albumImpl.setArtistId(album.getArtistId()); - albumImpl.setName(album.getName()); - albumImpl.setYear(album.getYear()); - albumImpl.setStatus(album.getStatus()); - albumImpl.setStatusByUserId(album.getStatusByUserId()); - albumImpl.setStatusByUserName(album.getStatusByUserName()); - albumImpl.setStatusDate(album.getStatusDate()); - - return albumImpl; - } - - /** - * Returns the album 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 album - * @return the album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByPrimaryKey(Serializable primaryKey) - throws NoSuchAlbumException, SystemException { - Album album = fetchByPrimaryKey(primaryKey); - - if (album == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchAlbumException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return album; - } - - /** - * Returns the album with the primary key or throws a {@link org.liferay.jukebox.NoSuchAlbumException} if it could not be found. - * - * @param albumId the primary key of the album - * @return the album - * @throws org.liferay.jukebox.NoSuchAlbumException if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album findByPrimaryKey(long albumId) - throws NoSuchAlbumException, SystemException { - return findByPrimaryKey((Serializable)albumId); - } - - /** - * Returns the album with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the album - * @return the album, or null if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - Album album = (Album)EntityCacheUtil.getResult(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumImpl.class, primaryKey); - - if (album == _nullAlbum) { - return null; - } - - if (album == null) { - Session session = null; - - try { - session = openSession(); - - album = (Album)session.get(AlbumImpl.class, primaryKey); - - if (album != null) { - cacheResult(album); - } - else { - EntityCacheUtil.putResult(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumImpl.class, primaryKey, _nullAlbum); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(AlbumModelImpl.ENTITY_CACHE_ENABLED, - AlbumImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return album; - } - - /** - * Returns the album with the primary key or returns null if it could not be found. - * - * @param albumId the primary key of the album - * @return the album, or null if a album with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Album fetchByPrimaryKey(long albumId) throws SystemException { - return fetchByPrimaryKey((Serializable)albumId); - } - - /** - * Returns all the albums. - * - * @return the albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @return the range of albums - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the albums. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.AlbumModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of albums - * @param end the upper bound of the range of albums (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of albums - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_ALBUM); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_ALBUM; - - if (pagination) { - sql = sql.concat(AlbumModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 albums from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (Album album : findAll()) { - remove(album); - } - } - - /** - * Returns the number of albums. - * - * @return the number of albums - * @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_ALBUM); - - 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(); - } - - @Override - protected Set getBadColumnNames() { - return _badColumnNames; - } - - /** - * Initializes the album persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.org.liferay.jukebox.model.Album"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(AlbumImpl.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_ALBUM = "SELECT album FROM Album album"; - private static final String _SQL_SELECT_ALBUM_WHERE = "SELECT album FROM Album album WHERE "; - private static final String _SQL_COUNT_ALBUM = "SELECT COUNT(album) FROM Album album"; - private static final String _SQL_COUNT_ALBUM_WHERE = "SELECT COUNT(album) FROM Album album WHERE "; - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN = "album.albumId"; - private static final String _FILTER_SQL_SELECT_ALBUM_WHERE = "SELECT DISTINCT {album.*} FROM jukebox_Album album WHERE "; - private static final String _FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_1 = - "SELECT {jukebox_Album.*} FROM (SELECT DISTINCT album.albumId FROM jukebox_Album album WHERE "; - private static final String _FILTER_SQL_SELECT_ALBUM_NO_INLINE_DISTINCT_WHERE_2 = - ") TEMP_TABLE INNER JOIN jukebox_Album ON TEMP_TABLE.albumId = jukebox_Album.albumId"; - private static final String _FILTER_SQL_COUNT_ALBUM_WHERE = "SELECT COUNT(DISTINCT album.albumId) AS COUNT_VALUE FROM jukebox_Album album WHERE "; - private static final String _FILTER_ENTITY_ALIAS = "album"; - private static final String _FILTER_ENTITY_TABLE = "jukebox_Album"; - private static final String _ORDER_BY_ENTITY_ALIAS = "album."; - private static final String _ORDER_BY_ENTITY_TABLE = "jukebox_Album."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Album exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Album 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(AlbumPersistenceImpl.class); - private static Set _badColumnNames = SetUtil.fromArray(new String[] { - "uuid" - }); - private static Album _nullAlbum = new AlbumImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullAlbumCacheModel; - } - }; - - private static CacheModel _nullAlbumCacheModel = new CacheModel() { - @Override - public Album toEntityModel() { - return _nullAlbum; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/persistence/ArtistPersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/persistence/ArtistPersistenceImpl.java deleted file mode 100644 index c84572adfa..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/persistence/ArtistPersistenceImpl.java +++ /dev/null @@ -1,6919 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.SQLQuery; -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.CharPool; -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.SetUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.security.permission.InlineSQLHelperUtil; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import org.liferay.jukebox.NoSuchArtistException; -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.model.impl.ArtistImpl; -import org.liferay.jukebox.model.impl.ArtistModelImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * The persistence implementation for the artist service. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author Julio Camarero - * @see ArtistPersistence - * @see ArtistUtil - * @generated - */ -public class ArtistPersistenceImpl extends BasePersistenceImpl - implements ArtistPersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link ArtistUtil} to access the artist persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = ArtistImpl.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(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.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_UUID = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", - new String[] { String.class.getName() }, - ArtistModelImpl.UUID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", - new String[] { String.class.getName() }); - - /** - * Returns all the artists where uuid = ?. - * - * @param uuid the uuid - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid) throws SystemException { - return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, int start, int end) - throws SystemException { - return findByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the artists where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, 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_UUID; - finderArgs = new Object[] { uuid }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; - finderArgs = new Object[] { uuid, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Artist artist : list) { - if (!Validator.equals(uuid, artist.getUuid())) { - 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_ARTIST_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByUuid_First(String uuid, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByUuid_First(uuid, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the first artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByUuid_First(String uuid, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid(uuid, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByUuid_Last(String uuid, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByUuid_Last(uuid, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the last artist in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByUuid_Last(String uuid, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid(uuid); - - if (count == 0) { - return null; - } - - List list = findByUuid(uuid, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the artists before and after the current artist in the ordered set where uuid = ?. - * - * @param artistId the primary key of the current artist - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] findByUuid_PrevAndNext(long artistId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = getByUuid_PrevAndNext(session, artist, uuid, - orderByComparator, true); - - array[1] = artist; - - array[2] = getByUuid_PrevAndNext(session, artist, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist getByUuid_PrevAndNext(Session session, Artist artist, - String uuid, 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_ARTIST_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_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(ArtistModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the artists where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid(String uuid) throws SystemException { - for (Artist artist : findByUuid(uuid, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(artist); - } - } - - /** - * Returns the number of artists where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid(String uuid) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; - - Object[] finderArgs = new Object[] { uuid }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_ARTIST_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_UUID_1 = "artist.uuid IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2 = "artist.uuid = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3 = "(artist.uuid IS NULL OR artist.uuid = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }, - ArtistModelImpl.UUID_COLUMN_BITMASK | - ArtistModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns the artist where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchArtistException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByUUID_G(String uuid, long groupId) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByUUID_G(uuid, groupId); - - if (artist == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchArtistException(msg.toString()); - } - - return artist; - } - - /** - * Returns the artist where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByUUID_G(String uuid, long groupId) - throws SystemException { - return fetchByUUID_G(uuid, groupId, true); - } - - /** - * Returns the artist where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByUUID_G(String uuid, long groupId, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { uuid, groupId }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, this); - } - - if (result instanceof Artist) { - Artist artist = (Artist)result; - - if (!Validator.equals(uuid, artist.getUuid()) || - (groupId != artist.getGroupId())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_ARTIST_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, list); - } - else { - Artist artist = list.get(0); - - result = artist; - - cacheResult(artist); - - if ((artist.getUuid() == null) || - !artist.getUuid().equals(uuid) || - (artist.getGroupId() != groupId)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, artist); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (Artist)result; - } - } - - /** - * Removes the artist where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the artist that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public Artist removeByUUID_G(String uuid, long groupId) - throws NoSuchArtistException, SystemException { - Artist artist = findByUUID_G(uuid, groupId); - - return remove(artist); - } - - /** - * Returns the number of artists where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUUID_G(String uuid, long groupId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; - - Object[] finderArgs = new Object[] { uuid, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_ARTIST_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - 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_UUID_G_UUID_1 = "artist.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "artist.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(artist.uuid IS NULL OR artist.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "artist.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", - new String[] { - String.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = - new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }, - ArtistModelImpl.UUID_COLUMN_BITMASK | - ArtistModelImpl.COMPANYID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns all the artists where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId) - throws SystemException { - return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId, int start, - int end) throws SystemException { - return findByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the artists where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, 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_UUID_C; - finderArgs = new Object[] { uuid, companyId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; - finderArgs = new Object[] { - uuid, companyId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Artist artist : list) { - if (!Validator.equals(uuid, artist.getUuid()) || - (companyId != artist.getCompanyId())) { - 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_ARTIST_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByUuid_C_First(uuid, companyId, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the first artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid_C(uuid, companyId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByUuid_C_Last(uuid, companyId, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the last artist in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid_C(uuid, companyId); - - if (count == 0) { - return null; - } - - List list = findByUuid_C(uuid, companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the artists before and after the current artist in the ordered set where uuid = ? and companyId = ?. - * - * @param artistId the primary key of the current artist - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] findByUuid_C_PrevAndNext(long artistId, String uuid, - long companyId, OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = getByUuid_C_PrevAndNext(session, artist, uuid, - companyId, orderByComparator, true); - - array[1] = artist; - - array[2] = getByUuid_C_PrevAndNext(session, artist, uuid, - companyId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist getByUuid_C_PrevAndNext(Session session, Artist artist, - String uuid, 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_ARTIST_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_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(ArtistModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the artists where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid_C(String uuid, long companyId) - throws SystemException { - for (Artist artist : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(artist); - } - } - - /** - * Returns the number of artists where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid_C(String uuid, long companyId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; - - Object[] finderArgs = new Object[] { uuid, companyId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_ARTIST_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_C_UUID_1 = "artist.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "artist.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(artist.uuid IS NULL OR artist.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "artist.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByGroupId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID = - new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByGroupId", - new String[] { Long.class.getName() }, - ArtistModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_GROUPID = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByGroupId", - new String[] { Long.class.getName() }); - - /** - * Returns all the artists where groupId = ?. - * - * @param groupId the group ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId) throws SystemException { - return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, int start, int end) - throws SystemException { - return findByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the artists where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, 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_GROUPID; - finderArgs = new Object[] { groupId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID; - finderArgs = new Object[] { groupId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Artist artist : list) { - if ((groupId != artist.getGroupId())) { - 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(ArtistModelImpl.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(groupId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByGroupId_First(long groupId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByGroupId_First(groupId, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the first artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByGroupId_First(long groupId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByGroupId(groupId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByGroupId_Last(long groupId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByGroupId_Last(groupId, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the last artist in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByGroupId_Last(long groupId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByGroupId(groupId); - - if (count == 0) { - return null; - } - - List list = findByGroupId(groupId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the artists before and after the current artist in the ordered set where groupId = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] findByGroupId_PrevAndNext(long artistId, long groupId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = getByGroupId_PrevAndNext(session, artist, groupId, - orderByComparator, true); - - array[1] = artist; - - array[2] = getByGroupId_PrevAndNext(session, artist, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist getByGroupId_PrevAndNext(Session session, Artist artist, - long groupId, 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_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(ArtistModelImpl.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(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the artists that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId) - throws SystemException { - return filterFindByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists that the user has permission to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, int end) - throws SystemException { - return filterFindByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the artists that the user has permissions to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId(groupId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(3 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - else { - query.append(ArtistModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, ArtistImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, ArtistImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where groupId = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] filterFindByGroupId_PrevAndNext(long artistId, - long groupId, OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId_PrevAndNext(artistId, groupId, - orderByComparator); - } - - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = filterGetByGroupId_PrevAndNext(session, artist, groupId, - orderByComparator, true); - - array[1] = artist; - - array[2] = filterGetByGroupId_PrevAndNext(session, artist, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist filterGetByGroupId_PrevAndNext(Session session, - Artist artist, long groupId, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - else { - query.append(ArtistModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, ArtistImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, ArtistImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the artists where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByGroupId(long groupId) throws SystemException { - for (Artist artist : findByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(artist); - } - } - - /** - * Returns the number of artists where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public int countByGroupId(long groupId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_GROUPID; - - Object[] finderArgs = new Object[] { groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - 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(); - } - - /** - * Returns the number of artists that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByGroupId(long groupId) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByGroupId(groupId); - } - - StringBundler query = new StringBundler(2); - - query.append(_FILTER_SQL_COUNT_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 = "artist.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_USERID = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUserId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID = - new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUserId", - new String[] { Long.class.getName() }, - ArtistModelImpl.USERID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_USERID = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUserId", - new String[] { Long.class.getName() }); - - /** - * Returns all the artists where userId = ?. - * - * @param userId the user ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUserId(long userId) throws SystemException { - return findByUserId(userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUserId(long userId, int start, int end) - throws SystemException { - return findByUserId(userId, start, end, null); - } - - /** - * Returns an ordered range of all the artists where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUserId(long userId, 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_USERID; - finderArgs = new Object[] { userId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_USERID; - finderArgs = new Object[] { userId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Artist artist : list) { - if ((userId != artist.getUserId())) { - 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_USERID_USERID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(ArtistModelImpl.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(userId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByUserId_First(long userId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByUserId_First(userId, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the first artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByUserId_First(long userId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUserId(userId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByUserId_Last(long userId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByUserId_Last(userId, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the last artist in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByUserId_Last(long userId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUserId(userId); - - if (count == 0) { - return null; - } - - List list = findByUserId(userId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the artists before and after the current artist in the ordered set where userId = ?. - * - * @param artistId the primary key of the current artist - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] findByUserId_PrevAndNext(long artistId, long userId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = getByUserId_PrevAndNext(session, artist, userId, - orderByComparator, true); - - array[1] = artist; - - array[2] = getByUserId_PrevAndNext(session, artist, userId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist getByUserId_PrevAndNext(Session session, Artist artist, - long userId, 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_USERID_USERID_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(ArtistModelImpl.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(userId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the artists where userId = ? from the database. - * - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUserId(long userId) throws SystemException { - for (Artist artist : findByUserId(userId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(artist); - } - } - - /** - * Returns the number of artists where userId = ?. - * - * @param userId the user ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUserId(long userId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_USERID; - - Object[] finderArgs = new Object[] { userId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_USERID_USERID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - 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_USERID_USERID_2 = "artist.userId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_COMPANYID = - new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.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(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByCompanyId", - new String[] { Long.class.getName() }, - ArtistModelImpl.COMPANYID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByCompanyId", - new String[] { Long.class.getName() }); - - /** - * Returns all the artists where companyId = ?. - * - * @param companyId the company ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId) - throws SystemException { - return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the artists where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId, int start, int end) - throws SystemException { - return findByCompanyId(companyId, start, end, null); - } - - /** - * Returns an ordered range of all the artists where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Artist artist : list) { - if ((companyId != artist.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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(ArtistModelImpl.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)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByCompanyId_First(long companyId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByCompanyId_First(companyId, orderByComparator); - - if (artist != null) { - return artist; - } - - 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 NoSuchArtistException(msg.toString()); - } - - /** - * Returns the first artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByCompanyId_First(long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByCompanyId(companyId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByCompanyId_Last(companyId, orderByComparator); - - if (artist != null) { - return artist; - } - - 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 NoSuchArtistException(msg.toString()); - } - - /** - * Returns the last artist in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByCompanyId(companyId); - - if (count == 0) { - return null; - } - - List list = findByCompanyId(companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the artists before and after the current artist in the ordered set where companyId = ?. - * - * @param artistId the primary key of the current artist - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] findByCompanyId_PrevAndNext(long artistId, long companyId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = getByCompanyId_PrevAndNext(session, artist, companyId, - orderByComparator, true); - - array[1] = artist; - - array[2] = getByCompanyId_PrevAndNext(session, artist, companyId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist getByCompanyId_PrevAndNext(Session session, Artist artist, - 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_ARTIST_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(ArtistModelImpl.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(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the artists 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 (Artist artist : findByCompanyId(companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(artist); - } - } - - /** - * Returns the number of artists where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching artists - * @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_ARTIST_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 = "artist.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_U_G = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByU_G", - new String[] { - Long.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_U_G = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByU_G", - new String[] { Long.class.getName(), Long.class.getName() }, - ArtistModelImpl.USERID_COLUMN_BITMASK | - ArtistModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_U_G = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByU_G", - new String[] { Long.class.getName(), Long.class.getName() }); - - /** - * Returns all the artists where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByU_G(long userId, long groupId) - throws SystemException { - return findByU_G(userId, groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the artists where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByU_G(long userId, long groupId, int start, int end) - throws SystemException { - return findByU_G(userId, groupId, start, end, null); - } - - /** - * Returns an ordered range of all the artists where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByU_G(long userId, long groupId, 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_U_G; - finderArgs = new Object[] { userId, groupId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_U_G; - finderArgs = new Object[] { - userId, groupId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Artist artist : list) { - if ((userId != artist.getUserId()) || - (groupId != artist.getGroupId())) { - 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_U_G_USERID_2); - - query.append(_FINDER_COLUMN_U_G_GROUPID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(ArtistModelImpl.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(userId); - - qPos.add(groupId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByU_G_First(long userId, long groupId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByU_G_First(userId, groupId, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the first artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByU_G_First(long userId, long groupId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByU_G(userId, groupId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByU_G_Last(long userId, long groupId, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByU_G_Last(userId, groupId, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the last artist in the ordered set where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByU_G_Last(long userId, long groupId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByU_G(userId, groupId); - - if (count == 0) { - return null; - } - - List list = findByU_G(userId, groupId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the artists before and after the current artist in the ordered set where userId = ? and groupId = ?. - * - * @param artistId the primary key of the current artist - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] findByU_G_PrevAndNext(long artistId, long userId, - long groupId, OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = getByU_G_PrevAndNext(session, artist, userId, groupId, - orderByComparator, true); - - array[1] = artist; - - array[2] = getByU_G_PrevAndNext(session, artist, userId, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist getByU_G_PrevAndNext(Session session, Artist artist, - long userId, long groupId, 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_U_G_USERID_2); - - query.append(_FINDER_COLUMN_U_G_GROUPID_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(ArtistModelImpl.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(userId); - - qPos.add(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the artists that the user has permission to view where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByU_G(long userId, long groupId) - throws SystemException { - return filterFindByU_G(userId, groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists that the user has permission to view where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByU_G(long userId, long groupId, int start, - int end) throws SystemException { - return filterFindByU_G(userId, groupId, start, end, null); - } - - /** - * Returns an ordered range of all the artists that the user has permissions to view where userId = ? and groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param groupId the group ID - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByU_G(long userId, long groupId, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByU_G(userId, groupId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_U_G_USERID_2); - - query.append(_FINDER_COLUMN_U_G_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - else { - query.append(ArtistModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, ArtistImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, ArtistImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - qPos.add(groupId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where userId = ? and groupId = ?. - * - * @param artistId the primary key of the current artist - * @param userId the user ID - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] filterFindByU_G_PrevAndNext(long artistId, long userId, - long groupId, OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByU_G_PrevAndNext(artistId, userId, groupId, - orderByComparator); - } - - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = filterGetByU_G_PrevAndNext(session, artist, userId, - groupId, orderByComparator, true); - - array[1] = artist; - - array[2] = filterGetByU_G_PrevAndNext(session, artist, userId, - groupId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist filterGetByU_G_PrevAndNext(Session session, Artist artist, - long userId, long groupId, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_U_G_USERID_2); - - query.append(_FINDER_COLUMN_U_G_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - else { - query.append(ArtistModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, ArtistImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, ArtistImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - qPos.add(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the artists where userId = ? and groupId = ? from the database. - * - * @param userId the user ID - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByU_G(long userId, long groupId) - throws SystemException { - for (Artist artist : findByU_G(userId, groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(artist); - } - } - - /** - * Returns the number of artists where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public int countByU_G(long userId, long groupId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_U_G; - - Object[] finderArgs = new Object[] { userId, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_U_G_USERID_2); - - query.append(_FINDER_COLUMN_U_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - qPos.add(groupId); - - 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(); - } - - /** - * Returns the number of artists that the user has permission to view where userId = ? and groupId = ?. - * - * @param userId the user ID - * @param groupId the group ID - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByU_G(long userId, long groupId) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByU_G(userId, groupId); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_U_G_USERID_2); - - query.append(_FINDER_COLUMN_U_G_GROUPID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - qPos.add(groupId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_U_G_USERID_2 = "artist.userId = ? AND "; - private static final String _FINDER_COLUMN_U_G_GROUPID_2 = "artist.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - ArtistModelImpl.GROUPID_COLUMN_BITMASK | - ArtistModelImpl.STATUS_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_S = new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the artists where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status) - throws SystemException { - return findByG_S(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the artists where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, int start, int end) - throws SystemException { - return findByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the artists where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, 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_G_S; - finderArgs = new Object[] { groupId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S; - finderArgs = new Object[] { - groupId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Artist artist : list) { - if ((groupId != artist.getGroupId()) || - (status != artist.getStatus())) { - 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(ArtistModelImpl.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(groupId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByG_S_First(groupId, status, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the first artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_S(groupId, status, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByG_S_Last(groupId, status, orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the last artist in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_S(groupId, status); - - if (count == 0) { - return null; - } - - List list = findByG_S(groupId, status, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the artists before and after the current artist in the ordered set where groupId = ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] findByG_S_PrevAndNext(long artistId, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = getByG_S_PrevAndNext(session, artist, groupId, status, - orderByComparator, true); - - array[1] = artist; - - array[2] = getByG_S_PrevAndNext(session, artist, groupId, status, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist getByG_S_PrevAndNext(Session session, Artist artist, - long groupId, int status, 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_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(ArtistModelImpl.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(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the artists that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status) - throws SystemException { - return filterFindByG_S(groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists that the user has permission to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end) throws SystemException { - return filterFindByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the artists that the user has permissions to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S(groupId, status, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - else { - query.append(ArtistModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, ArtistImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, ArtistImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where groupId = ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] filterFindByG_S_PrevAndNext(long artistId, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S_PrevAndNext(artistId, groupId, status, - orderByComparator); - } - - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = filterGetByG_S_PrevAndNext(session, artist, groupId, - status, orderByComparator, true); - - array[1] = artist; - - array[2] = filterGetByG_S_PrevAndNext(session, artist, groupId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist filterGetByG_S_PrevAndNext(Session session, Artist artist, - long groupId, int status, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - else { - query.append(ArtistModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, ArtistImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, ArtistImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the artists where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_S(long groupId, int status) throws SystemException { - for (Artist artist : findByG_S(groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(artist); - } - } - - /** - * Returns the number of artists where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_S(long groupId, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_S; - - Object[] finderArgs = new Object[] { groupId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of artists that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_S(long groupId, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_S(groupId, status); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_S_GROUPID_2 = "artist.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_S_STATUS_2 = "artist.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_LIKEN_S = - new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, ArtistImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_LikeN_S", - new String[] { - Long.class.getName(), String.class.getName(), - Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_LIKEN_S = - new FinderPath(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_LikeN_S", - new String[] { - Long.class.getName(), String.class.getName(), - Integer.class.getName() - }); - - /** - * Returns all the artists where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - return findByG_LikeN_S(groupId, name, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_LikeN_S(long groupId, String name, int status, - int start, int end) throws SystemException { - return findByG_LikeN_S(groupId, name, status, start, end, null); - } - - /** - * Returns an ordered range of all the artists where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_LikeN_S(long groupId, String name, int status, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - boolean pagination = true; - FinderPath finderPath = null; - Object[] finderArgs = null; - - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_LIKEN_S; - finderArgs = new Object[] { - groupId, name, status, - - start, end, orderByComparator - }; - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Artist artist : list) { - if ((groupId != artist.getGroupId()) || - !StringUtil.wildcardMatches(artist.getName(), name, - CharPool.UNDERLINE, CharPool.PERCENT, - CharPool.BACK_SLASH, false) || - (status != artist.getStatus())) { - 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(ArtistModelImpl.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(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByG_LikeN_S_First(long groupId, String name, int status, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByG_LikeN_S_First(groupId, name, status, - orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", name="); - msg.append(name); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the first artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByG_LikeN_S_First(long groupId, String name, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_LikeN_S(groupId, name, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist - * @throws org.liferay.jukebox.NoSuchArtistException if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByG_LikeN_S_Last(long groupId, String name, int status, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByG_LikeN_S_Last(groupId, name, status, - orderByComparator); - - if (artist != null) { - return artist; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", name="); - msg.append(name); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArtistException(msg.toString()); - } - - /** - * Returns the last artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching artist, or null if a matching artist could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByG_LikeN_S_Last(long groupId, String name, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_LikeN_S(groupId, name, status); - - if (count == 0) { - return null; - } - - List list = findByG_LikeN_S(groupId, name, status, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the artists before and after the current artist in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] findByG_LikeN_S_PrevAndNext(long artistId, long groupId, - String name, int status, OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = getByG_LikeN_S_PrevAndNext(session, artist, groupId, - name, status, orderByComparator, true); - - array[1] = artist; - - array[2] = getByG_LikeN_S_PrevAndNext(session, artist, groupId, - name, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist getByG_LikeN_S_PrevAndNext(Session session, Artist artist, - long groupId, String name, int status, - 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_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_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(ArtistModelImpl.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(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_LikeN_S(long groupId, String name, - int status) throws SystemException { - return filterFindByG_LikeN_S(groupId, name, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_LikeN_S(long groupId, String name, - int status, int start, int end) throws SystemException { - return filterFindByG_LikeN_S(groupId, name, status, start, end, null); - } - - /** - * Returns an ordered range of all the artists that the user has permissions to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_LikeN_S(long groupId, String name, - int status, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_LikeN_S(groupId, name, status, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - else { - query.append(ArtistModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, ArtistImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, ArtistImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the artists before and after the current artist in the ordered set of artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param artistId the primary key of the current artist - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist[] filterFindByG_LikeN_S_PrevAndNext(long artistId, - long groupId, String name, int status, - OrderByComparator orderByComparator) - throws NoSuchArtistException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_LikeN_S_PrevAndNext(artistId, groupId, name, status, - orderByComparator); - } - - Artist artist = findByPrimaryKey(artistId); - - Session session = null; - - try { - session = openSession(); - - Artist[] array = new ArtistImpl[3]; - - array[0] = filterGetByG_LikeN_S_PrevAndNext(session, artist, - groupId, name, status, orderByComparator, true); - - array[1] = artist; - - array[2] = filterGetByG_LikeN_S_PrevAndNext(session, artist, - groupId, name, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Artist filterGetByG_LikeN_S_PrevAndNext(Session session, - Artist artist, long groupId, String name, int status, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(ArtistModelImpl.ORDER_BY_JPQL); - } - else { - query.append(ArtistModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, ArtistImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, ArtistImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(artist); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the artists where groupId = ? and name LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - for (Artist artist : findByG_LikeN_S(groupId, name, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(artist); - } - } - - /** - * Returns the number of artists where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching artists - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_LIKEN_S; - - Object[] finderArgs = new Object[] { groupId, name, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of artists that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching artists that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_LikeN_S(groupId, name, status); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_ARTIST_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Artist.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_LIKEN_S_GROUPID_2 = "artist.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_NAME_1 = "artist.name LIKE NULL AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_NAME_2 = "lower(artist.name) LIKE ? AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_NAME_3 = "(artist.name IS NULL OR artist.name LIKE '') AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_STATUS_2 = "artist.status = ?"; - - public ArtistPersistenceImpl() { - setModelClass(Artist.class); - } - - /** - * Caches the artist in the entity cache if it is enabled. - * - * @param artist the artist - */ - @Override - public void cacheResult(Artist artist) { - EntityCacheUtil.putResult(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistImpl.class, artist.getPrimaryKey(), artist); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - new Object[] { artist.getUuid(), artist.getGroupId() }, artist); - - artist.resetOriginalValues(); - } - - /** - * Caches the artists in the entity cache if it is enabled. - * - * @param artists the artists - */ - @Override - public void cacheResult(List artists) { - for (Artist artist : artists) { - if (EntityCacheUtil.getResult( - ArtistModelImpl.ENTITY_CACHE_ENABLED, ArtistImpl.class, - artist.getPrimaryKey()) == null) { - cacheResult(artist); - } - else { - artist.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all artists. - * - *

- * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

- */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(ArtistImpl.class.getName()); - } - - EntityCacheUtil.clearCache(ArtistImpl.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 artist. - * - *

- * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

- */ - @Override - public void clearCache(Artist artist) { - EntityCacheUtil.removeResult(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistImpl.class, artist.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(artist); - } - - @Override - public void clearCache(List artists) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (Artist artist : artists) { - EntityCacheUtil.removeResult(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistImpl.class, artist.getPrimaryKey()); - - clearUniqueFindersCache(artist); - } - } - - protected void cacheUniqueFindersCache(Artist artist) { - if (artist.isNew()) { - Object[] args = new Object[] { artist.getUuid(), artist.getGroupId() }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, artist); - } - else { - ArtistModelImpl artistModelImpl = (ArtistModelImpl)artist; - - if ((artistModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - artist.getUuid(), artist.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - artist); - } - } - } - - protected void clearUniqueFindersCache(Artist artist) { - ArtistModelImpl artistModelImpl = (ArtistModelImpl)artist; - - Object[] args = new Object[] { artist.getUuid(), artist.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - - if ((artistModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - args = new Object[] { - artistModelImpl.getOriginalUuid(), - artistModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - } - } - - /** - * Creates a new artist with the primary key. Does not add the artist to the database. - * - * @param artistId the primary key for the new artist - * @return the new artist - */ - @Override - public Artist create(long artistId) { - Artist artist = new ArtistImpl(); - - artist.setNew(true); - artist.setPrimaryKey(artistId); - - String uuid = PortalUUIDUtil.generate(); - - artist.setUuid(uuid); - - return artist; - } - - /** - * Removes the artist with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param artistId the primary key of the artist - * @return the artist that was removed - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist remove(long artistId) - throws NoSuchArtistException, SystemException { - return remove((Serializable)artistId); - } - - /** - * Removes the artist with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the artist - * @return the artist that was removed - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist remove(Serializable primaryKey) - throws NoSuchArtistException, SystemException { - Session session = null; - - try { - session = openSession(); - - Artist artist = (Artist)session.get(ArtistImpl.class, primaryKey); - - if (artist == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchArtistException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(artist); - } - catch (NoSuchArtistException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected Artist removeImpl(Artist artist) throws SystemException { - artist = toUnwrappedModel(artist); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(artist)) { - artist = (Artist)session.get(ArtistImpl.class, - artist.getPrimaryKeyObj()); - } - - if (artist != null) { - session.delete(artist); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (artist != null) { - clearCache(artist); - } - - return artist; - } - - @Override - public Artist updateImpl(org.liferay.jukebox.model.Artist artist) - throws SystemException { - artist = toUnwrappedModel(artist); - - boolean isNew = artist.isNew(); - - ArtistModelImpl artistModelImpl = (ArtistModelImpl)artist; - - if (Validator.isNull(artist.getUuid())) { - String uuid = PortalUUIDUtil.generate(); - - artist.setUuid(uuid); - } - - Session session = null; - - try { - session = openSession(); - - if (artist.isNew()) { - session.save(artist); - - artist.setNew(false); - } - else { - session.merge(artist); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !ArtistModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((artistModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { artistModelImpl.getOriginalUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - - args = new Object[] { artistModelImpl.getUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - } - - if ((artistModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - artistModelImpl.getOriginalUuid(), - artistModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - - args = new Object[] { - artistModelImpl.getUuid(), - artistModelImpl.getCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - } - - if ((artistModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - artistModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - - args = new Object[] { artistModelImpl.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - } - - if ((artistModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { artistModelImpl.getOriginalUserId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, - args); - - args = new Object[] { artistModelImpl.getUserId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, - args); - } - - if ((artistModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - artistModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - - args = new Object[] { artistModelImpl.getCompanyId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - } - - if ((artistModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_U_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - artistModelImpl.getOriginalUserId(), - artistModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_U_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_U_G, - args); - - args = new Object[] { - artistModelImpl.getUserId(), - artistModelImpl.getGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_U_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_U_G, - args); - } - - if ((artistModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - artistModelImpl.getOriginalGroupId(), - artistModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - - args = new Object[] { - artistModelImpl.getGroupId(), - artistModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - } - } - - EntityCacheUtil.putResult(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistImpl.class, artist.getPrimaryKey(), artist); - - clearUniqueFindersCache(artist); - cacheUniqueFindersCache(artist); - - return artist; - } - - protected Artist toUnwrappedModel(Artist artist) { - if (artist instanceof ArtistImpl) { - return artist; - } - - ArtistImpl artistImpl = new ArtistImpl(); - - artistImpl.setNew(artist.isNew()); - artistImpl.setPrimaryKey(artist.getPrimaryKey()); - - artistImpl.setUuid(artist.getUuid()); - artistImpl.setArtistId(artist.getArtistId()); - artistImpl.setCompanyId(artist.getCompanyId()); - artistImpl.setGroupId(artist.getGroupId()); - artistImpl.setUserId(artist.getUserId()); - artistImpl.setUserName(artist.getUserName()); - artistImpl.setCreateDate(artist.getCreateDate()); - artistImpl.setModifiedDate(artist.getModifiedDate()); - artistImpl.setStatus(artist.getStatus()); - artistImpl.setStatusByUserId(artist.getStatusByUserId()); - artistImpl.setStatusByUserName(artist.getStatusByUserName()); - artistImpl.setStatusDate(artist.getStatusDate()); - artistImpl.setName(artist.getName()); - artistImpl.setBio(artist.getBio()); - - return artistImpl; - } - - /** - * Returns the artist 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 artist - * @return the artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByPrimaryKey(Serializable primaryKey) - throws NoSuchArtistException, SystemException { - Artist artist = fetchByPrimaryKey(primaryKey); - - if (artist == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchArtistException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return artist; - } - - /** - * Returns the artist with the primary key or throws a {@link org.liferay.jukebox.NoSuchArtistException} if it could not be found. - * - * @param artistId the primary key of the artist - * @return the artist - * @throws org.liferay.jukebox.NoSuchArtistException if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist findByPrimaryKey(long artistId) - throws NoSuchArtistException, SystemException { - return findByPrimaryKey((Serializable)artistId); - } - - /** - * Returns the artist with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the artist - * @return the artist, or null if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - Artist artist = (Artist)EntityCacheUtil.getResult(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistImpl.class, primaryKey); - - if (artist == _nullArtist) { - return null; - } - - if (artist == null) { - Session session = null; - - try { - session = openSession(); - - artist = (Artist)session.get(ArtistImpl.class, primaryKey); - - if (artist != null) { - cacheResult(artist); - } - else { - EntityCacheUtil.putResult(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistImpl.class, primaryKey, _nullArtist); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(ArtistModelImpl.ENTITY_CACHE_ENABLED, - ArtistImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return artist; - } - - /** - * Returns the artist with the primary key or returns null if it could not be found. - * - * @param artistId the primary key of the artist - * @return the artist, or null if a artist with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Artist fetchByPrimaryKey(long artistId) throws SystemException { - return fetchByPrimaryKey((Serializable)artistId); - } - - /** - * Returns all the artists. - * - * @return the artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @return the range of artists - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the artists. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.ArtistModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of artists - * @param end the upper bound of the range of artists (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of artists - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_ARTIST); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_ARTIST; - - if (pagination) { - sql = sql.concat(ArtistModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 artists from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (Artist artist : findAll()) { - remove(artist); - } - } - - /** - * Returns the number of artists. - * - * @return the number of artists - * @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_ARTIST); - - 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(); - } - - @Override - protected Set getBadColumnNames() { - return _badColumnNames; - } - - /** - * Initializes the artist persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.org.liferay.jukebox.model.Artist"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(ArtistImpl.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_ARTIST = "SELECT artist FROM Artist artist"; - private static final String _SQL_SELECT_ARTIST_WHERE = "SELECT artist FROM Artist artist WHERE "; - private static final String _SQL_COUNT_ARTIST = "SELECT COUNT(artist) FROM Artist artist"; - private static final String _SQL_COUNT_ARTIST_WHERE = "SELECT COUNT(artist) FROM Artist artist WHERE "; - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN = "artist.artistId"; - private static final String _FILTER_SQL_SELECT_ARTIST_WHERE = "SELECT DISTINCT {artist.*} FROM jukebox_Artist artist WHERE "; - private static final String _FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_1 = - "SELECT {jukebox_Artist.*} FROM (SELECT DISTINCT artist.artistId FROM jukebox_Artist artist WHERE "; - private static final String _FILTER_SQL_SELECT_ARTIST_NO_INLINE_DISTINCT_WHERE_2 = - ") TEMP_TABLE INNER JOIN jukebox_Artist ON TEMP_TABLE.artistId = jukebox_Artist.artistId"; - private static final String _FILTER_SQL_COUNT_ARTIST_WHERE = "SELECT COUNT(DISTINCT artist.artistId) AS COUNT_VALUE FROM jukebox_Artist artist WHERE "; - private static final String _FILTER_ENTITY_ALIAS = "artist"; - private static final String _FILTER_ENTITY_TABLE = "jukebox_Artist"; - private static final String _ORDER_BY_ENTITY_ALIAS = "artist."; - private static final String _ORDER_BY_ENTITY_TABLE = "jukebox_Artist."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Artist exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Artist 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(ArtistPersistenceImpl.class); - private static Set _badColumnNames = SetUtil.fromArray(new String[] { - "uuid" - }); - private static Artist _nullArtist = new ArtistImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullArtistCacheModel; - } - }; - - private static CacheModel _nullArtistCacheModel = new CacheModel() { - @Override - public Artist toEntityModel() { - return _nullArtist; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/persistence/SongPersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/persistence/SongPersistenceImpl.java deleted file mode 100644 index ad66fcebf5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/service/persistence/SongPersistenceImpl.java +++ /dev/null @@ -1,9251 +0,0 @@ -/** - * 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 org.liferay.jukebox.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.SQLQuery; -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.CharPool; -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.SetUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.security.permission.InlineSQLHelperUtil; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import org.liferay.jukebox.NoSuchSongException; -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.model.impl.SongImpl; -import org.liferay.jukebox.model.impl.SongModelImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * The persistence implementation for the song service. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author Julio Camarero - * @see SongPersistence - * @see SongUtil - * @generated - */ -public class SongPersistenceImpl extends BasePersistenceImpl - implements SongPersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link SongUtil} to access the song persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = SongImpl.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(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.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_UUID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", - new String[] { String.class.getName() }, - SongModelImpl.UUID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", - new String[] { String.class.getName() }); - - /** - * Returns all the songs where uuid = ?. - * - * @param uuid the uuid - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid) throws SystemException { - return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, int start, int end) - throws SystemException { - return findByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the songs where uuid = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, 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_UUID; - finderArgs = new Object[] { uuid }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; - finderArgs = new Object[] { uuid, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if (!Validator.equals(uuid, song.getUuid())) { - 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_SONG_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByUuid_First(String uuid, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByUuid_First(uuid, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByUuid_First(String uuid, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid(uuid, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByUuid_Last(String uuid, OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByUuid_Last(uuid, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByUuid_Last(String uuid, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid(uuid); - - if (count == 0) { - return null; - } - - List list = findByUuid(uuid, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where uuid = ?. - * - * @param songId the primary key of the current song - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByUuid_PrevAndNext(long songId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByUuid_PrevAndNext(session, song, uuid, - orderByComparator, true); - - array[1] = song; - - array[2] = getByUuid_PrevAndNext(session, song, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByUuid_PrevAndNext(Session session, Song song, - String uuid, 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_SONG_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_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(SongModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid(String uuid) throws SystemException { - for (Song song : findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null)) { - remove(song); - } - } - - /** - * Returns the number of songs where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid(String uuid) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; - - Object[] finderArgs = new Object[] { uuid }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_SONG_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_UUID_1 = "song.uuid IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2 = "song.uuid = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3 = "(song.uuid IS NULL OR song.uuid = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }, - SongModelImpl.UUID_COLUMN_BITMASK | - SongModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns the song where uuid = ? and groupId = ? or throws a {@link org.liferay.jukebox.NoSuchSongException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByUUID_G(String uuid, long groupId) - throws NoSuchSongException, SystemException { - Song song = fetchByUUID_G(uuid, groupId); - - if (song == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchSongException(msg.toString()); - } - - return song; - } - - /** - * Returns the song where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByUUID_G(String uuid, long groupId) - throws SystemException { - return fetchByUUID_G(uuid, groupId, true); - } - - /** - * Returns the song where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByUUID_G(String uuid, long groupId, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { uuid, groupId }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, this); - } - - if (result instanceof Song) { - Song song = (Song)result; - - if (!Validator.equals(uuid, song.getUuid()) || - (groupId != song.getGroupId())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_SONG_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, list); - } - else { - Song song = list.get(0); - - result = song; - - cacheResult(song); - - if ((song.getUuid() == null) || - !song.getUuid().equals(uuid) || - (song.getGroupId() != groupId)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, song); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (Song)result; - } - } - - /** - * Removes the song where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public Song removeByUUID_G(String uuid, long groupId) - throws NoSuchSongException, SystemException { - Song song = findByUUID_G(uuid, groupId); - - return remove(song); - } - - /** - * Returns the number of songs where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUUID_G(String uuid, long groupId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; - - Object[] finderArgs = new Object[] { uuid, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_SONG_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - 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_UUID_G_UUID_1 = "song.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "song.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(song.uuid IS NULL OR song.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "song.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", - new String[] { - String.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = - new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }, - SongModelImpl.UUID_COLUMN_BITMASK | - SongModelImpl.COMPANYID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns all the songs where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId) - throws SystemException { - return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId, int start, - int end) throws SystemException { - return findByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the songs where uuid = ? and companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, 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_UUID_C; - finderArgs = new Object[] { uuid, companyId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; - finderArgs = new Object[] { - uuid, companyId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if (!Validator.equals(uuid, song.getUuid()) || - (companyId != song.getCompanyId())) { - 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_SONG_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByUuid_C_First(uuid, companyId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid_C(uuid, companyId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByUuid_C_Last(uuid, companyId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid_C(uuid, companyId); - - if (count == 0) { - return null; - } - - List list = findByUuid_C(uuid, companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where uuid = ? and companyId = ?. - * - * @param songId the primary key of the current song - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByUuid_C_PrevAndNext(long songId, String uuid, - long companyId, OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByUuid_C_PrevAndNext(session, song, uuid, companyId, - orderByComparator, true); - - array[1] = song; - - array[2] = getByUuid_C_PrevAndNext(session, song, uuid, companyId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByUuid_C_PrevAndNext(Session session, Song song, - String uuid, 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_SONG_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_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(SongModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid_C(String uuid, long companyId) - throws SystemException { - for (Song song : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid_C(String uuid, long companyId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; - - Object[] finderArgs = new Object[] { uuid, companyId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_SONG_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_C_UUID_1 = "song.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "song.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(song.uuid IS NULL OR song.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "song.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByGroupId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID = - new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByGroupId", - new String[] { Long.class.getName() }, - SongModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_GROUPID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByGroupId", - new String[] { Long.class.getName() }); - - /** - * Returns all the songs where groupId = ?. - * - * @param groupId the group ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId) throws SystemException { - return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, int start, int end) - throws SystemException { - return findByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the songs where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, 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_GROUPID; - finderArgs = new Object[] { groupId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID; - finderArgs = new Object[] { groupId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if ((groupId != song.getGroupId())) { - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.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(groupId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByGroupId_First(long groupId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByGroupId_First(groupId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByGroupId_First(long groupId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByGroupId(groupId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByGroupId_Last(long groupId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByGroupId_Last(groupId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByGroupId_Last(long groupId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByGroupId(groupId); - - if (count == 0) { - return null; - } - - List list = findByGroupId(groupId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByGroupId_PrevAndNext(long songId, long groupId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByGroupId_PrevAndNext(session, song, groupId, - orderByComparator, true); - - array[1] = song; - - array[2] = getByGroupId_PrevAndNext(session, song, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByGroupId_PrevAndNext(Session session, Song song, - long groupId, 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_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(SongModelImpl.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(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the songs that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId) - throws SystemException { - return filterFindByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, int end) - throws SystemException { - return filterFindByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId(groupId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(3 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] filterFindByGroupId_PrevAndNext(long songId, long groupId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId_PrevAndNext(songId, groupId, orderByComparator); - } - - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = filterGetByGroupId_PrevAndNext(session, song, groupId, - orderByComparator, true); - - array[1] = song; - - array[2] = filterGetByGroupId_PrevAndNext(session, song, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song filterGetByGroupId_PrevAndNext(Session session, Song song, - long groupId, OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByGroupId(long groupId) throws SystemException { - for (Song song : findByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByGroupId(long groupId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_GROUPID; - - Object[] finderArgs = new Object[] { groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - 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(); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByGroupId(long groupId) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByGroupId(groupId); - } - - StringBundler query = new StringBundler(2); - - query.append(_FILTER_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 = "song.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_USERID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUserId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID = - new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUserId", - new String[] { Long.class.getName() }, - SongModelImpl.USERID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_USERID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUserId", - new String[] { Long.class.getName() }); - - /** - * Returns all the songs where userId = ?. - * - * @param userId the user ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUserId(long userId) throws SystemException { - return findByUserId(userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUserId(long userId, int start, int end) - throws SystemException { - return findByUserId(userId, start, end, null); - } - - /** - * Returns an ordered range of all the songs where userId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param userId the user ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUserId(long userId, 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_USERID; - finderArgs = new Object[] { userId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_USERID; - finderArgs = new Object[] { userId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if ((userId != song.getUserId())) { - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_USERID_USERID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.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(userId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByUserId_First(long userId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByUserId_First(userId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByUserId_First(long userId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUserId(userId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByUserId_Last(long userId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByUserId_Last(userId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where userId = ?. - * - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByUserId_Last(long userId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUserId(userId); - - if (count == 0) { - return null; - } - - List list = findByUserId(userId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where userId = ?. - * - * @param songId the primary key of the current song - * @param userId the user ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByUserId_PrevAndNext(long songId, long userId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByUserId_PrevAndNext(session, song, userId, - orderByComparator, true); - - array[1] = song; - - array[2] = getByUserId_PrevAndNext(session, song, userId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByUserId_PrevAndNext(Session session, Song song, - long userId, 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_USERID_USERID_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(SongModelImpl.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(userId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where userId = ? from the database. - * - * @param userId the user ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUserId(long userId) throws SystemException { - for (Song song : findByUserId(userId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where userId = ?. - * - * @param userId the user ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUserId(long userId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_USERID; - - Object[] finderArgs = new Object[] { userId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_USERID_USERID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - 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_USERID_USERID_2 = "song.userId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_COMPANYID = - new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.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(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByCompanyId", - new String[] { Long.class.getName() }, - SongModelImpl.COMPANYID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByCompanyId", - new String[] { Long.class.getName() }); - - /** - * Returns all the songs where companyId = ?. - * - * @param companyId the company ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId) throws SystemException { - return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the songs where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId, int start, int end) - throws SystemException { - return findByCompanyId(companyId, start, end, null); - } - - /** - * Returns an ordered range of all the songs where companyId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param companyId the company ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if ((companyId != song.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_SONG_WHERE); - - query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.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)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByCompanyId_First(long companyId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByCompanyId_First(companyId, orderByComparator); - - if (song != null) { - return song; - } - - 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 NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByCompanyId_First(long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByCompanyId(companyId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByCompanyId_Last(companyId, orderByComparator); - - if (song != null) { - return song; - } - - 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 NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByCompanyId(companyId); - - if (count == 0) { - return null; - } - - List list = findByCompanyId(companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where companyId = ?. - * - * @param songId the primary key of the current song - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByCompanyId_PrevAndNext(long songId, long companyId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByCompanyId_PrevAndNext(session, song, companyId, - orderByComparator, true); - - array[1] = song; - - array[2] = getByCompanyId_PrevAndNext(session, song, companyId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByCompanyId_PrevAndNext(Session session, Song song, - 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_SONG_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(SongModelImpl.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(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs 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 (Song song : findByCompanyId(companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching songs - * @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_SONG_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 = "song.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_ARTISTID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByArtistId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ARTISTID = - new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByArtistId", - new String[] { Long.class.getName() }, - SongModelImpl.ARTISTID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_ARTISTID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByArtistId", - new String[] { Long.class.getName() }); - - /** - * Returns all the songs where artistId = ?. - * - * @param artistId the artist ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByArtistId(long artistId) throws SystemException { - return findByArtistId(artistId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the songs where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByArtistId(long artistId, int start, int end) - throws SystemException { - return findByArtistId(artistId, start, end, null); - } - - /** - * Returns an ordered range of all the songs where artistId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param artistId the artist ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByArtistId(long artistId, 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_ARTISTID; - finderArgs = new Object[] { artistId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ARTISTID; - finderArgs = new Object[] { artistId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if ((artistId != song.getArtistId())) { - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_ARTISTID_ARTISTID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.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(artistId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByArtistId_First(long artistId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByArtistId_First(artistId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("artistId="); - msg.append(artistId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByArtistId_First(long artistId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByArtistId(artistId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByArtistId_Last(long artistId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByArtistId_Last(artistId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("artistId="); - msg.append(artistId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where artistId = ?. - * - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByArtistId_Last(long artistId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByArtistId(artistId); - - if (count == 0) { - return null; - } - - List list = findByArtistId(artistId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where artistId = ?. - * - * @param songId the primary key of the current song - * @param artistId the artist ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByArtistId_PrevAndNext(long songId, long artistId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByArtistId_PrevAndNext(session, song, artistId, - orderByComparator, true); - - array[1] = song; - - array[2] = getByArtistId_PrevAndNext(session, song, artistId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByArtistId_PrevAndNext(Session session, Song song, - long artistId, 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_ARTISTID_ARTISTID_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(SongModelImpl.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(artistId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where artistId = ? from the database. - * - * @param artistId the artist ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByArtistId(long artistId) throws SystemException { - for (Song song : findByArtistId(artistId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where artistId = ?. - * - * @param artistId the artist ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByArtistId(long artistId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_ARTISTID; - - Object[] finderArgs = new Object[] { artistId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_ARTISTID_ARTISTID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(artistId); - - 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_ARTISTID_ARTISTID_2 = "song.artistId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_ALBUMID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByAlbumId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ALBUMID = - new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByAlbumId", - new String[] { Long.class.getName() }, - SongModelImpl.ALBUMID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_ALBUMID = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByAlbumId", - new String[] { Long.class.getName() }); - - /** - * Returns all the songs where albumId = ?. - * - * @param albumId the album ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByAlbumId(long albumId) throws SystemException { - return findByAlbumId(albumId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs where albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByAlbumId(long albumId, int start, int end) - throws SystemException { - return findByAlbumId(albumId, start, end, null); - } - - /** - * Returns an ordered range of all the songs where albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByAlbumId(long albumId, 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_ALBUMID; - finderArgs = new Object[] { albumId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ALBUMID; - finderArgs = new Object[] { albumId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if ((albumId != song.getAlbumId())) { - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_ALBUMID_ALBUMID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.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(albumId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByAlbumId_First(long albumId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByAlbumId_First(albumId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("albumId="); - msg.append(albumId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByAlbumId_First(long albumId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByAlbumId(albumId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByAlbumId_Last(long albumId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByAlbumId_Last(albumId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("albumId="); - msg.append(albumId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where albumId = ?. - * - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByAlbumId_Last(long albumId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByAlbumId(albumId); - - if (count == 0) { - return null; - } - - List list = findByAlbumId(albumId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where albumId = ?. - * - * @param songId the primary key of the current song - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByAlbumId_PrevAndNext(long songId, long albumId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByAlbumId_PrevAndNext(session, song, albumId, - orderByComparator, true); - - array[1] = song; - - array[2] = getByAlbumId_PrevAndNext(session, song, albumId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByAlbumId_PrevAndNext(Session session, Song song, - long albumId, 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_ALBUMID_ALBUMID_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(SongModelImpl.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(albumId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where albumId = ? from the database. - * - * @param albumId the album ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByAlbumId(long albumId) throws SystemException { - for (Song song : findByAlbumId(albumId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where albumId = ?. - * - * @param albumId the album ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByAlbumId(long albumId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_ALBUMID; - - Object[] finderArgs = new Object[] { albumId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_ALBUMID_ALBUMID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(albumId); - - 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_ALBUMID_ALBUMID_2 = "song.albumId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - SongModelImpl.GROUPID_COLUMN_BITMASK | - SongModelImpl.STATUS_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_S = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the songs where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status) - throws SystemException { - return findByG_S(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the songs where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, int start, int end) - throws SystemException { - return findByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the songs where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, 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_G_S; - finderArgs = new Object[] { groupId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S; - finderArgs = new Object[] { - groupId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if ((groupId != song.getGroupId()) || - (status != song.getStatus())) { - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.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(groupId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByG_S_First(groupId, status, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_S(groupId, status, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByG_S_Last(groupId, status, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_S(groupId, status); - - if (count == 0) { - return null; - } - - List list = findByG_S(groupId, status, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByG_S_PrevAndNext(long songId, long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByG_S_PrevAndNext(session, song, groupId, status, - orderByComparator, true); - - array[1] = song; - - array[2] = getByG_S_PrevAndNext(session, song, groupId, status, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByG_S_PrevAndNext(Session session, Song song, - long groupId, int status, 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_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(SongModelImpl.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(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the songs that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status) - throws SystemException { - return filterFindByG_S(groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end) throws SystemException { - return filterFindByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S(groupId, status, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] filterFindByG_S_PrevAndNext(long songId, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S_PrevAndNext(songId, groupId, status, - orderByComparator); - } - - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = filterGetByG_S_PrevAndNext(session, song, groupId, - status, orderByComparator, true); - - array[1] = song; - - array[2] = filterGetByG_S_PrevAndNext(session, song, groupId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song filterGetByG_S_PrevAndNext(Session session, Song song, - long groupId, int status, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_S(long groupId, int status) throws SystemException { - for (Song song : findByG_S(groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_S(long groupId, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_S; - - Object[] finderArgs = new Object[] { groupId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_S(long groupId, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_S(groupId, status); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_S_GROUPID_2 = "song.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_S_STATUS_2 = "song.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_A = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_A", - new String[] { - Long.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_A", - new String[] { Long.class.getName(), Long.class.getName() }, - SongModelImpl.GROUPID_COLUMN_BITMASK | - SongModelImpl.ALBUMID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_A = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_A", - new String[] { Long.class.getName(), Long.class.getName() }); - - /** - * Returns all the songs where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_A(long groupId, long albumId) - throws SystemException { - return findByG_A(groupId, albumId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_A(long groupId, long albumId, int start, int end) - throws SystemException { - return findByG_A(groupId, albumId, start, end, null); - } - - /** - * Returns an ordered range of all the songs where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_A(long groupId, long albumId, 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_G_A; - finderArgs = new Object[] { groupId, albumId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_A; - finderArgs = new Object[] { - groupId, albumId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if ((groupId != song.getGroupId()) || - (albumId != song.getAlbumId())) { - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_ALBUMID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.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(groupId); - - qPos.add(albumId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByG_A_First(long groupId, long albumId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByG_A_First(groupId, albumId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", albumId="); - msg.append(albumId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_A_First(long groupId, long albumId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_A(groupId, albumId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByG_A_Last(long groupId, long albumId, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByG_A_Last(groupId, albumId, orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", albumId="); - msg.append(albumId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_A_Last(long groupId, long albumId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_A(groupId, albumId); - - if (count == 0) { - return null; - } - - List list = findByG_A(groupId, albumId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and albumId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByG_A_PrevAndNext(long songId, long groupId, - long albumId, OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByG_A_PrevAndNext(session, song, groupId, albumId, - orderByComparator, true); - - array[1] = song; - - array[2] = getByG_A_PrevAndNext(session, song, groupId, albumId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByG_A_PrevAndNext(Session session, Song song, - long groupId, long albumId, 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_ALBUMID_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(SongModelImpl.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(groupId); - - qPos.add(albumId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the songs that the user has permission to view where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_A(long groupId, long albumId) - throws SystemException { - return filterFindByG_A(groupId, albumId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_A(long groupId, long albumId, int start, - int end) throws SystemException { - return filterFindByG_A(groupId, albumId, start, end, null); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and albumId = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_A(long groupId, long albumId, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_A(groupId, albumId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_A_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_ALBUMID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(albumId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and albumId = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] filterFindByG_A_PrevAndNext(long songId, long groupId, - long albumId, OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_A_PrevAndNext(songId, groupId, albumId, - orderByComparator); - } - - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = filterGetByG_A_PrevAndNext(session, song, groupId, - albumId, orderByComparator, true); - - array[1] = song; - - array[2] = filterGetByG_A_PrevAndNext(session, song, groupId, - albumId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song filterGetByG_A_PrevAndNext(Session session, Song song, - long groupId, long albumId, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_A_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_ALBUMID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(albumId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where groupId = ? and albumId = ? from the database. - * - * @param groupId the group ID - * @param albumId the album ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_A(long groupId, long albumId) - throws SystemException { - for (Song song : findByG_A(groupId, albumId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_A(long groupId, long albumId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_A; - - Object[] finderArgs = new Object[] { groupId, albumId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_ALBUMID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(albumId); - - 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(); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and albumId = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_A(long groupId, long albumId) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_A(groupId, albumId); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_ALBUMID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(albumId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_A_GROUPID_2 = "song.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_A_ALBUMID_2 = "song.albumId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_A_S = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_A_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A_S = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_A_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }, - SongModelImpl.GROUPID_COLUMN_BITMASK | - SongModelImpl.ALBUMID_COLUMN_BITMASK | - SongModelImpl.STATUS_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_A_S = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_A_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }); - - /** - * Returns all the songs where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_A_S(long groupId, long albumId, int status) - throws SystemException { - return findByG_A_S(groupId, albumId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_A_S(long groupId, long albumId, int status, - int start, int end) throws SystemException { - return findByG_A_S(groupId, albumId, status, start, end, null); - } - - /** - * Returns an ordered range of all the songs where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_A_S(long groupId, long albumId, int status, - 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_G_A_S; - finderArgs = new Object[] { groupId, albumId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_A_S; - finderArgs = new Object[] { - groupId, albumId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if ((groupId != song.getGroupId()) || - (albumId != song.getAlbumId()) || - (status != song.getStatus())) { - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ALBUMID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.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(groupId); - - qPos.add(albumId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByG_A_S_First(long groupId, long albumId, int status, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByG_A_S_First(groupId, albumId, status, - orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", albumId="); - msg.append(albumId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_A_S_First(long groupId, long albumId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_A_S(groupId, albumId, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByG_A_S_Last(long groupId, long albumId, int status, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByG_A_S_Last(groupId, albumId, status, - orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", albumId="); - msg.append(albumId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_A_S_Last(long groupId, long albumId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_A_S(groupId, albumId, status); - - if (count == 0) { - return null; - } - - List list = findByG_A_S(groupId, albumId, status, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and albumId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByG_A_S_PrevAndNext(long songId, long groupId, - long albumId, int status, OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByG_A_S_PrevAndNext(session, song, groupId, albumId, - status, orderByComparator, true); - - array[1] = song; - - array[2] = getByG_A_S_PrevAndNext(session, song, groupId, albumId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByG_A_S_PrevAndNext(Session session, Song song, - long groupId, long albumId, int status, - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ALBUMID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_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(SongModelImpl.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(groupId); - - qPos.add(albumId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_A_S(long groupId, long albumId, int status) - throws SystemException { - return filterFindByG_A_S(groupId, albumId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_A_S(long groupId, long albumId, int status, - int start, int end) throws SystemException { - return filterFindByG_A_S(groupId, albumId, status, start, end, null); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and albumId = ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_A_S(long groupId, long albumId, int status, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_A_S(groupId, albumId, status, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ALBUMID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(albumId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] filterFindByG_A_S_PrevAndNext(long songId, long groupId, - long albumId, int status, OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_A_S_PrevAndNext(songId, groupId, albumId, status, - orderByComparator); - } - - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = filterGetByG_A_S_PrevAndNext(session, song, groupId, - albumId, status, orderByComparator, true); - - array[1] = song; - - array[2] = filterGetByG_A_S_PrevAndNext(session, song, groupId, - albumId, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song filterGetByG_A_S_PrevAndNext(Session session, Song song, - long groupId, long albumId, int status, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ALBUMID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(albumId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where groupId = ? and albumId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_A_S(long groupId, long albumId, int status) - throws SystemException { - for (Song song : findByG_A_S(groupId, albumId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_A_S(long groupId, long albumId, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_A_S; - - Object[] finderArgs = new Object[] { groupId, albumId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ALBUMID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(albumId); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and albumId = ? and status = ?. - * - * @param groupId the group ID - * @param albumId the album ID - * @param status the status - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_A_S(long groupId, long albumId, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_A_S(groupId, albumId, status); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_S_ALBUMID_2); - - query.append(_FINDER_COLUMN_G_A_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(albumId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_A_S_GROUPID_2 = "song.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_A_S_ALBUMID_2 = "song.albumId = ? AND "; - private static final String _FINDER_COLUMN_G_A_S_STATUS_2 = "song.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_LIKEN_S = - new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_LikeN_S", - new String[] { - Long.class.getName(), String.class.getName(), - Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_LIKEN_S = - new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_LikeN_S", - new String[] { - Long.class.getName(), String.class.getName(), - Integer.class.getName() - }); - - /** - * Returns all the songs where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - return findByG_LikeN_S(groupId, name, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_LikeN_S(long groupId, String name, int status, - int start, int end) throws SystemException { - return findByG_LikeN_S(groupId, name, status, start, end, null); - } - - /** - * Returns an ordered range of all the songs where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_LikeN_S(long groupId, String name, int status, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - boolean pagination = true; - FinderPath finderPath = null; - Object[] finderArgs = null; - - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_LIKEN_S; - finderArgs = new Object[] { - groupId, name, status, - - start, end, orderByComparator - }; - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Song song : list) { - if ((groupId != song.getGroupId()) || - !StringUtil.wildcardMatches(song.getName(), name, - CharPool.UNDERLINE, CharPool.PERCENT, - CharPool.BACK_SLASH, false) || - (status != song.getStatus())) { - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SongModelImpl.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(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByG_LikeN_S_First(long groupId, String name, int status, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByG_LikeN_S_First(groupId, name, status, - orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", name="); - msg.append(name); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the first song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_LikeN_S_First(long groupId, String name, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_LikeN_S(groupId, name, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByG_LikeN_S_Last(long groupId, String name, int status, - OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = fetchByG_LikeN_S_Last(groupId, name, status, - orderByComparator); - - if (song != null) { - return song; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", name="); - msg.append(name); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSongException(msg.toString()); - } - - /** - * Returns the last song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_LikeN_S_Last(long groupId, String name, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_LikeN_S(groupId, name, status); - - if (count == 0) { - return null; - } - - List list = findByG_LikeN_S(groupId, name, status, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the songs before and after the current song in the ordered set where groupId = ? and name LIKE ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] findByG_LikeN_S_PrevAndNext(long songId, long groupId, - String name, int status, OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = getByG_LikeN_S_PrevAndNext(session, song, groupId, name, - status, orderByComparator, true); - - array[1] = song; - - array[2] = getByG_LikeN_S_PrevAndNext(session, song, groupId, name, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song getByG_LikeN_S_PrevAndNext(Session session, Song song, - long groupId, String name, int status, - 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_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_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(SongModelImpl.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(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_LikeN_S(long groupId, String name, - int status) throws SystemException { - return filterFindByG_LikeN_S(groupId, name, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_LikeN_S(long groupId, String name, - int status, int start, int end) throws SystemException { - return filterFindByG_LikeN_S(groupId, name, status, start, end, null); - } - - /** - * Returns an ordered range of all the songs that the user has permissions to view where groupId = ? and name LIKE ? and status = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param groupId the group ID - * @param name the name - * @param status the status - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_LikeN_S(long groupId, String name, - int status, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_LikeN_S(groupId, name, status, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the songs before and after the current song in the ordered set of songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param songId the primary key of the current song - * @param groupId the group ID - * @param name the name - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song[] filterFindByG_LikeN_S_PrevAndNext(long songId, long groupId, - String name, int status, OrderByComparator orderByComparator) - throws NoSuchSongException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_LikeN_S_PrevAndNext(songId, groupId, name, status, - orderByComparator); - } - - Song song = findByPrimaryKey(songId); - - Session session = null; - - try { - session = openSession(); - - Song[] array = new SongImpl[3]; - - array[0] = filterGetByG_LikeN_S_PrevAndNext(session, song, groupId, - name, status, orderByComparator, true); - - array[1] = song; - - array[2] = filterGetByG_LikeN_S_PrevAndNext(session, song, groupId, - name, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Song filterGetByG_LikeN_S_PrevAndNext(Session session, Song song, - long groupId, String name, int status, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(SongModelImpl.ORDER_BY_JPQL); - } - else { - query.append(SongModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, SongImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, SongImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(song); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the songs where groupId = ? and name LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - for (Song song : findByG_LikeN_S(groupId, name, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(song); - } - } - - /** - * Returns the number of songs where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_LIKEN_S; - - Object[] finderArgs = new Object[] { groupId, name, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of songs that the user has permission to view where groupId = ? and name LIKE ? and status = ?. - * - * @param groupId the group ID - * @param name the name - * @param status the status - * @return the number of matching songs that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_LikeN_S(long groupId, String name, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_LikeN_S(groupId, name, status); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_LIKEN_S_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_LIKEN_S_NAME_2); - } - - query.append(_FINDER_COLUMN_G_LIKEN_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Song.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, - groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name.toLowerCase()); - } - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_LIKEN_S_GROUPID_2 = "song.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_NAME_1 = "song.name LIKE NULL AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_NAME_2 = "lower(song.name) LIKE ? AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_NAME_3 = "(song.name IS NULL OR song.name LIKE '') AND "; - private static final String _FINDER_COLUMN_G_LIKEN_S_STATUS_2 = "song.status = ?"; - public static final FinderPath FINDER_PATH_FETCH_BY_G_A_A_N = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, SongImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByG_A_A_N", - new String[] { - Long.class.getName(), Long.class.getName(), Long.class.getName(), - String.class.getName() - }, - SongModelImpl.GROUPID_COLUMN_BITMASK | - SongModelImpl.ARTISTID_COLUMN_BITMASK | - SongModelImpl.ALBUMID_COLUMN_BITMASK | - SongModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_A_A_N = new FinderPath(SongModelImpl.ENTITY_CACHE_ENABLED, - SongModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_A_A_N", - new String[] { - Long.class.getName(), Long.class.getName(), Long.class.getName(), - String.class.getName() - }); - - /** - * Returns the song where groupId = ? and artistId = ? and albumId = ? and name = ? or throws a {@link org.liferay.jukebox.NoSuchSongException} if it could not be found. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the matching song - * @throws org.liferay.jukebox.NoSuchSongException if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByG_A_A_N(long groupId, long artistId, long albumId, - String name) throws NoSuchSongException, SystemException { - Song song = fetchByG_A_A_N(groupId, artistId, albumId, name); - - if (song == null) { - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", artistId="); - msg.append(artistId); - - msg.append(", albumId="); - msg.append(albumId); - - msg.append(", name="); - msg.append(name); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchSongException(msg.toString()); - } - - return song; - } - - /** - * Returns the song where groupId = ? and artistId = ? and albumId = ? and name = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_A_A_N(long groupId, long artistId, long albumId, - String name) throws SystemException { - return fetchByG_A_A_N(groupId, artistId, albumId, name, true); - } - - /** - * Returns the song where groupId = ? and artistId = ? and albumId = ? and name = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @param retrieveFromCache whether to use the finder cache - * @return the matching song, or null if a matching song could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByG_A_A_N(long groupId, long artistId, long albumId, - String name, boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { groupId, artistId, albumId, name }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_G_A_A_N, - finderArgs, this); - } - - if (result instanceof Song) { - Song song = (Song)result; - - if ((groupId != song.getGroupId()) || - (artistId != song.getArtistId()) || - (albumId != song.getAlbumId()) || - !Validator.equals(name, song.getName())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(6); - - query.append(_SQL_SELECT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_A_N_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_A_N_ARTISTID_2); - - query.append(_FINDER_COLUMN_G_A_A_N_ALBUMID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_A_A_N_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_A_A_N_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_A_A_N_NAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(artistId); - - qPos.add(albumId); - - if (bindName) { - qPos.add(name); - } - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_A_A_N, - finderArgs, list); - } - else { - Song song = list.get(0); - - result = song; - - cacheResult(song); - - if ((song.getGroupId() != groupId) || - (song.getArtistId() != artistId) || - (song.getAlbumId() != albumId) || - (song.getName() == null) || - !song.getName().equals(name)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_A_A_N, - finderArgs, song); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_A_A_N, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (Song)result; - } - } - - /** - * Removes the song where groupId = ? and artistId = ? and albumId = ? and name = ? from the database. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the song that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public Song removeByG_A_A_N(long groupId, long artistId, long albumId, - String name) throws NoSuchSongException, SystemException { - Song song = findByG_A_A_N(groupId, artistId, albumId, name); - - return remove(song); - } - - /** - * Returns the number of songs where groupId = ? and artistId = ? and albumId = ? and name = ?. - * - * @param groupId the group ID - * @param artistId the artist ID - * @param albumId the album ID - * @param name the name - * @return the number of matching songs - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_A_A_N(long groupId, long artistId, long albumId, - String name) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_A_A_N; - - Object[] finderArgs = new Object[] { groupId, artistId, albumId, name }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(5); - - query.append(_SQL_COUNT_SONG_WHERE); - - query.append(_FINDER_COLUMN_G_A_A_N_GROUPID_2); - - query.append(_FINDER_COLUMN_G_A_A_N_ARTISTID_2); - - query.append(_FINDER_COLUMN_G_A_A_N_ALBUMID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_A_A_N_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_A_A_N_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_A_A_N_NAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(artistId); - - qPos.add(albumId); - - if (bindName) { - qPos.add(name); - } - - 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_G_A_A_N_GROUPID_2 = "song.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_A_A_N_ARTISTID_2 = "song.artistId = ? AND "; - private static final String _FINDER_COLUMN_G_A_A_N_ALBUMID_2 = "song.albumId = ? AND "; - private static final String _FINDER_COLUMN_G_A_A_N_NAME_1 = "song.name IS NULL"; - private static final String _FINDER_COLUMN_G_A_A_N_NAME_2 = "song.name = ?"; - private static final String _FINDER_COLUMN_G_A_A_N_NAME_3 = "(song.name IS NULL OR song.name = '')"; - - public SongPersistenceImpl() { - setModelClass(Song.class); - } - - /** - * Caches the song in the entity cache if it is enabled. - * - * @param song the song - */ - @Override - public void cacheResult(Song song) { - EntityCacheUtil.putResult(SongModelImpl.ENTITY_CACHE_ENABLED, - SongImpl.class, song.getPrimaryKey(), song); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - new Object[] { song.getUuid(), song.getGroupId() }, song); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_A_A_N, - new Object[] { - song.getGroupId(), song.getArtistId(), song.getAlbumId(), - song.getName() - }, song); - - song.resetOriginalValues(); - } - - /** - * Caches the songs in the entity cache if it is enabled. - * - * @param songs the songs - */ - @Override - public void cacheResult(List songs) { - for (Song song : songs) { - if (EntityCacheUtil.getResult(SongModelImpl.ENTITY_CACHE_ENABLED, - SongImpl.class, song.getPrimaryKey()) == null) { - cacheResult(song); - } - else { - song.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all songs. - * - *

- * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

- */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(SongImpl.class.getName()); - } - - EntityCacheUtil.clearCache(SongImpl.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 song. - * - *

- * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

- */ - @Override - public void clearCache(Song song) { - EntityCacheUtil.removeResult(SongModelImpl.ENTITY_CACHE_ENABLED, - SongImpl.class, song.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(song); - } - - @Override - public void clearCache(List songs) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (Song song : songs) { - EntityCacheUtil.removeResult(SongModelImpl.ENTITY_CACHE_ENABLED, - SongImpl.class, song.getPrimaryKey()); - - clearUniqueFindersCache(song); - } - } - - protected void cacheUniqueFindersCache(Song song) { - if (song.isNew()) { - Object[] args = new Object[] { song.getUuid(), song.getGroupId() }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, song); - - args = new Object[] { - song.getGroupId(), song.getArtistId(), song.getAlbumId(), - song.getName() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_A_A_N, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_A_A_N, args, song); - } - else { - SongModelImpl songModelImpl = (SongModelImpl)song; - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { song.getUuid(), song.getGroupId() }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - song); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_A_A_N.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - song.getGroupId(), song.getArtistId(), song.getAlbumId(), - song.getName() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_A_A_N, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_A_A_N, args, - song); - } - } - } - - protected void clearUniqueFindersCache(Song song) { - SongModelImpl songModelImpl = (SongModelImpl)song; - - Object[] args = new Object[] { song.getUuid(), song.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - args = new Object[] { - songModelImpl.getOriginalUuid(), - songModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - } - - args = new Object[] { - song.getGroupId(), song.getArtistId(), song.getAlbumId(), - song.getName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_A_A_N, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_A_A_N, args); - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_A_A_N.getColumnBitmask()) != 0) { - args = new Object[] { - songModelImpl.getOriginalGroupId(), - songModelImpl.getOriginalArtistId(), - songModelImpl.getOriginalAlbumId(), - songModelImpl.getOriginalName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_A_A_N, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_A_A_N, args); - } - } - - /** - * Creates a new song with the primary key. Does not add the song to the database. - * - * @param songId the primary key for the new song - * @return the new song - */ - @Override - public Song create(long songId) { - Song song = new SongImpl(); - - song.setNew(true); - song.setPrimaryKey(songId); - - String uuid = PortalUUIDUtil.generate(); - - song.setUuid(uuid); - - return song; - } - - /** - * Removes the song with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param songId the primary key of the song - * @return the song that was removed - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song remove(long songId) throws NoSuchSongException, SystemException { - return remove((Serializable)songId); - } - - /** - * Removes the song with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the song - * @return the song that was removed - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song remove(Serializable primaryKey) - throws NoSuchSongException, SystemException { - Session session = null; - - try { - session = openSession(); - - Song song = (Song)session.get(SongImpl.class, primaryKey); - - if (song == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchSongException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(song); - } - catch (NoSuchSongException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected Song removeImpl(Song song) throws SystemException { - song = toUnwrappedModel(song); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(song)) { - song = (Song)session.get(SongImpl.class, song.getPrimaryKeyObj()); - } - - if (song != null) { - session.delete(song); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (song != null) { - clearCache(song); - } - - return song; - } - - @Override - public Song updateImpl(org.liferay.jukebox.model.Song song) - throws SystemException { - song = toUnwrappedModel(song); - - boolean isNew = song.isNew(); - - SongModelImpl songModelImpl = (SongModelImpl)song; - - if (Validator.isNull(song.getUuid())) { - String uuid = PortalUUIDUtil.generate(); - - song.setUuid(uuid); - } - - Session session = null; - - try { - session = openSession(); - - if (song.isNew()) { - session.save(song); - - song.setNew(false); - } - else { - session.merge(song); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !SongModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { songModelImpl.getOriginalUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - - args = new Object[] { songModelImpl.getUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - songModelImpl.getOriginalUuid(), - songModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - - args = new Object[] { - songModelImpl.getUuid(), songModelImpl.getCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { songModelImpl.getOriginalGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - - args = new Object[] { songModelImpl.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { songModelImpl.getOriginalUserId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, - args); - - args = new Object[] { songModelImpl.getUserId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, - args); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - songModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - - args = new Object[] { songModelImpl.getCompanyId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ARTISTID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { songModelImpl.getOriginalArtistId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ARTISTID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ARTISTID, - args); - - args = new Object[] { songModelImpl.getArtistId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ARTISTID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ARTISTID, - args); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ALBUMID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { songModelImpl.getOriginalAlbumId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ALBUMID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ALBUMID, - args); - - args = new Object[] { songModelImpl.getAlbumId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ALBUMID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ALBUMID, - args); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - songModelImpl.getOriginalGroupId(), - songModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - - args = new Object[] { - songModelImpl.getGroupId(), songModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - songModelImpl.getOriginalGroupId(), - songModelImpl.getOriginalAlbumId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_A, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A, - args); - - args = new Object[] { - songModelImpl.getGroupId(), songModelImpl.getAlbumId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_A, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A, - args); - } - - if ((songModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - songModelImpl.getOriginalGroupId(), - songModelImpl.getOriginalAlbumId(), - songModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_A_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A_S, - args); - - args = new Object[] { - songModelImpl.getGroupId(), songModelImpl.getAlbumId(), - songModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_A_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_A_S, - args); - } - } - - EntityCacheUtil.putResult(SongModelImpl.ENTITY_CACHE_ENABLED, - SongImpl.class, song.getPrimaryKey(), song); - - clearUniqueFindersCache(song); - cacheUniqueFindersCache(song); - - return song; - } - - protected Song toUnwrappedModel(Song song) { - if (song instanceof SongImpl) { - return song; - } - - SongImpl songImpl = new SongImpl(); - - songImpl.setNew(song.isNew()); - songImpl.setPrimaryKey(song.getPrimaryKey()); - - songImpl.setUuid(song.getUuid()); - songImpl.setSongId(song.getSongId()); - songImpl.setCompanyId(song.getCompanyId()); - songImpl.setGroupId(song.getGroupId()); - songImpl.setUserId(song.getUserId()); - songImpl.setUserName(song.getUserName()); - songImpl.setCreateDate(song.getCreateDate()); - songImpl.setModifiedDate(song.getModifiedDate()); - songImpl.setArtistId(song.getArtistId()); - songImpl.setAlbumId(song.getAlbumId()); - songImpl.setName(song.getName()); - songImpl.setStatus(song.getStatus()); - songImpl.setStatusByUserId(song.getStatusByUserId()); - songImpl.setStatusByUserName(song.getStatusByUserName()); - songImpl.setStatusDate(song.getStatusDate()); - - return songImpl; - } - - /** - * Returns the song 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 song - * @return the song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByPrimaryKey(Serializable primaryKey) - throws NoSuchSongException, SystemException { - Song song = fetchByPrimaryKey(primaryKey); - - if (song == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchSongException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return song; - } - - /** - * Returns the song with the primary key or throws a {@link org.liferay.jukebox.NoSuchSongException} if it could not be found. - * - * @param songId the primary key of the song - * @return the song - * @throws org.liferay.jukebox.NoSuchSongException if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song findByPrimaryKey(long songId) - throws NoSuchSongException, SystemException { - return findByPrimaryKey((Serializable)songId); - } - - /** - * Returns the song with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the song - * @return the song, or null if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - Song song = (Song)EntityCacheUtil.getResult(SongModelImpl.ENTITY_CACHE_ENABLED, - SongImpl.class, primaryKey); - - if (song == _nullSong) { - return null; - } - - if (song == null) { - Session session = null; - - try { - session = openSession(); - - song = (Song)session.get(SongImpl.class, primaryKey); - - if (song != null) { - cacheResult(song); - } - else { - EntityCacheUtil.putResult(SongModelImpl.ENTITY_CACHE_ENABLED, - SongImpl.class, primaryKey, _nullSong); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(SongModelImpl.ENTITY_CACHE_ENABLED, - SongImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return song; - } - - /** - * Returns the song with the primary key or returns null if it could not be found. - * - * @param songId the primary key of the song - * @return the song, or null if a song with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Song fetchByPrimaryKey(long songId) throws SystemException { - return fetchByPrimaryKey((Serializable)songId); - } - - /** - * Returns all the songs. - * - * @return the songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @return the range of songs - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the songs. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.liferay.jukebox.model.impl.SongModelImpl}. If both orderByComparator 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. - *

- * - * @param start the lower bound of the range of songs - * @param end the upper bound of the range of songs (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of songs - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_SONG); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_SONG; - - if (pagination) { - sql = sql.concat(SongModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 songs from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (Song song : findAll()) { - remove(song); - } - } - - /** - * Returns the number of songs. - * - * @return the number of songs - * @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_SONG); - - 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(); - } - - @Override - protected Set getBadColumnNames() { - return _badColumnNames; - } - - /** - * Initializes the song persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.org.liferay.jukebox.model.Song"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(SongImpl.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_SONG = "SELECT song FROM Song song"; - private static final String _SQL_SELECT_SONG_WHERE = "SELECT song FROM Song song WHERE "; - private static final String _SQL_COUNT_SONG = "SELECT COUNT(song) FROM Song song"; - private static final String _SQL_COUNT_SONG_WHERE = "SELECT COUNT(song) FROM Song song WHERE "; - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN = "song.songId"; - private static final String _FILTER_SQL_SELECT_SONG_WHERE = "SELECT DISTINCT {song.*} FROM jukebox_Song song WHERE "; - private static final String _FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_1 = - "SELECT {jukebox_Song.*} FROM (SELECT DISTINCT song.songId FROM jukebox_Song song WHERE "; - private static final String _FILTER_SQL_SELECT_SONG_NO_INLINE_DISTINCT_WHERE_2 = - ") TEMP_TABLE INNER JOIN jukebox_Song ON TEMP_TABLE.songId = jukebox_Song.songId"; - private static final String _FILTER_SQL_COUNT_SONG_WHERE = "SELECT COUNT(DISTINCT song.songId) AS COUNT_VALUE FROM jukebox_Song song WHERE "; - private static final String _FILTER_ENTITY_ALIAS = "song"; - private static final String _FILTER_ENTITY_TABLE = "jukebox_Song"; - private static final String _ORDER_BY_ENTITY_ALIAS = "song."; - private static final String _ORDER_BY_ENTITY_TABLE = "jukebox_Song."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Song exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Song 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(SongPersistenceImpl.class); - private static Set _badColumnNames = SetUtil.fromArray(new String[] { - "uuid" - }); - private static Song _nullSong = new SongImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullSongCacheModel; - } - }; - - private static CacheModel _nullSongCacheModel = new CacheModel() { - @Override - public Song toEntityModel() { - return _nullSong; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/template/AlbumsPortletDisplayTemplateHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/template/AlbumsPortletDisplayTemplateHandler.java deleted file mode 100644 index e3b6a34311..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/template/AlbumsPortletDisplayTemplateHandler.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 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 org.liferay.jukebox.template; - -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.portletdisplaytemplate.BasePortletDisplayTemplateHandler; -import com.liferay.portal.kernel.template.TemplateVariableGroup; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.portletdisplaytemplate.util.PortletDisplayTemplateConstants; - -import java.util.List; -import java.util.Locale; -import java.util.Map; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.util.PortletKeys; - -/** - * @author Eduardo Garcia - */ -public class AlbumsPortletDisplayTemplateHandler - extends BasePortletDisplayTemplateHandler { - - @Override - public String getClassName() { - return Album.class.getName(); - } - - @Override - public String getName(Locale locale) { - String portletTitle = PortalUtil.getPortletTitle( - PortletKeys.ALBUMS, locale); - - return portletTitle.concat(StringPool.SPACE).concat( - LanguageUtil.get(locale, "template")); - } - - @Override - public String getResourceName() { - return PortletKeys.ALBUMS; - } - - @Override - public Map getTemplateVariableGroups( - long classPK, String language, Locale locale) - throws Exception { - - Map templateVariableGroups = - super.getTemplateVariableGroups(classPK, language, locale); - - TemplateVariableGroup templateVariableGroup = - templateVariableGroups.get("fields"); - - templateVariableGroup.empty(); - - templateVariableGroup.addCollectionVariable( - "albums", List.class, PortletDisplayTemplateConstants.ENTRIES, - "album", Album.class, "curAlbum", "name"); - - return templateVariableGroups; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/template/ArtistsPortletDisplayTemplateHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/template/ArtistsPortletDisplayTemplateHandler.java deleted file mode 100644 index 68aff582ad..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/template/ArtistsPortletDisplayTemplateHandler.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 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 org.liferay.jukebox.template; - -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.portletdisplaytemplate.BasePortletDisplayTemplateHandler; -import com.liferay.portal.kernel.template.TemplateVariableGroup; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.portletdisplaytemplate.util.PortletDisplayTemplateConstants; - -import java.util.List; -import java.util.Locale; -import java.util.Map; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.util.PortletKeys; - -/** - * @author Eduardo Garcia - */ -public class ArtistsPortletDisplayTemplateHandler - extends BasePortletDisplayTemplateHandler { - - @Override - public String getClassName() { - return Artist.class.getName(); - } - - @Override - public String getName(Locale locale) { - String portletTitle = PortalUtil.getPortletTitle( - PortletKeys.ARTISTS, locale); - - return portletTitle.concat(StringPool.SPACE).concat( - LanguageUtil.get(locale, "template")); - } - - @Override - public String getResourceName() { - return PortletKeys.ARTISTS; - } - - @Override - public Map getTemplateVariableGroups( - long classPK, String language, Locale locale) - throws Exception { - - Map templateVariableGroups = - super.getTemplateVariableGroups(classPK, language, locale); - - TemplateVariableGroup templateVariableGroup = - templateVariableGroups.get("fields"); - - templateVariableGroup.empty(); - - templateVariableGroup.addCollectionVariable( - "artists", List.class, PortletDisplayTemplateConstants.ENTRIES, - "artist", Artist.class, "curArtist", "name"); - - return templateVariableGroups; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/template/SongsPortletDisplayTemplateHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/template/SongsPortletDisplayTemplateHandler.java deleted file mode 100644 index 49b2340044..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/template/SongsPortletDisplayTemplateHandler.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 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 org.liferay.jukebox.template; - -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.portletdisplaytemplate.BasePortletDisplayTemplateHandler; -import com.liferay.portal.kernel.template.TemplateVariableGroup; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.portletdisplaytemplate.util.PortletDisplayTemplateConstants; - -import java.util.List; -import java.util.Locale; -import java.util.Map; - -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.util.PortletKeys; - -/** - * @author Eduardo Garcia - */ -public class SongsPortletDisplayTemplateHandler - extends BasePortletDisplayTemplateHandler { - - @Override - public String getClassName() { - return Song.class.getName(); - } - - @Override - public String getName(Locale locale) { - String portletTitle = PortalUtil.getPortletTitle( - PortletKeys.SONGS, locale); - - return portletTitle.concat(StringPool.SPACE).concat( - LanguageUtil.get(locale, "template")); - } - - @Override - public String getResourceName() { - return PortletKeys.SONGS; - } - - @Override - public Map getTemplateVariableGroups( - long classPK, String language, Locale locale) - throws Exception { - - Map templateVariableGroups = - super.getTemplateVariableGroups(classPK, language, locale); - - TemplateVariableGroup templateVariableGroup = - templateVariableGroups.get("fields"); - - templateVariableGroup.empty(); - - templateVariableGroup.addCollectionVariable( - "songs", List.class, PortletDisplayTemplateConstants.ENTRIES, - "song", Song.class, "curSong", "name"); - - return templateVariableGroups; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/trash/AlbumTrashHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/trash/AlbumTrashHandler.java deleted file mode 100644 index b5fcc5efe0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/trash/AlbumTrashHandler.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * 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 org.liferay.jukebox.trash; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.trash.TrashRenderer; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortletURLFactoryUtil; -import com.liferay.portlet.trash.model.TrashEntry; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -import org.liferay.jukebox.asset.AlbumAssetRenderer; -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.permission.AlbumPermission; -import org.liferay.jukebox.util.PortletKeys; - -/** - * Implements trash handling for the albums. - * - * @author Sergio González - */ -public class AlbumTrashHandler extends JukeBoxBaseTrashHandler { - - @Override - public void deleteTrashEntry(long classPK) - throws PortalException, SystemException { - - AlbumLocalServiceUtil.deleteAlbum(classPK); - } - - @Override - public String getClassName() { - return Album.class.getName(); - } - - @Override - public String getDeleteMessage() { - return "found-in-deleted-album-x"; - } - - @Override - public String getRestoreContainedModelLink( - PortletRequest portletRequest, long classPK) - throws PortalException, SystemException { - - Album album = AlbumLocalServiceUtil.getAlbum(classPK); - - PortletURL portletURL = getRestoreURL(portletRequest, classPK); - - portletURL.setParameter("albumId", String.valueOf(album.getAlbumId())); - - return portletURL.toString(); - } - - @Override - public String getRestoreMessage( - PortletRequest portletRequest, long classPK) { - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - return themeDisplay.translate("albums"); - } - - @Override - public TrashEntry getTrashEntry(long classPK) - throws PortalException, SystemException { - - Album album = getAlbum(classPK); - - return album.getTrashEntry(); - } - - @Override - public TrashRenderer getTrashRenderer(long classPK) - throws PortalException, SystemException { - - Album album = getAlbum(classPK); - - return new AlbumAssetRenderer(album); - } - - @Override - public boolean hasTrashPermission( - PermissionChecker permissionChecker, long groupId, long classPK, - String trashActionId) - throws PortalException, SystemException { - - return super.hasTrashPermission( - permissionChecker, groupId, classPK, trashActionId); - } - - @Override - public boolean isContainerModel() { - return true; - } - - @Override - public boolean isInTrash(long classPK) - throws PortalException, SystemException { - - Album album = AlbumLocalServiceUtil.getAlbum(classPK); - - return album.isInTrash(); - } - - @Override - public boolean isMovable() { - return false; - } - - @Override - public void restoreTrashEntry(long userId, long classPK) - throws PortalException, SystemException { - - AlbumLocalServiceUtil.restoreAlbumFromTrash(userId, classPK); - } - - protected Album getAlbum(long classPK) - throws PortalException, SystemException { - - return AlbumLocalServiceUtil.getAlbum(classPK); - } - - @Override - protected long getGroupId(long classPK) - throws PortalException, SystemException { - - Album album = getAlbum(classPK); - - return album.getGroupId(); - } - - protected PortletURL getRestoreURL( - PortletRequest portletRequest, long classPK) - throws PortalException, SystemException { - - String portletId = PortletKeys.ALBUMS; - - Album album = AlbumLocalServiceUtil.getAlbum(classPK); - - long plid = PortalUtil.getPlidFromPortletId( - album.getGroupId(), PortletKeys.ALBUMS); - - PortletURL portletURL = PortletURLFactoryUtil.create( - portletRequest, portletId, plid, PortletRequest.RENDER_PHASE); - - portletURL.setParameter("jspPage", "/html/albums/view_album.jsp"); - - return portletURL; - } - - @Override - protected boolean hasPermission( - PermissionChecker permissionChecker, long classPK, String actionId) - throws PortalException, SystemException { - - return AlbumPermission.contains(permissionChecker, classPK, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/trash/JukeBoxBaseTrashHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/trash/JukeBoxBaseTrashHandler.java deleted file mode 100644 index d0d045b830..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/trash/JukeBoxBaseTrashHandler.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * 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 org.liferay.jukebox.trash; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.trash.BaseTrashHandler; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil; -import com.liferay.portal.kernel.trash.TrashRenderer; -import com.liferay.portal.model.ContainerModel; - -import java.util.ArrayList; -import java.util.List; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.SongLocalServiceUtil; - -/** - * Represents the trash handler for songs and albums entities. - * - * @author Sergio González - */ -public abstract class JukeBoxBaseTrashHandler extends BaseTrashHandler { - - @Override - public ContainerModel getContainerModel(long containerModelId) - throws PortalException, SystemException { - - return AlbumLocalServiceUtil.getAlbum(containerModelId); - } - - @Override - public String getContainerModelClassName() { - return Album.class.getName(); - } - - @Override - public String getContainerModelName() { - return "album"; - } - - @Override - public List getParentContainerModels(long classPK) - throws PortalException, SystemException { - - List containerModels = new ArrayList(); - - ContainerModel containerModel = getParentContainerModel(classPK); - - if (containerModel == null) { - return containerModels; - } - - containerModels.add(containerModel); - - while (containerModel.getParentContainerModelId() > 0) { - containerModel = getContainerModel( - containerModel.getParentContainerModelId()); - - if (containerModel == null) { - break; - } - - containerModels.add(containerModel); - } - - return containerModels; - } - - @Override - public String getTrashContainedModelName() { - return "songs"; - } - - @Override - public int getTrashContainedModelsCount(long classPK) - throws PortalException, SystemException { - - Album album = AlbumLocalServiceUtil.getAlbum(classPK); - - return SongLocalServiceUtil.getSongsByAlbumIdCount(classPK); - } - - @Override - public List getTrashContainedModelTrashRenderers( - long classPK, int start, int end) - throws PortalException, SystemException { - - List trashRenderers = new ArrayList(); - - List songs = SongLocalServiceUtil.getSongsByAlbumId( - classPK, start, end); - - for (Song song : songs) { - TrashHandler trashHandler = - TrashHandlerRegistryUtil.getTrashHandler(Song.class.getName()); - - TrashRenderer trashRenderer = trashHandler.getTrashRenderer( - song.getSongId()); - - trashRenderers.add(trashRenderer); - } - - return trashRenderers; - } - - @Override - public String getTrashContainerModelName() { - return "albums"; - } - - @Override - public boolean isMovable() { - return true; - } - - protected abstract long getGroupId(long classPK) - throws PortalException, SystemException; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/trash/SongTrashHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/trash/SongTrashHandler.java deleted file mode 100644 index 8d892d1119..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/trash/SongTrashHandler.java +++ /dev/null @@ -1,308 +0,0 @@ -/** - * 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 org.liferay.jukebox.trash; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.trash.TrashActionKeys; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil; -import com.liferay.portal.kernel.trash.TrashRenderer; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.ContainerModel; -import com.liferay.portal.model.TrashedModel; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortletURLFactoryUtil; -import com.liferay.portlet.trash.DuplicateEntryException; -import com.liferay.portlet.trash.TrashEntryConstants; -import com.liferay.portlet.trash.model.TrashEntry; - -import java.util.ArrayList; -import java.util.List; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.SongLocalServiceUtil; -import org.liferay.jukebox.service.permission.AlbumPermission; -import org.liferay.jukebox.service.permission.SongPermission; -import org.liferay.jukebox.util.PortletKeys; - -/** - * Implements trash handling for the songs. - * - * @author Sergio González - */ -public class SongTrashHandler extends JukeBoxBaseTrashHandler { - - public void checkDuplicateTrashEntry( - TrashEntry trashEntry, long containerModelId, String newName) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(trashEntry.getClassPK()); - - if (containerModelId == TrashEntryConstants.DEFAULT_CONTAINER_ID) { - containerModelId = song.getAlbumId(); - } - - String originalName = trashEntry.getTypeSettingsProperty("title"); - - if (Validator.isNotNull(newName)) { - originalName = newName; - } - - Song duplicateSong = SongLocalServiceUtil.getSong( - song.getGroupId(), song.getArtistId(), containerModelId, - originalName); - - if (duplicateSong != null) { - DuplicateEntryException dee = new DuplicateEntryException(); - - dee.setDuplicateEntryId(duplicateSong.getSongId()); - dee.setOldName(duplicateSong.getName()); - dee.setTrashEntryId(trashEntry.getEntryId()); - - throw dee; - } - } - - @Override - public void deleteTrashEntry(long classPK) - throws PortalException, SystemException { - - SongLocalServiceUtil.deleteSong(classPK); - } - - @Override - public String getClassName() { - return Song.class.getName(); - } - - @Override - public ContainerModel getParentContainerModel(long classPK) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(classPK); - - return getContainerModel(song.getAlbumId()); - } - - @Override - public ContainerModel getParentContainerModel(TrashedModel trashedModel) - throws PortalException, SystemException { - - Song song = (Song)trashedModel; - - return getContainerModel(song.getAlbumId()); - } - - @Override - public String getRestoreContainerModelLink( - PortletRequest portletRequest, long classPK) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(classPK); - - PortletURL portletURL = getRestoreURL(portletRequest, classPK); - - portletURL.setParameter("songId", String.valueOf(song.getSongId())); - - return portletURL.toString(); - } - - @Override - public String getRestoreMessage( - PortletRequest portletRequest, long classPK) { - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - return themeDisplay.translate("songs"); - } - - @Override - public String getTrashContainedModelName() { - return "songs"; - } - - @Override - public int getTrashContainedModelsCount(long classPK) - throws PortalException, SystemException { - - Album album = AlbumLocalServiceUtil.getAlbum(classPK); - - return SongLocalServiceUtil.getSongsByAlbumIdCount(classPK); - } - - @Override - public List getTrashContainedModelTrashRenderers( - long classPK, int start, int end) - throws PortalException, SystemException { - - List trashRenderers = new ArrayList(); - - List songs = SongLocalServiceUtil.getSongsByAlbumId( - classPK, start, end); - - for (Song song : songs) { - TrashHandler trashHandler = - TrashHandlerRegistryUtil.getTrashHandler(Song.class.getName()); - - TrashRenderer trashRenderer = trashHandler.getTrashRenderer( - song.getSongId()); - - trashRenderers.add(trashRenderer); - } - - return trashRenderers; - } - - @Override - public TrashEntry getTrashEntry(long classPK) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(classPK); - - return song.getTrashEntry(); - } - - @Override - public boolean hasTrashPermission( - PermissionChecker permissionChecker, long groupId, long classPK, - String trashActionId) - throws PortalException, SystemException { - - if (trashActionId.equals(TrashActionKeys.MOVE)) { - return AlbumPermission.contains( - permissionChecker, classPK, "ADD_ALBUM"); - } - - return super.hasTrashPermission( - permissionChecker, groupId, classPK, trashActionId); - } - - @Override - public boolean isInTrash(long classPK) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(classPK); - - return song.isInTrash(); - } - - @Override - public boolean isInTrashContainer(long classPK) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(classPK); - - return song.isInTrashContainer(); - } - - @Override - public boolean isRestorable(long classPK) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(classPK); - - if ((song.getAlbumId() > 0) && - (AlbumLocalServiceUtil.fetchAlbum(song.getAlbumId()) == null)) { - - return false; - } - - return !song.isInTrashContainer(); - } - - @Override - public void moveEntry( - long userId, long classPK, long containerModelId, - ServiceContext serviceContext) - throws PortalException, SystemException { - - SongLocalServiceUtil.moveSong(classPK, containerModelId); - } - - @Override - public void moveTrashEntry( - long userId, long classPK, long containerId, - ServiceContext serviceContext) - throws PortalException, SystemException { - - SongLocalServiceUtil.moveSongFromTrash(userId, classPK, containerId); - } - - @Override - public void restoreTrashEntry(long userId, long classPK) - throws PortalException, SystemException { - - SongLocalServiceUtil.restoreSongFromTrash(userId, classPK); - } - - @Override - public void updateTitle(long classPK, String name) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(classPK); - - song.setName(name); - - SongLocalServiceUtil.updateSong(song); - } - - @Override - protected long getGroupId(long classPK) - throws PortalException, SystemException { - - Song song = SongLocalServiceUtil.getSong(classPK); - - return song.getGroupId(); - } - - protected PortletURL getRestoreURL( - PortletRequest portletRequest, long classPK) - throws PortalException, SystemException { - - String portletId = PortletKeys.SONGS; - - Song song = SongLocalServiceUtil.getSong(classPK); - - long plid = PortalUtil.getPlidFromPortletId( - song.getGroupId(), PortletKeys.SONGS); - - PortletURL portletURL = PortletURLFactoryUtil.create( - portletRequest, portletId, plid, PortletRequest.RENDER_PHASE); - - portletURL.setParameter("jspPage", "/html/songs/view_song.jsp"); - - return portletURL; - } - - @Override - protected boolean hasPermission( - PermissionChecker permissionChecker, long classPK, String actionId) - throws PortalException, SystemException { - - return SongPermission.contains(permissionChecker, classPK, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/AlbumIndexer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/AlbumIndexer.java deleted file mode 100644 index 4f8d88f3ce..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/AlbumIndexer.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * 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 org.liferay.jukebox.util; - -import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.search.BaseIndexer; -import com.liferay.portal.kernel.search.BooleanQuery; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.SearchContext; -import com.liferay.portal.kernel.search.SearchEngineUtil; -import com.liferay.portal.kernel.search.Summary; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.model.DLFileEntry; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Locale; - -import javax.portlet.PortletURL; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; -import org.liferay.jukebox.service.permission.AlbumPermission; -import org.liferay.jukebox.service.persistence.AlbumActionableDynamicQuery; - -/** - * @author Eudaldo Alonso - */ -public class AlbumIndexer extends BaseIndexer { - - public static final String[] CLASS_NAMES = {Album.class.getName()}; - - public static final String PORTLET_ID = PortletKeys.ALBUMS; - - public AlbumIndexer() { - setPermissionAware(true); - } - - @Override - public void addRelatedEntryFields(Document document, Object obj) - throws Exception { - - if (obj instanceof DLFileEntry) { - DLFileEntry dlFileEntry = (DLFileEntry)obj; - - Album album = AlbumLocalServiceUtil.getAlbum( - GetterUtil.getLong(dlFileEntry.getTitle())); - - document.addKeyword( - Field.CLASS_NAME_ID, - PortalUtil.getClassNameId(Album.class.getName())); - document.addKeyword(Field.CLASS_PK, album.getAlbumId()); - document.addKeyword(Field.RELATED_ENTRY, true); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getPortletId() { - return PORTLET_ID; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, String entryClassName, - long entryClassPK, String actionId) - throws Exception { - - return AlbumPermission.contains( - permissionChecker, entryClassPK, ActionKeys.VIEW); - } - - @Override - public void postProcessContextQuery( - BooleanQuery contextQuery, SearchContext searchContext) - throws Exception { - - addStatus(contextQuery, searchContext); - } - - @Override - public void postProcessSearchQuery( - BooleanQuery searchQuery, SearchContext searchContext) - throws Exception { - - if (searchContext.getAttributes() == null) { - return; - } - - addSearchTerm(searchQuery, searchContext, Field.TITLE, true); - addSearchTerm(searchQuery, searchContext, "artist", true); - addSearchTerm(searchQuery, searchContext, "year", false); - } - - @Override - protected void doDelete(Object obj) throws Exception { - Album album = (Album)obj; - - deleteDocument(album.getCompanyId(), album.getAlbumId()); - } - - @Override - protected Document doGetDocument(Object obj) throws Exception { - Album album = (Album)obj; - - Document document = getBaseModelDocument(PORTLET_ID, album); - - document.addDate(Field.MODIFIED_DATE, album.getModifiedDate()); - document.addText(Field.TITLE, album.getName()); - document.addKeyword("year", album.getYear()); - - Artist artist = ArtistLocalServiceUtil.getArtist(album.getArtistId()); - - document.addText("artist", artist.getName()); - document.addKeyword("artistId", artist.getArtistId()); - - return document; - } - - @Override - protected Summary doGetSummary( - Document document, Locale locale, String snippet, - PortletURL portletURL) { - - Summary summary = createSummary(document); - - summary.setMaxContentLength(200); - - return summary; - } - - @Override - protected void doReindex(Object obj) throws Exception { - Album album = (Album)obj; - - Document document = getDocument(album); - - SearchEngineUtil.updateDocument( - getSearchEngineId(), album.getCompanyId(), document); - } - - @Override - protected void doReindex(String className, long classPK) throws Exception { - Album album = AlbumLocalServiceUtil.getAlbum(classPK); - - doReindex(album); - } - - @Override - protected void doReindex(String[] ids) throws Exception { - long companyId = GetterUtil.getLong(ids[0]); - - reindexEntries(companyId); - } - - @Override - protected String getPortletId(SearchContext searchContext) { - return PORTLET_ID; - } - - protected void reindexEntries(long companyId) - throws PortalException, SystemException { - - final Collection documents = new ArrayList(); - - ActionableDynamicQuery actionableDynamicQuery = - new AlbumActionableDynamicQuery() { - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - } - - @Override - protected void performAction(Object object) throws PortalException { - Album album = (Album)object; - - Document document = getDocument(album); - - documents.add(document); - } - - }; - - actionableDynamicQuery.setCompanyId(companyId); - - actionableDynamicQuery.performActions(); - - SearchEngineUtil.updateDocuments( - getSearchEngineId(), companyId, documents); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/ArtistIndexer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/ArtistIndexer.java deleted file mode 100644 index 8d75a995b6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/ArtistIndexer.java +++ /dev/null @@ -1,230 +0,0 @@ -/** - * 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 org.liferay.jukebox.util; - -import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.search.BaseIndexer; -import com.liferay.portal.kernel.search.BooleanQuery; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.SearchContext; -import com.liferay.portal.kernel.search.SearchEngineUtil; -import com.liferay.portal.kernel.search.Summary; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.model.DLFileEntry; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Locale; - -import javax.portlet.PortletURL; - -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; -import org.liferay.jukebox.service.permission.ArtistPermission; -import org.liferay.jukebox.service.persistence.ArtistActionableDynamicQuery; - -/** - * @author Eudaldo Alonso - */ -public class ArtistIndexer extends BaseIndexer { - - public static final String[] CLASS_NAMES = {Artist.class.getName()}; - - public static final String PORTLET_ID = PortletKeys.ARTISTS; - - public ArtistIndexer() { - setPermissionAware(true); - } - - @Override - public void addRelatedEntryFields(Document document, Object obj) - throws Exception { - - if (obj instanceof DLFileEntry) { - DLFileEntry dlFileEntry = (DLFileEntry)obj; - - Artist artist = ArtistLocalServiceUtil.getArtist( - GetterUtil.getLong(dlFileEntry.getTitle())); - - document.addKeyword( - Field.CLASS_NAME_ID, - PortalUtil.getClassNameId(Artist.class.getName())); - document.addKeyword(Field.CLASS_PK, artist.getArtistId()); - document.addKeyword(Field.RELATED_ENTRY, true); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getPortletId() { - return PORTLET_ID; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, String entryClassName, - long entryClassPK, String actionId) - throws Exception { - - return ArtistPermission.contains( - permissionChecker, entryClassPK, ActionKeys.VIEW); - } - - @Override - public void postProcessContextQuery( - BooleanQuery contextQuery, SearchContext searchContext) - throws Exception { - - addStatus(contextQuery, searchContext); - - int artistId = GetterUtil.getInteger( - searchContext.getAttribute("artistId")); - - if (artistId != 0) { - contextQuery.addRequiredTerm("artistId", artistId); - } - } - - @Override - public void postProcessSearchQuery( - BooleanQuery searchQuery, SearchContext searchContext) - throws Exception { - - if (searchContext.getAttributes() == null) { - return; - } - - addSearchTerm(searchQuery, searchContext, Field.TITLE, true); - addSearchTerm(searchQuery, searchContext, "bio", true); - } - - @Override - protected void doDelete(Object obj) throws Exception { - Artist artist = (Artist)obj; - - deleteDocument(artist.getCompanyId(), artist.getArtistId()); - } - - @Override - protected Document doGetDocument(Object obj) throws Exception { - Artist artist = (Artist)obj; - - Document document = getBaseModelDocument(PORTLET_ID, artist); - - document.addDate(Field.MODIFIED_DATE, artist.getModifiedDate()); - document.addText(Field.TITLE, artist.getName()); - document.addKeyword("artistId", artist.getArtistId()); - document.addText("bio", artist.getBio()); - - return document; - } - - @Override - protected Summary doGetSummary( - Document document, Locale locale, String snippet, - PortletURL portletURL) { - - Summary summary = createSummary(document); - - summary.setMaxContentLength(200); - - String title = document.get(Field.TITLE); - - String content = snippet; - - if (Validator.isNull(snippet)) { - content = StringUtil.shorten(document.get("bio"), 200); - } - - portletURL.setParameter("jspPage", "/html/artists/view_artist.jsp"); - portletURL.setParameter("artistId", document.get(Field.CLASS_PK)); - - return new Summary(title, content, portletURL); - } - - @Override - protected void doReindex(Object obj) throws Exception { - Artist artist = (Artist)obj; - - Document document = getDocument(artist); - - SearchEngineUtil.updateDocument( - getSearchEngineId(), artist.getCompanyId(), document); - } - - @Override - protected void doReindex(String className, long classPK) throws Exception { - Artist artist = ArtistLocalServiceUtil.getArtist(classPK); - - doReindex(artist); - } - - @Override - protected void doReindex(String[] ids) throws Exception { - long companyId = GetterUtil.getLong(ids[0]); - - reindexEntries(companyId); - } - - @Override - protected String getPortletId(SearchContext searchContext) { - return PORTLET_ID; - } - - protected void reindexEntries(long companyId) - throws PortalException, SystemException { - - final Collection documents = new ArrayList(); - - ActionableDynamicQuery actionableDynamicQuery = - new ArtistActionableDynamicQuery() { - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - } - - @Override - protected void performAction(Object object) throws PortalException { - Artist artist = (Artist)object; - - Document document = getDocument(artist); - - documents.add(document); - } - - }; - - actionableDynamicQuery.setCompanyId(companyId); - - actionableDynamicQuery.performActions(); - - SearchEngineUtil.updateDocuments( - getSearchEngineId(), companyId, documents); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/Constants.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/Constants.java deleted file mode 100644 index abf30bbf2b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/Constants.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * 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 org.liferay.jukebox.util; - -/** - * @author Sergio González - */ -public class Constants { - - public static final String JUKEBOX_PORTLET_REPOSITORY = - "JukeboxPortletRepository"; - - public static final String LYRICS_FOLDER_NAME = "Lyrics"; - - public static final String SONGS_FOLDER_NAME = "Songs"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/PortletKeys.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/PortletKeys.java deleted file mode 100644 index e0599b93ef..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/PortletKeys.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * 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 org.liferay.jukebox.util; - -/** - * @author Eudaldo Alonso - */ -public class PortletKeys extends com.liferay.portal.util.PortletKeys { - - public static final String ALBUMS = "albums_WAR_jukeboxportlet"; - - public static final String ARTISTS = "artists_WAR_jukeboxportlet"; - - public static final String SONGS = "songs_WAR_jukeboxportlet"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/SongIndexer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/SongIndexer.java deleted file mode 100644 index a54b28dd4b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/org/liferay/jukebox/util/SongIndexer.java +++ /dev/null @@ -1,223 +0,0 @@ -/** - * 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 org.liferay.jukebox.util; - -import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.search.BaseIndexer; -import com.liferay.portal.kernel.search.BooleanQuery; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.SearchContext; -import com.liferay.portal.kernel.search.SearchEngineUtil; -import com.liferay.portal.kernel.search.Summary; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.model.DLFileEntry; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Locale; - -import javax.portlet.PortletURL; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.model.Song; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; -import org.liferay.jukebox.service.SongLocalServiceUtil; -import org.liferay.jukebox.service.permission.SongPermission; -import org.liferay.jukebox.service.persistence.SongActionableDynamicQuery; - -/** - * @author Eudaldo Alonso - */ -public class SongIndexer extends BaseIndexer { - - public static final String[] CLASS_NAMES = {Song.class.getName()}; - - public static final String PORTLET_ID = PortletKeys.SONGS; - - public SongIndexer() { - setPermissionAware(true); - } - - @Override - public void addRelatedEntryFields(Document document, Object obj) - throws Exception { - - if (obj instanceof DLFileEntry) { - DLFileEntry dlFileEntry = (DLFileEntry)obj; - - Song song = SongLocalServiceUtil.getSong( - GetterUtil.getLong(dlFileEntry.getTitle())); - - document.addKeyword( - Field.CLASS_NAME_ID, - PortalUtil.getClassNameId(Song.class.getName())); - document.addKeyword(Field.CLASS_PK, song.getSongId()); - document.addKeyword(Field.RELATED_ENTRY, true); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getPortletId() { - return PORTLET_ID; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, String entryClassName, - long entryClassPK, String actionId) - throws Exception { - - return SongPermission.contains( - permissionChecker, entryClassPK, ActionKeys.VIEW); - } - - @Override - public void postProcessContextQuery( - BooleanQuery contextQuery, SearchContext searchContext) - throws Exception { - - addStatus(contextQuery, searchContext); - } - - @Override - public void postProcessSearchQuery( - BooleanQuery searchQuery, SearchContext searchContext) - throws Exception { - - if (searchContext.getAttributes() == null) { - return; - } - - addSearchTerm(searchQuery, searchContext, Field.TITLE, true); - addSearchTerm(searchQuery, searchContext, "album", true); - addSearchTerm(searchQuery, searchContext, "artist", true); - } - - @Override - protected void doDelete(Object obj) throws Exception { - Song song = (Song)obj; - - deleteDocument(song.getCompanyId(), song.getSongId()); - } - - @Override - protected Document doGetDocument(Object obj) throws Exception { - Song song = (Song)obj; - - Document document = getBaseModelDocument(PORTLET_ID, song); - - document.addDate(Field.MODIFIED_DATE, song.getModifiedDate()); - document.addText(Field.TITLE, song.getName()); - - Album album = AlbumLocalServiceUtil.getAlbum(song.getAlbumId()); - - document.addText("album", album.getName()); - document.addKeyword("albumId", album.getAlbumId()); - - Artist artist = ArtistLocalServiceUtil.getArtist(song.getArtistId()); - - document.addText("artist", artist.getName()); - document.addKeyword("artistId", artist.getArtistId()); - - return document; - } - - @Override - protected Summary doGetSummary( - Document document, Locale locale, String snippet, - PortletURL portletURL) { - - Summary summary = createSummary(document); - - summary.setMaxContentLength(200); - - return summary; - } - - @Override - protected void doReindex(Object obj) throws Exception { - Song song = (Song)obj; - - Document document = getDocument(song); - - SearchEngineUtil.updateDocument( - getSearchEngineId(), song.getCompanyId(), document); - } - - @Override - protected void doReindex(String className, long classPK) throws Exception { - Song song = SongLocalServiceUtil.getSong(classPK); - - doReindex(song); - } - - @Override - protected void doReindex(String[] ids) throws Exception { - long companyId = GetterUtil.getLong(ids[0]); - - reindexEntries(companyId); - } - - @Override - protected String getPortletId(SearchContext searchContext) { - return PORTLET_ID; - } - - protected void reindexEntries(long companyId) - throws PortalException, SystemException { - - final Collection documents = new ArrayList(); - - ActionableDynamicQuery actionableDynamicQuery = - new SongActionableDynamicQuery() { - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - } - - @Override - protected void performAction(Object object) throws PortalException { - Song song = (Song)object; - - Document document = getDocument(song); - - documents.add(document); - } - - }; - - actionableDynamicQuery.setCompanyId(companyId); - - actionableDynamicQuery.performActions(); - - SearchEngineUtil.updateDocuments( - getSearchEngineId(), companyId, documents); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/portlet.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/portlet.properties deleted file mode 100644 index cb9a83d834..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/portlet.properties +++ /dev/null @@ -1 +0,0 @@ -resource.actions.configs=resource-actions/default.xml \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/resource-actions/default.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/resource-actions/default.xml deleted file mode 100644 index a43cabd16d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/resource-actions/default.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - artists - - - ADD_PORTLET_DISPLAY_TEMPLATE - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - ADD_PORTLET_DISPLAY_TEMPLATE - CONFIGURATION - - - - - albums - - - ADD_PORTLET_DISPLAY_TEMPLATE - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - ADD_PORTLET_DISPLAY_TEMPLATE - CONFIGURATION - - - - - songs - - - ADD_PORTLET_DISPLAY_TEMPLATE - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - ADD_PORTLET_DISPLAY_TEMPLATE - CONFIGURATION - - - - - org.liferay.jukebox.model - - songs - - - - ADD_ARTIST - ADD_ALBUM - ADD_SONG - PERMISSIONS - - - - - ADD_ALBUMS - ADD_SONGS - PERMISSIONS - - - - - org.liferay.jukebox.model.Artist - - artists - - - - DELETE - PERMISSIONS - UPDATE - VIEW - - - DELETE - UPDATE - VIEW - - - VIEW - - - PERMISSIONS - - - - - org.liferay.jukebox.model.Album - - albums - - - - DELETE - PERMISSIONS - UPDATE - VIEW - - - DELETE - UPDATE - VIEW - - - VIEW - - - PERMISSIONS - - - - - org.liferay.jukebox.model.Song - - songs - - - - DELETE - PERMISSIONS - UPDATE - VIEW - - - DELETE - UPDATE - VIEW - - - VIEW - - - PERMISSIONS - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/service.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/service.properties deleted file mode 100644 index 3da8eeab83..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/WEB-INF/src/service.properties +++ /dev/null @@ -1,41 +0,0 @@ -## -## 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=jukebox - build.number=56 - build.date=1384774378598 - 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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/asset/abstract.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/asset/abstract.jsp deleted file mode 100644 index 8aa75ad677..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/asset/abstract.jsp +++ /dev/null @@ -1,15 +0,0 @@ -<%-- -/** - * 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. - */ ---%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/asset/full_content.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/asset/full_content.jsp deleted file mode 100644 index 3ffadafb95..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/asset/full_content.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../../init.jsp" %> - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/configuration.jsp deleted file mode 100644 index 1cd21afd37..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/configuration.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String displayStyle = GetterUtil.getString(portletPreferences.getValue("displayStyle", StringPool.BLANK)); -long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), scopeGroupId); -%> - - - - - - - -
- - <% - TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(Album.class.getName()); - %> - - -
-
- - - - -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/edit_album.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/edit_album.jsp deleted file mode 100644 index a89505a181..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/edit_album.jsp +++ /dev/null @@ -1,100 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -long albumId = ParamUtil.getLong(request, "albumId"); - -Album album = null; - -if (albumId > 0) { - album = AlbumLocalServiceUtil.getAlbum(albumId); -} -%> - - - - - - - - - - - - - - - - - - <% - List artists = ArtistLocalServiceUtil.getArtists(scopeGroupId); - - for (Artist artist : artists) { - %> - - - - <% - } - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/toolbar.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/toolbar.jsp deleted file mode 100644 index 3df9c93739..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/toolbar.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String toolbarItem = ParamUtil.getString(request, "toolbarItem"); - -boolean searchView = ParamUtil.getBoolean(request, "searchView"); -%> - - - - - - - - - - - - - - - - - - - - - var albumPanel = A.one('#albumPanel'); - var inputNode = A.one('#keywords'); - - var search = new Liferay.JukeBoxContentSearch( - { - contentPanel: albumPanel, - inputNode: inputNode, - resourceURL: '', - namespace: '' - } - ); - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view.jsp deleted file mode 100644 index aae25edb63..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -long artistId = ParamUtil.getLong(request, "artistId"); -boolean showToolbar = ParamUtil.getBoolean(request, "showToolbar", true); -%> - - - - - - - - - - - - - - - - - - - - - -
- - - -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view_album.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view_album.jsp deleted file mode 100644 index a5d00ad8cb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view_album.jsp +++ /dev/null @@ -1,173 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -long albumId = ParamUtil.getLong(request, "albumId"); - -Album album = null; - -if (albumId > 0) { - album = AlbumLocalServiceUtil.getAlbum(albumId); -} -else { - album = (Album)request.getAttribute("jukebox_album"); -} - -Artist artist = ArtistLocalServiceUtil.getArtist(album.getArtistId()); - -List songs = SongLocalServiceUtil.getSongsByAlbumId(album.getAlbumId()); - -boolean showHeader = ParamUtil.getBoolean(request, "showHeader", true); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - boolean trashEnabled = TrashUtil.isTrashEnabled(scopeGroupId); - %> - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
-
- - - <%= artist.getName() %> - - (<%= album.getYear() %>) - -
- -
-
-
- -
- -
- - - -
- -
- - - - - - - -
-
- - - - - - -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view_resources.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view_resources.jsp deleted file mode 100644 index 67beae40cc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view_resources.jsp +++ /dev/null @@ -1,105 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String keywords = ParamUtil.getString(liferayPortletRequest, "keywords"); - -long artistId = ParamUtil.getLong(request, "artistId"); - -String displayStyle = GetterUtil.getString(portletPreferences.getValue("displayStyle", StringPool.BLANK)); -long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), scopeGroupId); - -long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle); - -List albums = null; - -if (artistId > 0) { - albums = AlbumServiceUtil.getAlbumsByArtistId(scopeGroupId, artistId); -} -else if (Validator.isNotNull(keywords)) { - albums = AlbumServiceUtil.getAlbums(scopeGroupId, StringPool.PERCENT + keywords + StringPool.PERCENT); -} -else { - albums = AlbumServiceUtil.getAlbums(scopeGroupId); -} -%> - - - - <%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, albums) %> - - -
- - - - - - - - -
-
- -
    - - <% - for (Album album : albums) { - %> - -
  • - - <% - Artist artist = ArtistLocalServiceUtil.getArtist(album.getArtistId()); - %> - - - - - - - - - - - <%= album.getName() %> - - - - - - - - - - - - -
    - <%= artist.getName() %> -
    - -
  • - - <% - } - %> - -
-
-
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view_search.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view_search.jsp deleted file mode 100644 index 97092750ec..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/albums/view_search.jsp +++ /dev/null @@ -1,123 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -PortletURL portletURL = renderResponse.createRenderURL(); - -portletURL.setParameter("jspPage", "/html/albums/view_search.jsp"); -portletURL.setParameter("redirect", PortalUtil.getCurrentURL(renderRequest)); - -AlbumSearch searchContainer = new AlbumSearch(renderRequest, portletURL); - -AlbumDisplayTerms displayTerms = (AlbumDisplayTerms)searchContainer.getDisplayTerms(); - -Indexer indexer = IndexerRegistryUtil.getIndexer(Album.class); - -SearchContext searchContext = SearchContextFactory.getInstance(request); - -if (displayTerms.isAdvancedSearch()) { - searchContext.setAndSearch(displayTerms.isAndOperator()); - searchContext.setAttribute(Field.TITLE, displayTerms.getTitle()); - searchContext.setAttribute("year", String.valueOf(displayTerms.getYear())); -} -else { - searchContext.setKeywords(displayTerms.getKeywords()); -} - -searchContext.setIncludeAttachments(true); -searchContext.setIncludeDiscussions(true); - -QueryConfig queryConfig = new QueryConfig(); - -queryConfig.setHighlightEnabled(true); - -searchContext.setQueryConfig(queryConfig); - -Hits hits = indexer.search(searchContext); -%> - - - - - - - - - - - - - - - - - -
- -
-
- -
    - - <% - PortletURL hitURL = liferayPortletResponse.createRenderURL(); - - List searchResultsList = SearchResultUtil.getSearchResults(hits, locale, hitURL); - - for (int i = 0; i < searchResultsList.size(); i++) { - SearchResult searchResult = searchResultsList.get(i); - - Summary summary = searchResult.getSummary(); - - List versions = searchResult.getVersions(); - - Collections.sort(versions); - - Album album = AlbumLocalServiceUtil.getAlbum(searchResult.getClassPK()); - %> - -
  • - - - - - - - -
  • - - <% - } - %> - -
-
-
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/asset/abstract.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/asset/abstract.jsp deleted file mode 100644 index 8aa75ad677..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/asset/abstract.jsp +++ /dev/null @@ -1,15 +0,0 @@ -<%-- -/** - * 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. - */ ---%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/asset/full_content.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/asset/full_content.jsp deleted file mode 100644 index afb320f00d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/asset/full_content.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../../init.jsp" %> - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/configuration.jsp deleted file mode 100644 index f9b953b9b5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/configuration.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String displayStyle = GetterUtil.getString(portletPreferences.getValue("displayStyle", StringPool.BLANK)); -long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), scopeGroupId); -%> - - - - - - - -
- - <% - TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(Artist.class.getName()); - %> - - -
-
- - - - -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/edit_artist.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/edit_artist.jsp deleted file mode 100644 index b5ca98db1a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/edit_artist.jsp +++ /dev/null @@ -1,88 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -long artistId = ParamUtil.getLong(request, "artistId"); - -Artist artist = null; - -if (artistId > 0) { - artist = ArtistLocalServiceUtil.getArtist(artistId); -} -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/toolbar.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/toolbar.jsp deleted file mode 100644 index 6ec2ef2187..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/toolbar.jsp +++ /dev/null @@ -1,81 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String toolbarItem = ParamUtil.getString(request, "toolbarItem"); - -boolean searchView = ParamUtil.getBoolean(request, "searchView"); -%> - - - - - - - - - - - - - - - - - - - - - var artistPanel = A.one('#artistPanel'); - var inputNode = A.one('#keywords'); - - var search = new Liferay.JukeBoxContentSearch( - { - contentPanel: artistPanel, - inputNode: inputNode, - resourceURL: '', - namespace: '' - } - ); - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view.jsp deleted file mode 100644 index ca3066ac10..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view.jsp +++ /dev/null @@ -1,35 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - - - - - - - - - - - - - - - -
- -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view_artist.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view_artist.jsp deleted file mode 100644 index 4ddde29950..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view_artist.jsp +++ /dev/null @@ -1,152 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -long artistId = ParamUtil.getLong(request, "artistId"); - -Artist artist = null; - -if (artistId > 0) { - artist = ArtistLocalServiceUtil.getArtist(artistId); -} -else { - artist = (Artist)request.getAttribute("jukebox_artist"); -} - -List albums = AlbumLocalServiceUtil.getAlbumsByArtistId(artist.getArtistId()); - -boolean showHeader = ParamUtil.getBoolean(request, "showHeader", true); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
- <%= artist.getBio() %> -
- -
- -
- -
- -
- - - -
- -
-
-
- - - - - - - - - - - - - -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view_resources.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view_resources.jsp deleted file mode 100644 index b2ced16128..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view_resources.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String keywords = ParamUtil.getString(liferayPortletRequest, "keywords"); - -String displayStyle = GetterUtil.getString(portletPreferences.getValue("displayStyle", StringPool.BLANK)); -long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), scopeGroupId); - -long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle); - -List artists = null; - -if (Validator.isNotNull(keywords)) { - artists = ArtistServiceUtil.getArtists(scopeGroupId, StringPool.PERCENT + keywords + StringPool.PERCENT); -} -else { - artists = ArtistServiceUtil.getArtists(scopeGroupId); -} -%> - - - - <%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, artists) %> - - -
- -
-
- -
    - - <% - for (Artist artist : artists) { - %> - -
  • - - - - - - - - - - <%= artist.getName() %> - - - - - - - - - - - -
  • - - <% - } - %> - -
-
-
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view_search.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view_search.jsp deleted file mode 100644 index f78d8e5d8c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/artists/view_search.jsp +++ /dev/null @@ -1,123 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -PortletURL portletURL = renderResponse.createRenderURL(); - -portletURL.setParameter("jspPage", "/html/artists/view_search.jsp"); -portletURL.setParameter("redirect", PortalUtil.getCurrentURL(renderRequest)); - -ArtistSearch searchContainer = new ArtistSearch(renderRequest, portletURL); - -ArtistDisplayTerms displayTerms = (ArtistDisplayTerms)searchContainer.getDisplayTerms(); - -Indexer indexer = IndexerRegistryUtil.getIndexer(Artist.class); - -SearchContext searchContext = SearchContextFactory.getInstance(request); - -if (displayTerms.isAdvancedSearch()) { - searchContext.setAndSearch(displayTerms.isAndOperator()); - searchContext.setAttribute(Field.TITLE, displayTerms.getTitle()); - searchContext.setAttribute("bio", String.valueOf(displayTerms.getBio())); -} -else { - searchContext.setKeywords(displayTerms.getKeywords()); -} - -searchContext.setIncludeAttachments(true); -searchContext.setIncludeDiscussions(true); - -QueryConfig queryConfig = new QueryConfig(); - -queryConfig.setHighlightEnabled(true); - -searchContext.setQueryConfig(queryConfig); - -Hits hits = indexer.search(searchContext); -%> - - - - - - - - - - - - - - - - - -
- -
-
- -
    - - <% - PortletURL hitURL = liferayPortletResponse.createRenderURL(); - - List searchResultsList = SearchResultUtil.getSearchResults(hits, locale, hitURL); - - for (int i = 0; i < searchResultsList.size(); i++) { - SearchResult searchResult = searchResultsList.get(i); - - Summary summary = searchResult.getSummary(); - - List versions = searchResult.getVersions(); - - Collections.sort(versions); - - Artist artist = ArtistLocalServiceUtil.getArtist(searchResult.getClassPK()); - %> - -
  • - - - - - - - -
  • - - <% - } - %> - -
-
-
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/error.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/error.jsp deleted file mode 100644 index da40d9e452..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/error.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="init.jsp" %> - -
- -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/init.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/init.jsp deleted file mode 100644 index cd59d4e9b9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/init.jsp +++ /dev/null @@ -1,106 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - -<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %> -<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> -<%@ taglib uri="http://liferay.com/tld/security" prefix="liferay-security" %> -<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %> -<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> -<%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %> - -<%@ page import="org.liferay.jukebox.search.AlbumDisplayTerms" %> -<%@ page import="org.liferay.jukebox.search.AlbumSearch" %> -<%@ page import="org.liferay.jukebox.search.ArtistDisplayTerms" %> -<%@ page import="org.liferay.jukebox.search.ArtistSearch" %> -<%@ page import="org.liferay.jukebox.search.SongDisplayTerms" %> -<%@ page import="org.liferay.jukebox.search.SongSearch" %> -<%@ page import="org.liferay.jukebox.service.ArtistServiceUtil" %> -<%@ page import="org.liferay.jukebox.service.AlbumServiceUtil" %> -<%@ page import="org.liferay.jukebox.service.SongServiceUtil" %> -<%@ page import="org.liferay.jukebox.service.ArtistLocalServiceUtil" %> -<%@ page import="org.liferay.jukebox.service.AlbumLocalServiceUtil" %> -<%@ page import="org.liferay.jukebox.service.SongLocalServiceUtil" %> -<%@ page import="org.liferay.jukebox.model.Artist" %> -<%@ page import="org.liferay.jukebox.model.Album" %> -<%@ page import="org.liferay.jukebox.model.Song" %> -<%@ page import="org.liferay.jukebox.service.permission.JukeBoxPermission" %> -<%@ page import="org.liferay.jukebox.service.permission.ArtistPermission" %> -<%@ page import="org.liferay.jukebox.service.permission.AlbumPermission" %> -<%@ page import="org.liferay.jukebox.service.permission.SongPermission" %> -<%@ page import="org.liferay.jukebox.AlbumNameException" %> -<%@ page import="org.liferay.jukebox.ArtistNameException" %> -<%@ page import="org.liferay.jukebox.DuplicatedSongException" %> -<%@ page import="org.liferay.jukebox.SongNameException" %> - -<%@ page import="com.liferay.portal.kernel.language.LanguageUtil" %> -<%@ page import="com.liferay.portal.kernel.template.TemplateHandler" %> -<%@ page import="com.liferay.portal.kernel.template.TemplateHandlerRegistryUtil" %> -<%@ page import="com.liferay.portal.kernel.search.Document" %> -<%@ page import="com.liferay.portal.kernel.search.Field" %> -<%@ page import="com.liferay.portal.kernel.search.Hits" %> -<%@ page import="com.liferay.portal.kernel.search.Indexer" %> -<%@ page import="com.liferay.portal.kernel.search.IndexerRegistryUtil" %> -<%@ page import="com.liferay.portal.kernel.search.QueryConfig" %> -<%@ page import="com.liferay.portal.kernel.search.SearchContext" %> -<%@ page import="com.liferay.portal.kernel.search.SearchContextFactory" %> -<%@ page import="com.liferay.portal.kernel.search.SearchResult" %> -<%@ page import="com.liferay.portal.kernel.search.SearchResultUtil" %> -<%@ page import="com.liferay.portal.kernel.search.Summary" %> -<%@ page import="com.liferay.portal.kernel.util.Constants" %> -<%@ page import="com.liferay.portal.kernel.util.GetterUtil" %> -<%@ page import="com.liferay.portal.kernel.util.HtmlUtil" %> -<%@ page import="com.liferay.portal.kernel.util.MathUtil" %> -<%@ page import="com.liferay.portal.kernel.util.ParamUtil" %> -<%@ page import="com.liferay.portal.kernel.util.StringPool" %> -<%@ page import="com.liferay.portal.kernel.util.Validator" %> -<%@ page import="com.liferay.portal.kernel.xuggler.XugglerUtil" %> -<%@ page import="com.liferay.portal.kernel.workflow.WorkflowConstants" %> -<%@ page import="com.liferay.portal.kernel.portlet.LiferayWindowState" %> -<%@ page import="com.liferay.portlet.trash.util.TrashUtil" %> - -<%@ page import="com.liferay.portal.security.permission.ActionKeys" %> -<%@ page import="com.liferay.portal.util.PortalUtil" %> - -<%@ page import="com.liferay.portlet.portletdisplaytemplate.util.PortletDisplayTemplateUtil" %> - -<%@ page import="java.text.Format" %> -<%@ page import="java.text.DateFormat" %> - -<%@ page import="java.util.ArrayList" %> -<%@ page import="java.util.Calendar" %> -<%@ page import="java.util.Comparator" %> -<%@ page import="java.util.Collections" %> -<%@ page import="java.util.Date" %> -<%@ page import="java.util.GregorianCalendar" %> -<%@ page import="java.util.List" %> -<%@ page import="java.util.Locale" %> -<%@ page import="java.util.Map" %> -<%@ page import="java.util.TimeZone" %> - -<%@ page import="javax.portlet.PortletURL" %> - -<%@ page import="javax.portlet.PortletMode" %> -<%@ page import="javax.portlet.PortletRequest" %> -<%@ page import="javax.portlet.PortletPreferences" %> -<%@ page import="javax.portlet.WindowState" %> - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/resources.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/resources.jsp deleted file mode 100644 index e1ba9fdb87..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/resources.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="init.jsp" %> - - - " rel="stylesheet" type="text/css" /> - - - - " rel="stylesheet" type="text/css" /> - " rel="stylesheet" type="text/css" /> - - - A.Get.script( - '<%= HtmlUtil.escapeJS(PortalUtil.getStaticResourceURL(request, PortalUtil.getPathContext() + "/jukebox-portlet/js/soundmanager2-jsmin.js")) %>', - { - onEnd: function(o) { - A.Get.script( - '<%= HtmlUtil.escapeJS(PortalUtil.getStaticResourceURL(request, PortalUtil.getPathContext() + "/jukebox-portlet/js/inlineplayer.js")) %>', - { - onEnd: function(o) { - } - } - ); - } - }); - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/asset/abstract.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/asset/abstract.jsp deleted file mode 100644 index 8aa75ad677..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/asset/abstract.jsp +++ /dev/null @@ -1,15 +0,0 @@ -<%-- -/** - * 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. - */ ---%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/asset/full_content.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/asset/full_content.jsp deleted file mode 100644 index 3a64519160..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/asset/full_content.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../../init.jsp" %> - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/configuration.jsp deleted file mode 100644 index ce46f3c15d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/configuration.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String displayStyle = GetterUtil.getString(portletPreferences.getValue("displayStyle", StringPool.BLANK)); -long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), scopeGroupId); -%> - - - - - - - -
- - <% - TemplateHandler templateHandler = TemplateHandlerRegistryUtil.getTemplateHandler(Song.class.getName()); - %> - - -
-
- - - - -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/edit_song.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/edit_song.jsp deleted file mode 100644 index 4d22b86be7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/edit_song.jsp +++ /dev/null @@ -1,101 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -long songId = ParamUtil.getLong(request, "songId"); - -Song song = null; - -if (songId > 0) { - song = SongLocalServiceUtil.getSong(songId); -} -%> - - - - - - - - - - - - - - - - - - <% - List albums = AlbumLocalServiceUtil.getAlbums(scopeGroupId); - - for (Album album : albums) { - %> - - - - <% - } - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/toolbar.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/toolbar.jsp deleted file mode 100644 index afcac2b1cf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/toolbar.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String toolbarItem = ParamUtil.getString(request, "toolbarItem"); - -boolean searchView = ParamUtil.getBoolean(request, "searchView"); -%> - - - - - - - - - - - - - - - - - - - - - var songPanel = A.one('#songPanel'); - var inputNode = A.one('#keywords'); - - var search = new Liferay.JukeBoxContentSearch( - { - contentPanel: songPanel, - inputNode: inputNode, - resourceURL: '', - namespace: '' - } - ); - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view.jsp deleted file mode 100644 index ea975fa2ed..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -long albumId = ParamUtil.getLong(request, "albumId"); -boolean showToolbar = ParamUtil.getBoolean(request, "showToolbar", true); -%> - - - - - - - - - - - - - - - - - - - - - -
- - - -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view_resources.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view_resources.jsp deleted file mode 100644 index 053fa8df8f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view_resources.jsp +++ /dev/null @@ -1,132 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String keywords = ParamUtil.getString(liferayPortletRequest, "keywords"); - -long albumId = ParamUtil.getLong(request, "albumId"); - -String displayStyle = GetterUtil.getString(portletPreferences.getValue("displayStyle", StringPool.BLANK)); -long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null), scopeGroupId); - -long portletDisplayDDMTemplateId = PortletDisplayTemplateUtil.getPortletDisplayTemplateDDMTemplateId(displayStyleGroupId, displayStyle); - -List songs = null; - -if (albumId > 0) { - Album album = AlbumLocalServiceUtil.getAlbum(albumId); - - if (album.isInTrash()) { - songs = SongServiceUtil.getSongsByAlbumId(scopeGroupId, albumId, WorkflowConstants.STATUS_ANY); - } - else { - songs = SongServiceUtil.getSongsByAlbumId(scopeGroupId, albumId); - } - -} -else if (Validator.isNotNull(keywords)) { - songs = SongServiceUtil.getSongs(scopeGroupId, StringPool.PERCENT + keywords + StringPool.PERCENT); -} -else { - songs = SongServiceUtil.getSongs(scopeGroupId); -} -%> - - - - <%= PortletDisplayTemplateUtil.renderDDMTemplate(pageContext, portletDisplayDDMTemplateId, songs) %> - - -
- - - - - - - - -
-
- - -
- -
- - -
- -
-
- -
    - - <% - for (Song song : songs) { - %> - -
  • - - <% - String songURL = song.getSongURL(themeDisplay, "mp3"); - %> - - - - - <%= song.getName() %> - - - - - <%= song.getName() %> - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - <% - } - %> - -
-
-
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view_search.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view_search.jsp deleted file mode 100644 index 6abdac5fa3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view_search.jsp +++ /dev/null @@ -1,123 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -PortletURL portletURL = renderResponse.createRenderURL(); - -portletURL.setParameter("jspPage", "/html/songs/view_search.jsp"); -portletURL.setParameter("redirect", PortalUtil.getCurrentURL(renderRequest)); - -SongSearch searchContainer = new SongSearch(renderRequest, portletURL); - -SongDisplayTerms displayTerms = (SongDisplayTerms)searchContainer.getDisplayTerms(); - -Indexer indexer = IndexerRegistryUtil.getIndexer(Song.class); - -SearchContext searchContext = SearchContextFactory.getInstance(request); - -if (displayTerms.isAdvancedSearch()) { - searchContext.setAndSearch(displayTerms.isAndOperator()); - searchContext.setAttribute(Field.TITLE, displayTerms.getTitle()); - searchContext.setAttribute("artist", String.valueOf(displayTerms.getArtist())); -} -else { - searchContext.setKeywords(displayTerms.getKeywords()); -} - -searchContext.setIncludeAttachments(true); -searchContext.setIncludeDiscussions(true); - -QueryConfig queryConfig = new QueryConfig(); - -queryConfig.setHighlightEnabled(true); - -searchContext.setQueryConfig(queryConfig); - -Hits hits = indexer.search(searchContext); -%> - - - - - - - - - - - - - - - - - -
- -
-
- -
    - - <% - PortletURL hitURL = liferayPortletResponse.createRenderURL(); - - List searchResultsList = SearchResultUtil.getSearchResults(hits, locale, hitURL); - - for (int i = 0; i < searchResultsList.size(); i++) { - SearchResult searchResult = searchResultsList.get(i); - - Summary summary = searchResult.getSummary(); - - List versions = searchResult.getVersions(); - - Collections.sort(versions); - - Song song = SongLocalServiceUtil.getSong(searchResult.getClassPK()); - %> - -
  • - - - - - - - -
  • - - <% - } - %> - -
-
-
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view_song.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view_song.jsp deleted file mode 100644 index 157df44949..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/html/songs/view_song.jsp +++ /dev/null @@ -1,180 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -long songId = ParamUtil.getLong(request, "songId"); - -Song song = null; - -if (songId > 0) { - song = SongLocalServiceUtil.getSong(songId); -} -else { - song = (Song)request.getAttribute("jukebox_song"); -} - -Album album = AlbumLocalServiceUtil.getAlbum(song.getAlbumId()); - -Artist artist = ArtistLocalServiceUtil.getArtist(song.getArtistId()); - -boolean showHeader = ParamUtil.getBoolean(request, "showHeader", true); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - boolean trashEnabled = TrashUtil.isTrashEnabled(scopeGroupId); - %> - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - <%= artist.getName() %> -
- -
- - - <%= album.getName() %> - (<%= album.getYear() %>) -
-
- -
-
- -
- -
- -
- - - -
- -
-
-
- - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/view.jsp deleted file mode 100644 index 3300266e80..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/jukebox-portlet/docroot/view.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - - - -This is the JukeBox portlet. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/language-util/edit_task.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/language-util/edit_task.jsp deleted file mode 100644 index ed06b6e7fe..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/language-util/edit_task.jsp +++ /dev/null @@ -1,207 +0,0 @@ -<%-- -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This file is part of Liferay Social Office. Liferay Social Office is free - * software: you can redistribute it and/or modify it under the terms of the GNU - * Affero General Public License as published by the Free Software Foundation, - * either version 3 of the License, or (at your option) any later version. - * - * Liferay Social Office 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 Affero General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along with - * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -long tasksEntryId = ParamUtil.getLong(request, "tasksEntryId"); - -TasksEntry tasksEntry = TasksEntryLocalServiceUtil.fetchTasksEntry(tasksEntryId); - -long priority = BeanParamUtil.getLong(tasksEntry, request, "priority", TasksEntryConstants.PRIORITY_NORMAL); -long assigneeUserId = BeanParamUtil.getLong(tasksEntry, request, "assigneeUserId"); - -boolean addDueDate = false; -String dueDateClassName = "hide"; -String dueDateToggleText = LanguageUtil.get(pageContext, "add-due-date"); - -if ((tasksEntry != null) && (tasksEntry.getDueDate() != null)) { - addDueDate = true; - dueDateClassName = StringPool.BLANK; - dueDateToggleText = LanguageUtil.get(pageContext, "remove-due-date"); -} -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "> - - - - - - - - - - - "> - - - - <% - List users = null; - - if (group.isUser()) { - users = UserLocalServiceUtil.getSocialUsers(group.getClassPK(), SocialRelationConstants.TYPE_BI_CONNECTION, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new UserFirstNameComparator(true)); - } - else { - LinkedHashMap userParams = new LinkedHashMap(); - - userParams.put("inherit", Boolean.TRUE); - userParams.put("usersGroups", new Long(themeDisplay.getScopeGroupId())); - - users = UserLocalServiceUtil.search(company.getCompanyId(), StringPool.BLANK, WorkflowConstants.STATUS_APPROVED, userParams, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new UserFirstNameComparator(true)); - } - - for (User curUser : users) { - long curUserId = curUser.getUserId(); - - if (curUserId == user.getUserId()) { - continue; - } - %> - - - - <% - } - %> - - - - - - - - - - - <% - String taglibAddDueDateOnClick = renderResponse.getNamespace() + "displayInputDate();"; - %> - - - - <%= dueDateToggleText %> - - - - - - - - - <% - for (int curStatus : TasksEntryConstants.STATUSES) { - %> - - - - <% - } - %> - - - - - - - - - - - - - - - - - - - - - - - - - function getSuggestionsContent() { - var content = document.fm1.title.value + ' '; - - return content; - } - - Liferay.provide( - window, - 'displayInputDate', - function() { - var A = AUI(); - - var checkbox = A.one('#addDueDate'); - - if (checkbox) { - var checkboxValue = checkbox.get('value'); - var dueDateToggle = A.one('#toggleDueDate'); - - if (checkboxValue == 'true') { - checkbox.set('value', false); - dueDateToggle.html('<%= LanguageUtil.get(pageContext, "add-due-date") %>'); - } - else { - checkbox.set('value', true); - dueDateToggle.html('<%= LanguageUtil.get(pageContext, "remove-due-date") %>'); - } - } - - var inputDate = A.one('#fm1 .lfr-input-date'); - var inputTime = A.one('#fm1 .lfr-input-time'); - - if (inputDate && inputTime) { - inputDate.toggleClass('hide'); - inputTime.toggleClass('hide'); - } - }, - ['aui-base'] - ); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-poller-nolonger-default/liferayPollerNoLongerDefaultTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-poller-nolonger-default/liferayPollerNoLongerDefaultTest.jsp deleted file mode 100644 index 9bb5d7d147..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-poller-nolonger-default/liferayPollerNoLongerDefaultTest.jsp +++ /dev/null @@ -1,259 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - - - - Liferay.provide( - Liferay.Portlet, - 'refreshLayout', - function(portletBound) { - if (!portletBound.isStatic) { - Liferay.Layout.refresh(portletBound); - } - }, - ['liferay-layout'] - ); - - - - - - - Liferay.Util.getTop().Liferay.fire( - 'popupReady', - { - doc: document, - win: window, - windowName: Liferay.Util.getWindowName() - } - ); - - - - <% - String scroll = ParamUtil.getString(request, "scroll"); - %> - - - Liferay.on( - 'allPortletsReady', - function(event) { - document.getElementById('<%= HtmlUtil.escape(scroll) %>').scrollIntoView(); - } - ); - - - - - Liferay.BrowserSelectors.run(); - - - - if (Liferay.Data.ICONS_INLINE_SVG) { - svg4everybody( - { - attributeName: 'data-href', - polyfill: true - } - ); - } - - - - var focusInPortletHandler = dom.delegate( - document, - 'focusin', - '.portlet', - function(event) { - dom.addClasses(dom.closest(event.delegateTarget, '.portlet'), 'open'); - } - ); - - var focusOutPortletHandler = dom.delegate( - document, - 'focusout', - '.portlet', - function(event) { - dom.removeClasses(dom.closest(event.delegateTarget, '.portlet'), 'open'); - } - ); - - - - if (A.UA.mobile) { - Liferay.Util.addInputCancel(); - } - - -<% -Group group = null; - -LayoutRevision layoutRevision = null; - -if (layout != null) { - group = layout.getGroup(); - - layoutRevision = LayoutStagingUtil.getLayoutRevision(layout); -} -%> - - - - - Liferay.Data.layoutConfig = { - container: '#main-content', - dropNodes: '.portlet-column', - - - - handles: Liferay.Data.PORTLET_TOUCH_DRAG_HANDLE_SELECTOR || ['.portlet-title-default'], - - - handles: Liferay.Data.PORTLET_DRAG_HANDLE_SELECTOR || ['.portlet-title-default', '.portlet-topper'], - - - - disabledDropContainerClass: 'portlet-dropzone-disabled', - dragNodes: '.portlet-boundary:not(.portlet-static)', - dropContainer: '.portlet-dropzone', - emptyColumnClass: 'empty', - invalid: '.portlet-static', - nestedPortletId: '_<%= PortletKeys.NESTED_PORTLETS %>_INSTANCE', - portletBoundary: '.portlet-boundary' - }; - - Liferay.fire('dataLayoutConfigReady'); - - - - <%-- aui:script won't accept a null body --%> - - - - - var navBlock = A.one(Liferay.Data.NAV_SELECTOR); - - Liferay.once( - 'initNavigation', - function() { - new Liferay.Navigation( - { - navBlock: navBlock - } - ); - } - ); - - if (navBlock) { - if (A.UA.touchMobile) { - var panel = document.querySelector(Liferay.Data.NAV_SELECTOR_MOBILE); - - Liferay.on('liferay.collapse.shown', - function(event) { - var panelId = event.panel.geAttribute('id'); - - if (panelId === panel.geAttribute('id')) { - Liferay.fire('initNavigation'); - } - } - ); - } - else { - navBlock.once( - ['gesturemovestart', 'mousemove'], - function() { - Liferay.fire('initNavigation'); - } - ); - } - } - - A.on( - 'io:complete', - function() { - Liferay.fire('io:complete'); - } - ); - - - - - new Liferay.Menu(); - - var liferayNotices = Liferay.Data.notices; - - for (var i = 1; i < liferayNotices.length; i++) { - new Liferay.Notice(liferayNotices[i]); - } - - - Liferay.Poller.init( - { - encryptedUserId: '<%= Encryptor.encrypt(company.getKeyObj(), String.valueOf(themeDisplay.getUserId())) %>', - supportsComet: <%= ServerDetector.isSupportsComet() %> - } - ); - - - - - - - - <%-- User Inputted Layout and LayoutSet JavaScript --%> - - <% - LayoutSet layoutSet = themeDisplay.getLayoutSet(); - - UnicodeProperties layoutSetSettings = layoutSet.getSettingsProperties(); - - UnicodeProperties masterLayoutTypeSettings = new UnicodeProperties(); - - if (layout.getMasterLayoutPlid() > 0) { - Layout masterLayout = LayoutLocalServiceUtil.fetchLayout(layout.getMasterLayoutPlid()); - - if (masterLayout != null) { - masterLayoutTypeSettings = masterLayout.getTypeSettingsProperties(); - } - } - - UnicodeProperties layoutTypeSettings = layout.getTypeSettingsProperties(); - %> - - - - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-portlet-icon-back/LiferayPortletIconBack.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-portlet-icon-back/LiferayPortletIconBack.jsp deleted file mode 100644 index 09843d184d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-portlet-icon-back/LiferayPortletIconBack.jsp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-security-encrypt/LiferaySecurityEncrypt.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-security-encrypt/LiferaySecurityEncrypt.jsp deleted file mode 100644 index da51153cce..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-security-encrypt/LiferaySecurityEncrypt.jsp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-soy/soytags.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-soy/soytags.jsp deleted file mode 100644 index 55e85bd79a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-soy/soytags.jsp +++ /dev/null @@ -1,14 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-captcha/LiferayUICapcha.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-captcha/LiferayUICapcha.jsp deleted file mode 100644 index a400166453..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-captcha/LiferayUICapcha.jsp +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-clay/LiferayUIClayTagsTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-clay/LiferayUIClayTagsTest.jsp deleted file mode 100644 index 9002f3b3a0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-clay/LiferayUIClayTagsTest.jsp +++ /dev/null @@ -1,81 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - - - - - - - - - - - - - - - - - - - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-custom/LiferayUICustom.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-custom/LiferayUICustom.jsp deleted file mode 100644 index 7070815e49..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-custom/LiferayUICustom.jsp +++ /dev/null @@ -1,77 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -long fooId = ParamUtil.getLong(request, "fooId"); - -Foo foo = null; - -if (fooId > 0) { - foo = FooLocalServiceUtil.getFoo(fooId); -} -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-flags/LiferayUIFlagsTagsTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-flags/LiferayUIFlagsTagsTest.jsp deleted file mode 100644 index b6e0c1ad96..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-flags/LiferayUIFlagsTagsTest.jsp +++ /dev/null @@ -1,10 +0,0 @@ - -
- -
-
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-icon/FontAwesomeNoLongerIncludeDefaultTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-icon/FontAwesomeNoLongerIncludeDefaultTest.jsp deleted file mode 100644 index 6de0ac2cef..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-icon/FontAwesomeNoLongerIncludeDefaultTest.jsp +++ /dev/null @@ -1,25 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -
- -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-trash-empty/view_deleted_message_attachments.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-trash-empty/view_deleted_message_attachments.jsp deleted file mode 100644 index ca8509d0cf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-trash-empty/view_deleted_message_attachments.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/html/portlet/message_boards/init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); -MBMessage message = (MBMessage)request.getAttribute(WebKeys.MESSAGE_BOARDS_MESSAGE); -long messageId = BeanParamUtil.getLong(message, request, "messageId"); -long categoryId = MBUtil.getCategoryId(request, message); -MBUtil.addPortletBreadcrumbEntries(message, request, renderResponse); -PortletURL portletURL = renderResponse.createRenderURL(); -portletURL.setParameter("struts_action", "/message_boards/edit_message"); -portletURL.setParameter("messageId", String.valueOf(message.getMessageId())); -PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), portletURL.toString()); -PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "removed-attachments"), currentURL); -PortletURL iteratorURL = renderResponse.createRenderURL(); -iteratorURL.setParameter("struts_action", "/message_boards/view_deleted_message_attachments"); -iteratorURL.setParameter("redirect", currentURL); -iteratorURL.setParameter("messageId", String.valueOf(messageId)); -%> - - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-trash-undo/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-trash-undo/view.jsp deleted file mode 100644 index 3a249387ea..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferay-ui-trash-undo/view.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="../init.jsp" %> - -<% -long albumId = ParamUtil.getLong(request, "albumId"); -boolean showToolbar = ParamUtil.getBoolean(request, "showToolbar", true); -%> - - - - - - - - - - - - - - - - - - - - - -
- - - -
\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferayfrontend-cardstreeview/LiferayFrontendCardsTreeviewTagsTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferayfrontend-cardstreeview/LiferayFrontendCardsTreeviewTagsTest.jsp deleted file mode 100644 index 750cf98f9e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/liferayfrontend-cardstreeview/LiferayFrontendCardsTreeviewTagsTest.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%! String nodes = "[children: [{id: '1.1',name: 'Pablictor'},{children: [{id: '1.2.1',name: 'Eudaldo'}],id: '1.2',name: 'Pabla'}],id: '1',name: 'Sandro'},{id: '2',name: 'Victor'}]"; %> - -/> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/link-application-urls/general.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/link-application-urls/general.jsp deleted file mode 100644 index 8a94c177f6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/link-application-urls/general.jsp +++ /dev/null @@ -1,87 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<%@ -page import="com.liferay.portlet.configuration.css.web.internal.display.context.PortletConfigurationCSSPortletDisplayContext" %> - -<% -String currentURL = PortalUtil.getCurrentURL(request); - -PortletConfigurationCSSPortletDisplayContext portletConfigurationCSSPortletDisplayContext = new PortletConfigurationCSSPortletDisplayContext(renderRequest); -%> - -<% -Map contextUseForAllTitle = new HashMap<>(); - -contextUseForAllTitle.put("checked", portletConfigurationCSSPortletDisplayContext.isUseCustomTitle()); -contextUseForAllTitle.put("disableOnChecked", false); -contextUseForAllTitle.put("label", LanguageUtil.get(request, "use-custom-title")); -contextUseForAllTitle.put("name", renderResponse.getNamespace() + "useCustomTitle"); -contextUseForAllTitle.put("inputSelector", ".custom-title input"); -%> - - - - - - - - - - - - <% - for (LayoutDescription layoutDescription : portletConfigurationCSSPortletDisplayContext.getLayoutDescriptions()) { - Layout layoutDescriptionLayout = LayoutLocalServiceUtil.fetchLayout(layoutDescription.getPlid()); - %> - - - - <% - } - %> - - - - - - - <% - for (PortletDecorator portletDecorator : theme.getPortletDecorators()) { - %> - - - - <% - } - %> - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/logo-selector/LogoSelectorTagsTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/logo-selector/LogoSelectorTagsTest.jsp deleted file mode 100644 index 63a0fbdc04..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/logo-selector/LogoSelectorTagsTest.jsp +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/navigation-tags/NavigationTagsTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/navigation-tags/NavigationTagsTest.jsp deleted file mode 100644 index 4a688b0573..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/navigation-tags/NavigationTagsTest.jsp +++ /dev/null @@ -1,12 +0,0 @@ -<%@ include file="/html/portlet/navigation/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/portlet-header/portlet_header.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/portlet-header/portlet_header.jsp deleted file mode 100644 index f6e159654d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/portlet-header/portlet_header.jsp +++ /dev/null @@ -1,30 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -String portletDescription = (String)request.getAttribute(ProductNavigationControlMenuWebKeys.PORTLET_DESCRIPTION); -String portletTitle = (String)request.getAttribute(ProductNavigationControlMenuWebKeys.PORTLET_TITLE); -%> - -
  • - <%= HtmlUtil.escape(portletTitle) %> - - - - -
  • \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/portlet-icon/PortletIconTagsTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/portlet-icon/PortletIconTagsTest.jsp deleted file mode 100644 index aff06aa70c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/portlet-icon/PortletIconTagsTest.jsp +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/removeFlash/flash.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/removeFlash/flash.jsp deleted file mode 100644 index 512b4e1e11..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/removeFlash/flash.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - - - - - <% - - // http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_12701 - - Properties flashAttributesProps = PropertiesUtil.load(flashAttributes); - - String align = GetterUtil.getString(flashAttributesProps.getProperty("align"), "left"); - String allowScriptAccess = GetterUtil.getString(flashAttributesProps.getProperty("allowScriptAccess"), "sameDomain"); - String base = GetterUtil.getString(flashAttributesProps.getProperty("base"), "."); - String bgcolor = GetterUtil.getString(flashAttributesProps.getProperty("bgcolor"), "#FFFFFF"); - String devicefont = GetterUtil.getString(flashAttributesProps.getProperty("devicefont"), "true"); - String height = GetterUtil.getString(flashAttributesProps.getProperty("height"), "500"); - String loop = GetterUtil.getString(flashAttributesProps.getProperty("loop"), "true"); - String menu = GetterUtil.getString(flashAttributesProps.getProperty("menu"), "false"); - String play = GetterUtil.getString(flashAttributesProps.getProperty("play"), "false"); - String quality = GetterUtil.getString(flashAttributesProps.getProperty("quality"), "best"); - String salign = GetterUtil.getString(flashAttributesProps.getProperty("salign"), ""); - String scale = GetterUtil.getString(flashAttributesProps.getProperty("scale"), "showall"); - String swliveconnect = GetterUtil.getString(flashAttributesProps.getProperty("swliveconnect"), "false"); - String width = GetterUtil.getString(flashAttributesProps.getProperty("width"), "100%"); - String wmode = GetterUtil.getString(flashAttributesProps.getProperty("wmode"), "opaque"); - - flashVariables = StringUtil.replace(flashVariables, "\n", "&"); - %> - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/repository-service-util/RepositoryServiceUtilTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/repository-service-util/RepositoryServiceUtilTest.jsp deleted file mode 100644 index 67a1f972de..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/repository-service-util/RepositoryServiceUtilTest.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - - - -<% - - - - RepositoryLocalServiceUtil.getRepositoryImpl( - 0, fileEntryId, 0); - -%> -This is the Test portlet. diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/restore-entry/RestoreEntryTagsTest.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/restore-entry/RestoreEntryTagsTest.jsp deleted file mode 100644 index 17134316db..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/jsptests/restore-entry/RestoreEntryTagsTest.jsp +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/pom.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/pom.xml deleted file mode 100644 index bf78e9ca11..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - 4.0.0 - - - com.liferay.ide.tools.tests - tools-tests - 3.10.6-SNAPSHOT - - - com.liferay.ide.upgrade.problems.core.tests - eclipse-test-plugin - - Liferay IDE Upgrade Problems Core Tests - - - - - org.eclipse.tycho - tycho-maven-plugin - true - - - org.eclipse.tycho - tycho-surefire-plugin - - false - false - - -Xmx1024m - ${skipTests} - - - - org.eclipse.tycho - target-platform-configuration - - - - - eclipse-feature - com.liferay.ide.eclipse.tools - 0.0.0 - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1c0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/liferay-display.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index 9a9f630015..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/liferay-plugin-package.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 33ac0fcff5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,15 +0,0 @@ -name=Actioncommand Demo -module-group-id=liferay -module-incremental-version=1 -tags= -short-description= -change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=EE -portal-dependency-jars=\ - jstl-api.jar,\ - jstl-impl.jar -portal-dependency-tlds=liferay-portlet.tld -long-description= -liferay-versions=6.2.10+ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/liferay-portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index de072e842e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - demo-action-command - /icon.png - /css/main.css - - /js/main.js - - - demo-action-command-portlet - - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 4a66d2623a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - demo-action-command - Demo Action Command - - com.liferay.demo.portlet.DemoActionCommandPortlet - - - action.package.prefix - com.liferay.demo.portlet.action - - - view-template - /html/demoactioncommand/view.jsp - - 0 - - text/html - view - - - Demo Action Command - Demo Action Command - - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/DemoActionCommandPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/DemoActionCommandPortlet.java deleted file mode 100644 index b754bdf2fb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/DemoActionCommandPortlet.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.liferay.demo.portlet; - -import com.liferay.util.bridges.mvc.MVCPortlet; - -/** - * Portlet implementation class DemoActionCommandPortlet - */ -public class DemoActionCommandPortlet extends MVCPortlet { - - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/action/SayHelloActionCommand.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/action/SayHelloActionCommand.java deleted file mode 100644 index b7a7d67aa9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/action/SayHelloActionCommand.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.liferay.demo.portlet.action; - -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.util.bridges.mvc.ActionCommand; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletException; -import javax.portlet.PortletRequest; -import javax.portlet.PortletResponse; - -public class SayHelloActionCommand implements ActionCommand { - - @Override - public boolean processCommand(PortletRequest portletRequest, - PortletResponse portletResponse) throws PortletException { - - ActionRequest actionRequest = (ActionRequest) portletRequest; - ActionResponse actionResponse = (ActionResponse) portletResponse; - - String name = ParamUtil.getString(actionRequest, "name"); - - actionResponse.setRenderParameter("name", name); - actionResponse.setRenderParameter( - "mvcPath", "/html/demoactioncommand/view.jsp"); - - - return true; - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/action/SayHelloActionCommand2.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/action/SayHelloActionCommand2.java deleted file mode 100644 index aeed59ac2b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/action/SayHelloActionCommand2.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.liferay.demo.portlet.action; - -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.util.bridges.mvc.ActionCommand; -import com.liferay.util.bridges.mvc.BaseActionCommand; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletException; -import javax.portlet.PortletRequest; -import javax.portlet.PortletResponse; - -public class SayHelloActionCommand extends BaseActionCommand { - - @Override - public boolean processCommand(PortletRequest portletRequest, - PortletResponse portletResponse) throws PortletException { - - ActionRequest actionRequest = (ActionRequest) portletRequest; - ActionResponse actionResponse = (ActionResponse) portletResponse; - - String name = ParamUtil.getString(actionRequest, "name"); - - actionResponse.setRenderParameter("name", name); - actionResponse.setRenderParameter( - "mvcPath", "/html/demoactioncommand/view.jsp"); - - - return true; - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/aui.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/aui.tld deleted file mode 100644 index 0e076ab62d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/aui.tld +++ /dev/null @@ -1,2336 +0,0 @@ - - - - 1.0 - aui - http://alloy.liferay.com/tld/aui - - button-item - com.liferay.taglib.aui.ButtonItemTag - JSP - - ]]> - activeState - false - true - boolean - - - ]]> - boundingBox - false - true - java.lang.String - - - ]]> - classNames - false - true - java.lang.Object - - - ]]> - contentBox - false - true - java.lang.String - - - boundingBox.]]> - cssClass - false - true - java.lang.String - - - ]]> - defaultState - false - true - boolean - - - ]]> - depth - false - true - java.lang.Object - - - ]]> - destroyed - false - true - boolean - - - ]]> - disabled - false - true - boolean - - - ]]> - focused - false - true - boolean - - - {fn: // The function to execute - context: // The context to execute the function in - type: // The type of event to listen for (defaults to "click") - }]]> - handler - false - true - java.lang.Object - - - ]]> - height - false - true - java.lang.Object - - - boundingBox when - visible is set to - false.]]> - hideClass - false - true - java.lang.String - - - ]]> - hoverState - false - true - boolean - - - ]]> - icon - false - true - java.lang.String - - - aui-button-icon.]]> - iconNode - false - true - java.lang.String - - - ]]> - buttonitemId - false - true - java.lang.String - - - ]]> - index - false - true - java.lang.Object - - - ]]> - initialized - false - true - boolean - - - ]]> - label - false - true - java.lang.String - - - aui-button-label.]]> - labelNode - false - true - java.lang.String - - - ]]> - buttonitemParent - false - true - java.lang.Object - - - true the render phase will be autimatically invoked - preventing the .render() manual call.]]> - render - false - true - java.lang.Object - - - ]]> - rendered - false - true - boolean - - - ]]> - root - false - true - java.lang.Object - - - -
    0
    (Default) Not selected
    -
    1
    Fully selected
    -
    2
    Partially selected
    - ]]>
    - selected - false - true - java.lang.Object -
    - - ]]> - srcNode - false - true - java.lang.String - - - ]]> - strings - false - true - java.lang.Object - - - ]]> - tabIndex - false - true - java.lang.Object - - - ]]> - title - false - true - java.lang.String - - - ]]> - type - false - true - java.lang.String - - - ]]> - useARIA - false - true - boolean - - - ]]> - visible - false - true - boolean - - - ]]> - width - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterActiveStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterBoundingBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterClassNamesChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterContentBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterCssClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDefaultStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDepthChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after destruction is complete (and as a result cannot prevent - destruction). -

    ]]>
    - afterDestroy - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDestroyedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDisabledChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterFocusedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHandlerChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHeightChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHideClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHoverStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIconChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIconNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIdChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIndexChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" momemt of this event, will be notified - after initialization of the object is complete (and therefore - cannot prevent initialization). -

    ]]>
    - afterInit - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterInitializedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterLabelChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterLabelNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterParentChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterRenderChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterRenderedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterRootChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterSelectedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterSrcNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterStringsChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterTabIndexChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterTitleChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterTypeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterUseARIAChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterVisibleChange - false - true - java.lang.Object - - - ]]> - afterContentUpdate - false - true - java.lang.Object - - - - Subscribers to the "on" moment of this event, will be notified - before the widget is rendered. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after rendering is complete. -

    ]]>
    - afterRender - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterWidthChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onActiveStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onBoundingBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onClassNamesChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onContentBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onCssClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDefaultStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDepthChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after destruction is complete (and as a result cannot prevent - destruction). -

    ]]>
    - onDestroy - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDestroyedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDisabledChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onFocusedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHandlerChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHeightChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHideClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHoverStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIconChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIconNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIdChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIndexChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" momemt of this event, will be notified - after initialization of the object is complete (and therefore - cannot prevent initialization). -

    ]]>
    - onInit - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onInitializedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onLabelChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onLabelNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onParentChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onRenderChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onRenderedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onRootChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onSelectedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onSrcNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onStringsChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onTabIndexChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onTitleChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onTypeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onUseARIAChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onVisibleChange - false - true - java.lang.Object - - - ]]> - onContentUpdate - false - true - java.lang.Object - - - - Subscribers to the "on" moment of this event, will be notified - before the widget is rendered. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after rendering is complete. -

    ]]>
    - onRender - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onWidthChange - false - true - java.lang.Object - - true -
    - - a - com.liferay.taglib.aui.ATag - JSP - - ariaRole - false - true - java.lang.String - - - cssClass - false - true - java.lang.String - - - data - false - true - java.util.Map - - - href - true - true - java.lang.String - - - id - false - true - java.lang.String - - - label - false - true - java.lang.String - - - lang - false - true - java.lang.String - - - onClick - false - true - java.lang.String - - - target - false - true - java.lang.String - - - title - false - true - java.lang.String - - true - - - button - com.liferay.taglib.aui.ButtonTag - JSP - - cssClass - false - true - java.lang.String - - - data - false - true - java.lang.Object - - - disabled - false - true - boolean - - - href - false - true - java.lang.String - - - icon - false - true - java.lang.String - - - iconAlign - false - true - java.lang.String - - - name - false - true - java.lang.String - - - onClick - false - true - java.lang.String - - - primary - false - true - java.lang.Object - - - type - false - true - java.lang.String - - - useDialog - false - true - boolean - - - value - false - true - java.lang.String - - true - - - button-row - com.liferay.taglib.aui.ButtonRowTag - JSP - - cssClass - false - true - java.lang.String - - - id - false - true - java.lang.String - - true - - - col - com.liferay.taglib.aui.ColTag - JSP - - cssClass - false - true - java.lang.String - - - id - false - true - java.lang.String - - - offset - false - true - int - - - offsetWidth - false - true - int - - - span - false - true - int - - - width - false - true - int - - true - - - column - com.liferay.taglib.aui.ColumnTag - JSP - - columnWidth - false - true - int - - - cssClass - false - true - java.lang.String - - - first - false - true - boolean - - - id - false - true - java.lang.String - - - last - false - true - boolean - - true - - - component - com.liferay.taglib.aui.ComponentTag - JSP - - defineVar - false - true - boolean - - - excludeAttributes - false - true - java.lang.String - - - javaScriptAttributes - false - true - java.lang.String - - - module - false - true - java.lang.String - - - name - false - true - java.lang.String - - - options - false - true - java.util.Map - - - scriptPosition - false - true - java.lang.String - - - tagPageContext - true - true - javax.servlet.jsp.JspContext - - - useJavaScript - false - true - java.io.Serializable - - - var - false - true - java.lang.String - - true - - - container - com.liferay.taglib.aui.ContainerTag - JSP - - cssClass - false - true - java.lang.String - - - fluid - false - true - boolean - - - id - false - true - java.lang.String - - true - - - field-wrapper - com.liferay.taglib.aui.FieldWrapperTag - JSP - - cssClass - false - true - java.lang.String - - - data - false - true - java.lang.Object - - - first - false - true - boolean - - - helpMessage - false - true - java.lang.String - - - inlineField - false - true - boolean - - - inlineLabel - false - true - java.lang.String - - - label - false - true - java.lang.String - - - last - false - true - boolean - - - name - false - true - java.lang.String - - - required - false - true - boolean - - - - fieldset - com.liferay.taglib.aui.FieldsetTag - JSP - - column - false - true - boolean - - - cssClass - false - true - java.lang.String - - - helpMessage - false - true - java.lang.String - - - id - false - true - java.lang.String - - - label - false - true - java.lang.String - - true - - - form - com.liferay.taglib.aui.FormTag - JSP - - action - false - true - java.lang.String - - - cssClass - false - true - java.lang.String - - - escapeXml - false - true - boolean - - - inlineLabels - false - true - boolean - - - method - false - true - java.lang.String - - - name - false - true - java.lang.String - - - onSubmit - false - true - java.lang.String - - - portletNamespace - false - true - java.lang.String - - - useNamespace - false - true - boolean - - true - - - icon - com.liferay.taglib.aui.IconTag - JSP - - cssClass - false - true - java.lang.String - - - data - false - true - java.util.Map - - - id - false - true - java.lang.String - - - image - false - true - java.lang.String - - - label - false - true - java.lang.String - - - target - false - true - java.lang.String - - - url - false - true - java.lang.String - - true - - - input - com.liferay.taglib.aui.InputTag - JSP - - autoFocus - false - true - boolean - - - autoSize - false - true - boolean - - - bean - false - true - java.lang.Object - - - changesContext - false - true - boolean - - - checked - false - true - boolean - - - classPK - false - true - long - - - cssClass - false - true - java.lang.String - - - data - false - true - java.lang.Object - - - dateTogglerCheckboxLabel - false - true - java.lang.String - - - defaultLanguageId - false - true - java.lang.String - - - disabled - false - true - boolean - - - field - false - true - java.lang.String - - - fieldParam - false - true - java.lang.String - - - first - false - true - boolean - - - formName - false - true - java.lang.String - - - helpMessage - false - true - java.lang.String - - - helpTextCssClass - false - true - java.lang.String - - - id - false - true - java.lang.String - - - ignoreRequestValue - false - true - boolean - - - inlineField - false - true - boolean - - - inlineLabel - false - true - java.lang.String - - - label - false - true - java.lang.String - - - languageId - false - true - java.lang.String - - - last - false - true - boolean - - - max - false - true - java.lang.Object - - - model - false - true - java.lang.Class - - - min - false - true - java.lang.Object - - - multiple - false - true - boolean - - - name - true - true - java.lang.String - - - onChange - false - true - java.lang.String - - - onClick - false - true - java.lang.String - - - placeholder - false - true - java.lang.String - - - prefix - false - true - java.lang.String - - - required - false - true - boolean - - - resizable - false - true - boolean - - - showRequiredLabel - false - true - boolean - - - suffix - false - true - java.lang.String - - - title - false - true - java.lang.String - - - type - false - true - java.lang.String - - - useNamespace - false - true - boolean - - - value - false - true - java.lang.Object - - - wrapperCssClass - false - true - java.lang.String - - true - - - layout - com.liferay.taglib.aui.LayoutTag - JSP - - cssClass - false - true - java.lang.String - - true - - - model-context - com.liferay.taglib.aui.ModelContextTag - JSP - - bean - false - true - java.lang.Object - - - defaultLanguageId - false - true - java.lang.String - - - model - false - true - java.lang.Class - - - - nav - com.liferay.taglib.aui.NavTag - JSP - - ariaLabel - false - true - java.lang.String - - - ariaRole - false - true - java.lang.String - - - collapsible - false - true - boolean - - - cssClass - false - true - java.lang.String - - - icon - false - true - java.lang.String - - - id - false - true - java.lang.String - - - useNamespace - false - true - boolean - - true - - - nav-bar - com.liferay.taglib.aui.NavBarTag - JSP - - cssClass - false - true - java.lang.String - - - id - false - true - java.lang.String - - true - - - nav-bar-search - com.liferay.taglib.aui.NavBarSearchTag - JSP - - cssClass - false - true - java.lang.String - - - id - false - true - java.lang.String - - - file - false - true - java.lang.String - - - searchContainer - false - true - com.liferay.portal.kernel.dao.search.SearchContainer - - true - - - nav-item - com.liferay.taglib.aui.NavItemTag - JSP - - anchorCssClass - false - true - java.lang.String - - - anchorData - false - true - java.lang.Object - - - anchorId - false - true - java.lang.String - - - ariaLabel - false - true - java.lang.String - - - ariaRole - false - true - java.lang.String - - - cssClass - false - true - java.lang.String - - - data - false - true - java.lang.Object - - - dropdown - false - true - boolean - - - href - false - true - java.lang.Object - - - iconCssClass - false - true - java.lang.String - - - id - false - true - java.lang.String - - - label - false - true - java.lang.String - - - selected - false - true - boolean - - - state - false - true - java.lang.String - - - title - false - true - java.lang.String - - - toggle - false - true - boolean - - - useDialog - false - true - boolean - - - wrapDropDownMenu - false - true - boolean - - true - - - option - com.liferay.taglib.aui.OptionTag - JSP - - cssClass - false - true - java.lang.String - - - data - false - true - java.util.Map - - - disabled - false - true - boolean - - - label - false - true - java.lang.Object - - - selected - false - true - boolean - - - style - false - true - java.lang.String - - - useModelValue - false - true - boolean - - - value - false - true - java.lang.Object - - true - - - panel - com.liferay.taglib.aui.PanelTag - JSP - - collapsed - false - true - boolean - - - collapsible - false - true - boolean - - - id - false - true - java.lang.String - - - label - false - true - java.lang.String - - - - row - com.liferay.taglib.aui.RowTag - JSP - - cssClass - false - true - java.lang.String - - - fluid - false - true - boolean - - - id - false - true - java.lang.String - - true - - - script - com.liferay.taglib.aui.ScriptTag - JSP - - position - false - true - java.lang.String - - - use - false - true - java.lang.String - - - - select - com.liferay.taglib.aui.SelectTag - JSP - - bean - false - true - java.lang.Object - - - changesContext - false - true - boolean - - - cssClass - false - true - java.lang.String - - - data - false - true - java.util.Map - - - disabled - false - true - boolean - - - first - false - true - boolean - - - helpMessage - false - true - java.lang.String - - - id - false - true - java.lang.String - - - ignoreRequestValue - false - true - boolean - - - inlineField - false - true - boolean - - - inlineLabel - false - true - java.lang.String - - - label - false - true - java.lang.String - - - last - false - true - boolean - - - listType - false - true - java.lang.String - - - listTypeFieldName - false - true - java.lang.String - - - multiple - false - true - boolean - - - name - true - true - java.lang.String - - - onChange - false - true - java.lang.String - - - onClick - false - true - java.lang.String - - - prefix - false - true - java.lang.String - - - required - false - true - boolean - - - showEmptyOption - false - true - boolean - - - showRequiredLabel - false - true - boolean - - - suffix - false - true - java.lang.String - - - title - false - true - java.lang.String - - - useNamespace - false - true - boolean - - true - - - spacer - com.liferay.taglib.aui.SpacerTag - JSP - - - translation-manager - com.liferay.taglib.aui.TranslationManagerTag - JSP - - availableLocales - false - true - java.util.Locale[] - - - defaultLanguageId - false - true - java.lang.String - - - editingLanguageId - false - true - java.lang.String - - - id - false - true - java.lang.String - - - initialize - false - true - boolean - - - readOnly - false - true - boolean - - - - validator - com.liferay.taglib.aui.ValidatorTagImpl - JSP - - errorMessage - false - true - java.lang.String - - - name - true - true - java.lang.String - - - - workflow-status - com.liferay.taglib.aui.WorkflowStatusTag - JSP - - bean - false - true - java.lang.Object - - - helpMessage - false - true - java.lang.String - - - id - false - true - java.lang.String - - - model - false - true - java.lang.Class - - - showIcon - false - true - boolean - - - showLabel - false - true - boolean - - - status - false - true - java.lang.Integer - - - statusMessage - false - true - java.lang.String - - - version - false - true - java.lang.String - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-portlet-ext.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-portlet-ext.tld deleted file mode 100644 index ad90264667..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-portlet-ext.tld +++ /dev/null @@ -1,518 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-portlet - http://liferay.com/tld/portlet - - - - - actionURL - com.liferay.taglib.portlet.ActionURLTag - com.liferay.taglib.portlet.ActionURLTei - JSP - - allowEmptyParam - false - true - - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsGroupId - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - name - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - refererGroupId - false - true - - - refererPlid - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - icon-back - com.liferay.taglib.portletext.IconBackTag - JSP - - - icon-close - com.liferay.taglib.portletext.IconCloseTag - JSP - - - icon-configuration - com.liferay.taglib.portletext.IconConfigurationTag - JSP - - - icon-edit - com.liferay.taglib.portletext.IconEditTag - JSP - - - icon-edit-defaults - com.liferay.taglib.portletext.IconEditDefaultsTag - JSP - - - icon-edit-guest - com.liferay.taglib.portletext.IconEditGuestTag - JSP - - - icon-export-import - com.liferay.taglib.portletext.IconExportImportTag - JSP - - - icon-help - com.liferay.taglib.portletext.IconHelpTag - JSP - - - icon-maximize - com.liferay.taglib.portletext.IconMaximizeTag - JSP - - - icon-minimize - com.liferay.taglib.portletext.IconMinimizeTag - JSP - - - icon-options - com.liferay.taglib.portletext.IconOptionsTag - JSP - - - icon-portlet - com.liferay.taglib.portletext.IconPortletTag - JSP - - portlet - false - true - - - - icon-portlet-css - com.liferay.taglib.portletext.IconPortletCssTag - JSP - - - icon-print - com.liferay.taglib.portletext.IconPrintTag - JSP - - - icon-refresh - com.liferay.taglib.portletext.IconRefreshTag - JSP - - - param - com.liferay.taglib.util.ParamTag - empty - - name - true - true - - - value - true - true - - - - preview - com.liferay.taglib.portletext.PreviewTag - JSP - - portletName - true - true - - - queryString - false - true - - - showBorders - false - true - - - width - false - true - - - - - - - renderURL - com.liferay.taglib.portlet.RenderURLTag - com.liferay.taglib.portlet.RenderURLTei - JSP - - allowEmptyParam - false - true - - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsGroupId - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - refererGroupId - false - true - - - refererPlid - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - renderURLParams - com.liferay.taglib.portlet.RenderURLParamsTag - JSP - - varImpl - true - true - - - - - - - resourceURL - com.liferay.taglib.portlet.ResourceURLTag - com.liferay.taglib.portlet.ResourceURLTei - JSP - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsGroupId - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - id - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - refererGroupId - false - true - - - refererPlid - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - runtime - com.liferay.taglib.portletext.RuntimeTag - JSP - - defaultPreferences - false - true - - - portletName - true - true - - - queryString - false - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-security.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-security.tld deleted file mode 100644 index f8e6f6dd82..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-security.tld +++ /dev/null @@ -1,106 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-security - http://liferay.com/tld/security - - doAsURL - com.liferay.taglib.security.DoAsURLTag - com.liferay.taglib.security.DoAsURLTei - JSP - - doAsUserId - false - true - - - var - false - true - - - - encrypt - com.liferay.taglib.security.EncryptTag - JSP - - className - false - true - - - protocol - true - true - - - style - false - true - - - target - false - true - - - unencryptedParams - false - true - - - url - true - true - - - - permissionsURL - com.liferay.taglib.security.PermissionsURLTag - com.liferay.taglib.security.PermissionsURLTei - JSP - - modelResource - true - true - - - modelResourceDescription - true - true - - - redirect - false - true - - - resourceGroupId - false - true - - - resourcePrimKey - true - true - - - roleTypes - false - true - - - var - false - true - - - windowState - false - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-theme.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-theme.tld deleted file mode 100644 index 90ac81db71..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-theme.tld +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 1.0 - 1.1 - theme - http://liferay.com/tld/theme - - defineObjects - com.liferay.taglib.theme.DefineObjectsTag - com.liferay.taglib.theme.DefineObjectsTei - empty - - - include - com.liferay.taglib.theme.IncludeTag - JSP - - page - true - true - - - - layout-icon - com.liferay.taglib.theme.LayoutIconTag - JSP - - layout - true - true - - - - meta-tags - com.liferay.taglib.theme.MetaTagsTag - JSP - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - wrap-portlet - com.liferay.taglib.theme.WrapPortletTag - JSP - - page - true - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-ui.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-ui.tld deleted file mode 100644 index f2b2075166..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-ui.tld +++ /dev/null @@ -1,4112 +0,0 @@ - - - - 1.0 - liferay-ui - http://liferay.com/tld/ui - - app-view-display-style - com.liferay.taglib.ui.AppViewDisplayStyleTag - empty - - displayStyle - true - true - - - displayStyles - true - true - - - requestParams - true - true - - - - app-view-entry - com.liferay.taglib.ui.AppViewEntryTag - empty - - actionJsp - false - true - - - assetCategoryClassName - false - true - - - assetCategoryClassPK - false - true - - - assetTagClassName - false - true - - - assetTagClassPK - false - true - - - author - false - true - - - createDate - false - true - - - cssClass - false - true - - - data - false - true - - - description - false - true - - - displayDate - false - true - - - displayStyle - true - true - - - expirationDate - false - true - - - folder - false - true - - - groupId - false - true - - - latestApprovedVersion - false - true - - - latestApprovedVersionAuthor - false - true - - - locked - false - true - - - modifiedDate - false - true - - - reviewDate - false - true - - - rowCheckerId - false - true - - - rowCheckerName - false - true - - - shortcut - false - true - - - showCheckbox - true - true - - - showLinkTitle - false - true - - - status - false - true - - - thumbnailDivStyle - false - true - - - thumbnailSrc - true - true - - - thumbnailStyle - false - true - - - title - true - true - - - version - false - true - - - url - false - true - - - - app-view-navigation-entry - com.liferay.taglib.ui.AppViewNavigationEntryTag - empty - - actionJsp - false - true - - - cssClass - false - true - - - dataView - false - true - - - entryTitle - true - true - - - iconImage - false - true - - - iconSrc - false - true - - - selected - false - true - - - viewURL - true - true - - - - app-view-toolbar - com.liferay.taglib.ui.AppViewToolbarTag - JSP - - includeDisplayStyle - false - true - - - includeSelectAll - false - true - - - searchJsp - false - true - - - - app-view-search-entry - com.liferay.taglib.ui.AppViewSearchEntryTag - empty - - actionJsp - false - true - - - containerIcon - false - true - - - containerName - false - true - - - containerSrc - false - true - - - containerType - false - true - - - cssClass - false - true - - - description - true - true - - - fileEntryTuples - false - true - - - locked - false - true - - - mbMessages - false - true - - - queryTerms - true - true - - - rowCheckerId - false - true - - - rowCheckerName - false - true - - - showCheckbox - false - true - - - status - false - true - - - thumbnailSrc - false - true - - - title - true - true - - - url - true - true - - - versions - false - true - - - - asset-categories-error - com.liferay.taglib.ui.AssetCategoriesErrorTag - JSP - - - asset-categories-navigation - com.liferay.taglib.ui.AssetCategoriesNavigationTag - JSP - - hidePortletWhenEmpty - false - true - - - vocabularyIds - false - true - - - - asset-categories-selector - com.liferay.taglib.ui.AssetCategoriesSelectorTag - JSP - - className - false - true - - - classPK - false - true - - - contentCallback - false - true - - - curCategoryIds - false - true - - - hiddenInput - false - true - - - - asset-categories-summary - com.liferay.taglib.ui.AssetCategoriesSummaryTag - JSP - - className - true - true - - - classPK - true - true - - - message - false - true - - - portletURL - false - true - - - - asset-links - com.liferay.taglib.ui.AssetLinksTag - JSP - - assetEntryId - false - true - - - className - false - true - - - classPK - false - true - - - - asset-tags-error - com.liferay.taglib.ui.AssetTagsErrorTag - JSP - - - asset-tags-navigation - com.liferay.taglib.ui.AssetTagsNavigationTag - JSP - - classNameId - false - true - - - displayStyle - false - true - - - hidePortletWhenEmpty - false - true - - - maxAssetTags - false - true - - - showAssetCount - false - true - - - showZeroAssetCount - false - true - - - - asset-tags-selector - com.liferay.taglib.ui.AssetTagsSelectorTag - JSP - - autoFocus - false - true - - - className - false - true - - - classPK - false - true - - - contentCallback - false - true - - - curTags - false - true - - - groupIds - false - true - - - hiddenInput - false - true - - - id - false - true - - - - asset-tags-summary - com.liferay.taglib.ui.AssetTagsSummaryTag - JSP - - assetTagNames - false - true - - - className - true - true - - - classPK - true - true - - - message - false - true - - - portletURL - false - true - - - - breadcrumb - com.liferay.taglib.ui.BreadcrumbTag - JSP - - displayStyle - false - true - - - portletURL - false - true - - - selLayout - false - true - - - selLayoutParam - false - true - - - showCurrentGroup - false - true - - - showCurrentPortlet - false - true - - - showGuestGroup - false - true - - - showLayout - false - true - - - showParentGroups - false - true - - - showPortletBreadcrumb - false - true - - - - calendar - com.liferay.taglib.ui.CalendarTag - JSP - - data - false - true - - - day - false - true - - - headerFormat - false - true - - - headerPattern - false - true - - - month - true - true - - - showAllPotentialWeeks - false - true - - - year - true - true - - - - captcha - com.liferay.taglib.ui.CaptchaTag - JSP - - url - true - true - - - - categorization-filter - com.liferay.taglib.ui.CategorizationFilterTag - JSP - - assetType - false - true - - - portletURL - false - true - - - - custom-attribute - com.liferay.taglib.ui.CustomAttributeTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - label - false - true - - - name - true - true - - - - custom-attribute-list - com.liferay.taglib.ui.CustomAttributeListTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - ignoreAttributeNames - false - true - - - label - false - true - - - - custom-attributes-available - com.liferay.taglib.ui.CustomAttributesAvailableTag - JSP - - className - true - true - - - classPK - false - true - - - companyId - false - true - - - ignoreAttributeNames - false - true - - - editable - false - true - - - - ddm-template-selector - com.liferay.taglib.ui.DDMTemplateSelectorTag - JSP - - classNameId - true - true - - - displayStyle - true - true - - - displayStyleGroupId - true - true - - - displayStyles - false - true - - - icon - false - true - - - label - false - true - - - refreshURL - false - true - - - showEmptyOption - false - true - - - - diff - com.liferay.taglib.ui.DiffTag - JSP - - diffResults - true - true - - - sourceName - true - true - - - targetName - true - true - - - - diff-html - com.liferay.taglib.ui.DiffHtmlTag - JSP - - diffHtmlResults - true - true - - - - discussion - com.liferay.taglib.ui.DiscussionTag - JSP - - assetEntryVisible - false - true - - - className - true - true - - - classPK - true - true - - - formAction - true - true - - - formName - false - true - - - hideControls - false - true - - - permissionClassName - false - true - - - permissionClassPK - false - true - - - ratingsEnabled - false - true - - - redirect - false - true - - - Deprecated as of 6.2.0, with no direct replacement - subject - false - true - - - userId - true - true - - - - error - com.liferay.taglib.ui.ErrorTag - com.liferay.taglib.ui.ErrorTei - JSP - - exception - false - true - - - focusField - false - true - - - key - false - true - - - message - false - true - - - rowBreak - false - true - - - translateMessage - false - true - - - - error-marker - com.liferay.taglib.ui.ErrorMarkerTag - JSP - - key - false - true - - - value - false - true - - - - flags - com.liferay.taglib.ui.FlagsTag - JSP - - className - true - true - - - classPK - true - true - - - contentTitle - true - true - - - label - false - true - - - message - false - true - - - reportedUserId - true - true - - - - flash - com.liferay.taglib.ui.FlashTag - JSP - - align - false - true - - - allowFullScreen - false - true - - - allowScriptAccess - false - true - - - base - false - true - - - bgcolor - false - true - - - devicefont - false - true - - - flashvars - false - true - - - height - false - true - - - id - false - true - - - loop - false - true - - - menu - false - true - - - movie - true - true - - - play - false - true - - - quality - false - true - - - salign - false - true - - - scale - false - true - - - swliveconnect - false - true - - - version - false - true - - - width - false - true - - - wmode - false - true - - - - form-navigator - com.liferay.taglib.ui.FormNavigatorTag - JSP - - backURL - false - true - - - categoryNames - true - true - - - categorySections - true - true - - - displayStyle - false - true - - - formName - false - true - - - htmlBottom - false - true - - - htmlTop - false - true - - - jspPath - false - true - - - showButtons - false - true - - - - group-search - com.liferay.taglib.ui.GroupSearchTag - JSP - - groupParams - true - true - - - portletURL - true - true - - - rowChecker - false - true - - - - header - com.liferay.taglib.ui.HeaderTag - JSP - - backLabel - false - true - - - backURL - false - true - - - cssClass - false - true - - - escapeXml - false - true - - - localizeTitle - false - true - - - showBackURL - false - true - - - title - true - true - - - - icon - com.liferay.taglib.ui.IconTag - JSP - - alt - false - true - - - ariaRole - false - true - - - cssClass - false - true - - - data - false - true - - - iconCssClass - false - true - - - id - false - true - - - image - false - true - - - imageHover - false - true - - - label - false - true - - - lang - false - true - - - linkCssClass - false - true - - - localizeMessage - false - true - - - message - false - true - - - method - false - true - - - onClick - false - true - - - src - false - true - - - srcHover - false - true - - - target - false - true - - - toolTip - false - true - - - url - false - true - - - useDialog - false - true - - - - icon-deactivate - com.liferay.taglib.ui.IconDeactivateTag - JSP - - label - false - true - - - url - true - true - - - - icon-delete - com.liferay.taglib.ui.IconDeleteTag - JSP - - confirmation - false - true - - - cssClass - false - true - - - id - false - true - - - image - false - true - - - label - false - true - - - message - false - true - - - method - false - true - - - trash - false - true - - - url - true - true - - - - icon-help - com.liferay.taglib.ui.IconHelpTag - JSP - - message - true - true - - - - icon-list - com.liferay.taglib.ui.IconListTag - JSP - - showWhenSingleIcon - false - true - - - - icon-menu - com.liferay.taglib.ui.IconMenuTag - JSP - - cssClass - false - true - - - direction - false - true - - - disabled - false - true - - - extended - false - true - - - icon - false - true - - - id - false - true - - - localizeMessage - false - true - - - maxDisplayItems - false - true - - - message - false - true - - - select - false - true - - - showExpanded - false - true - - - showArrow - false - true - - - showWhenSingleIcon - false - true - - - triggerCssClass - false - true - - - useIconCaret - false - true - - - - input-asset-links - com.liferay.taglib.ui.InputAssetLinksTag - JSP - - assetEntryId - false - true - - - className - false - true - - - classPK - false - true - - - - input-checkbox - com.liferay.taglib.ui.InputCheckBoxTag - JSP - - cssClass - false - true - - - defaultValue - false - true - - - disabled - false - true - - - formName - false - true - - - id - false - true - - - onClick - false - true - - - param - true - true - - - - input-date - com.liferay.taglib.ui.InputDateTag - JSP - - autoFocus - false - true - - - cssClass - false - true - - - dayParam - false - true - - - dayValue - false - true - - - disableNamespace - false - true - - - disabled - false - true - - - firstDayOfWeek - false - true - - - formName - false - true - - - monthAndYearParam - false - true - - - monthParam - false - true - - - monthValue - false - true - - - name - false - true - - - yearParam - false - true - - - yearValue - false - true - - - - input-editor - com.liferay.taglib.ui.InputEditorTag - JSP - - configParams - false - true - - - contentsLanguageId - false - true - - - cssClass - false - true - - - editorImpl - false - true - - - inlineEdit - false - true - - - inlineEditSaveURL - false - true - - - fileBrowserParams - false - true - - - height - false - true - - - initMethod - false - true - - - name - false - true - - - onBlurMethod - false - true - - - onChangeMethod - false - true - - - onFocusMethod - false - true - - - resizable - false - true - - - skipEditorLoading - false - true - - - toolbarSet - false - true - - - width - false - true - - - - input-field - com.liferay.taglib.ui.InputFieldTag - JSP - - autoFocus - false - true - - - autoSize - false - true - - - bean - false - true - - - cssClass - false - true - - - dateTogglerCheckboxLabel - false - true - - - defaultLanguageId - false - true - - - defaultValue - false - true - - - disabled - false - true - - - field - true - true - - - fieldParam - false - true - - - formName - false - true - - - format - false - true - - - id - false - true - - - ignoreRequestValue - false - true - - - languageId - false - true - - - model - true - true - - - placeholder - false - true - - - - input-localized - com.liferay.taglib.ui.InputLocalizedTag - JSP - - autoFocus - false - true - - - autoSize - false - true - - - availableLocales - false - true - - - cssClass - false - true - - - defaultLanguageId - false - true - - - disabled - false - true - - - displayWidth - false - true - - - formName - false - true - - - id - false - true - - - ignoreRequestValue - false - true - - - languageId - false - true - - - maxLength - false - true - - - name - true - true - - - type - false - true - - - xml - true - true - - true - - - input-move-boxes - com.liferay.taglib.ui.InputMoveBoxesTag - JSP - - cssClass - false - true - - - leftBoxName - true - true - - - leftList - true - true - - - leftOnChange - false - true - - - leftReorder - false - true - - - leftTitle - true - true - - - rightBoxName - true - true - - - rightList - true - true - - - rightOnChange - false - true - - - rightReorder - false - true - - - rightTitle - true - true - - - - input-permissions - com.liferay.taglib.ui.InputPermissionsTag - JSP - - formName - false - true - - - modelName - false - true - - - - input-permissions-params - com.liferay.taglib.ui.InputPermissionsParamsTag - JSP - - modelName - true - true - - - - input-repeat - com.liferay.taglib.ui.InputRepeatTag - JSP - - cssClass - false - true - - - event - false - true - - - - input-resource - com.liferay.taglib.ui.InputResourceTag - JSP - - cssClass - false - true - - - id - false - true - - - title - false - true - - - url - true - true - - - - input-scheduler - com.liferay.taglib.ui.InputSchedulerTag - JSP - - - input-search - com.liferay.taglib.ui.InputSearchTag - JSP - - autoFocus - false - true - - - buttonLabel - false - true - - - cssClass - false - true - - - id - false - true - - - name - false - true - - - placeholder - false - true - - - showButton - false - true - - - title - false - true - - - - input-select - com.liferay.taglib.ui.InputSelectTag - JSP - - cssClass - false - true - - - defaultValue - false - true - - - disabled - false - true - - - formName - false - true - - - param - true - true - - - - input-textarea - com.liferay.taglib.ui.InputTextAreaTag - JSP - - cssClass - false - true - - - defaultValue - false - true - - - disabled - false - true - - - param - true - true - - - - input-time - com.liferay.taglib.ui.InputTimeTag - JSP - - amPmParam - true - true - - - amPmValue - false - true - - - cssClass - false - true - - - dateParam - false - true - - - dateValue - false - true - - - disabled - false - true - - - hourParam - true - true - - - hourValue - false - true - - - minuteInterval - false - true - - - minuteParam - true - true - - - minuteValue - false - true - - - name - false - true - - - - input-time-zone - com.liferay.taglib.ui.InputTimeZoneTag - JSP - - autoFocus - false - true - - - cssClass - false - true - - - daylight - false - true - - - disabled - false - true - - - displayStyle - false - true - - - name - true - true - - - nullable - false - true - - - value - false - true - - - - journal-article - com.liferay.taglib.ui.JournalArticleTag - JSP - - articleId - false - true - - - articlePage - false - true - - - articleResourcePrimKey - false - true - - - groupId - false - true - - - languageId - false - true - - - showAvailableLocales - false - true - - - showTitle - false - true - - - templateId - false - true - - - xmlRequest - false - true - - - - journal-content-search - com.liferay.taglib.ui.JournalContentSearchTag - JSP - - showListed - false - true - - - targetPortletId - false - true - - - type - false - true - - - - language - com.liferay.taglib.ui.LanguageTag - JSP - - displayCurrentLocale - false - true - - - displayStyle - false - true - - - formAction - false - true - - - formName - false - true - - - languageId - false - true - - - languageIds - false - true - - - name - false - true - - - - logo-selector - com.liferay.taglib.ui.LogoSelectorTag - JSP - - currentLogoURL - false - true - - - defaultLogoURL - false - true - - - editLogoURL - false - true - - - imageId - false - true - - - logoDisplaySelector - false - true - - - showBackground - false - true - - - - membership-policy-error - com.liferay.taglib.ui.MembershipPolicyErrorTag - JSP - - - message - com.liferay.taglib.ui.MessageTag - JSP - - arguments - false - true - - - key - true - true - - - localizeKey - false - true - - - translateArguments - false - true - - - unicode - false - true - - - - my-sites - com.liferay.taglib.ui.MySitesTag - JSP - - classNames - false - true - - - cssClass - false - true - - - includeControlPanel - false - true - - - max - false - true - - - - navigation - com.liferay.taglib.ui.NavigationTag - JSP - - bulletStyle - false - true - - - displayStyle - false - true - - - headerType - false - true - - - includedLayouts - false - true - - - nestedChildren - false - true - - - preview - false - true - - - rootLayoutLevel - false - true - - - rootLayoutType - false - true - - - - page-iterator - com.liferay.taglib.ui.PageIteratorTag - JSP - - cur - true - true - - - curParam - true - true - - - delta - false - true - - - deltaConfigurable - false - true - - - deltaParam - false - true - - - formName - false - true - - - id - false - true - - - jsCall - false - true - - - maxPages - false - true - - - target - false - true - - - total - true - true - - - type - false - true - - - url - false - true - - - - panel - com.liferay.taglib.ui.PanelTag - JSP - - collapsible - false - true - - - cssClass - false - true - - - defaultState - false - true - - - extended - false - true - - - helpMessage - false - true - - - iconCssClass - false - true - - - id - false - true - - - parentId - false - true - - - persistState - false - true - - - state - false - true - - - title - true - true - - - - panel-container - com.liferay.taglib.ui.PanelContainerTag - JSP - - accordion - false - true - - - cssClass - false - true - - - extended - false - true - - - id - false - true - - - persistState - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - png-image - com.liferay.taglib.ui.PngImageTag - JSP - - height - true - true - - - image - true - true - - - width - true - true - - - - progress - com.liferay.taglib.ui.ProgressTag - JSP - - height - false - true - - - id - true - true - - - message - false - true - - - sessionKey - true - true - - - updatePeriod - false - true - - - - ratings - com.liferay.taglib.ui.RatingsTag - JSP - - className - true - true - - - classPK - true - true - - - numberOfStars - false - true - - - ratingsEntry - false - true - - - ratingsStats - false - true - - - type - false - true - - - url - false - true - - - - ratings-score - com.liferay.taglib.ui.RatingsScoreTag - JSP - - score - true - true - - - - restore-entry - com.liferay.taglib.ui.RestoreEntryTag - JSP - - duplicateEntryAction - false - true - - - overrideMessage - false - true - - - renameMessage - false - true - - - restoreEntryAction - false - true - - - - rss - com.liferay.taglib.ui.RSSTag - JSP - - delta - false - true - - - displayStyle - false - true - - - feedType - false - true - - - message - false - true - - - name - false - true - - - resourceURL - false - true - - - url - false - true - - - - rss-settings - com.liferay.taglib.ui.RSSSettingsTag - JSP - - delta - false - true - - - displayStyle - false - true - - - displayStyles - false - true - - - enabled - false - true - - - feedType - false - true - - - name - false - true - - - nameEnabled - false - true - - - - search - com.liferay.taglib.ui.SearchTag - JSP - - - search-container - com.liferay.taglib.ui.SearchContainerTag - com.liferay.taglib.ui.SearchContainerTei - JSP - - curParam - false - true - - - delta - false - true - - - deltaConfigurable - false - true - - - deltaParam - false - true - - - displayTerms - false - true - - - emptyResultsMessage - false - true - - - headerNames - false - true - - - hover - false - true - - - id - false - true - - - iteratorURL - false - true - - - orderByCol - false - true - - - orderByColParam - false - true - - - orderByComparator - false - true - - - orderByType - false - true - - - orderByTypeParam - false - true - - - rowChecker - false - true - - - searchContainer - false - true - - - searchTerms - false - true - - - total - false - true - - - totalVar - false - true - - - var - false - true - - - - search-container-column-button - com.liferay.taglib.ui.SearchContainerColumnButtonTag - JSP - - align - false - true - - - colspan - false - true - - - cssClass - false - true - - - href - true - true - - - index - false - true - - - name - false - true - - - valign - false - true - - - - search-container-column-date - com.liferay.taglib.ui.SearchContainerColumnDateTag - JSP - - align - false - true - - - colspan - false - true - - - cssClass - false - true - - - href - false - true - - - index - false - true - - - name - false - true - - - orderable - false - true - - - orderableProperty - false - true - - - property - false - true - - - valign - false - true - - - value - false - true - - - - search-container-column-jsp - com.liferay.taglib.ui.SearchContainerColumnJSPTag - JSP - - align - false - true - - - colspan - false - true - - - cssClass - false - true - - - index - false - true - - - name - false - true - - - path - true - true - - - valign - false - true - - - - search-container-column-status - com.liferay.taglib.ui.SearchContainerColumnStatusTag - JSP - - align - false - true - - - colspan - false - true - - - cssClass - false - true - - - href - false - true - - - index - false - true - - - name - false - true - - - orderable - false - true - - - orderableProperty - false - true - - - property - false - true - - - valign - false - true - - - status - false - true - - - statusByUserId - false - true - - - statusDate - false - true - - - - search-container-column-text - com.liferay.taglib.ui.SearchContainerColumnTextTag - com.liferay.taglib.ui.SearchContainerColumnTextTei - JSP - - align - false - true - - - buffer - false - true - - - colspan - false - true - - - cssClass - false - true - - - href - false - true - - - index - false - true - - - name - false - true - - - orderable - false - true - - - orderableProperty - false - true - - - property - false - true - - - target - false - true - - - title - false - true - - - translate - false - true - - - valign - false - true - - - value - false - true - - - - search-container-results - com.liferay.taglib.ui.SearchContainerResultsTag - com.liferay.taglib.ui.SearchContainerResultsTei - JSP - - results - false - true - - - resultsVar - false - true - - - Deprecated as of 6.2.0, replaced by liferay-ui:search-container#total - total - false - true - - - Deprecated as of 6.2.0, replaced by liferay-ui:search-container#totalVar - totalVar - false - true - - - - search-container-row - com.liferay.taglib.ui.SearchContainerRowTag - com.liferay.taglib.ui.SearchContainerRowTei - JSP - - bold - false - true - - - className - true - true - - - escapedModel - false - true - - - indexVar - false - true - - - keyProperty - false - true - - - modelVar - false - true - - - rowIdProperty - false - true - - - rowVar - false - true - - - servletContext - false - true - - - stringKey - false - true - - - - search-container-row-parameter - com.liferay.taglib.ui.SearchContainerRowParameterTag - JSP - - name - true - true - - - value - true - true - - - - search-form - com.liferay.taglib.ui.SearchFormTag - JSP - - page - true - true - - - searchContainer - false - true - - - servletContext - false - true - - - showAddButton - false - true - - - - search-iterator - com.liferay.taglib.ui.SearchIteratorTag - JSP - - paginate - false - true - - - searchContainer - false - true - - - type - false - true - - - - search-paginator - com.liferay.taglib.ui.SearchPaginatorTag - JSP - - id - false - true - - - searchContainer - true - true - - - type - false - true - - - - search-speed - com.liferay.taglib.ui.SearchSpeedTag - JSP - - hits - true - true - - - searchContainer - true - true - - - - search-toggle - com.liferay.taglib.ui.SearchToggleTag - JSP - - autoFocus - false - true - - - buttonLabel - false - true - - - displayTerms - true - true - - - id - true - true - - - width - false - true - - - - section - com.liferay.taglib.ui.SectionTag - com.liferay.taglib.ui.SectionTei - JSP - - - sites-directory - com.liferay.taglib.ui.SitesDirectoryTag - JSP - - displayStyle - false - true - - - sites - false - true - - - - social-activities - com.liferay.taglib.ui.SocialActivitiesTag - JSP - - activities - false - true - - - className - false - true - - - classPK - false - true - - - displayRSSFeed - false - true - - - feedDelta - false - true - - - feedDisplayStyle - false - true - - - feedEnabled - false - true - - - feedLink - false - true - - - feedLinkMessage - false - true - - - feedTitle - false - true - - - feedType - false - true - - - - social-bookmark - com.liferay.taglib.ui.SocialBookmarkTag - JSP - - contentId - false - true - - - target - false - true - - - title - true - true - - - type - true - true - - - url - true - true - - - - social-bookmarks - com.liferay.taglib.ui.SocialBookmarksTag - JSP - - contentId - false - true - - - displayStyle - false - true - - - target - false - true - - - title - true - true - - - types - false - true - - - url - true - true - - - - staging - com.liferay.taglib.ui.StagingTag - JSP - - cssClass - false - true - - - extended - false - true - - - groupId - false - true - - - icon - false - true - - - layoutSetBranchId - false - true - - - message - false - true - - - onlyActions - false - true - - - privateLayout - false - true - - - selPlid - false - true - - - showManageBranches - false - true - - - - success - com.liferay.taglib.ui.SuccessTag - empty - - key - true - true - - - message - true - true - - - translateMessage - false - true - - - - table-iterator - com.liferay.taglib.ui.TableIteratorTag - com.liferay.taglib.ui.TableIteratorTei - JSP - - bodyPage - false - true - - - list - true - true - - - listType - true - true - - - rowBreak - false - true - - - rowLength - true - true - - - rowPadding - false - true - - - rowValign - false - true - - - width - false - true - - - - tabs - com.liferay.taglib.ui.TabsTag - JSP - - - backLabel - false - true - - - backURL - false - true - - - formName - false - true - - - names - true - true - - - onClick - false - true - - - param - false - true - - - portletURL - false - true - - - refresh - false - true - - - tabsValues - false - true - - - type - false - true - - - url - false - true - - - url0 - false - true - - - url1 - false - true - - - url2 - false - true - - - url3 - false - true - - - url4 - false - true - - - url5 - false - true - - - url6 - false - true - - - url7 - false - true - - - url8 - false - true - - - url9 - false - true - - - value - false - true - - - - toggle - com.liferay.taglib.ui.ToggleTag - JSP - - defaultShowContent - false - true - - - hideImage - false - true - - - hideMessage - false - true - - - id - true - true - - - showImage - false - true - - - showMessage - false - true - - - stateVar - false - true - - - - toggle-area - com.liferay.taglib.ui.ToggleAreaTag - JSP - - align - false - true - - - defaultShowContent - false - true - - - hideImage - false - true - - - hideMessage - false - true - - - id - false - true - - - showImage - false - true - - - showMessage - false - true - - - stateVar - false - true - - - - toggle-value - com.liferay.taglib.ui.ToggleValueTag - JSP - - defaultValue - false - true - - - id - true - true - - - - trash-empty - com.liferay.taglib.ui.TrashEmptyTag - empty - - confirmMessage - false - true - - - emptyMessage - false - true - - - infoMessage - false - true - - - portletURL - true - true - - - totalEntries - true - true - - - - trash-undo - com.liferay.taglib.ui.TrashUndoTag - empty - - portletURL - true - true - - - redirect - false - true - - - - upload-progress - com.liferay.taglib.ui.UploadProgressTag - JSP - - height - false - true - - - id - true - true - - - message - false - true - - - redirect - false - true - - - updatePeriod - false - true - - - - user-display - com.liferay.taglib.ui.UserDisplayTag - com.liferay.taglib.ui.UserDisplayTei - JSP - - displayStyle - false - true - - - url - false - true - - - userId - true - true - - - userName - false - true - - - - user-search - com.liferay.taglib.ui.UserSearchTag - JSP - - portletURL - true - true - - - rowChecker - false - true - - - userParams - true - true - - - - webdav - com.liferay.taglib.ui.WebDAVTag - JSP - - path - true - true - - - - write - com.liferay.taglib.ui.WriteTag - JSP - - bean - true - true - - - property - true - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-util.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-util.tld deleted file mode 100644 index 72a4caf0bd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/tld/liferay-util.tld +++ /dev/null @@ -1,141 +0,0 @@ - - - - - 1.2 - 1.1 - liferay-util - http://liferay.com/tld/util - - body-bottom - com.liferay.taglib.util.BodyBottomTag - JSP - - outputKey - false - true - - - - body-top - com.liferay.taglib.util.BodyTopTag - JSP - - outputKey - false - true - - - - buffer - com.liferay.taglib.util.BufferTag - com.liferay.taglib.util.BufferTei - JSP - - var - true - true - - - - get-url - com.liferay.taglib.util.GetUrlTag - com.liferay.taglib.util.GetUrlTei - JSP - - expires - false - true - - - url - true - true - - - var - false - true - - - - html-bottom - com.liferay.taglib.util.HtmlBottomTag - JSP - - outputKey - false - true - - - position - false - true - - - - html-top - com.liferay.taglib.util.HtmlTopTag - JSP - - outputKey - false - true - - - position - false - true - - - - include - com.liferay.taglib.util.IncludeTag - JSP - - page - true - true - - - portletId - false - true - - - servletContext - false - true - - - strict - false - true - - - useCustomPage - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - whitespace-remover - com.liferay.taglib.util.WhitespaceRemoverTag - JSP - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/web.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/web.xml deleted file mode 100644 index 1aa8cdb8d7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/css/.sass-cache/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/css/.sass-cache/main.css deleted file mode 100644 index 8b13789179..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/css/.sass-cache/main.css +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/css/main.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/html/demoactioncommand/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/html/demoactioncommand/view.jsp deleted file mode 100644 index 7f60990390..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/html/demoactioncommand/view.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> -<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> -<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> -<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %> - -<%@ page import="com.liferay.portal.kernel.util.ParamUtil" %> -<%@ page import="javax.portlet.ActionRequest" %> - - - -<% -String name = ParamUtil.getString(renderRequest, "name"); -%> -<% -if(name != "") { -%> - Hello <%=name %> -<% -} -else { -%> - - - - - - - -<%} %> diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/icon.png b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/icon.png deleted file mode 100644 index 807b862cfc..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/icon.png and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/js/main.js b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/js/main.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/view.jsp deleted file mode 100644 index 61a1b4628d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/actioncommand-demo-portlet/docroot/view.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<% -/** - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * The contents of this file are subject to the terms of the Liferay Enterprise - * Subscription License ("License"). You may not use this file except in - * compliance with the License. You can obtain a copy of the License by - * contacting Liferay, Inc. See the License for the specific language governing - * permissions and limitations under the License, including but not limited to - * distribution rights of the Software. - * - * - * - */ -%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - - - -This is the Actioncommand Demo portlet. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/classnameid-related-test/BaseDDMDisplayMethodTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/classnameid-related-test/BaseDDMDisplayMethodTest.java deleted file mode 100644 index a4eb542f64..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/classnameid-related-test/BaseDDMDisplayMethodTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * 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. - */ - -import com.liferay.dynamic.data.mapping.io.DDMFormValuesJSONDeserializer; -import com.liferay.dynamic.data.mapping.io.DDMFormXSDDeserializer; -import com.liferay.bookmarks.service.persistence.BookmarksEntryFinder; - -public class BaseDDMDisplayMethodTest { - - @Test - public void testInvocationMethod() throws Exception { - - int count = _alloyServiceInvoker.dynamicQueryCount(_dynamicQuery); - - boolean isShowAddStructureButton = _baseDDMDisplay.isShowAddStructureButton(); - - boolean isEditable = _ddl.isEditable(_preferences, "", _groupId); - - DDMExpression _ddmExpression = _ddmExpressionFactory.createDoubleDDMExpression(""); - - List ddmFormFieldEvaluationResultList = _ddmFormFieldEvaluationResult.getNestedDDMFormFieldEvaluationResults(); - - ResourceBundle resourceBundle = _ddmFormFieldFactoryHelper.getResourceBundle(_locale); - - _calendarBookingService.invokeTransition(_calendarBookingId, _status, _serviceContext); - - CalendarBookingServiceUtil.invokeTransition(_calendarBookingId, _status, _serviceContext); - - DDLRecord ddlLocalRecord =_ddlRecordLocalService.deleteRecordLocale(_recordId, _locale, _serviceContext); - - DDLRecord _ddlLocalRecord = DDLRecordLocalServiceUtil.deleteRecordLocale(_recordId, _locale, _serviceContext); - - DDLRecord ddlRecord = _ddlRecordService.deleteRecordLocale(_recordId, _locale, _serviceContext); - - DDLRecord _ddlRecord = DDLRecordServiceUtil.deleteRecordLocale(_recordId, _locale, _serviceContext); - - DDMStructure ddmStructure = _ddmStructureLocalService.updateXSD(_structureId, "", _serviceContext); - - DDMStructure _ddmStructure = DDMStructureLocalServiceUtil.updateXSD(_structureId, "", _serviceContext); - } - - private AlloyServiceInvoker _alloyServiceInvoker; - - private DynamicQuery _dynamicQuery; - - @Reference - private BaseDDMDisplay _baseDDMDisplay; - - @Reference - private DDL _ddl; - - @Reference - private PortletPreferences _preferences; - - private long _groupId; - - @Reference - private DDMExpressionFactory _ddmExpressionFactory; - - private DDMFormFieldEvaluationResult _ddmFormFieldEvaluationResult; - - private DDMFormFieldFactoryHelper _ddmFormFieldFactoryHelper; - - private CalendarBookingService _calendarBookingService; - - private DDLRecordLocalService _ddlRecordLocalService; - - private DDLRecordService _ddlRecordService; - - private DDMStructureLocalService _ddmStructureLocalService; - - @Reference - private Locale _locale; - - private long _calendarBookingId = 1; - - private int _status = 1; - - private long _recordId = 1; - - private long _structureId = 1; - - @Reference - private ServiceContext _serviceContext; - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/classnameid-related-test/DDMStructureClassNameIdRelatedTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/classnameid-related-test/DDMStructureClassNameIdRelatedTest.java deleted file mode 100644 index 5d9e1a9f8a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/classnameid-related-test/DDMStructureClassNameIdRelatedTest.java +++ /dev/null @@ -1,642 +0,0 @@ -/** - * 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 com.liferay.dynamic.data.mapping.service.persistence.test; - -import com.liferay.arquillian.extension.junit.bridge.junit.Arquillian; -import com.liferay.dynamic.data.mapping.exception.NoSuchStructureLinkException; -import com.liferay.dynamic.data.mapping.model.DDMStructureLink; -import com.liferay.dynamic.data.mapping.service.DDMStructureLinkLocalServiceUtil; -import com.liferay.dynamic.data.mapping.service.persistence.DDMStructureLinkPersistence; -import com.liferay.dynamic.data.mapping.service.persistence.DDMStructureLinkUtil; -import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; -import com.liferay.portal.kernel.dao.orm.ProjectionFactoryUtil; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; -import com.liferay.portal.kernel.test.ReflectionTestUtil; -import com.liferay.portal.kernel.test.rule.AggregateTestRule; -import com.liferay.portal.kernel.test.util.RandomTestUtil; -import com.liferay.portal.kernel.transaction.Propagation; -import com.liferay.portal.kernel.util.IntegerWrapper; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil; -import com.liferay.portal.test.rule.LiferayIntegrationTestRule; -import com.liferay.portal.test.rule.PersistenceTestRule; -import com.liferay.portal.test.rule.TransactionalTestRule; - -import com.liferay.dynamic.data.mapping.service.persistence.DDMStructureLinkUtil; -import com.liferay.dynamic.data.mapping.service.persistence.DDMStructurePersistence; -import com.liferay.dynamic.data.mapping.service.persistence.DDMStructureUtil; -import com.liferay.dynamic.data.mapping.service.persistence.DDMTemplateLinkPersistence; -import com.liferay.dynamic.data.mapping.service.persistenceDDMTemplateLinkUtil; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * @generated - */ -@RunWith(Arquillian.class) -public class DDMStructureClassNameIdRelatedTest { - - @ClassRule - @Rule - public static final AggregateTestRule aggregateTestRule = - new AggregateTestRule( - new LiferayIntegrationTestRule(), PersistenceTestRule.INSTANCE, - new TransactionalTestRule( - Propagation.REQUIRED, - "com.liferay.dynamic.data.mapping.service")); - - @Before - public void setUp() { - _persistence = DDMStructureLinkUtil.getPersistence(); - - Class clazz = _persistence.getClass(); - - _dynamicQueryClassLoader = clazz.getClassLoader(); - } - - @After - public void tearDown() throws Exception { - Iterator iterator = _ddmStructureLinks.iterator(); - - while (iterator.hasNext()) { - _persistence.remove(iterator.next()); - - iterator.remove(); - } - } - - @Test - public void testCreate() throws Exception { - long pk = RandomTestUtil.nextLong(); - - DDMStructureLink ddmStructureLink = _persistence.create(pk); - - Assert.assertNotNull(ddmStructureLink); - - Assert.assertEquals(ddmStructureLink.getPrimaryKey(), pk); - } - - @Test - public void testRemove() throws Exception { - DDMStructureLink newDDMStructureLink = addDDMStructureLink(); - - _persistence.remove(newDDMStructureLink); - - DDMStructureLink existingDDMStructureLink = - _persistence.fetchByPrimaryKey(newDDMStructureLink.getPrimaryKey()); - - Assert.assertNull(existingDDMStructureLink); - } - - @Test - public void testUpdateNew() throws Exception { - addDDMStructureLink(); - } - - @Test - public void testUpdateExisting() throws Exception { - long pk = RandomTestUtil.nextLong(); - - DDMStructureLink newDDMStructureLink = _persistence.create(pk); - - newDDMStructureLink.setMvccVersion(RandomTestUtil.nextLong()); - - newDDMStructureLink.setCtCollectionId(RandomTestUtil.nextLong()); - - newDDMStructureLink.setCompanyId(RandomTestUtil.nextLong()); - - newDDMStructureLink.setClassNameId(RandomTestUtil.nextLong()); - - newDDMStructureLink.setClassPK(RandomTestUtil.nextLong()); - - newDDMStructureLink.setStructureId(RandomTestUtil.nextLong()); - - _ddmStructureLinks.add(_persistence.update(newDDMStructureLink)); - - DDMStructureLink existingDDMStructureLink = - _persistence.findByPrimaryKey(newDDMStructureLink.getPrimaryKey()); - - Assert.assertEquals( - existingDDMStructureLink.getMvccVersion(), - newDDMStructureLink.getMvccVersion()); - Assert.assertEquals( - existingDDMStructureLink.getCtCollectionId(), - newDDMStructureLink.getCtCollectionId()); - Assert.assertEquals( - existingDDMStructureLink.getStructureLinkId(), - newDDMStructureLink.getStructureLinkId()); - Assert.assertEquals( - existingDDMStructureLink.getCompanyId(), - newDDMStructureLink.getCompanyId()); - Assert.assertEquals( - existingDDMStructureLink.getClassNameId(), - newDDMStructureLink.getClassNameId()); - Assert.assertEquals( - existingDDMStructureLink.getClassPK(), - newDDMStructureLink.getClassPK()); - Assert.assertEquals( - existingDDMStructureLink.getStructureId(), - newDDMStructureLink.getStructureId()); - } - - @Test - public void testCountByClassNameId() throws Exception { - _persistence.countByClassNameId(RandomTestUtil.nextLong()); - - _persistence.countByClassNameId(0L); - } - - @Test - public void testCountByStructureId() throws Exception { - _persistence.countByStructureId(RandomTestUtil.nextLong()); - - _persistence.countByStructureId(0L); - } - - @Test - public void testCountByC_C() throws Exception { - _persistence.countByC_C( - RandomTestUtil.nextLong(), RandomTestUtil.nextLong()); - - _persistence.countByC_C(0L, 0L); - } - - @Test - public void testCountByC_C_S() throws Exception { - _persistence.countByC_C_S( - RandomTestUtil.nextLong(), RandomTestUtil.nextLong(), - RandomTestUtil.nextLong()); - - _persistence.countByC_C_S(0L, 0L, 0L); - } - - @Test - public void testFindByPrimaryKeyExisting() throws Exception { - DDMStructureLink newDDMStructureLink = addDDMStructureLink(); - - DDMStructureLink existingDDMStructureLink = - _persistence.findByPrimaryKey(newDDMStructureLink.getPrimaryKey()); - - Assert.assertEquals(existingDDMStructureLink, newDDMStructureLink); - } - - @Test(expected = NoSuchStructureLinkException.class) - public void testFindByPrimaryKeyMissing() throws Exception { - long pk = RandomTestUtil.nextLong(); - - _persistence.findByPrimaryKey(pk); - } - - @Test - public void testFindAll() throws Exception { - _persistence.findAll( - QueryUtil.ALL_POS, QueryUtil.ALL_POS, getOrderByComparator()); - } - - protected OrderByComparator getOrderByComparator() { - return OrderByComparatorFactoryUtil.create( - "DDMStructureLink", "mvccVersion", true, "ctCollectionId", true, - "structureLinkId", true, "companyId", true, "classNameId", true, - "classPK", true, "structureId", true); - } - - @Test - public void testFetchByPrimaryKeyExisting() throws Exception { - DDMStructureLink newDDMStructureLink = addDDMStructureLink(); - - DDMStructureLink existingDDMStructureLink = - _persistence.fetchByPrimaryKey(newDDMStructureLink.getPrimaryKey()); - - Assert.assertEquals(existingDDMStructureLink, newDDMStructureLink); - } - - @Test - public void testFetchByPrimaryKeyMissing() throws Exception { - long pk = RandomTestUtil.nextLong(); - - DDMStructureLink missingDDMStructureLink = - _persistence.fetchByPrimaryKey(pk); - - Assert.assertNull(missingDDMStructureLink); - } - - @Test - public void testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereAllPrimaryKeysExist() - throws Exception { - - DDMStructureLink newDDMStructureLink1 = addDDMStructureLink(); - DDMStructureLink newDDMStructureLink2 = addDDMStructureLink(); - - Set primaryKeys = new HashSet(); - - primaryKeys.add(newDDMStructureLink1.getPrimaryKey()); - primaryKeys.add(newDDMStructureLink2.getPrimaryKey()); - - Map ddmStructureLinks = - _persistence.fetchByPrimaryKeys(primaryKeys); - - Assert.assertEquals(2, ddmStructureLinks.size()); - Assert.assertEquals( - newDDMStructureLink1, - ddmStructureLinks.get(newDDMStructureLink1.getPrimaryKey())); - Assert.assertEquals( - newDDMStructureLink2, - ddmStructureLinks.get(newDDMStructureLink2.getPrimaryKey())); - } - - @Test - public void testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist() - throws Exception { - - long pk1 = RandomTestUtil.nextLong(); - - long pk2 = RandomTestUtil.nextLong(); - - Set primaryKeys = new HashSet(); - - primaryKeys.add(pk1); - primaryKeys.add(pk2); - - Map ddmStructureLinks = - _persistence.fetchByPrimaryKeys(primaryKeys); - - Assert.assertTrue(ddmStructureLinks.isEmpty()); - } - - @Test - public void testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereSomePrimaryKeysExist() - throws Exception { - - DDMStructureLink newDDMStructureLink = addDDMStructureLink(); - - long pk = RandomTestUtil.nextLong(); - - Set primaryKeys = new HashSet(); - - primaryKeys.add(newDDMStructureLink.getPrimaryKey()); - primaryKeys.add(pk); - - Map ddmStructureLinks = - _persistence.fetchByPrimaryKeys(primaryKeys); - - Assert.assertEquals(1, ddmStructureLinks.size()); - Assert.assertEquals( - newDDMStructureLink, - ddmStructureLinks.get(newDDMStructureLink.getPrimaryKey())); - } - - @Test - public void testFetchByPrimaryKeysWithNoPrimaryKeys() throws Exception { - Set primaryKeys = new HashSet(); - - Map ddmStructureLinks = - _persistence.fetchByPrimaryKeys(primaryKeys); - - Assert.assertTrue(ddmStructureLinks.isEmpty()); - } - - @Test - public void testFetchByPrimaryKeysWithOnePrimaryKey() throws Exception { - DDMStructureLink newDDMStructureLink = addDDMStructureLink(); - - Set primaryKeys = new HashSet(); - - primaryKeys.add(newDDMStructureLink.getPrimaryKey()); - - Map ddmStructureLinks = - _persistence.fetchByPrimaryKeys(primaryKeys); - - Assert.assertEquals(1, ddmStructureLinks.size()); - Assert.assertEquals( - newDDMStructureLink, - ddmStructureLinks.get(newDDMStructureLink.getPrimaryKey())); - } - - @Test - public void testActionableDynamicQuery() throws Exception { - final IntegerWrapper count = new IntegerWrapper(); - - ActionableDynamicQuery actionableDynamicQuery = - DDMStructureLinkLocalServiceUtil.getActionableDynamicQuery(); - - actionableDynamicQuery.setPerformActionMethod( - new ActionableDynamicQuery.PerformActionMethod() { - - @Override - public void performAction(DDMStructureLink ddmStructureLink) { - Assert.assertNotNull(ddmStructureLink); - - count.increment(); - } - - }); - - actionableDynamicQuery.performActions(); - - Assert.assertEquals(count.getValue(), _persistence.countAll()); - } - - @Test - public void testDynamicQueryByPrimaryKeyExisting() throws Exception { - DDMStructureLink newDDMStructureLink = addDDMStructureLink(); - - DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass( - DDMStructureLink.class, _dynamicQueryClassLoader); - - dynamicQuery.add( - RestrictionsFactoryUtil.eq( - "structureLinkId", newDDMStructureLink.getStructureLinkId())); - - List result = _persistence.findWithDynamicQuery( - dynamicQuery); - - Assert.assertEquals(1, result.size()); - - DDMStructureLink existingDDMStructureLink = result.get(0); - - Assert.assertEquals(existingDDMStructureLink, newDDMStructureLink); - } - - @Test - public void testDynamicQueryByPrimaryKeyMissing() throws Exception { - DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass( - DDMStructureLink.class, _dynamicQueryClassLoader); - - dynamicQuery.add( - RestrictionsFactoryUtil.eq( - "structureLinkId", RandomTestUtil.nextLong())); - - List result = _persistence.findWithDynamicQuery( - dynamicQuery); - - Assert.assertEquals(0, result.size()); - } - - @Test - public void testDynamicQueryByProjectionExisting() throws Exception { - DDMStructureLink newDDMStructureLink = addDDMStructureLink(); - - DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass( - DDMStructureLink.class, _dynamicQueryClassLoader); - - dynamicQuery.setProjection( - ProjectionFactoryUtil.property("structureLinkId")); - - Object newStructureLinkId = newDDMStructureLink.getStructureLinkId(); - - dynamicQuery.add( - RestrictionsFactoryUtil.in( - "structureLinkId", new Object[] {newStructureLinkId})); - - List result = _persistence.findWithDynamicQuery(dynamicQuery); - - Assert.assertEquals(1, result.size()); - - Object existingStructureLinkId = result.get(0); - - Assert.assertEquals(existingStructureLinkId, newStructureLinkId); - } - - @Test - public void testDynamicQueryByProjectionMissing() throws Exception { - DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass( - DDMStructureLink.class, _dynamicQueryClassLoader); - - dynamicQuery.setProjection( - ProjectionFactoryUtil.property("structureLinkId")); - - dynamicQuery.add( - RestrictionsFactoryUtil.in( - "structureLinkId", new Object[] {RandomTestUtil.nextLong()})); - - List result = _persistence.findWithDynamicQuery(dynamicQuery); - - Assert.assertEquals(0, result.size()); - } - - @Test - public void testResetOriginalValues() throws Exception { - DDMStructureLink newDDMStructureLink = addDDMStructureLink(); - - _persistence.clearCache(); - - DDMStructureLink existingDDMStructureLink = - _persistence.findByPrimaryKey(newDDMStructureLink.getPrimaryKey()); - - Assert.assertEquals( - Long.valueOf(existingDDMStructureLink.getClassNameId()), - ReflectionTestUtil.invoke( - existingDDMStructureLink, "getOriginalClassNameId", - new Class[0])); - Assert.assertEquals( - Long.valueOf(existingDDMStructureLink.getClassPK()), - ReflectionTestUtil.invoke( - existingDDMStructureLink, "getOriginalClassPK", - new Class[0])); - Assert.assertEquals( - Long.valueOf(existingDDMStructureLink.getStructureId()), - ReflectionTestUtil.invoke( - existingDDMStructureLink, "getOriginalStructureId", - new Class[0])); - } - - @Test - public void testFindByClassNameId() { - long a = 343453; - int b = 4; - int c = 7; - long d = 80987; - - _persistence.findByClassNameId(a); - - _persistence.findByClassNameId(a, b, c); - - _persistence.findByClassNameId(a, b, c, getOrderByComparator()); - - _persistence.findByClassNameId(a, b, c, getOrderByComparator(), true); - - _persistence.findByClassNameId_First(a, getOrderByComparator()); - - _persistence.fetchByClassNameId_First(a, getOrderByComparator()); - - _persistence.findByClassNameId_Last(a, getOrderByComparator()); - - _persistence.fetchByClassNameId_Last(a, getOrderByComparator()); - - _persistence.findByClassNameId_PrevAndNext(a, d, getOrderByComparator()); - - _persistence.removeByClassNameId(a); - - _persistence.countByClassNameId(a); - - DDMStructureLinkUtil.findByClassNameId (a); - - DDMStructureLinkUtil.findByClassNameId (a, b, c); - - DDMStructureLinkUtil.findByClassNameId (a, b, c, getOrderByComparator()); - - DDMStructureLinkUtil.findByClassNameId (a, b, c, getOrderByComparator(), d); - - DDMStructureLinkUtil.findByClassNameId_First (a, getOrderByComparator()); - - DDMStructureLinkUtil.fetchByClassNameId_First (a, getOrderByComparator()); - - DDMStructureLinkUtil.findByClassNameId_Last (a, getOrderByComparator()); - - DDMStructureLinkUtil.fetchByClassNameId_Last (a, getOrderByComparator()); - - DDMStructureLinkUtil.findByClassNameId_PrevAndNext (a, b, getOrderByComparator()); - - DDMStructureLinkUtil.removeByClassNameId (a); - - DDMStructureLinkUtil.countByClassNameId (a); - - _persistence.findByClassNameId(a); - - _persistence2.findByClassNameId(a, b, c); - - _persistence2.findByClassNameId(a, b, c, getOrderByComparator()); - - _persistence2.findByClassNameId(a, b, c, getOrderByComparator(), true); - - _persistence2.findByClassNameId_First(a, getOrderByComparator()); - - _persistence2.fetchByClassNameId_First(a, getOrderByComparator()); - - _persistence2.findByClassNameId_Last(a, getOrderByComparator()); - - _persistence2.fetchByClassNameId_Last(a, getOrderByComparator()); - - _persistence2.findByClassNameId_PrevAndNext(a, d, getOrderByComparator()); - - _persistence2.removeByClassNameId(a); - - _persistence2.countByClassNameId(a); - - DDMStructureUtil.findByClassNameId (a); - - DDMStructureUtil.findByClassNameId (a, b, c); - - DDMStructureUtil.findByClassNameId (a, b, c, getOrderByComparator()); - - DDMStructureUtil.findByClassNameId (a, b, c, getOrderByComparator(), d); - - DDMStructureUtil.findByClassNameId_First (a, getOrderByComparator()); - - DDMStructureUtil.fetchByClassNameId_First (a, getOrderByComparator()); - - DDMStructureUtil.findByClassNameId_Last (a, getOrderByComparator()); - - DDMStructureUtil.fetchByClassNameId_Last (a, getOrderByComparator()); - - DDMStructureUtil.findByClassNameId_PrevAndNext (a, b, getOrderByComparator()); - - DDMStructureUtil.removeByClassNameId (a); - - DDMStructureUtil.countByClassNameId (a); - - _persistence3.findByClassNameId(a); - - _persistence3.findByClassNameId(a, b, c); - - _persistence3.findByClassNameId(a, b, c, getOrderByComparator()); - - _persistence3.findByClassNameId(a, b, c, getOrderByComparator(), true); - - _persistence3.findByClassNameId_First(a, getOrderByComparator()); - - _persistence3.fetchByClassNameId_First(a, getOrderByComparator()); - - _persistence3.findByClassNameId_Last(a, getOrderByComparator()); - - _persistence3.fetchByClassNameId_Last(a, getOrderByComparator()); - - _persistence3.findByClassNameId_PrevAndNext(a, d, getOrderByComparator()); - - _persistence3.removeByClassNameId(a); - - _persistence3.countByClassNameId(a); - - DDMTemplateLinkUtil.findByClassNameId (a); - - DDMTemplateLinkUtil.findByClassNameId (a, b, c); - - DDMTemplateLinkUtil.findByClassNameId (a, b, c, getOrderByComparator()); - - DDMTemplateLinkUtil.findByClassNameId (a, b, c, getOrderByComparator(), d); - - DDMTemplateLinkUtil.findByClassNameId_First (a, getOrderByComparator()); - - DDMTemplateLinkUtil.fetchByClassNameId_First (a, getOrderByComparator()); - - DDMTemplateLinkUtil.findByClassNameId_Last (a, getOrderByComparator()); - - DDMTemplateLinkUtil.fetchByClassNameId_Last (a, getOrderByComparator()); - - DDMTemplateLinkUtil.findByClassNameId_PrevAndNext (a, b, getOrderByComparator()); - - DDMTemplateLinkUtil.removeByClassNameId (a); - - DDMTemplateLinkUtil.countByClassNameId (a); - } - - protected DDMStructureLink addDDMStructureLink() throws Exception { - long pk = RandomTestUtil.nextLong(); - - DDMStructureLink ddmStructureLink = _persistence.create(pk); - - ddmStructureLink.setMvccVersion(RandomTestUtil.nextLong()); - - ddmStructureLink.setCtCollectionId(RandomTestUtil.nextLong()); - - ddmStructureLink.setCompanyId(RandomTestUtil.nextLong()); - - ddmStructureLink.setClassNameId(RandomTestUtil.nextLong()); - - ddmStructureLink.setClassPK(RandomTestUtil.nextLong()); - - ddmStructureLink.setStructureId(RandomTestUtil.nextLong()); - - _ddmStructureLinks.add(_persistence.update(ddmStructureLink)); - - return ddmStructureLink; - } - - private List _ddmStructureLinks = - new ArrayList(); - private DDMStructureLinkPersistence _persistence; - private DDMStructurePersistence _persistence2; - private DDMTemplateLinkPersistence _persistence3; - private ClassLoader _dynamicQueryClassLoader; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal-ext.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal-ext.properties deleted file mode 100644 index 31cb82300a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal-ext.properties +++ /dev/null @@ -1,10 +0,0 @@ -## -## HTTP Header Response -## - - # - # Set this to nonempty value for the portal to send the "X-XSS-Protection" - # HTTP header to block cross-site scripting attacks. Possible nonempty - # values are "0", "1" and "1; mode=block" - # - http.header.secure.x.xss.protection=1 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal-liferay.com.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal-liferay.com.properties deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal-setup-wizard.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal-setup-wizard.properties deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal.properties deleted file mode 100644 index 9b2d073955..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portal.properties +++ /dev/null @@ -1,351 +0,0 @@ -## -## Properties Override -## - -## -## Staging -## - - # - # Set this property to false to avoid deleting the temporary LAR during a - # a failed staging publication process. In remote staging contexts, this - # only applies for the staging environment. - # - # Env: LIFERAY_STAGING_PERIOD_DELETE_PERIOD_TEMP_PERIOD_LAR_PERIOD_ON_PERIOD_FAILURE - # - staging.delete.temp.lar.on.failure=true - - # - # Set this property to false to avoid deleting the temporary LAR during a - # a successful staging publication process. In remote staging contexts, this - # only applies for the staging environment. - # - # Env: LIFERAY_STAGING_PERIOD_DELETE_PERIOD_TEMP_PERIOD_LAR_PERIOD_ON_PERIOD_SUCCESS - # - staging.delete.temp.lar.on.success=true - - # - # Set this property to false to enable editing on the live site. - # - # Env: LIFERAY_STAGING_PERIOD_LIVE_PERIOD_GROUP_PERIOD_LOCKING_PERIOD_ENABLED - # - staging.live.group.locking.enabled=true - - # - # By default, in a remote staging environment, the live group is marked and - # staging is prevented on the live group. - # - # To achieve a Content Development - UAT - Production environment, staging - # must be enabled for the UAT live group involved. When staging is enabled - # for this group, it becomes the live group with respect to the Content - # Development server and a staging group with respect to the Production - # server. - # - # Set this property to true to allow staging for a live group. If set to - # true, staging can be turned on for a live group, so that it can - # simultaneously act as both a live group and a staging group. - # - # Env: LIFERAY_STAGING_PERIOD_LIVE_PERIOD_GROUP_PERIOD_REMOTE_PERIOD_STAGING_PERIOD_ENABLED - # - staging.live.group.remote.staging.enabled=false - - # - # Set the file block sizes for remote staging. If a LAR file used for remote - # staging exceeds this size, the file will be split into multiple files - # prior to transmission and then reassembled on the remote server. The - # default buffer size is 10 megabytes. - # - # Env: LIFERAY_STAGING_PERIOD_REMOTE_PERIOD_TRANSFER_PERIOD_BUFFER_PERIOD_SIZE - # - staging.remote.transfer.buffer.size=10485760 - - # - # Set the interval in hours on how often CheckSystemEventMessageListener - # will run to check for and delete system events that have been reached the - # maximum age. - # - # Env: LIFERAY_STAGING_PERIOD_SYSTEM_PERIOD_EVENT_PERIOD_CHECK_PERIOD_INTERVAL - # - staging.system.event.check.interval=24 - - # - # Set this to the maximum age (in number of hours) that a system event will - # be kept. Note that these settings may be overridden in Portal Settings for - # each portal server or in Site Settings for each site. - # - # Env: LIFERAY_STAGING_PERIOD_SYSTEM_PERIOD_EVENT_PERIOD_MAX_PERIOD_AGE - # - staging.system.event.max.age=0 - - - user.groups.copy.layouts.to.user.personal.site=true - -## -## Value Object -## - - # - # Set this to true to enable entity level caching. - # - value.object.entity.cache.enabled=true - - # - # Entity level caching for a specific type of value object can be configured - # by using a property name that includes the value object's class name. - # - value.object.entity.cache.enabled.com.liferay.portal.kernel.model.Layout=true - value.object.entity.cache.enabled.com.liferay.portal.kernel.model.User=true - - # - # Set this to true to enable finder level caching. - # - value.object.finder.cache.enabled=true - - # - # Finder level caching for a specific type of value object can be configured - # by using a property name that includes the value object's class name. - # Mapping tables can also be specified to configure the caching of value - # object relationships. - # - value.object.finder.cache.enabled.com.liferay.portal.kernel.model.Layout=true - value.object.finder.cache.enabled.com.liferay.portal.kernel.model.User=true - value.object.finder.cache.enabled.Users_Roles=true - - value.object.column.bitmask.enabled=true - value.object.column.bitmask.enabled.com.liferay.portal.kernel.model.User=true - - - # - # Set the name of a class that implements - # com.liferay.document.library.kernel.antivirus.AntivirusScanner. The - # document library server will use this to scan documents for viruses. - # - # Env: LIFERAY_DL_PERIOD_STORE_PERIOD_ANTIVIRUS_PERIOD_IMPL - # - dl.store.antivirus.impl=com.liferay.portlet.documentlibrary.antivirus.DummyAntivirusScannerImpl - #dl.store.antivirus.impl=com.liferay.portlet.documentlibrary.antivirus.ClamAntivirusScannerImpl - -## -## Ehcache -## - - # - # Set the classpath to the location of the Ehcache config file for internal - # caches. Edit the file specified in the property - # "ehcache.multi-vm.config.location" to enable clustered cache. - # - # Env: LIFERAY_EHCACHE_PERIOD_MULTI_PERIOD_VM_PERIOD_CONFIG_PERIOD_LOCATION - # Env: LIFERAY_EHCACHE_PERIOD_SINGLE_PERIOD_VM_PERIOD_CONFIG_PERIOD_LOCATION - # - ehcache.single.vm.config.location=/ehcache/liferay-single-vm.xml - ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm.xml - - # - # Set this to true to enable the Ehcache bootstrap cache loader. - # - # Env: LIFERAY_EHCACHE_PERIOD_BOOTSTRAP_PERIOD_CACHE_PERIOD_LOADER_PERIOD_ENABLED - # - ehcache.bootstrap.cache.loader.enabled=false - - # - # Input a list of comma delimited key value pair to set bootstrap loader - # properties for the default cache. - # - # Env: LIFERAY_EHCACHE_PERIOD_BOOTSTRAP_PERIOD_CACHE_PERIOD_LOADER_PERIOD_PROPERTIES_PERIOD_DEFAULT - # - ehcache.bootstrap.cache.loader.properties= - - ehcache.bootstrap.cache.loader.properties.default= - - # - # Input a list of comma delimited key value pair to set bootstrap loader - # properties for a specific cache. - # - # Env: LIFERAY_EHCACHE_PERIOD_BOOTSTRAP_PERIOD_CACHE_PERIOD_LOADER_PERIOD_PROPERTIES_PERIOD__DOLLAR__OPENCURLYBRACE_SPECIFIC_PERIOD_CACHE_PERIOD_NAME_CLOSECURLYBRACE_ - # - #ehcache.bootstrap.cache.loader.properties.${specific.cache.name}= - - # - # Input a list of comma delimited key value pair to set replication - # properties for the default cache. - # - # Env: LIFERAY_EHCACHE_PERIOD_REPLICATOR_PERIOD_PROPERTIES_PERIOD_DEFAULT - # - ehcache.replicator.properties.default= - - # - # Set this to true to enable JMX integration in - # com.liferay.portal.cache.EhcachePortalCacheManager. Set this to false if - # the portal needs to be reloaded under WebSphere. - # - # Env: LIFERAY_EHCACHE_PERIOD_PORTAL_PERIOD_CACHE_PERIOD_MANAGER_PERIOD_JMX_PERIOD_ENABLED - # - ehcache.portal.cache.manager.jmx.enabled=true - - # - # Set this to true to allow Ehcache to use blocking caches. This improves - # performance significantly by locking on keys instead of the entire cache. - # The drawback is that threads can hang if the cache is not used properly. - # Make sure that all queries that return a miss also immediately populate - # the cache, or else other threads that are blocked on a query of that same - # key will continue to hang. Reference Ehcache's BlockingCache for more - # information. The blocking cache is no longer implemented by Ehcache's - # BlockingCache, but by Liferay's BlockingPortalCache for better safety and - # faster performance. - # - # Blocking cache together with transactional cache performs poorly, because - # transactional cache affects the cache population visibility across - # transactions. When transactional cache is on, blocking cache most likely - # does nothing useful unless the transaction window time is short. When - # transactional cache is off, it is better to turn on blocking cache for - # better database access performance. - # - # Env: LIFERAY_EHCACHE_PERIOD_BLOCKING_PERIOD_CACHE_PERIOD_ALLOWED - # - ehcache.blocking.cache.allowed=false - - # - # Set the socket timeout in milliseconds. - # - # Env: LIFERAY_EHCACHE_PERIOD_SOCKET_PERIOD_SO_PERIOD_TIMEOUT - # - ehcache.socket.so.timeout=10000 - - # - # Set the start port for Ehcache socket. The port number will increase by 1 - # until it finds an unused port. - # - # Env: LIFERAY_EHCACHE_PERIOD_SOCKET_PERIOD_START_PERIOD_PORT - # - ehcache.socket.start.port=32454 - - # - # Set this to true to configure permission caching to block. See the - # property "ehcache.blocking.cache.allowed" for more information. - # - # Env: LIFERAY_PERMISSIONS_PERIOD_OBJECT_PERIOD_BLOCKING_PERIOD_CACHE - # - permissions.object.blocking.cache=false - - # - # Set this to true to configure entity level caching to block. See the - # property "ehcache.blocking.cache.allowed" for more information. - # - # Env: LIFERAY_VALUE_PERIOD_OBJECT_PERIOD_ENTITY_PERIOD_BLOCKING_PERIOD_CACHE - # - value.object.entity.blocking.cache=true - -## -## Asset -## - - # - # Input a list of comma delimited default properties for new categories. - # Each item of the list should have the following format: "key:value". - # - # Env: LIFERAY_ASSET_PERIOD_CATEGORIES_PERIOD_PROPERTIES_PERIOD_DEFAULT - # - asset.categories.properties.default= - - # - # Set the following to false to specify that searching and browsing using - # categories should only show assets that have been assigned the selected - # category explicitly. When set to true, the children categories are also - # included in the search. - # - # Env: LIFERAY_ASSET_PERIOD_CATEGORIES_PERIOD_SEARCH_PERIOD_HIERARCHICAL - # - asset.categories.search.hierarchical=true - - # - # Set the maximum number of entries for the Asset Categories Selector. A - # value of -1 will load all entries and the results will be not paginated. - # - # Env: LIFERAY_ASSET_PERIOD_CATEGORIES_PERIOD_SELECTOR_PERIOD_MAX_PERIOD_ENTRIES - # - asset.categories.selector.max.entries=50 - - # - # Set the limit for results used when performing asset searches that are - # subsequently filtered by permissions. - # - # Env: LIFERAY_ASSET_PERIOD_FILTER_PERIOD_SEARCH_PERIOD_LIMIT - # - asset.filter.search.limit=200 - - # - # Set the language key of the vocabulary which will be created by default. - # - # Env: LIFERAY_ASSET_PERIOD_VOCABULARY_PERIOD_DEFAULT - # - asset.vocabulary.default=topic - -## -## Layouts -## - - # - # Set this to false to disable server side parallel rendering. You can also - # disable it on a per request basis by setting the attribute key - # com.liferay.portal.kernel.util.WebKeys.PORTLET_PARALLEL_RENDER to the - # Boolean.FALSE in a pre service event or by setting the URL parameter - # "p_p_parallel" to "0". - # - # Set this to true to forcibly set the property "portlet.container.restrict" - # to true, as server side parallel rendering requires restricted request - # attributes. - # - # This feature is only available for Tomcat and will be ignored when the - # portal is running in other environments. - # - # This property is deprecated and only provided for documentation purposes. - # - # Env: LIFERAY_LAYOUT_PERIOD_PARALLEL_PERIOD_RENDER_PERIOD_ENABLE - # - #layout.parallel.render.enable=false - - # - # Set the number of core threads used for server side parallel rendering. - # - # Env: LIFERAY_LAYOUT_PERIOD_PARALLEL_PERIOD_RENDER_PERIOD_THREAD_PERIOD_POOL_PERIOD_CORE_PERIOD_THREAD_PERIOD_COUNT - # - layout.parallel.render.thread.pool.core.thread.count=1 - - # - # Set the time in seconds to keep a thread alive for server side parallel - # rendering. - # - # Env: LIFERAY_LAYOUT_PERIOD_PARALLEL_PERIOD_RENDER_PERIOD_THREAD_PERIOD_POOL_PERIOD_KEEP_PERIOD_ALIVE_PERIOD_TIME - # - layout.parallel.render.thread.pool.keep.alive.time=600 - - # - # Set the maximum size of the task queue for server side parallel rendering. - # An unbounded queue size will never trigger RejectedExecutionHandler. Under - # heavy load, this will lead to massive memory usage. A bounded queue size - # with a proper RejectedExecutionHandler can help the server perform - # graceful degradation. - # - # Env: LIFERAY_LAYOUT_PERIOD_PARALLEL_PERIOD_RENDER_PERIOD_THREAD_PERIOD_POOL_PERIOD_MAX_PERIOD_QUEUE_PERIOD_SIZE - # - layout.parallel.render.thread.pool.max.queue.size=100 - - # - # Set the maximum number of threads used for server side parallel rendering. - # - # Env: LIFERAY_LAYOUT_PERIOD_PARALLEL_PERIOD_RENDER_PERIOD_THREAD_PERIOD_POOL_PERIOD_MAX_PERIOD_THREAD_PERIOD_COUNT - # - layout.parallel.render.thread.pool.max.thread.count=20 - - # - # Set the timeout time for server side parallel rendering. On timeout, all - # pending portlets will fail back to ajax loading or trigger an error - # message depending on whether the portlets are ajaxable. - # - # This timeout is an int value rather than long to avoid some atomic set - # race condition. The Integer.MAX_VALUE is more than enough for a reasonable - # timeout. - # - # Env: LIFERAY_LAYOUT_PERIOD_PARALLEL_PERIOD_RENDER_PERIOD_TIMEOUT - # - layout.parallel.render.timeout=5000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portlet-ext.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/portlet-ext.properties deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/system-ext.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/system-ext.properties deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/system.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/copyPortalSettings/system.properties deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay70-deprecated-methods-test/AssetVocabularyServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay70-deprecated-methods-test/AssetVocabularyServiceSoap.java deleted file mode 100644 index f6614c4009..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay70-deprecated-methods-test/AssetVocabularyServiceSoap.java +++ /dev/null @@ -1,376 +0,0 @@ -/** - * Copyright (c) 2000-2012 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 com.liferay.portlet.asset.service.http; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.LocalizationUtil; - -import com.liferay.portlet.asset.service.AssetVocabularyServiceUtil; - -import java.rmi.RemoteException; - -import java.util.Locale; -import java.util.Map; - -/** - *

    - * This class provides a SOAP utility for the - * {@link com.liferay.portlet.asset.service.AssetVocabularyServiceUtil} 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. - *

    - * - *

    - * 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 com.liferay.portlet.asset.model.AssetVocabularySoap}. - * If the method in the service utility returns a - * {@link com.liferay.portlet.asset.model.AssetVocabulary}, that is translated to a - * {@link com.liferay.portlet.asset.model.AssetVocabularySoap}. Methods that SOAP cannot - * safely wire are skipped. - *

    - * - *

    - * 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). - *

    - * - *

    - * You can see a list of services at - * http://localhost:8080/api/secure/axis. Set the property - * axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

    - * - *

    - * The SOAP utility is only generated for remote services. - *

    - * - * @author Brian Wing Shun Chan - * @see AssetVocabularyServiceHttp - * @see com.liferay.portlet.asset.model.AssetVocabularySoap - * @see com.liferay.portlet.asset.service.AssetVocabularyServiceUtil - * @generated - */ -public class AssetVocabularyServiceSoap { - /** - * @deprecated - */ - public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary( - java.lang.String[] titleMapLanguageIds, - java.lang.String[] titleMapValues, - java.lang.String[] descriptionMapLanguageIds, - java.lang.String[] descriptionMapValues, java.lang.String settings, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - Map titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds, - titleMapValues); - Map descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, - descriptionMapValues); - - com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(titleMap, - descriptionMap, settings, serviceContext); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap addVocabulary( - java.lang.String title, java.lang.String[] titleMapLanguageIds, - java.lang.String[] titleMapValues, - java.lang.String[] descriptionMapLanguageIds, - java.lang.String[] descriptionMapValues, java.lang.String settings, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - Map titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds, - titleMapValues); - Map descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, - descriptionMapValues); - - com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.addVocabulary(title, - titleMap, descriptionMap, settings, serviceContext); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void deleteVocabularies(long[] vocabularyIds) - throws RemoteException { - try { - AssetVocabularyServiceUtil.deleteVocabularies(vocabularyIds); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void deleteVocabulary(long vocabularyId) - throws RemoteException { - try { - AssetVocabularyServiceUtil.deleteVocabulary(vocabularyId); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getCompanyVocabularies( - long companyId) throws RemoteException { - try { - java.util.List returnValue = - AssetVocabularyServiceUtil.getCompanyVocabularies(companyId); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies( - long[] groupIds) throws RemoteException { - try { - java.util.List returnValue = - AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupsVocabularies( - long[] groupIds, java.lang.String className) throws RemoteException { - try { - java.util.List returnValue = - AssetVocabularyServiceUtil.getGroupsVocabularies(groupIds, - className); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies( - long groupId) throws RemoteException { - try { - java.util.List returnValue = - AssetVocabularyServiceUtil.getGroupVocabularies(groupId); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator obc) - throws RemoteException { - try { - java.util.List returnValue = - AssetVocabularyServiceUtil.getGroupVocabularies(groupId, start, - end, obc); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getGroupVocabularies( - long groupId, java.lang.String name, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator obc) - throws RemoteException { - try { - java.util.List returnValue = - AssetVocabularyServiceUtil.getGroupVocabularies(groupId, name, - start, end, obc); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getGroupVocabulariesCount(long groupId) - throws RemoteException { - try { - int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getGroupVocabulariesCount(long groupId, - java.lang.String name) throws RemoteException { - try { - int returnValue = AssetVocabularyServiceUtil.getGroupVocabulariesCount(groupId, - name); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static java.lang.String getJSONGroupVocabularies(long groupId, - java.lang.String name, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator obc) - throws RemoteException { - try { - com.liferay.portal.kernel.json.JSONObject returnValue = AssetVocabularyServiceUtil.getJSONGroupVocabularies(groupId, - name, start, end, obc); - - return returnValue.toString(); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap[] getVocabularies( - long[] vocabularyIds) throws RemoteException { - try { - java.util.List returnValue = - AssetVocabularyServiceUtil.getVocabularies(vocabularyIds); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap getVocabulary( - long vocabularyId) throws RemoteException { - try { - com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.getVocabulary(vocabularyId); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * @deprecated - */ - public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary( - long vocabularyId, java.lang.String[] titleMapLanguageIds, - java.lang.String[] titleMapValues, - java.lang.String[] descriptionMapLanguageIds, - java.lang.String[] descriptionMapValues, java.lang.String settings, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - Map titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds, - titleMapValues); - Map descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, - descriptionMapValues); - - com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId, - titleMap, descriptionMap, settings, serviceContext); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.asset.model.AssetVocabularySoap updateVocabulary( - long vocabularyId, java.lang.String title, - java.lang.String[] titleMapLanguageIds, - java.lang.String[] titleMapValues, - java.lang.String[] descriptionMapLanguageIds, - java.lang.String[] descriptionMapValues, java.lang.String settings, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - Map titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds, - titleMapValues); - Map descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, - descriptionMapValues); - - com.liferay.portlet.asset.model.AssetVocabulary returnValue = AssetVocabularyServiceUtil.updateVocabulary(vocabularyId, - title, titleMap, descriptionMap, settings, serviceContext); - - return com.liferay.portlet.asset.model.AssetVocabularySoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(AssetVocabularyServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay70-deprecated-methods-test/PortalMockFactory.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay70-deprecated-methods-test/PortalMockFactory.java deleted file mode 100644 index 066ed7e864..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay70-deprecated-methods-test/PortalMockFactory.java +++ /dev/null @@ -1,266 +0,0 @@ -package cz.datalite.zk.liferay.mock; - -import com.liferay.counter.service.CounterLocalService; -import com.liferay.counter.service.CounterLocalServiceUtil; -import com.liferay.portal.kernel.dao.orm.*; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.language.Language; -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.servlet.BrowserSniffer; -import com.liferay.portal.kernel.servlet.BrowserSnifferUtil; -import com.liferay.portal.kernel.util.*; -import com.liferay.portal.kernel.xml.SAXReaderUtil; -import com.liferay.portal.model.*; -import com.liferay.portal.model.impl.*; -import com.liferay.portal.security.auth.AuthToken; -import com.liferay.portal.security.auth.AuthTokenUtil; -import com.liferay.portal.service.*; -import com.liferay.portal.util.PortalImpl; -import com.liferay.portal.util.PortalInstances; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.xml.SAXReaderImpl; -import com.liferay.portlet.PortletPreferencesFactory; -import com.liferay.portlet.PortletPreferencesFactoryUtil; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; - -import javax.portlet.PortletRequest; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.jsp.PageContext; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.Locale; -import java.util.Random; - -import static org.mockito.Matchers.anyBoolean; -import static org.mockito.Matchers.anyLong; -import static org.mockito.Matchers.anyString; -import static org.mockito.Mockito.*; -import static org.mockito.Mockito.any; - -public class PortalMockFactory -{ - protected CompanyMockFactory companyMockFactory; - protected UserMockFactory userMockFactory; - - /** - * Construc Portal Mock Factory with company and user mocks. - * - * @param companyMockFactory - * @param userMockFactory - */ - public PortalMockFactory(CompanyMockFactory companyMockFactory, UserMockFactory userMockFactory) - { - this.companyMockFactory = companyMockFactory; - this.userMockFactory = userMockFactory; - } - - /** - * Initialize all mockes for Liferay. - * - * If you need refresh basic mock configuration, just call this method - it sets all services - * with a fresh instance and then it initializes basic values. - */ - public void initLiferay() - { - try { - // classloader is the web app - PortalClassLoaderUtil.setClassLoader(PortalMockFactory.class.getClassLoader()); - - mockServices(); - mockDynamicQuery(); - fillTestData(); - - } catch (PortalException ex) { - throw new RuntimeException(ex); - } catch (SystemException ex) { - throw new RuntimeException(ex); - } - } - - - /** - * Normaly Liferay regsiters service in utility class via Spring. - * - * For each utility class, we create a mock service with RETURNS_MOCKS (create not null objects for all functions). - * We try to avoid as much NPE as possible. - * - * This is just a random list of services, as the need to use them pops out. It might be a good idea to - * start with list of Liferay services and do this more thoroughly. - * - * When some service call needs to be implemented, just add something like: - * when(CompanyLocalServiceUtil.getService().getCompany(companyId)).thenReturn(company); - */ - public void mockServices() throws SystemException, PortalException { - new AccountLocalServiceUtil().setService(mock(AccountLocalService.class, RETURNS_MOCKS)); - new AddressLocalServiceUtil().setService(mock(AddressLocalService.class, RETURNS_MOCKS)); - new BrowserTrackerLocalServiceUtil().setService(mock(BrowserTrackerLocalService.class, RETURNS_MOCKS)); - new ClusterGroupLocalServiceUtil().setService(mock(ClusterGroupLocalService.class, RETURNS_MOCKS)); - new CompanyLocalServiceUtil().setService(mock(CompanyLocalService.class, RETURNS_MOCKS)); - - new ContactLocalServiceUtil().setService(mock(ContactLocalService.class, RETURNS_MOCKS)); - when(ContactLocalServiceUtil.getService().createContact(anyLong())).thenReturn(new ContactImpl()); - - new CountryServiceUtil().setService(mock(CountryService.class, RETURNS_MOCKS)); - - new EmailAddressLocalServiceUtil().setService(mock(EmailAddressLocalService.class, RETURNS_MOCKS)); - when(EmailAddressLocalServiceUtil.getService().createEmailAddress(anyLong())).thenReturn(new EmailAddressImpl()); - when(EmailAddressLocalServiceUtil.getService().getEmailAddresses(anyLong(), anyString(), anyLong())).thenReturn(new LinkedList()); - - new PhoneLocalServiceUtil().setService(mock(PhoneLocalService.class, RETURNS_MOCKS)); - when(PhoneLocalServiceUtil.getService().getPhones(anyLong(), anyString(), anyLong())).thenReturn(new LinkedList()); - - new WebsiteLocalServiceUtil().setService(mock(WebsiteLocalService.class, RETURNS_MOCKS)); - when(WebsiteLocalServiceUtil.getService().getWebsites(anyLong(), anyString(), anyLong())).thenReturn(new LinkedList()); - - new GroupLocalServiceUtil().setService(mock(GroupLocalService.class, RETURNS_MOCKS)); - when(GroupLocalServiceUtil.getService().createGroup(anyLong())).thenReturn(new GroupImpl()); - - new ImageLocalServiceUtil().setService(mock(ImageLocalService.class, RETURNS_MOCKS)); - new LayoutLocalServiceUtil().setService(mock(LayoutLocalService.class, RETURNS_MOCKS)); - new LayoutPrototypeLocalServiceUtil().setService(mock(LayoutPrototypeLocalService.class, RETURNS_MOCKS)); - new LayoutSetLocalServiceUtil().setService(mock(LayoutSetLocalService.class, RETURNS_MOCKS)); - new LayoutSetPrototypeLocalServiceUtil().setService(mock(LayoutSetPrototypeLocalService.class, RETURNS_MOCKS)); - new LayoutTemplateLocalServiceUtil().setService(mock(LayoutTemplateLocalService.class, RETURNS_MOCKS)); - new LockLocalServiceUtil().setService(mock(LockLocalService.class, RETURNS_MOCKS)); - new MembershipRequestLocalServiceUtil().setService(mock(MembershipRequestLocalService.class, RETURNS_MOCKS)); - new OrgLaborLocalServiceUtil().setService(mock(OrgLaborLocalService.class, RETURNS_MOCKS)); - new OrganizationLocalServiceUtil().setService(mock(OrganizationLocalService.class, RETURNS_MOCKS)); - new PasswordPolicyLocalServiceUtil().setService(mock(PasswordPolicyLocalService.class, RETURNS_MOCKS)); - new PasswordPolicyRelLocalServiceUtil().setService(mock(PasswordPolicyRelLocalService.class, RETURNS_MOCKS)); - new PasswordTrackerLocalServiceUtil().setService(mock(PasswordTrackerLocalService.class, RETURNS_MOCKS)); - new PermissionLocalServiceUtil().setService(mock(PermissionLocalService.class, RETURNS_MOCKS)); - - new PhoneLocalServiceUtil().setService(mock(PhoneLocalService.class, RETURNS_MOCKS)); - when(PhoneLocalServiceUtil.getService().createPhone(anyLong())).thenReturn(new PhoneImpl()); - - new PluginSettingLocalServiceUtil().setService(mock(PluginSettingLocalService.class, RETURNS_MOCKS)); - new PortalLocalServiceUtil().setService(mock(PortalLocalService.class, RETURNS_MOCKS)); - new PortletItemLocalServiceUtil().setService(mock(PortletItemLocalService.class, RETURNS_MOCKS)); - new PortletPreferencesLocalServiceUtil().setService(mock(PortletPreferencesLocalService.class, RETURNS_MOCKS)); - new QuartzLocalServiceUtil().setService(mock(QuartzLocalService.class, RETURNS_MOCKS)); - new ReleaseLocalServiceUtil().setService(mock(ReleaseLocalService.class, RETURNS_MOCKS)); - new ResourceActionLocalServiceUtil().setService(mock(ResourceActionLocalService.class, RETURNS_MOCKS)); - new ResourceCodeLocalServiceUtil().setService(mock(ResourceCodeLocalService.class, RETURNS_MOCKS)); - new ResourcePermissionLocalServiceUtil().setService(mock(ResourcePermissionLocalService.class, RETURNS_MOCKS)); - - new RoleLocalServiceUtil().setService(mock(RoleLocalService.class, RETURNS_MOCKS)); - when(RoleLocalServiceUtil.getService().hasUserRole(anyLong(), anyLong(), anyString(), anyBoolean())).thenReturn(true); - - new ServiceComponentLocalServiceUtil().setService(mock(ServiceComponentLocalService.class, RETURNS_MOCKS)); - new ShardLocalServiceUtil().setService(mock(ShardLocalService.class, RETURNS_MOCKS)); - new SubscriptionLocalServiceUtil().setService(mock(SubscriptionLocalService.class, RETURNS_MOCKS)); - new TeamLocalServiceUtil().setService(mock(TeamLocalService.class, RETURNS_MOCKS)); - new ThemeLocalServiceUtil().setService(mock(ThemeLocalService.class, RETURNS_MOCKS)); - new TicketLocalServiceUtil().setService(mock(TicketLocalService.class, RETURNS_MOCKS)); - new UserGroupGroupRoleLocalServiceUtil().setService(mock(UserGroupGroupRoleLocalService.class, RETURNS_MOCKS)); - new UserGroupLocalServiceUtil().setService(mock(UserGroupLocalService.class, RETURNS_MOCKS)); - new UserGroupRoleLocalServiceUtil().setService(mock(UserGroupRoleLocalService.class, RETURNS_MOCKS)); - new UserIdMapperLocalServiceUtil().setService(mock(UserIdMapperLocalService.class, RETURNS_MOCKS)); - new UserLocalServiceUtil().setService(mock(UserLocalService.class, RETURNS_MOCKS)); - new UserTrackerLocalServiceUtil().setService(mock(UserTrackerLocalService.class, RETURNS_MOCKS)); - new UserTrackerPathLocalServiceUtil().setService(mock(UserTrackerPathLocalService.class, RETURNS_MOCKS)); - new WebDAVPropsLocalServiceUtil().setService(mock(WebDAVPropsLocalService.class, RETURNS_MOCKS)); - new WebsiteLocalServiceUtil().setService(mock(WebsiteLocalService.class, RETURNS_MOCKS)); - new WorkflowDefinitionLinkLocalServiceUtil().setService(mock(WorkflowDefinitionLinkLocalService.class, RETURNS_MOCKS)); - new WorkflowInstanceLinkLocalServiceUtil().setService(mock(WorkflowInstanceLinkLocalService.class, RETURNS_MOCKS)); - - new ListTypeServiceUtil().setService(mock(ListTypeService.class, RETURNS_MOCKS)); - when(ListTypeServiceUtil.getService().getListTypes(anyString())).thenReturn(Arrays.asList((ListType) new ListTypeImpl())); - - new PortalUtil().setPortal(spy(new PortalImpl())); - new PortletPreferencesFactoryUtil().setPortletPreferencesFactory(mock(PortletPreferencesFactory.class, RETURNS_MOCKS)); - new DigesterUtil().setDigester(mock(Digester.class, RETURNS_MOCKS)); - new HttpUtil().setHttp(mock(Http.class, RETURNS_MOCKS)); - new AuthTokenUtil().setAuthToken(mock(AuthToken.class, RETURNS_MOCKS)); - new SAXReaderUtil().setSAXReader(SAXReaderImpl.getInstance()); - - new LanguageUtil().setLanguage(mock(Language.class, RETURNS_MOCKS)); - - // language.get(Locale l, String key) should always return key - Answer languageAnswer = new Answer() { - public String answer(InvocationOnMock invocation) throws Throwable { - Object[] args = invocation.getArguments(); - return (String) args[1]; - } - }; - when(LanguageUtil.getLanguage().get(any(Locale.class), anyString())).thenAnswer(languageAnswer); - when(LanguageUtil.getLanguage().get(any(PageContext.class), anyString())).thenAnswer(languageAnswer); - - - new BrowserSnifferUtil().setBrowserSniffer(mock(BrowserSniffer.class, RETURNS_MOCKS)); - - new CounterLocalServiceUtil().setService(mock(CounterLocalService.class, RETURNS_MOCKS)); - when(CounterLocalServiceUtil.getService().increment(anyString())).thenReturn(new Random().nextLong()); - - new PortletLocalServiceUtil().setService(mock(PortletLocalService.class, RETURNS_MOCKS)); - - companyMockFactory.setupClassNames(); - } - - /** - * Setup basic classes for DynamicQuery Liferay API with dummy implementation. - * - * We will not actually support dynamic queries - the only implementation is done by RETURNS_MOCKS to avoid NPE. - * What we need is to avoid method in constructing queries. This method contains mockup of: - *
      - *
    • PortalClassLoaderUtil - dynamic class loader (use classloader of this class instead)
    • - *
    • DynamicQueryFactoryUtil - return dummy implementation of DynamicQueryFactory
    • - *
    • RestrictionsFactoryUtil - RestrictionsFactory with dummy implementation
    • - *
    • ProjectionFactoryUtil - ProjectionFactory with dummy implementation
    • - *
    - */ - public void mockDynamicQuery() - { - new DynamicQueryFactoryUtil().setDynamicQueryFactory(mock(DynamicQueryFactory.class, RETURNS_MOCKS)); - new RestrictionsFactoryUtil().setRestrictionsFactory(mock(RestrictionsFactory.class, RETURNS_MOCKS)); - new ProjectionFactoryUtil().setProjectionFactory(mock(ProjectionFactory.class, RETURNS_MOCKS)); - new OrderFactoryUtil().setOrderFactory(mock(OrderFactory.class, RETURNS_MOCKS)); - } - - private void fillTestData() throws PortalException, SystemException - { - when(PortletLocalServiceUtil.getPortletById(anyString())).thenReturn(new PortletImpl()); - - // default and the only one company (portal instance) - companyMockFactory.createCompanyImpl("company", CompanyMockFactory.DEFAULT_COMPANY_ID); - PortalInstances.addCompanyId(1); - - // main group - Group group = companyMockFactory.createGroupImpl("group", CompanyMockFactory.GROUP_ID); - - // with serveral organizations - Organization orgDefault = companyMockFactory.createOrganizationImpl("organization", 10493); - companyMockFactory.addOrganizationToGroup(orgDefault, group); - - Organization orgDatalite = companyMockFactory.createOrganizationImpl("datalite", 10818); - companyMockFactory.addOrganizationToGroup(orgDatalite, group); - - // and several users - User admin = userMockFactory.createUserImpl("admin", CompanyMockFactory.MAIN_USER_ID); - Contact adminContact = userMockFactory.createContactImpl("admin", CompanyMockFactory.MAIN_USER_ID); - Address adminAddress = userMockFactory.createAddressImpl("admin", CompanyMockFactory.MAIN_USER_ID); - userMockFactory.addContactToUser(adminContact, admin); - userMockFactory.addAddressToContact(adminAddress, adminContact); - - User edudant = userMockFactory.createUserImpl("Bruno", 10870); - Contact edudantContact = userMockFactory.createContactImpl("Bruno", 10870); - Address edudantAddress = userMockFactory.createAddressImpl("Bruno", 10870); - userMockFactory.addContactToUser(edudantContact, edudant); - userMockFactory.addAddressToContact(edudantAddress, edudantContact); - - User francimor = userMockFactory.createUserImpl("Michelle", 11014); - Contact francimorContact = userMockFactory.createContactImpl("Michelle", 11014); - Address francimorAddress = userMockFactory.createAddressImpl("Michelle", 11014); - userMockFactory.addContactToUser(francimorContact, francimor); - userMockFactory.addAddressToContact(francimorAddress, francimorContact); - - userMockFactory.createUserQuery( Arrays.asList(admin, edudant, francimor) ); - - doReturn("mockNamespace").when(PortalUtil.getPortal()).getPortletNamespace(anyString()); - doReturn(CompanyMockFactory.MAIN_USER_ID).when(PortalUtil.getPortal()).getUserId(any(HttpServletRequest.class)); - doReturn(CompanyMockFactory.MAIN_USER_ID).when(PortalUtil.getPortal()).getUserId(any(PortletRequest.class)); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay70-deprecated-methods-test/WebServerServlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay70-deprecated-methods-test/WebServerServlet.java deleted file mode 100644 index cacb4e59a2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay70-deprecated-methods-test/WebServerServlet.java +++ /dev/null @@ -1,1156 +0,0 @@ -/** - * Copyright (c) 2000-2012 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 com.liferay.portal.webserver; - -import com.liferay.portal.NoSuchGroupException; -import com.liferay.portal.freemarker.FreeMarkerUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.freemarker.FreeMarkerContext; -import com.liferay.portal.kernel.freemarker.FreeMarkerEngineUtil; -import com.liferay.portal.kernel.image.ImageBag; -import com.liferay.portal.kernel.image.ImageToolUtil; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.repository.RepositoryException; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.repository.model.FileVersion; -import com.liferay.portal.kernel.repository.model.Folder; -import com.liferay.portal.kernel.servlet.HttpHeaders; -import com.liferay.portal.kernel.servlet.PortalSessionThreadLocal; -import com.liferay.portal.kernel.servlet.Range; -import com.liferay.portal.kernel.servlet.ServletResponseUtil; -import com.liferay.portal.kernel.util.CharPool; -import com.liferay.portal.kernel.util.ContentTypes; -import com.liferay.portal.kernel.util.FastDateFormatFactoryUtil; -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.HtmlUtil; -import com.liferay.portal.kernel.util.HttpUtil; -import com.liferay.portal.kernel.util.MimeTypesUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.ReleaseInfo; -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.Validator; -import com.liferay.portal.kernel.util.Validator_IW; -import com.liferay.portal.kernel.webdav.WebDAVUtil; -import com.liferay.portal.model.Company; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.Image; -import com.liferay.portal.model.ImageConstants; -import com.liferay.portal.model.User; -import com.liferay.portal.model.impl.ImageImpl; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.auth.PrincipalThreadLocal; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil; -import com.liferay.portal.security.permission.PermissionThreadLocal; -import com.liferay.portal.service.CompanyLocalServiceUtil; -import com.liferay.portal.service.GroupLocalServiceUtil; -import com.liferay.portal.service.ImageLocalServiceUtil; -import com.liferay.portal.service.ImageServiceUtil; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portal.util.Portal; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.util.PropsValues; -import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; -import com.liferay.portlet.documentlibrary.NoSuchFolderException; -import com.liferay.portlet.documentlibrary.model.DLFileEntry; -import com.liferay.portlet.documentlibrary.model.DLFileShortcut; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; -import com.liferay.portlet.documentlibrary.service.DLAppServiceUtil; -import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil; -import com.liferay.portlet.documentlibrary.util.AudioProcessor; -import com.liferay.portlet.documentlibrary.util.AudioProcessorUtil; -import com.liferay.portlet.documentlibrary.util.DLUtil; -import com.liferay.portlet.documentlibrary.util.DocumentConversionUtil; -import com.liferay.portlet.documentlibrary.util.ImageProcessorImpl; -import com.liferay.portlet.documentlibrary.util.ImageProcessorUtil; -import com.liferay.portlet.documentlibrary.util.PDFProcessorImpl; -import com.liferay.portlet.documentlibrary.util.PDFProcessorUtil; -import com.liferay.portlet.documentlibrary.util.VideoProcessorImpl; -import com.liferay.portlet.documentlibrary.util.VideoProcessorUtil; -import com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalServiceUtil; -import com.liferay.portlet.dynamicdatalists.util.DDLUtil; - -import java.awt.image.RenderedImage; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.text.Format; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -/** - * @author Alexander Chow - * @author Brian Wing Shun Chan - */ -public class WebServerServlet extends HttpServlet { - - /** - * @see com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter - */ - public static boolean hasFiles(HttpServletRequest request) { - try { - - // Do not use permission checking since this may be called from - // other contexts that are also managing the principal - - User user = _getUser(request); - - String path = HttpUtil.fixPath(request.getPathInfo()); - - String[] pathArray = StringUtil.split(path, CharPool.SLASH); - - if (pathArray.length == 0) { - return true; - } - else if (_PATH_DDL.equals(pathArray[0])) { - _checkDDLRecord(pathArray); - } - else if (Validator.isNumber(pathArray[0])) { - _checkFileEntry(pathArray); - } - else { - long groupId = _getGroupId(user.getCompanyId(), pathArray[0]); - long folderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID; - - for (int i = 1; i < pathArray.length; i++) { - try { - Folder folder = DLAppLocalServiceUtil.getFolder( - groupId, folderId, pathArray[i]); - - folderId = folder.getFolderId(); - } - catch (NoSuchFolderException nsfe) { - if (i != pathArray.length - 1) { - return false; - } - - pathArray = new String[] { - String.valueOf(groupId), String.valueOf(folderId), - pathArray[i] - }; - - _checkFileEntry(pathArray); - } - } - } - } - catch (Exception e) { - return false; - } - - return true; - } - - @Override - public void init(ServletConfig servletConfig) throws ServletException { - super.init(servletConfig); - - _lastModified = GetterUtil.getBoolean( - servletConfig.getInitParameter("last_modified"), true); - } - - @Override - public void service( - HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - - User user = null; - - try { - user = _getUser(request); - - PrincipalThreadLocal.setName(user.getUserId()); - PrincipalThreadLocal.setPassword( - PortalUtil.getUserPassword(request)); - - PermissionChecker permissionChecker = - PermissionCheckerFactoryUtil.create(user, true); - - PermissionThreadLocal.setPermissionChecker(permissionChecker); - - if (_lastModified) { - long lastModified = getLastModified(request); - - if (lastModified > 0) { - long ifModifiedSince = request.getDateHeader( - HttpHeaders.IF_MODIFIED_SINCE); - - if ((ifModifiedSince > 0) && - (ifModifiedSince == lastModified)) { - - response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); - - return; - } - } - - if (lastModified > 0) { - response.setDateHeader( - HttpHeaders.LAST_MODIFIED, lastModified); - } - } - - String path = HttpUtil.fixPath(request.getPathInfo()); - String[] pathArray = StringUtil.split(path, CharPool.SLASH); - - if (pathArray.length == 0) { - sendGroups( - response, user, - request.getServletPath() + StringPool.SLASH + path); - } - else { - if (_PATH_DDL.equals(pathArray[0])) { - sendDDLRecordFile(request, response, pathArray); - } - else if (Validator.isNumber(pathArray[0])) { - sendFile(request, response, user, pathArray); - } - else { - if (isLegacyImageGalleryImageId(request, response)) { - return; - } - - Image image = getImage(request, true); - - if (image != null) { - writeImage(image, request, response); - } - else { - sendDocumentLibrary( - request, response, user, - request.getServletPath() + StringPool.SLASH + path, - pathArray); - } - } - } - } - catch (NoSuchFileEntryException nsfee) { - PortalUtil.sendError( - HttpServletResponse.SC_NOT_FOUND, nsfee, request, response); - } - catch (PrincipalException pe) { - processPrincipalException(pe, user, request, response); - } - catch (Exception e) { - PortalUtil.sendError(e, request, response); - } - } - - protected boolean isLegacyImageGalleryImageId( - HttpServletRequest request, HttpServletResponse response) { - - try { - long imageId = getImageId(request); - - if (imageId == 0) { - return false; - } - - DLFileEntry dlFileEntry = - DLFileEntryServiceUtil.fetchFileEntryByImageId(imageId); - - if (dlFileEntry == null) { - return false; - } - - StringBundler sb = new StringBundler(9); - - sb.append("/documents/"); - sb.append(dlFileEntry.getGroupId()); - sb.append(StringPool.SLASH); - sb.append(dlFileEntry.getFolderId()); - sb.append(StringPool.SLASH); - sb.append( - HttpUtil.encodeURL( - HtmlUtil.unescape(dlFileEntry.getTitle()), true)); - sb.append("?version="); - sb.append(dlFileEntry.getVersion()); - - if (imageId == dlFileEntry.getSmallImageId()) { - sb.append("&imageThumbnail=1"); - } - else if (imageId == dlFileEntry.getSmallImageId()) { - sb.append("&imageThumbnail=2"); - } - else if (imageId == dlFileEntry.getSmallImageId()) { - sb.append("&imageThumbnail=3"); - } - - response.setHeader(HttpHeaders.LOCATION, sb.toString()); - response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); - - return true; - } - catch (Exception e) { - } - - return false; - } - - protected Image getDefaultImage(HttpServletRequest request, long imageId) { - String path = GetterUtil.getString(request.getPathInfo()); - - if (path.startsWith("/company_logo") || - path.startsWith("/layout_set_logo") || path.startsWith("/logo")) { - - return ImageLocalServiceUtil.getDefaultCompanyLogo(); - } - else if (path.startsWith("/organization_logo")) { - return ImageLocalServiceUtil.getDefaultOrganizationLogo(); - } - else if (path.startsWith("/user_female_portrait")) { - return ImageLocalServiceUtil.getDefaultUserFemalePortrait(); - } - else if (path.startsWith("/user_male_portrait")) { - return ImageLocalServiceUtil.getDefaultUserMalePortrait(); - } - else if (path.startsWith("/user_portrait")) { - return ImageLocalServiceUtil.getDefaultUserMalePortrait(); - } - else { - return null; - } - } - - protected FileEntry getFileEntry(String[] pathArray) throws Exception { - if (pathArray.length == 1) { - long dlFileShortcutId = GetterUtil.getLong(pathArray[0]); - - DLFileShortcut dlFileShortcut = DLAppServiceUtil.getFileShortcut( - dlFileShortcutId); - - return DLAppServiceUtil.getFileEntry( - dlFileShortcut.getToFileEntryId()); - } - else if (pathArray.length == 2) { - long groupId = GetterUtil.getLong(pathArray[0]); - - return DLAppServiceUtil.getFileEntryByUuidAndGroupId( - pathArray[1], groupId); - } - else { - long groupId = GetterUtil.getLong(pathArray[0]); - long folderId = GetterUtil.getLong(pathArray[1]); - - String fileName = pathArray[2]; - - if (fileName.contains(StringPool.QUESTION)) { - fileName = fileName.substring( - 0, fileName.indexOf(StringPool.QUESTION)); - } - - return DLAppServiceUtil.getFileEntry(groupId, folderId, fileName); - } - } - - protected Image getImage(HttpServletRequest request, boolean getDefault) - throws PortalException, SystemException { - - Image image = null; - - long imageId = getImageId(request); - - if (imageId > 0) { - image = ImageServiceUtil.getImage(imageId); - - String path = GetterUtil.getString(request.getPathInfo()); - - if (path.startsWith("/user_female_portrait") || - path.startsWith("/user_male_portrait") || - path.startsWith("/user_portrait")) { - - image = getUserPortraitImageResized(image, imageId); - } - } - else { - String uuid = ParamUtil.getString(request, "uuid"); - long groupId = ParamUtil.getLong(request, "groupId"); - boolean igSmallImage = ParamUtil.getBoolean( - request, "igSmallImage"); - java.lang.Object[] test; - - if (Validator_IW.isNotNull(test) && (groupId > 0)) { - try { - FileEntry fileEntry = - DLAppServiceUtil.getFileEntryByUuidAndGroupId( - uuid, groupId); - - image = convertFileEntry(igSmallImage, fileEntry); - } - catch (Exception e) { - } - } - } - - if (getDefault) { - if (image == null) { - if (_log.isWarnEnabled()) { - _log.warn("Get a default image for " + imageId); - } - - image = getDefaultImage(request, imageId); - } - } - - return image; - } - - protected Image convertFileEntry(boolean smallImage, FileEntry fileEntry) - throws PortalException, SystemException { - - try { - Image image = new ImageImpl(); - - image.setModifiedDate(fileEntry.getModifiedDate()); - - InputStream is = null; - - if (smallImage) { - is = ImageProcessorUtil.getThumbnailAsStream( - fileEntry.getFileVersion(), - ImageProcessorImpl.THUMBNAIL_INDEX_DEFAULT); - } - else { - is = fileEntry.getContentStream(); - } - - byte[] bytes = FileUtil.getBytes(is); - - image.setTextObj(bytes); - - image.setType(fileEntry.getExtension()); - - return image; - } - catch (PortalException pe) { - throw pe; - } - catch (SystemException se) { - throw se; - } - catch (Exception e) { - throw new SystemException(e); - } - } - - protected byte[] getImageBytes(HttpServletRequest request, Image image) { - try { - if (!PropsValues.IMAGE_AUTO_SCALE) { - return image.getTextObj(); - } - - ImageBag imageBag = null; - - if (image.getImageId() == 0) { - imageBag = ImageToolUtil.read(image.getTextObj()); - - RenderedImage renderedImage = imageBag.getRenderedImage(); - - image.setHeight(renderedImage.getHeight()); - image.setWidth(renderedImage.getWidth()); - } - - int height = ParamUtil.getInteger( - request, "height", image.getHeight()); - int width = ParamUtil.getInteger( - request, "width", image.getWidth()); - - if ((height >= image.getHeight()) && (width >= image.getWidth())) { - return image.getTextObj(); - } - - if (image.getImageId() != 0) { - imageBag = ImageToolUtil.read(image.getTextObj()); - } - - RenderedImage renderedImage = ImageToolUtil.scale( - imageBag.getRenderedImage(), height, width); - - return ImageToolUtil.getBytes(renderedImage, imageBag.getType()); - } - catch (Exception e) { - if (_log.isWarnEnabled()) { - _log.warn("Error scaling image " + image.getImageId(), e); - } - } - - return image.getTextObj(); - } - - protected long getImageId(HttpServletRequest request) { - - // The image id may be passed in as image_id, img_id, or i_id - - long imageId = ParamUtil.getLong(request, "image_id"); - - if (imageId <= 0) { - imageId = ParamUtil.getLong(request, "img_id"); - } - - if (imageId <= 0) { - imageId = ParamUtil.getLong(request, "i_id"); - } - - if (imageId <= 0) { - long companyId = ParamUtil.getLong(request, "companyId"); - String screenName = ParamUtil.getString(request, "screenName"); - - try { - if ((companyId > 0) && Validator.isNotNull(screenName)) { - User user = UserLocalServiceUtil.getUserByScreenName( - companyId, screenName); - - imageId = user.getPortraitId(); - } - } - catch (Exception e) { - } - } - - return imageId; - } - - @Override - protected long getLastModified(HttpServletRequest request) { - try { - Date modifiedDate = null; - - Image image = getImage(request, true); - - if (image != null) { - modifiedDate = image.getModifiedDate(); - } - else { - String path = HttpUtil.fixPath(request.getPathInfo()); - - String[] pathArray = StringUtil.split(path, CharPool.SLASH); - - if (pathArray.length == 0) { - return -1; - } - - if (pathArray[0].equals("language")) { - return -1; - } - - FileEntry fileEntry = null; - - try { - fileEntry = getFileEntry(pathArray); - } - catch (Exception e) { - } - - if (fileEntry == null) { - return -1; - } - else { - String version = ParamUtil.getString(request, "version"); - - if (Validator.isNotNull(version)) { - FileVersion fileVersion = fileEntry.getFileVersion( - version); - - modifiedDate = fileVersion.getModifiedDate(); - } - else { - modifiedDate = fileEntry.getModifiedDate(); - } - } - } - - if (modifiedDate == null) { - modifiedDate = PortalUtil.getUptime(); - } - - // Round down and remove milliseconds - - return (modifiedDate.getTime() / 1000) * 1000; - } - catch (PrincipalException pe) { - if (_log.isWarnEnabled()) { - _log.warn(pe, pe); - } - } - catch (Exception e) { - _log.error(e, e); - } - - return -1; - } - - protected Image getUserPortraitImageResized(Image image, long imageId) - throws PortalException, SystemException { - - if (image == null) { - return null; - } - - if ((image.getHeight() > PropsValues.USERS_IMAGE_MAX_HEIGHT) || - (image.getWidth() > PropsValues.USERS_IMAGE_MAX_WIDTH)) { - - User user = UserLocalServiceUtil.getUserByPortraitId(imageId); - - UserLocalServiceUtil.updatePortrait( - user.getUserId(), image.getTextObj()); - - return ImageLocalServiceUtil.getImage(imageId); - } - - return image; - } - - protected void processPrincipalException( - Throwable t, User user, HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - if (!user.isDefaultUser()) { - PortalUtil.sendError( - HttpServletResponse.SC_UNAUTHORIZED, (Exception)t, request, - response); - - return; - } - - String redirect = - request.getContextPath() + Portal.PATH_MAIN + "/portal/login"; - - String currentURL = PortalUtil.getCurrentURL(request); - - redirect = HttpUtil.addParameter(redirect, "redirect", currentURL); - - response.sendRedirect(redirect); - } - - protected void sendDDLRecordFile( - HttpServletRequest request, HttpServletResponse response, - String[] pathArray) - throws Exception { - - if (pathArray.length == 3) { - long recordId = GetterUtil.getLong(pathArray[1]); - String fieldName = GetterUtil.getString(pathArray[2]); - - DDLUtil.sendRecordFileUpload( - request, response, recordId, fieldName); - } - } - - protected void sendDocumentLibrary( - HttpServletRequest request, HttpServletResponse response, User user, - String path, String[] pathArray) - throws Exception { - - if (!PropsValues.WEB_SERVER_SERVLET_DIRECTORY_INDEXING_ENABLED) { - response.setStatus(HttpServletResponse.SC_FORBIDDEN); - - return; - } - - long groupId = _getGroupId(user.getCompanyId(), pathArray[0]); - long folderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID; - - for (int i = 1; i < pathArray.length; i++) { - String name = pathArray[i]; - - try { - Folder folder = DLAppServiceUtil.getFolder( - groupId, folderId, name); - - folderId = folder.getFolderId(); - } - catch (NoSuchFolderException nsfe) { - if (i != pathArray.length - 1) { - throw nsfe; - } - - String title = name; - - sendFile(response, user, groupId, folderId, title); - - return; - } - } - - try { - sendFile(response, user, groupId, folderId, "index.html"); - - return; - } - catch (Exception e) { - if ((e instanceof NoSuchFileEntryException) || - (e instanceof PrincipalException)) { - - try { - sendFile(response, user, groupId, folderId, "index.htm"); - - return; - } - catch (NoSuchFileEntryException nsfee) { - } - catch (PrincipalException pe) { - } - } - else { - throw e; - } - } - - List webServerEntries = new ArrayList(); - - webServerEntries.add(new WebServerEntry(path, "../")); - - List folders = DLAppServiceUtil.getFolders(groupId, folderId); - - for (Folder folder : folders) { - WebServerEntry webServerEntry = new WebServerEntry( - path, folder.getName() + StringPool.SLASH, - folder.getCreateDate(), folder.getModifiedDate(), - folder.getDescription(), 0); - - webServerEntries.add(webServerEntry); - } - - List fileEntries = DLAppServiceUtil.getFileEntries( - groupId, folderId); - - for (FileEntry fileEntry : fileEntries) { - WebServerEntry webServerEntry = new WebServerEntry( - path, fileEntry.getTitle(), fileEntry.getCreateDate(), - fileEntry.getModifiedDate(), fileEntry.getDescription(), - fileEntry.getSize()); - - webServerEntries.add(webServerEntry); - } - - sendHTML(response, path, webServerEntries); - } - - protected void sendFile( - HttpServletRequest request, HttpServletResponse response, - User user, String[] pathArray) - throws Exception { - - FileEntry fileEntry = getFileEntry(pathArray); - - if (fileEntry == null) { - throw new NoSuchFileEntryException(); - } - - String version = ParamUtil.getString(request, "version"); - - if (Validator.isNull(version)) { - if (Validator.isNotNull(fileEntry.getVersion())) { - version = fileEntry.getVersion(); - } - } - - String tempFileId = DLUtil.getTempFileId( - fileEntry.getFileEntryId(), version); - - FileVersion fileVersion = fileEntry.getFileVersion(version); - - String fileName = fileVersion.getTitle(); - - String extension = fileVersion.getExtension(); - - if (Validator.isNotNull(extension) && - !fileName.endsWith(StringPool.PERIOD + extension)) { - - fileName += StringPool.PERIOD + extension; - } - - boolean converted = false; - - String targetExtension = ParamUtil.getString( - request, "targetExtension"); - int imageThumbnail = ParamUtil.getInteger(request, "imageThumbnail"); - int documentThumbnail = ParamUtil.getInteger( - request, "documentThumbnail"); - int previewFileIndex = ParamUtil.getInteger( - request, "previewFileIndex"); - boolean audioPreview = ParamUtil.getBoolean(request, "audioPreview"); - boolean videoPreview = ParamUtil.getBoolean(request, "videoPreview"); - int videoThumbnail = ParamUtil.getInteger(request, "videoThumbnail"); - - InputStream inputStream = null; - long contentLength = 0; - - if ((imageThumbnail > 0) && (imageThumbnail <= 3)) { - fileName = FileUtil.stripExtension(fileName).concat( - StringPool.PERIOD).concat(fileVersion.getExtension()); - - int thumbnailIndex = imageThumbnail - 1; - - inputStream = ImageProcessorUtil.getThumbnailAsStream( - fileVersion, thumbnailIndex); - contentLength = ImageProcessorUtil.getThumbnailFileSize( - fileVersion, thumbnailIndex); - - converted = true; - } - else if ((documentThumbnail > 0) && (documentThumbnail <= 3)) { - fileName = FileUtil.stripExtension(fileName).concat( - StringPool.PERIOD).concat(PDFProcessorImpl.THUMBNAIL_TYPE); - - int thumbnailIndex = documentThumbnail - 1; - - inputStream = PDFProcessorUtil.getThumbnailAsStream( - fileVersion, thumbnailIndex); - contentLength = PDFProcessorUtil.getThumbnailFileSize( - fileVersion, thumbnailIndex); - - converted = true; - } - else if (previewFileIndex > 0) { - fileName = FileUtil.stripExtension(fileName).concat( - StringPool.PERIOD).concat(PDFProcessorImpl.PREVIEW_TYPE); - inputStream = PDFProcessorUtil.getPreviewAsStream( - fileVersion, previewFileIndex); - contentLength = PDFProcessorUtil.getPreviewFileSize( - fileVersion, previewFileIndex); - - converted = true; - } - else if (audioPreview) { - fileName = FileUtil.stripExtension(fileName).concat( - StringPool.PERIOD).concat(AudioProcessor.PREVIEW_TYPE); - inputStream = AudioProcessorUtil.getPreviewAsStream(fileVersion); - contentLength = AudioProcessorUtil.getPreviewFileSize(fileVersion); - - converted = true; - } - else if (videoPreview) { - String type = ParamUtil.getString(request, "type"); - - fileName = FileUtil.stripExtension(fileName).concat( - StringPool.PERIOD).concat(type); - inputStream = VideoProcessorUtil.getPreviewAsStream( - fileVersion, type); - contentLength = VideoProcessorUtil.getPreviewFileSize( - fileVersion, type); - - response.setHeader( - HttpHeaders.ACCEPT_RANGES, - HttpHeaders.ACCEPT_RANGES_BYTES_VALUE); - - List ranges = null; - - try { - ranges = ServletResponseUtil.getRanges( - request, response, contentLength); - } - catch (IOException ioe) { - if (_log.isErrorEnabled()) { - _log.error(ioe); - } - - response.setHeader( - HttpHeaders.CONTENT_RANGE, "bytes */" + contentLength); - - response.sendError( - HttpServletResponse.SC_REQUESTED_RANGE_NOT_SATISFIABLE); - - return; - } - - if ((ranges != null) && (ranges.size() > 0)) { - if (_log.isDebugEnabled()) { - _log.debug("Video range requested"); - } - - String contentType = MimeTypesUtil.getContentType(fileName); - - ServletResponseUtil.write( - request, response, fileName, ranges, inputStream, - contentLength, contentType); - - return; - } - - converted = true; - } - else if ((videoThumbnail > 0) && (videoThumbnail <= 3)) { - fileName = FileUtil.stripExtension(fileName).concat( - StringPool.PERIOD).concat(VideoProcessorImpl.THUMBNAIL_TYPE); - - int thumbnailIndex = videoThumbnail - 1; - - inputStream = VideoProcessorUtil.getThumbnailAsStream( - fileVersion, thumbnailIndex); - contentLength = VideoProcessorUtil.getThumbnailFileSize( - fileVersion, thumbnailIndex); - - converted = true; - } - else { - inputStream = fileVersion.getContentStream(true); - contentLength = fileVersion.getSize(); - - if (Validator.isNotNull(targetExtension)) { - File convertedFile = DocumentConversionUtil.convert( - tempFileId, inputStream, extension, targetExtension); - - if (convertedFile != null) { - fileName = FileUtil.stripExtension(fileName).concat( - StringPool.PERIOD).concat(targetExtension); - inputStream = Files.newInputStream(convertedFile.toPath()); - contentLength = convertedFile.length(); - - converted = true; - } - } - } - - String contentType = null; - - if (converted) { - contentType = MimeTypesUtil.getContentType(fileName); - } - else { - contentType = fileVersion.getMimeType(); - } - - ServletResponseUtil.sendFile( - request, response, fileName, inputStream, contentLength, - contentType); - } - - protected void sendFile( - HttpServletResponse response, User user, long groupId, - long folderId, String title) - throws Exception { - - FileEntry fileEntry = DLAppServiceUtil.getFileEntry( - groupId, folderId, title); - - String contentType = fileEntry.getMimeType(); - - response.setContentType(contentType); - - InputStream inputStream = fileEntry.getContentStream(); - - ServletResponseUtil.write(response, inputStream); - } - - protected void sendGroups( - HttpServletResponse response, User user, String path) - throws Exception { - - if (!PropsValues.WEB_SERVER_SERVLET_DIRECTORY_INDEXING_ENABLED) { - response.setStatus(HttpServletResponse.SC_FORBIDDEN); - - return; - } - - List webServerEntries = new ArrayList(); - - List groups = WebDAVUtil.getGroups(user); - - for (Group group : groups) { - String name = HttpUtil.fixPath(group.getFriendlyURL()); - - WebServerEntry webServerEntry = new WebServerEntry( - path, name + StringPool.SLASH, null, null, - group.getDescription(), 0); - - webServerEntries.add(webServerEntry); - } - - sendHTML(response, path, webServerEntries); - } - - protected void sendHTML( - HttpServletResponse response, String path, - List webServerEntries) - throws Exception { - - FreeMarkerContext freeMarkerContext = - FreeMarkerEngineUtil.getWrappedRestrictedToolsContext(); - - freeMarkerContext.put("dateFormat", _dateFormat); - freeMarkerContext.put("entries", webServerEntries); - freeMarkerContext.put("path", HttpUtil.encodePath(path)); - freeMarkerContext.put("serverInfo", ReleaseInfo.getServerInfo()); - freeMarkerContext.put("validator", Validator_IW.getInstance()); - - String html = FreeMarkerUtil.process(_TEMPLATE_FTL, freeMarkerContext); - - response.setContentType(ContentTypes.TEXT_HTML_UTF8); - - ServletResponseUtil.write(response, html); - } - - protected void writeImage( - Image image, HttpServletRequest request, HttpServletResponse response) { - - if (image == null) { - return; - } - - String contentType = null; - - String type = image.getType(); - - if (!type.equals(ImageConstants.TYPE_NOT_AVAILABLE)) { - contentType = MimeTypesUtil.getContentType("A." + type); - - response.setContentType(contentType); - } - - String fileName = ParamUtil.getString(request, "fileName"); - - try { - byte[] bytes = getImageBytes(request, image); - - if (Validator.isNotNull(fileName)) { - ServletResponseUtil.sendFile( - request, response, fileName, bytes, contentType); - } - else { - ServletResponseUtil.write(response, bytes); - } - } - catch (Exception e) { - if (_log.isWarnEnabled()) { - _log.warn(e, e); - } - } - } - - private static void _checkDDLRecord(String[] pathArray) - throws Exception { - - if (pathArray.length == 2) { - long recordId = GetterUtil.getLong(pathArray[1]); - - DDLRecordLocalServiceUtil.getRecord(recordId); - } - } - - private static void _checkFileEntry(String[] pathArray) - throws Exception { - - if (pathArray.length == 1) { - long dlFileShortcutId = GetterUtil.getLong(pathArray[0]); - - DLFileShortcut dlFileShortcut = - DLAppLocalServiceUtil.getFileShortcut(dlFileShortcutId); - - DLAppLocalServiceUtil.getFileEntry( - dlFileShortcut.getToFileEntryId()); - } - else if (pathArray.length == 2) { - - // Unable to check with UUID because of multiple repositories - - } - else { - long groupId = GetterUtil.getLong(pathArray[0]); - long folderId = GetterUtil.getLong(pathArray[1]); - String fileName = pathArray[2]; - - try { - DLAppLocalServiceUtil.getFileEntry(groupId, folderId, fileName); - } - catch (RepositoryException re) { - } - } - } - - private static long _getGroupId(long companyId, String name) - throws Exception { - - try { - Group group = GroupLocalServiceUtil.getFriendlyURLGroup( - companyId, StringPool.SLASH + name); - - return group.getGroupId(); - } - catch (NoSuchGroupException nsge) { - } - - User user = UserLocalServiceUtil.getUserByScreenName(companyId, name); - - Group group = user.getGroup(); - - return group.getGroupId(); - } - - private static User _getUser(HttpServletRequest request) throws Exception { - HttpSession session = request.getSession(); - - if (PortalSessionThreadLocal.getHttpSession() == null) { - PortalSessionThreadLocal.setHttpSession(session); - } - - User user = PortalUtil.getUser(request); - - if (user != null) { - return user; - } - - String userIdString = (String)session.getAttribute("j_username"); - String password = (String)session.getAttribute("j_password"); - - if ((userIdString != null) && (password != null)) { - long userId = GetterUtil.getLong(userIdString); - - user = UserLocalServiceUtil.getUser(userId); - } - else { - long companyId = PortalUtil.getCompanyId(request); - - Company company = CompanyLocalServiceUtil.getCompany(companyId); - - user = company.getDefaultUser(); - } - - return user; - } - - private static final String _DATE_FORMAT_PATTERN = "d MMM yyyy HH:mm z"; - - private static final String _PATH_DDL = "ddl"; - - private static final String _TEMPLATE_FTL = - "com/liferay/portal/webserver/dependencies/template.ftl"; - - private static Log _log = LogFactoryUtil.getLog(WebServerServlet.class); - - private static Format _dateFormat = - FastDateFormatFactoryUtil.getSimpleDateFormat(_DATE_FORMAT_PATTERN); - - private boolean _lastModified = true; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay71-deprecated-methods-test/JournalArticleLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay71-deprecated-methods-test/JournalArticleLocalServiceUtil.java deleted file mode 100644 index 3f2a40fb40..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay71-deprecated-methods-test/JournalArticleLocalServiceUtil.java +++ /dev/null @@ -1,4436 +0,0 @@ -/** - * 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 com.liferay.journal.service; - -import org.osgi.framework.Bundle; -import org.osgi.framework.FrameworkUtil; -import org.osgi.util.tracker.ServiceTracker; - -/** - * Provides the local service utility for JournalArticle. This utility wraps - * com.liferay.journal.service.impl.JournalArticleLocalServiceImpl and - * is an 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 Brian Wing Shun Chan - * @see JournalArticleLocalService - * @generated - */ -public class JournalArticleLocalServiceUtil { - - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to com.liferay.journal.service.impl.JournalArticleLocalServiceImpl and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds a web content article with additional parameters. All scheduling - * parameters (display date, expiration date, and review date) use the - * current user's timezone. - * - *

    - * The web content articles hold HTML content wrapped in XML. The XML lets - * you specify the article's default locale and available locales. Here is a - * content example: - *

    - * - *

    - *

    -	 * 
    -	 * <?xml version='1.0' encoding='UTF-8'?>
    -	 * <root default-locale="en_US" available-locales="en_US">
    -	 * 	<static-content language-id="en_US">
    -	 * 		<![CDATA[<p><b><i>test<i> content<b></p>]]>
    -	 * 	</static-content>
    -	 * </root>
    -	 * 
    -	 * 

    - * - * @param userId the primary key of the web content article's creator/owner - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param classPK the primary key of the DDM structure, if the primary key - of the DDMStructure class is given as the - classNameId parameter, the primary key of the class - associated with the web content article, or 0 - otherwise - * @param articleId the primary key of the web content article - * @param autoArticleId whether to auto generate the web content article ID - * @param version the web content article's version - * @param titleMap the web content article's locales and localized titles - * @param descriptionMap the web content article's locales and localized - descriptions - * @param friendlyURLMap the web content article's locales and localized - friendly URLs - * @param content the HTML content wrapped in XML - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param layoutUuid the unique string identifying the web content - article's display page - * @param displayDateMonth the month the web content article is set to - display - * @param displayDateDay the calendar day the web content article is set to - display - * @param displayDateYear the year the web content article is set to - display - * @param displayDateHour the hour the web content article is set to - display - * @param displayDateMinute the minute the web content article is set to - display - * @param expirationDateMonth the month the web content article is set to - expire - * @param expirationDateDay the calendar day the web content article is set - to expire - * @param expirationDateYear the year the web content article is set to - expire - * @param expirationDateHour the hour the web content article is set to - expire - * @param expirationDateMinute the minute the web content article is set to - expire - * @param neverExpire whether the web content article is not set to auto - expire - * @param reviewDateMonth the month the web content article is set for - review - * @param reviewDateDay the calendar day the web content article is set for - review - * @param reviewDateYear the year the web content article is set for review - * @param reviewDateHour the hour the web content article is set for review - * @param reviewDateMinute the minute the web content article is set for - review - * @param neverReview whether the web content article is not set for review - * @param indexable whether the web content article is searchable - * @param smallImage whether the web content article has a small image - * @param smallImageURL the web content article's small image URL - * @param smallImageFile the web content article's small image file - * @param images the web content's images - * @param articleURL the web content article's accessible URL - * @param serviceContext the service context to be applied. Can set the - UUID, creation date, modification date, expando bridge - attributes, guest permissions, group permissions, asset category - IDs, asset tag names, asset link entry IDs, URL title, and - workflow actions for the web content article. Can also set - whether to add the default guest and group permissions. - * @return the web content article - */ - public static com.liferay.journal.model.JournalArticle addArticle( - long userId, long groupId, long folderId, long classNameId, - long classPK, String articleId, boolean autoArticleId, - double version, java.util.Map titleMap, - java.util.Map descriptionMap, - java.util.Map friendlyURLMap, - String content, String ddmStructureKey, String ddmTemplateKey, - String layoutUuid, int displayDateMonth, int displayDateDay, - int displayDateYear, int displayDateHour, int displayDateMinute, - int expirationDateMonth, int expirationDateDay, - int expirationDateYear, int expirationDateHour, - int expirationDateMinute, boolean neverExpire, int reviewDateMonth, - int reviewDateDay, int reviewDateYear, int reviewDateHour, - int reviewDateMinute, boolean neverReview, boolean indexable, - boolean smallImage, String smallImageURL, - java.io.File smallImageFile, java.util.Map images, - String articleURL, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addArticle( - userId, groupId, folderId, classNameId, classPK, articleId, - autoArticleId, version, titleMap, descriptionMap, friendlyURLMap, - content, ddmStructureKey, ddmTemplateKey, layoutUuid, - displayDateMonth, displayDateDay, displayDateYear, displayDateHour, - displayDateMinute, expirationDateMonth, expirationDateDay, - expirationDateYear, expirationDateHour, expirationDateMinute, - neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear, - reviewDateHour, reviewDateMinute, neverReview, indexable, - smallImage, smallImageURL, smallImageFile, images, articleURL, - serviceContext); - } - - /** - * Adds a web content article with additional parameters. All scheduling - * parameters (display date, expiration date, and review date) use the - * current user's timezone. - * - *

    - * The web content articles hold HTML content wrapped in XML. The XML lets - * you specify the article's default locale and available locales. Here is a - * content example: - *

    - * - *

    - *

    -	 * 
    -	 * <?xml version='1.0' encoding='UTF-8'?>
    -	 * <root default-locale="en_US" available-locales="en_US">
    -	 * 	<static-content language-id="en_US">
    -	 * 		<![CDATA[<p><b><i>test<i> content<b></p>]]>
    -	 * 	</static-content>
    -	 * </root>
    -	 * 
    -	 * 

    - * - * @param userId the primary key of the web content article's creator/owner - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param classPK the primary key of the DDM structure, if the primary key - of the DDMStructure class is given as the - classNameId parameter, the primary key of the class - associated with the web content article, or 0 - otherwise - * @param articleId the primary key of the web content article - * @param autoArticleId whether to auto generate the web content article ID - * @param version the web content article's version - * @param titleMap the web content article's locales and localized titles - * @param descriptionMap the web content article's locales and localized - descriptions - * @param content the HTML content wrapped in XML - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param layoutUuid the unique string identifying the web content - article's display page - * @param displayDateMonth the month the web content article is set to - display - * @param displayDateDay the calendar day the web content article is set to - display - * @param displayDateYear the year the web content article is set to - display - * @param displayDateHour the hour the web content article is set to - display - * @param displayDateMinute the minute the web content article is set to - display - * @param expirationDateMonth the month the web content article is set to - expire - * @param expirationDateDay the calendar day the web content article is set - to expire - * @param expirationDateYear the year the web content article is set to - expire - * @param expirationDateHour the hour the web content article is set to - expire - * @param expirationDateMinute the minute the web content article is set to - expire - * @param neverExpire whether the web content article is not set to auto - expire - * @param reviewDateMonth the month the web content article is set for - review - * @param reviewDateDay the calendar day the web content article is set for - review - * @param reviewDateYear the year the web content article is set for review - * @param reviewDateHour the hour the web content article is set for review - * @param reviewDateMinute the minute the web content article is set for - review - * @param neverReview whether the web content article is not set for review - * @param indexable whether the web content article is searchable - * @param smallImage whether the web content article has a small image - * @param smallImageURL the web content article's small image URL - * @param smallImageFile the web content article's small image file - * @param images the web content's images - * @param articleURL the web content article's accessible URL - * @param serviceContext the service context to be applied. Can set the - UUID, creation date, modification date, expando bridge - attributes, guest permissions, group permissions, asset category - IDs, asset tag names, asset link entry IDs, URL title, and - workflow actions for the web content article. Can also set - whether to add the default guest and group permissions. - * @return the web content article - */ - public static com.liferay.journal.model.JournalArticle addArticle( - long userId, long groupId, long folderId, long classNameId, - long classPK, String articleId, boolean autoArticleId, - double version, java.util.Map titleMap, - java.util.Map descriptionMap, - String content, String ddmStructureKey, String ddmTemplateKey, - String layoutUuid, int displayDateMonth, int displayDateDay, - int displayDateYear, int displayDateHour, int displayDateMinute, - int expirationDateMonth, int expirationDateDay, - int expirationDateYear, int expirationDateHour, - int expirationDateMinute, boolean neverExpire, int reviewDateMonth, - int reviewDateDay, int reviewDateYear, int reviewDateHour, - int reviewDateMinute, boolean neverReview, boolean indexable, - boolean smallImage, String smallImageURL, - java.io.File smallImageFile, java.util.Map images, - String articleURL, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addArticle( - userId, groupId, folderId, classNameId, classPK, articleId, - autoArticleId, version, titleMap, descriptionMap, content, - ddmStructureKey, ddmTemplateKey, layoutUuid, displayDateMonth, - displayDateDay, displayDateYear, displayDateHour, displayDateMinute, - expirationDateMonth, expirationDateDay, expirationDateYear, - expirationDateHour, expirationDateMinute, neverExpire, - reviewDateMonth, reviewDateDay, reviewDateYear, reviewDateHour, - reviewDateMinute, neverReview, indexable, smallImage, smallImageURL, - smallImageFile, images, articleURL, serviceContext); - } - - /** - * Adds a web content article. - * - * @param userId the primary key of the web content article's creator/owner - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @param titleMap the web content article's locales and localized titles - * @param descriptionMap the web content article's locales and localized - descriptions - * @param content the HTML content wrapped in XML. For more information, - see the content example in the {@link #addArticle(long, long, - long, long, long, String, boolean, double, Map, Map, String, - String, String, String, int, int, int, int, int, int, int, int, - int, int, boolean, int, int, int, int, int, boolean, boolean, - boolean, String, File, Map, String, ServiceContext)} description. - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param serviceContext the service context to be applied. Can set the - UUID, creation date, modification date, expando bridge - attributes, guest permissions, group permissions, asset category - IDs, asset tag names, asset link entry IDs, asset priority, URL - title, and workflow actions for the web content article. Can also - set whether to add the default guest and group permissions. - * @return the web content article - */ - public static com.liferay.journal.model.JournalArticle addArticle( - long userId, long groupId, long folderId, - java.util.Map titleMap, - java.util.Map descriptionMap, - String content, String ddmStructureKey, String ddmTemplateKey, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addArticle( - userId, groupId, folderId, titleMap, descriptionMap, content, - ddmStructureKey, ddmTemplateKey, serviceContext); - } - - /** - * Adds the resources to the web content article. - * - * @param article the web content article - * @param addGroupPermissions whether to add group permissions - * @param addGuestPermissions whether to add guest permissions - */ - public static void addArticleResources( - com.liferay.journal.model.JournalArticle article, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().addArticleResources( - article, addGroupPermissions, addGuestPermissions); - } - - /** - * Adds the model resources with the permissions to the web content article. - * - * @param article the web content article to add resources to - * @param groupPermissions the group permissions to be added - * @param guestPermissions the guest permissions to be added - */ - public static void addArticleResources( - com.liferay.journal.model.JournalArticle article, - String[] groupPermissions, String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().addArticleResources( - article, groupPermissions, guestPermissions); - } - - /** - * Adds the resources to the most recently created web content article. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param addGroupPermissions whether to add group permissions - * @param addGuestPermissions whether to add guest permissions - */ - public static void addArticleResources( - long groupId, String articleId, boolean addGroupPermissions, - boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().addArticleResources( - groupId, articleId, addGroupPermissions, addGuestPermissions); - } - - /** - * Adds the resources with the permissions to the most recently created web - * content article. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param groupPermissions the group permissions to be added - * @param guestPermissions the guest permissions to be added - */ - public static void addArticleResources( - long groupId, String articleId, String[] groupPermissions, - String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().addArticleResources( - groupId, articleId, groupPermissions, guestPermissions); - } - - /** - * Adds the journal article to the database. Also notifies the appropriate model listeners. - * - *

    - * Important: Inspect JournalArticleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there. - *

    - * - * @param journalArticle the journal article - * @return the journal article that was added - */ - public static com.liferay.journal.model.JournalArticle addJournalArticle( - com.liferay.journal.model.JournalArticle journalArticle) { - - return getService().addJournalArticle(journalArticle); - } - - /** - * Returns the web content article with the group, article ID, and version. - * This method checks for the article's resource primary key and, if not - * found, creates a new one. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @return the matching web content article - */ - public static com.liferay.journal.model.JournalArticle - checkArticleResourcePrimKey( - long groupId, String articleId, double version) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().checkArticleResourcePrimKey( - groupId, articleId, version); - } - - /** - * Checks all web content articles by handling their expirations and sending - * review notifications based on their current workflow. - */ - public static void checkArticles() - throws com.liferay.portal.kernel.exception.PortalException { - - getService().checkArticles(); - } - - /** - * Checks the web content article matching the group, article ID, and - * version, replacing escaped newline and return characters with non-escaped - * newline and return characters. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - */ - public static void checkNewLine( - long groupId, String articleId, double version) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().checkNewLine(groupId, articleId, version); - } - - /** - * Checks the web content article matching the group, article ID, and - * version for an associated structure. If no structure is associated, - * return; otherwise check that the article and structure match. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - */ - public static void checkStructure( - long groupId, String articleId, double version) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().checkStructure(groupId, articleId, version); - } - - /** - * Copies the web content article matching the group, article ID, and - * version. This method creates a new article, extracting all the values - * from the old one and updating its article ID. - * - * @param userId the primary key of the web content article's creator/owner - * @param groupId the primary key of the web content article's group - * @param oldArticleId the primary key of the old web content article - * @param newArticleId the primary key of the new web content article - * @param autoArticleId whether to auto-generate the web content article ID - * @param version the web content article's version - * @return the new web content article - */ - public static com.liferay.journal.model.JournalArticle copyArticle( - long userId, long groupId, String oldArticleId, String newArticleId, - boolean autoArticleId, double version) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().copyArticle( - userId, groupId, oldArticleId, newArticleId, autoArticleId, - version); - } - - /** - * Creates a new journal article with the primary key. Does not add the journal article to the database. - * - * @param id the primary key for the new journal article - * @return the new journal article - */ - public static com.liferay.journal.model.JournalArticle createJournalArticle( - long id) { - - return getService().createJournalArticle(id); - } - - /** - * Deletes the web content article and its resources. - * - * @param article the web content article - * @return the deleted web content article - */ - public static com.liferay.journal.model.JournalArticle deleteArticle( - com.liferay.journal.model.JournalArticle article) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().deleteArticle(article); - } - - /** - * Deletes the web content article and its resources, optionally sending - * email notifying denial of the article if it had not yet been approved. - * - * @param article the web content article - * @param articleURL the web content article's accessible URL to include in - email notifications (optionally null) - * @param serviceContext the service context to be applied (optionally - null). Can set the portlet preferences that include - email information to notify recipients of the unapproved web - content's denial. - * @return the deleted web content article - */ - public static com.liferay.journal.model.JournalArticle deleteArticle( - com.liferay.journal.model.JournalArticle article, String articleURL, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().deleteArticle(article, articleURL, serviceContext); - } - - /** - * Deletes the web content article and its resources matching the group, - * article ID, and version, optionally sending email notifying denial of the - * web content article if it had not yet been approved. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param articleURL the web content article's accessible URL - * @param serviceContext the service context to be applied. Can set the - portlet preferences that include email information to notify - recipients of the unapproved web content article's denial. - * @return the deleted web content article - */ - public static com.liferay.journal.model.JournalArticle deleteArticle( - long groupId, String articleId, double version, String articleURL, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().deleteArticle( - groupId, articleId, version, articleURL, serviceContext); - } - - /** - * Deletes all web content articles and their resources matching the group - * and article ID, optionally sending email notifying denial of article if - * it had not yet been approved. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param serviceContext the service context to be applied. Can set the - portlet preferences that include email information to notify - recipients of the unapproved web content article's denial. - */ - public static void deleteArticle( - long groupId, String articleId, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteArticle(groupId, articleId, serviceContext); - } - - /** - * Deletes all the group's web content articles and resources. - * - * @param groupId the primary key of the web content article's group - */ - public static void deleteArticles(long groupId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteArticles(groupId); - } - - /** - * Deletes all the group's web content articles and resources in the folder, - * including recycled articles. - * - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - */ - public static void deleteArticles(long groupId, long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteArticles(groupId, folderId); - } - - /** - * Deletes all the group's web content articles and resources in the folder, - * optionally including recycled articles. - * - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @param includeTrashedEntries whether to include recycled web content - articles - */ - public static void deleteArticles( - long groupId, long folderId, boolean includeTrashedEntries) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteArticles(groupId, folderId, includeTrashedEntries); - } - - /** - * Deletes all the group's web content articles and resources matching the - * class name and class primary key. - * - * @param groupId the primary key of the web content article's group - * @param className the DDMStructure class name if the web content article - is related to a DDM structure, the primary key of the class name - associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param classPK the primary key of the DDM structure, if the DDMStructure - class name is given as the className parameter, the - primary key of the class associated with the web content article, - or 0 otherwise - */ - public static void deleteArticles( - long groupId, String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteArticles(groupId, className, classPK); - } - - /** - * Deletes the journal article from the database. Also notifies the appropriate model listeners. - * - *

    - * Important: Inspect JournalArticleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there. - *

    - * - * @param journalArticle the journal article - * @return the journal article that was removed - */ - public static com.liferay.journal.model.JournalArticle deleteJournalArticle( - com.liferay.journal.model.JournalArticle journalArticle) { - - return getService().deleteJournalArticle(journalArticle); - } - - /** - * Deletes the journal article with the primary key from the database. Also notifies the appropriate model listeners. - * - *

    - * Important: Inspect JournalArticleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there. - *

    - * - * @param id the primary key of the journal article - * @return the journal article that was removed - * @throws PortalException if a journal article with the primary key could not be found - */ - public static com.liferay.journal.model.JournalArticle deleteJournalArticle( - long id) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().deleteJournalArticle(id); - } - - /** - * Deletes the layout's association with the web content articles for the - * group. - * - * @param groupId the primary key of the web content article's group - * @param layoutUuid the unique string identifying the web content article's - display page - */ - public static void deleteLayoutArticleReferences( - long groupId, String layoutUuid) { - - getService().deleteLayoutArticleReferences(groupId, layoutUuid); - } - - /** - * @throws PortalException - */ - public static com.liferay.portal.kernel.model.PersistedModel - deletePersistedModel( - com.liferay.portal.kernel.model.PersistedModel persistedModel) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().deletePersistedModel(persistedModel); - } - - 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 - */ - public static java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { - - return getService().dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.journal.model.impl.JournalArticleModelImpl. - *

    - * - * @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 - */ - public static java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, - int end) { - - return getService().dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.journal.model.impl.JournalArticleModelImpl. - *

    - * - * @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 null) - * @return the ordered range of matching rows - */ - 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) { - - return getService().dynamicQuery( - dynamicQuery, start, end, orderByComparator); - } - - /** - * Returns the number of rows matching the dynamic query. - * - * @param dynamicQuery the dynamic query - * @return the number of rows matching the dynamic query - */ - public static long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { - - return getService().dynamicQueryCount(dynamicQuery); - } - - /** - * Returns the number of rows matching the dynamic query. - * - * @param dynamicQuery the dynamic query - * @param projection the projection to apply to the query - * @return the number of rows matching the dynamic query - */ - public static long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, - com.liferay.portal.kernel.dao.orm.Projection projection) { - - return getService().dynamicQueryCount(dynamicQuery, projection); - } - - /** - * Expires the web content article matching the group, article ID, and - * version. - * - * @param userId the primary key of the user updating the web content - article - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param articleURL the web content article's accessible URL - * @param serviceContext the service context to be applied. Can set the - modification date, status date, portlet preferences, and can set - whether to add the default command update for the web content - article. With respect to social activities, by setting the - service context's command to {@link Constants#UPDATE}, the - invocation is considered a web content update activity; otherwise - it is considered a web content add activity. - * @return the web content article - */ - public static com.liferay.journal.model.JournalArticle expireArticle( - long userId, long groupId, String articleId, double version, - String articleURL, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().expireArticle( - userId, groupId, articleId, version, articleURL, serviceContext); - } - - /** - * Expires the web content article matching the group and article ID, - * expiring all of its versions if the - * journal.article.expire.all.versions portal property is - * true, otherwise expiring only its latest approved version. - * - * @param userId the primary key of the user updating the web content - article - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param articleURL the web content article's accessible URL - * @param serviceContext the service context to be applied. Can set the - modification date, status date, portlet preferences, and can set - whether to add the default command update for the web content - article. With respect to social activities, by setting the service - context's command to {@link Constants#UPDATE}, the invocation is - considered a web content update activity; otherwise it is - considered a web content add activity. - */ - public static void expireArticle( - long userId, long groupId, String articleId, String articleURL, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().expireArticle( - userId, groupId, articleId, articleURL, serviceContext); - } - - /** - * Returns the web content article with the ID. - * - * @param id the primary key of the web content article - * @return the web content article with the ID - */ - public static com.liferay.journal.model.JournalArticle fetchArticle( - long id) { - - return getService().fetchArticle(id); - } - - public static com.liferay.journal.model.JournalArticle fetchArticle( - long groupId, String articleId) { - - return getService().fetchArticle(groupId, articleId); - } - - /** - * Returns the web content article matching the group, article ID, and - * version. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @return the web content article matching the group, article ID, and - version, or null if no web content article could be - found - */ - public static com.liferay.journal.model.JournalArticle fetchArticle( - long groupId, String articleId, double version) { - - return getService().fetchArticle(groupId, articleId, version); - } - - public static com.liferay.journal.model.JournalArticle - fetchArticleByUrlTitle(long groupId, String urlTitle) { - - return getService().fetchArticleByUrlTitle(groupId, urlTitle); - } - - public static com.liferay.journal.model.JournalArticle - fetchArticleByUrlTitle(long groupId, String urlTitle, double version) { - - return getService().fetchArticleByUrlTitle(groupId, urlTitle, version); - } - - public static com.liferay.journal.model.JournalArticle fetchDisplayArticle( - long groupId, String articleId) { - - return getService().fetchDisplayArticle(groupId, articleId); - } - - public static com.liferay.journal.model.JournalArticle fetchJournalArticle( - long id) { - - return getService().fetchJournalArticle(id); - } - - /** - * Returns the journal article matching the UUID and group. - * - * @param uuid the journal article's UUID - * @param groupId the primary key of the group - * @return the matching journal article, or null if a matching journal article could not be found - */ - public static com.liferay.journal.model.JournalArticle - fetchJournalArticleByUuidAndGroupId(String uuid, long groupId) { - - return getService().fetchJournalArticleByUuidAndGroupId(uuid, groupId); - } - - public static com.liferay.journal.model.JournalArticle fetchLatestArticle( - long resourcePrimKey) { - - return getService().fetchLatestArticle(resourcePrimKey); - } - - public static com.liferay.journal.model.JournalArticle fetchLatestArticle( - long resourcePrimKey, int status) { - - return getService().fetchLatestArticle(resourcePrimKey, status); - } - - /** - * Returns the latest web content article matching the resource primary key - * and workflow status, optionally preferring articles with approved - * workflow status. - * - * @param resourcePrimKey the primary key of the resource instance - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param preferApproved whether to prefer returning the latest matching - article that has workflow status {@link - WorkflowConstants#STATUS_APPROVED} over returning one that has a - different status - * @return the latest web content article matching the resource primary key - and workflow status, optionally preferring articles with an - approved workflow status, or null if no matching web - content article could be found - */ - public static com.liferay.journal.model.JournalArticle fetchLatestArticle( - long resourcePrimKey, int status, boolean preferApproved) { - - return getService().fetchLatestArticle( - resourcePrimKey, status, preferApproved); - } - - public static com.liferay.journal.model.JournalArticle fetchLatestArticle( - long resourcePrimKey, int[] statuses) { - - return getService().fetchLatestArticle(resourcePrimKey, statuses); - } - - /** - * Returns the latest web content article matching the group, article ID, - * and workflow status. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the latest matching web content article, or null if - no matching web content article could be found - */ - public static com.liferay.journal.model.JournalArticle fetchLatestArticle( - long groupId, String articleId, int status) { - - return getService().fetchLatestArticle(groupId, articleId, status); - } - - public static com.liferay.journal.model.JournalArticle - fetchLatestArticleByUrlTitle( - long groupId, String urlTitle, int status) { - - return getService().fetchLatestArticleByUrlTitle( - groupId, urlTitle, status); - } - - /** - * Returns the latest indexable web content article matching the resource - * primary key. - * - * @param resourcePrimKey the primary key of the resource instance - * @return the latest indexable web content article matching the resource - primary key, or null if no matching web content - article could be found - */ - public static com.liferay.journal.model.JournalArticle - fetchLatestIndexableArticle(long resourcePrimKey) { - - return getService().fetchLatestIndexableArticle(resourcePrimKey); - } - - public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery - getActionableDynamicQuery() { - - return getService().getActionableDynamicQuery(); - } - - /** - * Returns the web content article with the ID. - * - * @param id the primary key of the web content article - * @return the web content article with the ID - */ - public static com.liferay.journal.model.JournalArticle getArticle(long id) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticle(id); - } - - /** - * Returns the latest approved web content article, or the latest unapproved - * article if none are approved. Both approved and unapproved articles must - * match the group and article ID. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @return the matching web content article - */ - public static com.liferay.journal.model.JournalArticle getArticle( - long groupId, String articleId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticle(groupId, articleId); - } - - /** - * Returns the web content article matching the group, article ID, and - * version. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @return the matching web content article - */ - public static com.liferay.journal.model.JournalArticle getArticle( - long groupId, String articleId, double version) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticle(groupId, articleId, version); - } - - /** - * Returns the web content article matching the group, class name, and class - * PK. - * - * @param groupId the primary key of the web content article's group - * @param className the DDMStructure class name if the web content article - is related to a DDM structure, the primary key of the class name - associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param classPK the primary key of the DDM structure, if the DDMStructure - class name is given as the className parameter, the - primary key of the class associated with the web content article, - or 0 otherwise - * @return the matching web content article - */ - public static com.liferay.journal.model.JournalArticle getArticle( - long groupId, String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticle(groupId, className, classPK); - } - - /** - * Returns the latest web content article that is approved, or the latest - * unapproved article if none are approved. Both approved and unapproved - * articles must match the group and URL title. - * - * @param groupId the primary key of the web content article's group - * @param urlTitle the web content article's accessible URL title - * @return the matching web content article - */ - public static com.liferay.journal.model.JournalArticle getArticleByUrlTitle( - long groupId, String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleByUrlTitle(groupId, urlTitle); - } - - /** - * Returns the web content from the web content article associated with the - * portlet request model and the DDM template. - * - * @param article the web content article - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param portletRequestModel the portlet request model - * @param themeDisplay the theme display - * @return the web content from the web content article associated with the - portlet request model and the DDM template - */ - public static String getArticleContent( - com.liferay.journal.model.JournalArticle article, - String ddmTemplateKey, String viewMode, String languageId, - com.liferay.portal.kernel.portlet.PortletRequestModel - portletRequestModel, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleContent( - article, ddmTemplateKey, viewMode, languageId, portletRequestModel, - themeDisplay); - } - - /** - * Returns the web content from the web content article associated with the - * DDM template. - * - * @param article the web content article - * @param ddmTemplateKey the primary key of the web content article's - DDM template - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param themeDisplay the theme display - * @return the web content from the matching web content article - * @deprecated As of Wilberforce (7.0.x), replaced by {@link - #getArticleContent(JournalArticle, String, String, String, - PortletRequestModel,ThemeDisplay)} - */ - @Deprecated - public static String getArticleContent( - com.liferay.journal.model.JournalArticle article, - String ddmTemplateKey, String viewMode, String languageId, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleContent( - article, ddmTemplateKey, viewMode, languageId, themeDisplay); - } - - /** - * Returns the web content from the web content article matching the group, - * article ID, and version, and associated with the portlet request model - * and the DDM template. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param viewMode the mode in which the web content is being viewed - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param languageId the primary key of the language translation to get - * @param portletRequestModel the portlet request model - * @param themeDisplay the theme display - * @return the web content from the matching web content article - */ - public static String getArticleContent( - long groupId, String articleId, double version, String viewMode, - String ddmTemplateKey, String languageId, - com.liferay.portal.kernel.portlet.PortletRequestModel - portletRequestModel, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleContent( - groupId, articleId, version, viewMode, ddmTemplateKey, languageId, - portletRequestModel, themeDisplay); - } - - /** - * Returns the web content from the web content article matching the group, - * article ID, and version, and associated with the DDM template. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param viewMode the mode in which the web content is being viewed - * @param ddmTemplateKey the primary key of the web content article's - DDM template (optionally null). If the article - is related to a DDM structure, the template's structure must - match it. - * @param languageId the primary key of the language translation to get - * @param themeDisplay the theme display - * @return the web content from the matching web content article - * @deprecated As of Wilberforce (7.0.x), replaced by {@link - #getArticleContent(long, String, double, String, String, - String, PortletRequestModel, ThemeDisplay)} - */ - @Deprecated - public static String getArticleContent( - long groupId, String articleId, double version, String viewMode, - String ddmTemplateKey, String languageId, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleContent( - groupId, articleId, version, viewMode, ddmTemplateKey, languageId, - themeDisplay); - } - - /** - * Returns the web content from the web content article matching the group, - * article ID, and version. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param themeDisplay the theme display - * @return the web content from the matching web content article - * @deprecated As of Wilberforce (7.0.x), replaced by {@link - #getArticleContent(long, String, double, String, String, - String, PortletRequestModel, ThemeDisplay)} - */ - @Deprecated - public static String getArticleContent( - long groupId, String articleId, double version, String viewMode, - String languageId, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleContent( - groupId, articleId, version, viewMode, languageId, themeDisplay); - } - - /** - * Returns the latest web content from the web content article matching the - * group and article ID, and associated with the portlet request model and - * the DDM template. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param viewMode the mode in which the web content is being viewed - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param languageId the primary key of the language translation to get - * @param portletRequestModel the portlet request model - * @param themeDisplay the theme display - * @return the latest web content from the matching web content article - */ - public static String getArticleContent( - long groupId, String articleId, String viewMode, - String ddmTemplateKey, String languageId, - com.liferay.portal.kernel.portlet.PortletRequestModel - portletRequestModel, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleContent( - groupId, articleId, viewMode, ddmTemplateKey, languageId, - portletRequestModel, themeDisplay); - } - - /** - * Returns the latest web content from the web content article matching the - * group and article ID, and associated with the DDM template. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param viewMode the mode in which the web content is being viewed - * @param ddmTemplateKey the primary key of the web content article's - DDM template - * @param languageId the primary key of the language translation to get - * @param themeDisplay the theme display - * @return the latest web content from the matching web content article - * @deprecated As of Wilberforce (7.0.x), replaced by {@link - #getArticleContent(long, String, String, String, String, - PortletRequestModel, ThemeDisplay)} - */ - @Deprecated - public static String getArticleContent( - long groupId, String articleId, String viewMode, - String ddmTemplateKey, String languageId, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleContent( - groupId, articleId, viewMode, ddmTemplateKey, languageId, - themeDisplay); - } - - /** - * Returns the latest web content from the web content article matching the - * group and article ID. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param themeDisplay the theme display - * @return the latest web content from the matching web content article - * @deprecated As of Wilberforce (7.0.x), replaced by {@link - #getArticleContent(long, String, String, String, String, - PortletRequestModel, ThemeDisplay)} - */ - @Deprecated - public static String getArticleContent( - long groupId, String articleId, String viewMode, String languageId, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleContent( - groupId, articleId, viewMode, languageId, themeDisplay); - } - - public static String getArticleDescription( - long articlePK, java.util.Locale locale) { - - return getService().getArticleDescription(articlePK, locale); - } - - public static String getArticleDescription( - long articlePK, String languageId) { - - return getService().getArticleDescription(articlePK, languageId); - } - - public static java.util.Map - getArticleDescriptionMap(long articlePK) { - - return getService().getArticleDescriptionMap(articlePK); - } - - /** - * Returns a web content article display for the specified page of the - * latest version of the web content article, based on the DDM template. Web - * content transformation tokens are added using the portlet request model - * and theme display. - * - * @param article the primary key of the web content article - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param page the web content article page to display - * @param portletRequestModel the portlet request model - * @param themeDisplay the theme display - * @return the web content article display, or null if the - article has expired or if article's display date/time is after - the current date/time - */ - public static com.liferay.journal.model.JournalArticleDisplay - getArticleDisplay( - com.liferay.journal.model.JournalArticle article, - String ddmTemplateKey, String viewMode, String languageId, - int page, - com.liferay.portal.kernel.portlet.PortletRequestModel - portletRequestModel, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleDisplay( - article, ddmTemplateKey, viewMode, languageId, page, - portletRequestModel, themeDisplay); - } - - /** - * Returns a web content article display for the specified page of the - * specified version of the web content article matching the group, article - * ID, and DDM template. Web content transformation tokens are added using - * the portlet request model and theme display. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param page the web content article page to display - * @param portletRequestModel the portlet request model - * @param themeDisplay the theme display - * @return the web content article display, or null if the - article has expired or if article's display date/time is after - the current date/time - */ - public static com.liferay.journal.model.JournalArticleDisplay - getArticleDisplay( - long groupId, String articleId, double version, - String ddmTemplateKey, String viewMode, String languageId, - int page, - com.liferay.portal.kernel.portlet.PortletRequestModel - portletRequestModel, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleDisplay( - groupId, articleId, version, ddmTemplateKey, viewMode, languageId, - page, portletRequestModel, themeDisplay); - } - - /** - * Returns a web content article display for the first page of the specified - * version of the web content article matching the group, article ID, and - * DDM template. Web content transformation tokens are added from the theme - * display (if not null). - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param themeDisplay the theme display - * @return the web content article display, or null if the - article has expired or if article's display date/time is after - the current date/time - */ - public static com.liferay.journal.model.JournalArticleDisplay - getArticleDisplay( - long groupId, String articleId, double version, - String ddmTemplateKey, String viewMode, String languageId, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleDisplay( - groupId, articleId, version, ddmTemplateKey, viewMode, languageId, - themeDisplay); - } - - /** - * Returns a web content article display for the specified page of the - * latest version of the web content article matching the group and article - * ID. Web content transformation tokens are added from the theme display - * (if not null). - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param page the web content article page to display - * @param portletRequestModel the portlet request model - * @param themeDisplay the theme display - * @return the web content article display, or null if the - article has expired or if article's display date/time is after - the current date/time - */ - public static com.liferay.journal.model.JournalArticleDisplay - getArticleDisplay( - long groupId, String articleId, String viewMode, - String languageId, int page, - com.liferay.portal.kernel.portlet.PortletRequestModel - portletRequestModel, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleDisplay( - groupId, articleId, viewMode, languageId, page, portletRequestModel, - themeDisplay); - } - - /** - * Returns a web content article display for the specified page of the - * latest version of the web content article matching the group, article ID, - * and DDM template. Web content transformation tokens are added using the - * portlet request model and theme display. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param page the web content article page to display - * @param portletRequestModel the portlet request model - * @param themeDisplay the theme display - * @return the web content article display, or null if the - article has expired or if article's display date/time is after - the current date/time - */ - public static com.liferay.journal.model.JournalArticleDisplay - getArticleDisplay( - long groupId, String articleId, String ddmTemplateKey, - String viewMode, String languageId, int page, - com.liferay.portal.kernel.portlet.PortletRequestModel - portletRequestModel, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleDisplay( - groupId, articleId, ddmTemplateKey, viewMode, languageId, page, - portletRequestModel, themeDisplay); - } - - /** - * Returns a web content article display for the first page of the latest - * version of the web content article matching the group, article ID, and - * DDM template. Web content transformation tokens are added from the theme - * display (if not null). - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param themeDisplay the theme display - * @return the web content article display, or null if the - article has expired or if article's display date/time is after - the current date/time - */ - public static com.liferay.journal.model.JournalArticleDisplay - getArticleDisplay( - long groupId, String articleId, String ddmTemplateKey, - String viewMode, String languageId, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleDisplay( - groupId, articleId, ddmTemplateKey, viewMode, languageId, - themeDisplay); - } - - /** - * Returns a web content article display for the first page of the latest - * version of the web content article matching the group and article ID. Web - * content transformation tokens are added from the theme display (if not - * null). - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param viewMode the mode in which the web content is being viewed - * @param languageId the primary key of the language translation to get - * @param themeDisplay the theme display - * @return the web content article display, or null if the - article has expired or if article's display date/time is after - the current date/time - */ - public static com.liferay.journal.model.JournalArticleDisplay - getArticleDisplay( - long groupId, String articleId, String viewMode, - String languageId, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getArticleDisplay( - groupId, articleId, viewMode, languageId, themeDisplay); - } - - public static java.util.List getArticleLocalizationLanguageIds( - long articlePK) { - - return getService().getArticleLocalizationLanguageIds(articlePK); - } - - /** - * Returns all the web content articles present in the system. - * - * @return the web content articles present in the system - */ - public static java.util.List - getArticles() { - - return getService().getArticles(); - } - - /** - * Returns all the web content articles belonging to the group. - * - * @param groupId the primary key of the web content article's group - * @return the web content articles belonging to the group - */ - public static java.util.List - getArticles(long groupId) { - - return getService().getArticles(groupId); - } - - /** - * Returns a range of all the web content articles belonging to the group. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the web content article's group - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return the range of matching web content articles - */ - public static java.util.List - getArticles(long groupId, int start, int end) { - - return getService().getArticles(groupId, start, end); - } - - /** - * Returns an ordered range of all the web content articles belonging to the - * group. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the web content article's group - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param obc the comparator to order the web content articles - * @return the range of matching web content articles ordered by the - comparator - */ - public static java.util.List - getArticles( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().getArticles(groupId, start, end, obc); - } - - /** - * Returns all the web content articles matching the group and folder. - * - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @return the matching web content articles - */ - public static java.util.List - getArticles(long groupId, long folderId) { - - return getService().getArticles(groupId, folderId); - } - - /** - * Returns a range of all the web content articles matching the group and - * folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article's folder - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return the range of matching web content articles - */ - public static java.util.List - getArticles(long groupId, long folderId, int start, int end) { - - return getService().getArticles(groupId, folderId, start, end); - } - - /** - * Returns a range of all the web content articles matching the group, - * folder, and status. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article's folder - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return the range of matching web content articles - */ - public static java.util.List - getArticles( - long groupId, long folderId, int status, int start, int end) { - - return getService().getArticles(groupId, folderId, status, start, end); - } - - /** - * Returns an ordered range of all the web content articles matching the - * group and folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article's folder - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param orderByComparator the comparator to order the web content - articles - * @return the range of matching web content articles ordered by the - comparator - */ - public static java.util.List - getArticles( - long groupId, long folderId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - orderByComparator) { - - return getService().getArticles( - groupId, folderId, start, end, orderByComparator); - } - - /** - * Returns all the web content articles matching the group and article ID. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @return the matching web content articles - */ - public static java.util.List - getArticles(long groupId, String articleId) { - - return getService().getArticles(groupId, articleId); - } - - public static java.util.List - getArticles( - long groupId, String articleId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - orderByComparator) { - - return getService().getArticles( - groupId, articleId, start, end, orderByComparator); - } - - /** - * Returns all the web content articles matching the resource primary key. - * - * @param resourcePrimKey the primary key of the resource instance - * @return the web content articles matching the resource primary key - */ - public static java.util.List - getArticlesByResourcePrimKey(long resourcePrimKey) { - - return getService().getArticlesByResourcePrimKey(resourcePrimKey); - } - - /** - * Returns all the web content articles matching the small image ID. - * - * @param smallImageId the primary key of the web content article's small - image - * @return the web content articles matching the small image ID - */ - public static java.util.List - getArticlesBySmallImageId(long smallImageId) { - - return getService().getArticlesBySmallImageId(smallImageId); - } - - public static java.util.List - getArticlesByStructureId( - long groupId, long classNameId, String ddmStructureKey, int status, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().getArticlesByStructureId( - groupId, classNameId, ddmStructureKey, status, start, end, obc); - } - - public static java.util.List - getArticlesByStructureId( - long groupId, long classNameId, String ddmStructureKey, - java.util.Locale locale, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().getArticlesByStructureId( - groupId, classNameId, ddmStructureKey, locale, status, start, end, - obc); - } - - public static java.util.List - getArticlesByStructureId( - long groupId, String ddmStructureKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().getArticlesByStructureId( - groupId, ddmStructureKey, status, start, end, obc); - } - - public static java.util.List - getArticlesByStructureId( - long groupId, String ddmStructureKey, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().getArticlesByStructureId( - groupId, ddmStructureKey, start, end, obc); - } - - public static java.util.List - getArticlesByStructureId( - long groupId, String ddmStructureKey, java.util.Locale locale, - int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().getArticlesByStructureId( - groupId, ddmStructureKey, locale, status, start, end, obc); - } - - /** - * Returns the number of web content articles belonging to the group. - * - * @param groupId the primary key of the web content article's group - * @return the number of web content articles belonging to the group - */ - public static int getArticlesCount(long groupId) { - return getService().getArticlesCount(groupId); - } - - /** - * Returns the number of web content articles matching the group and folder. - * - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article's folder - * @return the number of matching web content articles - */ - public static int getArticlesCount(long groupId, long folderId) { - return getService().getArticlesCount(groupId, folderId); - } - - /** - * Returns the number of web content articles matching the group, folder, - * and status. - * - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article's folder - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the number of matching web content articles - */ - public static int getArticlesCount( - long groupId, long folderId, int status) { - - return getService().getArticlesCount(groupId, folderId, status); - } - - public static int getArticlesCount(long groupId, String articleId) { - return getService().getArticlesCount(groupId, articleId); - } - - public static String getArticleTitle( - long articlePK, java.util.Locale locale) { - - return getService().getArticleTitle(articlePK, locale); - } - - public static String getArticleTitle(long articlePK, String languageId) { - return getService().getArticleTitle(articlePK, languageId); - } - - public static java.util.Map getArticleTitleMap( - long articlePK) { - - return getService().getArticleTitleMap(articlePK); - } - - /** - * Returns an ordered range of all the web content articles matching the - * company, version, and workflow status. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param version the web content article's version - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return the range of matching web content articles ordered by article ID - */ - public static java.util.List - getCompanyArticles( - long companyId, double version, int status, int start, int end) { - - return getService().getCompanyArticles( - companyId, version, status, start, end); - } - - /** - * Returns an ordered range of all the web content articles matching the - * company and workflow status. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return the range of matching web content articles ordered by article ID - */ - public static java.util.List - getCompanyArticles(long companyId, int status, int start, int end) { - - return getService().getCompanyArticles(companyId, status, start, end); - } - - /** - * Returns the number of web content articles matching the company, version, - * and workflow status. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param version the web content article's version - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return the number of matching web content articles - */ - public static int getCompanyArticlesCount( - long companyId, double version, int status, int start, int end) { - - return getService().getCompanyArticlesCount( - companyId, version, status, start, end); - } - - /** - * Returns the number of web content articles matching the company and - * workflow status. - * - * @param companyId the primary key of the web content article's company - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the number of matching web content articles - */ - public static int getCompanyArticlesCount(long companyId, int status) { - return getService().getCompanyArticlesCount(companyId, status); - } - - /** - * Returns the matching web content article currently displayed or next to - * be displayed if no article is currently displayed. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @return the matching web content article currently displayed, or the next - one to be displayed if no version of the article is currently - displayed - */ - public static com.liferay.journal.model.JournalArticle getDisplayArticle( - long groupId, String articleId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getDisplayArticle(groupId, articleId); - } - - /** - * Returns the web content article matching the URL title that is currently - * displayed or next to be displayed if no article is currently displayed. - * - * @param groupId the primary key of the web content article's group - * @param urlTitle the web content article's accessible URL title - * @return the web content article matching the URL title that is currently - displayed, or next one to be displayed if no version of the - article is currently displayed - */ - public static com.liferay.journal.model.JournalArticle - getDisplayArticleByUrlTitle(long groupId, String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getDisplayArticleByUrlTitle(groupId, urlTitle); - } - - public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery - getExportActionableDynamicQuery( - com.liferay.exportimport.kernel.lar.PortletDataContext - portletDataContext) { - - return getService().getExportActionableDynamicQuery(portletDataContext); - } - - public static - com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery - getIndexableActionableDynamicQuery() { - - return getService().getIndexableActionableDynamicQuery(); - } - - public static java.util.List - getIndexableArticlesByDDMStructureKey(String[] ddmStructureKeys) { - - return getService().getIndexableArticlesByDDMStructureKey( - ddmStructureKeys); - } - - public static java.util.List - getIndexableArticlesByDDMStructureKey( - String[] ddmStructureKeys, java.util.Locale locale) { - - return getService().getIndexableArticlesByDDMStructureKey( - ddmStructureKeys, locale); - } - - /** - * Returns the indexable web content articles matching the resource primary - * key. - * - * @param resourcePrimKey the primary key of the resource instance - * @return the indexable web content articles matching the resource primary - key - */ - public static java.util.List - getIndexableArticlesByResourcePrimKey(long resourcePrimKey) { - - return getService().getIndexableArticlesByResourcePrimKey( - resourcePrimKey); - } - - /** - * Returns the journal article with the primary key. - * - * @param id the primary key of the journal article - * @return the journal article - * @throws PortalException if a journal article with the primary key could not be found - */ - public static com.liferay.journal.model.JournalArticle getJournalArticle( - long id) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getJournalArticle(id); - } - - /** - * Returns the journal article matching the UUID and group. - * - * @param uuid the journal article's UUID - * @param groupId the primary key of the group - * @return the matching journal article - * @throws PortalException if a matching journal article could not be found - */ - public static com.liferay.journal.model.JournalArticle - getJournalArticleByUuidAndGroupId(String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getJournalArticleByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the journal articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.journal.model.impl.JournalArticleModelImpl. - *

    - * - * @param start the lower bound of the range of journal articles - * @param end the upper bound of the range of journal articles (not inclusive) - * @return the range of journal articles - */ - public static java.util.List - getJournalArticles(int start, int end) { - - return getService().getJournalArticles(start, end); - } - - /** - * Returns all the journal articles matching the UUID and company. - * - * @param uuid the UUID of the journal articles - * @param companyId the primary key of the company - * @return the matching journal articles, or an empty list if no matches were found - */ - public static java.util.List - getJournalArticlesByUuidAndCompanyId(String uuid, long companyId) { - - return getService().getJournalArticlesByUuidAndCompanyId( - uuid, companyId); - } - - /** - * Returns a range of journal articles matching the UUID and company. - * - * @param uuid the UUID of the journal articles - * @param companyId the primary key of the company - * @param start the lower bound of the range of journal articles - * @param end the upper bound of the range of journal articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the range of matching journal articles, or an empty list if no matches were found - */ - public static java.util.List - getJournalArticlesByUuidAndCompanyId( - String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - orderByComparator) { - - return getService().getJournalArticlesByUuidAndCompanyId( - uuid, companyId, start, end, orderByComparator); - } - - /** - * Returns the number of journal articles. - * - * @return the number of journal articles - */ - public static int getJournalArticlesCount() { - return getService().getJournalArticlesCount(); - } - - /** - * Returns the latest web content article matching the resource primary key, - * preferring articles with approved workflow status. - * - * @param resourcePrimKey the primary key of the resource instance - * @return the latest web content article matching the resource primary key, - preferring articles with approved workflow status - */ - public static com.liferay.journal.model.JournalArticle getLatestArticle( - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getLatestArticle(resourcePrimKey); - } - - /** - * Returns the latest web content article matching the resource primary key - * and workflow status, preferring articles with approved workflow status. - * - * @param resourcePrimKey the primary key of the resource instance - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the latest web content article matching the resource primary key - and workflow status, preferring articles with approved workflow - status - */ - public static com.liferay.journal.model.JournalArticle getLatestArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getLatestArticle(resourcePrimKey, status); - } - - /** - * Returns the latest web content article matching the resource primary key - * and workflow status, optionally preferring articles with approved - * workflow status. - * - * @param resourcePrimKey the primary key of the resource instance - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param preferApproved whether to prefer returning the latest matching - article that has workflow status {@link - WorkflowConstants#STATUS_APPROVED} over returning one that has a - different status - * @return the latest web content article matching the resource primary key - and workflow status, optionally preferring articles with approved - workflow status - */ - public static com.liferay.journal.model.JournalArticle getLatestArticle( - long resourcePrimKey, int status, boolean preferApproved) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getLatestArticle( - resourcePrimKey, status, preferApproved); - } - - /** - * Returns the latest web content article with the group and article ID. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @return the latest matching web content article - */ - public static com.liferay.journal.model.JournalArticle getLatestArticle( - long groupId, String articleId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getLatestArticle(groupId, articleId); - } - - /** - * Returns the latest web content article matching the group, article ID, - * and workflow status. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the latest matching web content article - */ - public static com.liferay.journal.model.JournalArticle getLatestArticle( - long groupId, String articleId, int status) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getLatestArticle(groupId, articleId, status); - } - - /** - * Returns the latest web content article matching the group, class name ID, - * and class PK. - * - * @param groupId the primary key of the web content article's group - * @param className the DDMStructure class name if the web content article - is related to a DDM structure, the class name associated with the - article, or JournalArticleConstants.CLASSNAME_ID_DEFAULT in the - journal-api module otherwise - * @param classPK the primary key of the DDM structure, if the DDMStructure - class name is given as the className parameter, the - primary key of the class associated with the web content article, - or 0 otherwise - * @return the latest matching web content article - */ - public static com.liferay.journal.model.JournalArticle getLatestArticle( - long groupId, String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getLatestArticle(groupId, className, classPK); - } - - /** - * Returns the latest web content article matching the group, URL title, and - * workflow status. - * - * @param groupId the primary key of the web content article's group - * @param urlTitle the web content article's accessible URL title - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the latest matching web content article - */ - public static com.liferay.journal.model.JournalArticle - getLatestArticleByUrlTitle( - long groupId, String urlTitle, int status) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getLatestArticleByUrlTitle( - groupId, urlTitle, status); - } - - /** - * Returns the latest version number of the web content with the group and - * article ID. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @return the latest version number of the matching web content - */ - public static double getLatestVersion(long groupId, String articleId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getLatestVersion(groupId, articleId); - } - - /** - * Returns the latest version number of the web content with the group, - * article ID, and workflow status. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the latest version number of the matching web content - */ - public static double getLatestVersion( - long groupId, String articleId, int status) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getLatestVersion(groupId, articleId, status); - } - - public static java.util.List - getNoAssetArticles() { - - return getService().getNoAssetArticles(); - } - - public static java.util.List - getNoPermissionArticles() { - - return getService().getNoPermissionArticles(); - } - - /** - * Returns the number of web content articles that are not recycled. - * - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @return the number of web content articles that are not recycled - */ - public static int getNotInTrashArticlesCount(long groupId, long folderId) { - return getService().getNotInTrashArticlesCount(groupId, folderId); - } - - /** - * Returns the oldest web content article with the group and article ID. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @return the oldest matching web content article - */ - public static com.liferay.journal.model.JournalArticle getOldestArticle( - long groupId, String articleId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getOldestArticle(groupId, articleId); - } - - /** - * Returns the oldest web content article matching the group, article ID, - * and workflow status. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the oldest matching web content article - */ - public static com.liferay.journal.model.JournalArticle getOldestArticle( - long groupId, String articleId, int status) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getOldestArticle(groupId, articleId, status); - } - - /** - * Returns the OSGi service identifier. - * - * @return the OSGi service identifier - */ - public static String getOSGiServiceIdentifier() { - return getService().getOSGiServiceIdentifier(); - } - - public static java.util.List - - getPersistedModel(long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getPersistedModel(resourcePrimKey); - } - - /** - * @throws PortalException - */ - public static com.liferay.portal.kernel.model.PersistedModel - getPersistedModel(java.io.Serializable primaryKeyObj) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getPersistedModel(primaryKeyObj); - } - - /** - * Returns the previously approved version of the web content article. For - * more information on the approved workflow status, see {@link - * WorkflowConstants#STATUS_APPROVED}. - * - * @param article the web content article - * @return the previously approved version of the web content article, or - the current web content article if there are no previously - approved web content articles - */ - public static com.liferay.journal.model.JournalArticle - getPreviousApprovedArticle( - com.liferay.journal.model.JournalArticle article) { - - return getService().getPreviousApprovedArticle(article); - } - - /** - * Returns the web content articles matching the group and DDM structure - * key. - * - * @param groupId the primary key of the web content article's group - * @param ddmStructureKey the primary key of the web content article's DDM - structure - * @return the matching web content articles - */ - public static java.util.List - getStructureArticles(long groupId, String ddmStructureKey) { - - return getService().getStructureArticles(groupId, ddmStructureKey); - } - - /** - * Returns an ordered range of all the web content articles matching the - * group and DDM structure key. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the web content article's group - * @param ddmStructureKey the primary key of the web content article's DDM - structure - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param obc the comparator to order the web content articles - * @return the range of matching web content articles ordered by the - comparator - */ - public static java.util.List - getStructureArticles( - long groupId, String ddmStructureKey, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().getStructureArticles( - groupId, ddmStructureKey, start, end, obc); - } - - /** - * Returns the web content articles matching the DDM structure keys. - * - * @param ddmStructureKeys the primary keys of the web content article's - DDM structures - * @return the web content articles matching the DDM structure keys - */ - public static java.util.List - getStructureArticles(String[] ddmStructureKeys) { - - return getService().getStructureArticles(ddmStructureKeys); - } - - /** - * Returns the number of web content articles matching the group and DDM - * structure key. - * - * @param groupId the primary key of the web content article's group - * @param ddmStructureKey the primary key of the web content article's DDM - structure - * @return the number of matching web content articles - */ - public static int getStructureArticlesCount( - long groupId, String ddmStructureKey) { - - return getService().getStructureArticlesCount(groupId, ddmStructureKey); - } - - /** - * @deprecated As of Judson (7.1.x), with no direct replacement - */ - @Deprecated - public static com.liferay.portal.kernel.service.SubscriptionLocalService - getSubscriptionLocalService() { - - return getService().getSubscriptionLocalService(); - } - - /** - * Returns the web content articles matching the group and DDM template key. - * - * @param groupId the primary key of the web content article's group - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @return the matching web content articles - */ - public static java.util.List - getTemplateArticles(long groupId, String ddmTemplateKey) { - - return getService().getTemplateArticles(groupId, ddmTemplateKey); - } - - /** - * Returns an ordered range of all the web content articles matching the - * group and DDM template key. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the web content article's group - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param obc the comparator to order the web content articles - * @return the range of matching web content articles ordered by the - comparator - */ - public static java.util.List - getTemplateArticles( - long groupId, String ddmTemplateKey, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().getTemplateArticles( - groupId, ddmTemplateKey, start, end, obc); - } - - /** - * Returns the number of web content articles matching the group and DDM - * template key. - * - * @param groupId the primary key of the web content article's group - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @return the number of matching web content articles - */ - public static int getTemplateArticlesCount( - long groupId, String ddmTemplateKey) { - - return getService().getTemplateArticlesCount(groupId, ddmTemplateKey); - } - - /** - * Returns the web content article's unique URL title. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param urlTitle the web content article's accessible URL title - * @return the web content article's unique URL title - */ - public static String getUniqueUrlTitle( - long groupId, String articleId, String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getUniqueUrlTitle(groupId, articleId, urlTitle); - } - - /** - * Returns true if the specified web content article exists. - * - * @param groupId the primary key of the group - * @param articleId the primary key of the web content article - * @return true if the specified web content article exists; - false otherwise - */ - public static boolean hasArticle(long groupId, String articleId) { - return getService().hasArticle(groupId, articleId); - } - - /** - * Returns true if the web content article, specified by group - * and article ID, is the latest version. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @return true if the specified web content article is the - latest version; false otherwise - */ - public static boolean isLatestVersion( - long groupId, String articleId, double version) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().isLatestVersion(groupId, articleId, version); - } - - /** - * Returns true if the web content article, specified by group, - * article ID, and workflow status, is the latest version. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return true if the specified web content article is the - latest version; false otherwise - */ - public static boolean isLatestVersion( - long groupId, String articleId, double version, int status) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().isLatestVersion( - groupId, articleId, version, status); - } - - public static boolean isListable( - com.liferay.journal.model.JournalArticle article) { - - return getService().isListable(article); - } - - public static boolean isRenderable( - com.liferay.journal.model.JournalArticle article, - com.liferay.portal.kernel.portlet.PortletRequestModel - portletRequestModel, - com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) { - - return getService().isRenderable( - article, portletRequestModel, themeDisplay); - } - - /** - * Moves the web content article matching the group and article ID to a new - * folder. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param newFolderId the primary key of the web content article's new - folder - * @return the updated web content article, which was moved to a new - folder - * @deprecated As of Wilberforce (7.0.x), replaced by {@link - #moveArticle(long, String, long, ServiceContext)} - */ - @Deprecated - public static com.liferay.journal.model.JournalArticle moveArticle( - long groupId, String articleId, long newFolderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().moveArticle(groupId, articleId, newFolderId); - } - - /** - * Moves the web content article matching the group and article ID to a new - * folder. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param newFolderId the primary key of the web content article's new - folder - * @param serviceContext the service context to be applied. Can set the - user ID, language ID, portlet preferences, portlet request, - portlet response, theme display, and can set whether to add the - default command update for the web content article. With respect - to social activities, by setting the service context's command to - {@link Constants#UPDATE}, the invocation is considered a web - content update activity; otherwise it is considered a web content - add activity. - * @return the updated web content article, which was moved to a new folder - */ - public static com.liferay.journal.model.JournalArticle moveArticle( - long groupId, String articleId, long newFolderId, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().moveArticle( - groupId, articleId, newFolderId, serviceContext); - } - - /** - * Moves the web content article from the Recycle Bin to a new folder. - * - * @param userId the primary key of the user updating the web content - article - * @param groupId the primary key of the web content article's group - * @param article the web content article - * @param newFolderId the primary key of the web content article's new - folder - * @param serviceContext the service context to be applied. Can set the - modification date, portlet preferences, and can set whether to - add the default command update for the web content article. With - respect to social activities, by setting the service context's - command to {@link Constants#UPDATE}, the invocation is considered - a web content update activity; otherwise it is considered a web - content add activity. - * @return the updated web content article, which was moved from the Recycle - Bin to a new folder - */ - public static com.liferay.journal.model.JournalArticle moveArticleFromTrash( - long userId, long groupId, - com.liferay.journal.model.JournalArticle article, long newFolderId, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().moveArticleFromTrash( - userId, groupId, article, newFolderId, serviceContext); - } - - /** - * Moves the latest version of the web content article matching the group - * and article ID to the recycle bin. - * - * @param userId the primary key of the user updating the web content - article - * @param article the web content article - * @return the updated web content article, which was moved to the Recycle - Bin - */ - public static com.liferay.journal.model.JournalArticle moveArticleToTrash( - long userId, com.liferay.journal.model.JournalArticle article) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().moveArticleToTrash(userId, article); - } - - /** - * Moves the latest version of the web content article matching the group - * and article ID to the recycle bin. - * - * @param userId the primary key of the user updating the web content - article - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @return the moved web content article or null if no matching - article was found - */ - public static com.liferay.journal.model.JournalArticle moveArticleToTrash( - long userId, long groupId, String articleId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().moveArticleToTrash(userId, groupId, articleId); - } - - /** - * Rebuilds the web content article's tree path using tree traversal. - * - *

    - * For example, here is a conceptualization of a web content article tree - * path: - *

    - * - *

    - *

    -	 * 
    -	 * /(Folder's folderId)/(Subfolder's folderId)/(article's articleId)
    -	 * 
    -	 * 

    - * - * @param companyId the primary key of the web content article's company - */ - public static void rebuildTree(long companyId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().rebuildTree(companyId); - } - - /** - * Removes the web content of the web content article matching the group, - * article ID, and version, and language. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param languageId the primary key of the language locale to remove - * @return the updated web content article with the locale removed - */ - public static com.liferay.journal.model.JournalArticle removeArticleLocale( - long groupId, String articleId, double version, String languageId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().removeArticleLocale( - groupId, articleId, version, languageId); - } - - /** - * Restores the web content article from the Recycle Bin. - * - * @param userId the primary key of the user restoring the web content - article - * @param article the web content article - * @return the restored web content article from the Recycle Bin - */ - public static com.liferay.journal.model.JournalArticle - restoreArticleFromTrash( - long userId, com.liferay.journal.model.JournalArticle article) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().restoreArticleFromTrash(userId, article); - } - - /** - * Returns a range of all the web content articles matching the parameters - * without using the indexer. It is preferable to use the indexed version - * {@link #search(long, long, long, int, int, int)} instead of this method - * wherever possible for performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the group (optionally - 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants - starting with the "STATUS_" prefix. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return the matching web content articles - * @deprecated As of Judson (7.1.x), replaced by {@link #search(long - groupId, List folderIds, Locale locale, int status, int - start, int end)} - */ - @Deprecated - public static java.util.List - search( - long groupId, java.util.List folderIds, int status, int start, - int end) { - - return getService().search(groupId, folderIds, status, start, end); - } - - public static java.util.List - search( - long groupId, java.util.List folderIds, - java.util.Locale locale, int status, int start, int end) { - - return getService().search( - groupId, folderIds, locale, status, start, end); - } - - /** - * Returns a range of all the web content articles in a single folder - * matching the parameters without using the indexer. It is preferable to - * use the indexed version {@link #search(long, long, long, int, int, int)} - * instead of this method wherever possible for performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the group (optionally 0) - * @param folderId the primary key of the web content article folder - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return the matching web content articles - */ - public static java.util.List - search(long groupId, long folderId, int status, int start, int end) { - - return getService().search(groupId, folderId, status, start, end); - } - - /** - * Returns an ordered range of all the web content articles matching the - * parameters without using the indexer, including a keywords parameter for - * matching with the article's ID, title, description, and content, a DDM - * structure key parameter, and a DDM template key parameter. It is - * preferable to use the indexed version {@link #search(long, long, List, - * long, String, String, String, LinkedHashMap, int, int, Sort)} instead of - * this method wherever possible for performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param keywords the keywords (space separated), which may occur in the - web content article ID, title, description, or content - (optionally null). If the keywords value is not - null, the search uses the OR operator in connecting - query criteria; otherwise it uses the AND operator. - * @param version the web content article's version (optionally - null) - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param displayDateGT the date after which a matching web content - article's display date must be after (optionally - null) - * @param displayDateLT the date before which a matching web content - article's display date must be before (optionally - null) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param reviewDate the web content article's scheduled review date - (optionally null) - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param obc the comparator to order the web content articles - * @return the range of matching web content articles ordered by the - comparator - */ - public static java.util.List - search( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String keywords, Double version, - String ddmStructureKey, String ddmTemplateKey, - java.util.Date displayDateGT, java.util.Date displayDateLT, - int status, java.util.Date reviewDate, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().search( - companyId, groupId, folderIds, classNameId, keywords, version, - ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT, - status, reviewDate, start, end, obc); - } - - /** - * Returns an ordered range of all the web content articles matching the - * parameters without using the indexer, including keyword parameters for - * article ID, title, description, and content, a DDM structure key - * parameter, a DDM template key parameter, and an AND operator switch. It - * is preferable to use the indexed version {@link #search(long, long, List, - * long, String, String, String, String, int, String, String, LinkedHashMap, - * boolean, int, int, Sort)} instead of this method wherever possible for - * performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param articleId the article ID keywords (space separated, optionally - null) - * @param version the web content article's version (optionally - null) - * @param title the title keywords (space separated, optionally - null) - * @param description the description keywords (space separated, optionally - null) - * @param content the content keywords (space separated, optionally - null) - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param displayDateGT the date after which a matching web content - article's display date must be after (optionally - null) - * @param displayDateLT the date before which a matching web content - article's display date must be before (optionally - null) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param reviewDate the web content article's scheduled review date - (optionally null) - * @param andOperator whether every field must match its value or keywords, - or just one field must match. Company, group, folder IDs, class - name ID, and status must all match their values. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param obc the comparator to order the web content articles - * @return the range of matching web content articles ordered by the - comparator - */ - public static java.util.List - search( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String articleId, Double version, String title, - String description, String content, String ddmStructureKey, - String ddmTemplateKey, java.util.Date displayDateGT, - java.util.Date displayDateLT, int status, java.util.Date reviewDate, - boolean andOperator, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().search( - companyId, groupId, folderIds, classNameId, articleId, version, - title, description, content, ddmStructureKey, ddmTemplateKey, - displayDateGT, displayDateLT, status, reviewDate, andOperator, - start, end, obc); - } - - /** - * Returns an ordered range of all the web content articles matching the - * parameters without using the indexer, including keyword parameters for - * article ID, title, description, and content, a DDM structure keys - * (plural) parameter, a DDM template keys (plural) parameter, and an AND - * operator switch. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param articleId the article ID keywords (space separated, optionally - null) - * @param version the web content article's version (optionally - null) - * @param title the title keywords (space separated, optionally - null) - * @param description the description keywords (space separated, optionally - null) - * @param content the content keywords (space separated, optionally - null) - * @param ddmStructureKeys the primary keys of the web content article's - DDM structures, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKeys the primary keys of the web content article's DDM - templates (originally null). If the articles are - related to a DDM structure, the template's structure must match - it. - * @param displayDateGT the date after which a matching web content - article's display date must be after (optionally - null) - * @param displayDateLT the date before which a matching web content - article's display date must be before (optionally - null) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param reviewDate the web content article's scheduled review date - (optionally null) - * @param andOperator whether every field must match its value or keywords, - or just one field must match. Company, group, folder IDs, class - name ID, and status must all match their values. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param obc the comparator to order the web content articles - * @return the range of matching web content articles ordered by the - comparator - */ - public static java.util.List - search( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String articleId, Double version, String title, - String description, String content, String[] ddmStructureKeys, - String[] ddmTemplateKeys, java.util.Date displayDateGT, - java.util.Date displayDateLT, int status, java.util.Date reviewDate, - boolean andOperator, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) { - - return getService().search( - companyId, groupId, folderIds, classNameId, articleId, version, - title, description, content, ddmStructureKeys, ddmTemplateKeys, - displayDateGT, displayDateLT, status, reviewDate, andOperator, - start, end, obc); - } - - /** - * Returns an ordered range of all the web content articles matching the - * parameters using the indexer, including a keywords parameter for matching - * an article's ID, title, description, or content, a DDM structure key - * parameter, a DDM template key parameter, and a finder hash map parameter. - * It is preferable to use this method instead of the non-indexed version - * whenever possible for performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param keywords the keywords (space separated), which may occur in the - web content article ID, title, description, or content - (optionally null). If the keywords value is not - null, the search uses the OR operator in connecting - query criteria; otherwise it uses the AND operator. - * @param params the finder parameters (optionally null) - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param sort the field, type, and direction by which to sort (optionally - null) - * @return the matching web content articles ordered by sort - */ - public static com.liferay.portal.kernel.search.Hits search( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String ddmStructureKey, String ddmTemplateKey, - String keywords, java.util.LinkedHashMap params, - int start, int end, com.liferay.portal.kernel.search.Sort sort) { - - return getService().search( - companyId, groupId, folderIds, classNameId, ddmStructureKey, - ddmTemplateKey, keywords, params, start, end, sort); - } - - /** - * Returns an ordered range of all the web content articles matching the - * parameters using the indexer, including a keywords parameter for matching - * an article's ID, title, description, or content, a DDM structure key - * parameter, a DDM template key parameter, an AND operator switch, and - * parameters for type, status, a finder hash map. It is preferable to use - * this method instead of the non-indexed version whenever possible for - * performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param articleId the article ID keywords (space separated, optionally - null) - * @param title the title keywords (space separated, optionally - null) - * @param description the description keywords (space separated, optionally - null) - * @param content the content keywords (space separated, optionally - null) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param params the finder parameters (optionally null). The - includeDiscussions parameter can be set to - true to search for the keywords in the web content - article discussions. - * @param andSearch whether every field must match its value or keywords, - or just one field must match - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param sort the field, type, and direction by which to sort (optionally - null) - * @return the matching web content articles ordered by sort - */ - public static com.liferay.portal.kernel.search.Hits search( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String articleId, String title, String description, - String content, int status, String ddmStructureKey, - String ddmTemplateKey, java.util.LinkedHashMap params, - boolean andSearch, int start, int end, - com.liferay.portal.kernel.search.Sort sort) { - - return getService().search( - companyId, groupId, folderIds, classNameId, articleId, title, - description, content, status, ddmStructureKey, ddmTemplateKey, - params, andSearch, start, end, sort); - } - - /** - * @deprecated As of Wilberforce (7.0.x), replaced by {@link #search(long, - long, List, long, String, String, String, String, int, - String, String, LinkedHashMap, boolean, int, int, Sort)} - */ - @Deprecated - public static com.liferay.portal.kernel.search.Hits search( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String articleId, String title, String description, - String content, String type, String statusString, - String ddmStructureKey, String ddmTemplateKey, - java.util.LinkedHashMap params, boolean andSearch, - int start, int end, com.liferay.portal.kernel.search.Sort sort) { - - return getService().search( - companyId, groupId, folderIds, classNameId, articleId, title, - description, content, type, statusString, ddmStructureKey, - ddmTemplateKey, params, andSearch, start, end, sort); - } - - /** - * Returns a range of all the web content articles matching the group, - * creator, and status using the indexer. It is preferable to use this - * method instead of the non-indexed version whenever possible for - * performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the group (optionally 0) - * @param userId the primary key of the user searching for web content - articles - * @param creatorUserId the primary key of the web content article's - creator - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return the matching web content articles - */ - public static com.liferay.portal.kernel.search.Hits search( - long groupId, long userId, long creatorUserId, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().search( - groupId, userId, creatorUserId, status, start, end); - } - - /** - * Returns the number of web content articles matching the group, folders, - * and status. - * - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the number of matching web content articles - */ - public static int searchCount( - long groupId, java.util.List folderIds, int status) { - - return getService().searchCount(groupId, folderIds, status); - } - - /** - * Returns the number of web content articles matching the group, folder, - * and status. - * - * @param groupId the primary key of the group (optionally 0) - * @param folderId the primary key of the web content article folder - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @return the number of matching web content articles - */ - public static int searchCount(long groupId, long folderId, int status) { - return getService().searchCount(groupId, folderId, status); - } - - /** - * Returns the number of web content articles matching the parameters, - * including a keywords parameter for matching with the article's ID, title, - * description, and content, a DDM structure key parameter, and a DDM - * template key parameter. - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param keywords the keywords (space separated), which may occur in the - web content article ID, title, description, or content - (optionally null). If the keywords value is not - null, the search uses the OR operator in connecting - query criteria; otherwise it uses the AND operator. - * @param version the web content article's version (optionally - null) - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param displayDateGT the date after which a matching web content - article's display date must be after (optionally - null) - * @param displayDateLT the date before which a matching web content - article's display date must be before (optionally - null) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param reviewDate the web content article's scheduled review date - (optionally null) - * @return the number of matching web content articles - */ - public static int searchCount( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String keywords, Double version, - String ddmStructureKey, String ddmTemplateKey, - java.util.Date displayDateGT, java.util.Date displayDateLT, int status, - java.util.Date reviewDate) { - - return getService().searchCount( - companyId, groupId, folderIds, classNameId, keywords, version, - ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT, - status, reviewDate); - } - - /** - * Returns the number of web content articles matching the parameters, - * including keyword parameters for article ID, title, description, and - * content, a DDM structure key parameter, a DDM template key parameter, and - * an AND operator switch. - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param articleId the article ID keywords (space separated, optionally - null) - * @param version the web content article's version (optionally - null) - * @param title the title keywords (space separated, optionally - null) - * @param description the description keywords (space separated, optionally - null) - * @param content the content keywords (space separated, optionally - null) - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param displayDateGT the date after which a matching web content - article's display date must be after (optionally - null) - * @param displayDateLT the date before which a matching web content - article's display date must be before (optionally - null) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param reviewDate the web content article's scheduled review date - (optionally null) - * @param andOperator whether every field must match its value or keywords, - or just one field must match. Group, folder IDs, class name ID, - and status must all match their values. - * @return the number of matching web content articles - */ - public static int searchCount( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String articleId, Double version, String title, - String description, String content, String ddmStructureKey, - String ddmTemplateKey, java.util.Date displayDateGT, - java.util.Date displayDateLT, int status, java.util.Date reviewDate, - boolean andOperator) { - - return getService().searchCount( - companyId, groupId, folderIds, classNameId, articleId, version, - title, description, content, ddmStructureKey, ddmTemplateKey, - displayDateGT, displayDateLT, status, reviewDate, andOperator); - } - - /** - * Returns the number of web content articles matching the parameters, - * including keyword parameters for article ID, title, description, and - * content, a DDM structure keys (plural) parameter, a DDM template keys - * (plural) parameter, and an AND operator switch. - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param articleId the article ID keywords (space separated, optionally - null) - * @param version the web content article's version (optionally - null) - * @param title the title keywords (space separated, optionally - null) - * @param description the description keywords (space separated, optionally - null) - * @param content the content keywords (space separated, optionally - null) - * @param ddmStructureKeys the primary keys of the web content article's - DDM structures, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKeys the primary keys of the web content article's DDM - templates (originally null). If the articles are - related to a DDM structure, the template's structure must match - it. - * @param displayDateGT the date after which a matching web content - article's display date must be after (optionally - null) - * @param displayDateLT the date before which a matching web content - article's display date must be before (optionally - null) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param reviewDate the web content article's scheduled review date - (optionally null) - * @param andOperator whether every field must match its value or keywords, - or just one field must match. Group, folder IDs, class name ID, - and status must all match their values. - * @return the number of matching web content articles - */ - public static int searchCount( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String articleId, Double version, String title, - String description, String content, String[] ddmStructureKeys, - String[] ddmTemplateKeys, java.util.Date displayDateGT, - java.util.Date displayDateLT, int status, java.util.Date reviewDate, - boolean andOperator) { - - return getService().searchCount( - companyId, groupId, folderIds, classNameId, articleId, version, - title, description, content, ddmStructureKeys, ddmTemplateKeys, - displayDateGT, displayDateLT, status, reviewDate, andOperator); - } - - /** - * Returns a {@link BaseModelSearchResult} containing the total number of - * hits and an ordered range of all the web content articles matching the - * parameters using the indexer, including a keywords parameter for matching - * an article's ID, title, description, or content, a DDM structure key - * parameter, a DDM template key parameter, and a finder hash map parameter. - * It is preferable to use this method instead of the non-indexed version - * whenever possible for performance reasons. - * - *

    - * The start and end parameters only affect the - * amount of web content articles returned as results, not the total number - * of hits. - *

    - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class, the - primary key of the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param ddmStructureKey the primary key of the web content article's DDM - structure - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param keywords the keywords (space separated), which may occur in the - web content article ID, title, description, or content - (optionally null). If the keywords value is not - null, the search uses the OR operator in connecting - query criteria; otherwise it uses the AND operator. - * @param params the finder parameters (optionally null) - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param sort the field, type, and direction by which to sort (optionally - null) - * @return a {@link BaseModelSearchResult} containing the total number of - hits and an ordered range of all the matching web content - articles ordered by sort - */ - public static com.liferay.portal.kernel.search.BaseModelSearchResult - searchJournalArticles( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String ddmStructureKey, String ddmTemplateKey, - String keywords, java.util.LinkedHashMap params, - int start, int end, com.liferay.portal.kernel.search.Sort sort) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().searchJournalArticles( - companyId, groupId, folderIds, classNameId, ddmStructureKey, - ddmTemplateKey, keywords, params, start, end, sort); - } - - /** - * Returns a {@link BaseModelSearchResult} containing the total number of - * hits and an ordered range of all the web content articles matching the - * parameters using the indexer, including keyword parameters for article - * ID, title, description, or content, a DDM structure key parameter, a DDM - * template key parameter, an AND operator switch, and parameters for type, - * status, and a finder hash map. It is preferable to use this method - * instead of the non-indexed version whenever possible for performance - * reasons. - * - *

    - * The start and end parameters only affect the - * amount of web content articles returned as results, not the total number - * of hits. - *

    - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the web content article's company - * @param groupId the primary key of the group (optionally 0) - * @param folderIds the primary keys of the web content article folders - (optionally {@link Collections#EMPTY_LIST}) - * @param classNameId the primary key of the DDMStructure class, the - primary key of the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param articleId the article ID keywords (space separated, optionally - null) - * @param title the title keywords (space separated, optionally - null) - * @param description the description keywords (space separated, optionally - null) - * @param content the content keywords (space separated, optionally - null) - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param ddmStructureKey the primary key of the web content article's DDM - structure - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param params the finder parameters (optionally null). The - includeDiscussions parameter can be set to - true to search for the keywords in the web content - article discussions. - * @param andSearch whether every field must match its value or keywords, - or just one field must match - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @param sort the field, type, and direction by which to sort (optionally - null) - * @return a {@link BaseModelSearchResult} containing the total number of - hits and an ordered range of all the matching web content - articles ordered by sort - */ - public static com.liferay.portal.kernel.search.BaseModelSearchResult - searchJournalArticles( - long companyId, long groupId, java.util.List folderIds, - long classNameId, String articleId, String title, - String description, String content, int status, - String ddmStructureKey, String ddmTemplateKey, - java.util.LinkedHashMap params, - boolean andSearch, int start, int end, - com.liferay.portal.kernel.search.Sort sort) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().searchJournalArticles( - companyId, groupId, folderIds, classNameId, articleId, title, - description, content, status, ddmStructureKey, ddmTemplateKey, - params, andSearch, start, end, sort); - } - - /** - * Returns a {@link BaseModelSearchResult} containing the total number of - * hits and an ordered range of all the web content articles matching the - * parameters using the indexer, including the web content article's creator - * ID and status. It is preferable to use this method instead of the - * non-indexed version whenever possible for performance reasons. - * - *

    - * The start and end parameters only affect the - * amount of web content articles returned as results, not the total number - * of hits. - *

    - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the group (optionally 0) - * @param userId the primary key of the user searching for web content - articles - * @param creatorUserId the primary key of the web content article's - creator - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param start the lower bound of the range of web content articles to - return - * @param end the upper bound of the range of web content articles to - return (not inclusive) - * @return a {@link BaseModelSearchResult} containing the total number of - hits and an ordered range of all the matching web content - articles ordered by sort - */ - public static com.liferay.portal.kernel.search.BaseModelSearchResult - searchJournalArticles( - long groupId, long userId, long creatorUserId, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().searchJournalArticles( - groupId, userId, creatorUserId, status, start, end); - } - - /** - * @deprecated As of Judson (7.1.x), with no direct replacement - */ - @Deprecated - public static void setSubscriptionLocalService( - com.liferay.portal.kernel.service.SubscriptionLocalService - subscriptionLocalService) { - - getService().setSubscriptionLocalService(subscriptionLocalService); - } - - public static void setTreePaths( - long folderId, String treePath, boolean reindex) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().setTreePaths(folderId, treePath, reindex); - } - - /** - * Subscribes the user to changes in elements that belong to the web content - * article. - * - * @param userId the primary key of the user to be subscribed - * @param groupId the primary key of the folder's group - * @param articleId the primary key of the article to subscribe to - */ - public static void subscribe(long userId, long groupId, long articleId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().subscribe(userId, groupId, articleId); - } - - /** - * Subscribes the user to changes in elements that belong to the web content - * article's DDM structure. - * - * @param groupId the primary key of the folder's group - * @param userId the primary key of the user to be subscribed - * @param ddmStructureId the primary key of the structure to subscribe to - */ - public static void subscribeStructure( - long groupId, long userId, long ddmStructureId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().subscribeStructure(groupId, userId, ddmStructureId); - } - - /** - * Unsubscribes the user from changes in elements that belong to the web - * content article. - * - * @param userId the primary key of the user to be subscribed - * @param groupId the primary key of the folder's group - * @param articleId the primary key of the article to unsubscribe from - */ - public static void unsubscribe(long userId, long groupId, long articleId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().unsubscribe(userId, groupId, articleId); - } - - /** - * Unsubscribes the user from changes in elements that belong to the web - * content article's DDM structure. - * - * @param groupId the primary key of the folder's group - * @param userId the primary key of the user to be subscribed - * @param ddmStructureId the primary key of the structure to subscribe to - */ - public static void unsubscribeStructure( - long groupId, long userId, long ddmStructureId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().unsubscribeStructure(groupId, userId, ddmStructureId); - } - - /** - * Updates the web content article with additional parameters. All - * scheduling parameters (display date, expiration date, and review date) - * use the current user's timezone. - * - * @param userId the primary key of the user updating the web content - article - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param titleMap the web content article's locales and localized titles - * @param descriptionMap the web content article's locales and localized - descriptions - * @param friendlyURLMap the web content article's locales and localized - friendly URLs - * @param content the HTML content wrapped in XML. For more information, - see the content example in the {@link #addArticle(long, long, - long, long, long, String, boolean, double, Map, Map, String, - String, String, String, int, int, int, int, int, int, int, int, - int, int, boolean, int, int, int, int, int, boolean, boolean, - boolean, String, File, Map, String, ServiceContext)} description. - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param layoutUuid the unique string identifying the web content - article's display page - * @param displayDateMonth the month the web content article is set to - display - * @param displayDateDay the calendar day the web content article is set to - display - * @param displayDateYear the year the web content article is set to - display - * @param displayDateHour the hour the web content article is set to - display - * @param displayDateMinute the minute the web content article is set to - display - * @param expirationDateMonth the month the web content article is set to - expire - * @param expirationDateDay the calendar day the web content article is set - to expire - * @param expirationDateYear the year the web content article is set to - expire - * @param expirationDateHour the hour the web content article is set to - expire - * @param expirationDateMinute the minute the web content article is set to - expire - * @param neverExpire whether the web content article is not set to auto - expire - * @param reviewDateMonth the month the web content article is set for - review - * @param reviewDateDay the calendar day the web content article is set for - review - * @param reviewDateYear the year the web content article is set for review - * @param reviewDateHour the hour the web content article is set for review - * @param reviewDateMinute the minute the web content article is set for - review - * @param neverReview whether the web content article is not set for review - * @param indexable whether the web content is searchable - * @param smallImage whether to update web content article's a small image. - A file must be passed in as smallImageFile value, - otherwise the current small image is deleted. - * @param smallImageURL the web content article's small image URL - (optionally null) - * @param smallImageFile the web content article's new small image file - (optionally null). Must pass in - smallImage value of true to replace the - article's small image file. - * @param images the web content's images (optionally null) - * @param articleURL the web content article's accessible URL (optionally - null) - * @param serviceContext the service context to be applied. Can set the - modification date, expando bridge attributes, asset category IDs, - asset tag names, asset link entry IDs, asset priority, workflow - actions, URL title , and can set whether to add the default - command update for the web content article. With respect to - social activities, by setting the service context's command to - {@link Constants#UPDATE}, the invocation is considered a web - content update activity; otherwise it is considered a web content - add activity. - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle updateArticle( - long userId, long groupId, long folderId, String articleId, - double version, java.util.Map titleMap, - java.util.Map descriptionMap, - java.util.Map friendlyURLMap, - String content, String ddmStructureKey, String ddmTemplateKey, - String layoutUuid, int displayDateMonth, int displayDateDay, - int displayDateYear, int displayDateHour, int displayDateMinute, - int expirationDateMonth, int expirationDateDay, - int expirationDateYear, int expirationDateHour, - int expirationDateMinute, boolean neverExpire, int reviewDateMonth, - int reviewDateDay, int reviewDateYear, int reviewDateHour, - int reviewDateMinute, boolean neverReview, boolean indexable, - boolean smallImage, String smallImageURL, - java.io.File smallImageFile, java.util.Map images, - String articleURL, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateArticle( - userId, groupId, folderId, articleId, version, titleMap, - descriptionMap, friendlyURLMap, content, ddmStructureKey, - ddmTemplateKey, layoutUuid, displayDateMonth, displayDateDay, - displayDateYear, displayDateHour, displayDateMinute, - expirationDateMonth, expirationDateDay, expirationDateYear, - expirationDateHour, expirationDateMinute, neverExpire, - reviewDateMonth, reviewDateDay, reviewDateYear, reviewDateHour, - reviewDateMinute, neverReview, indexable, smallImage, smallImageURL, - smallImageFile, images, articleURL, serviceContext); - } - - /** - * Updates the web content article matching the version, replacing its - * folder, title, description, content, and layout UUID. - * - * @param userId the primary key of the user updating the web content - article - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param titleMap the web content article's locales and localized titles - * @param descriptionMap the web content article's locales and localized - descriptions - * @param content the HTML content wrapped in XML. For more information, - see the content example in the {@link #addArticle(long, long, - long, long, long, String, boolean, double, Map, Map, String, - String, String, String, int, int, int, int, int, int, int, int, - int, int, boolean, int, int, int, int, int, boolean, boolean, - boolean, String, File, Map, String, ServiceContext)} description. - * @param layoutUuid the unique string identifying the web content - article's display page - * @param serviceContext the service context to be applied. Can set the - modification date, expando bridge attributes, asset category IDs, - asset tag names, asset link entry IDs, asset priority, workflow - actions, URL title, and can set whether to add the default - command update for the web content article. With respect to - social activities, by setting the service context's command to - {@link Constants#UPDATE}, the invocation is considered a web - content update activity; otherwise it is considered a web content - add activity. - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle updateArticle( - long userId, long groupId, long folderId, String articleId, - double version, java.util.Map titleMap, - java.util.Map descriptionMap, - String content, String layoutUuid, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateArticle( - userId, groupId, folderId, articleId, version, titleMap, - descriptionMap, content, layoutUuid, serviceContext); - } - - /** - * Updates the web content article with additional parameters. All - * scheduling parameters (display date, expiration date, and review date) - * use the current user's timezone. - * - * @param userId the primary key of the user updating the web content - article - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param titleMap the web content article's locales and localized titles - * @param descriptionMap the web content article's locales and localized - descriptions - * @param content the HTML content wrapped in XML. For more information, - see the content example in the {@link #addArticle(long, long, - long, long, long, String, boolean, double, Map, Map, String, - String, String, String, int, int, int, int, int, int, int, int, - int, int, boolean, int, int, int, int, int, boolean, boolean, - boolean, String, File, Map, String, ServiceContext)} description. - * @param ddmStructureKey the primary key of the web content article's DDM - structure, if the article is related to a DDM structure, or - null otherwise - * @param ddmTemplateKey the primary key of the web content article's DDM - template - * @param layoutUuid the unique string identifying the web content - article's display page - * @param displayDateMonth the month the web content article is set to - display - * @param displayDateDay the calendar day the web content article is set to - display - * @param displayDateYear the year the web content article is set to - display - * @param displayDateHour the hour the web content article is set to - display - * @param displayDateMinute the minute the web content article is set to - display - * @param expirationDateMonth the month the web content article is set to - expire - * @param expirationDateDay the calendar day the web content article is set - to expire - * @param expirationDateYear the year the web content article is set to - expire - * @param expirationDateHour the hour the web content article is set to - expire - * @param expirationDateMinute the minute the web content article is set to - expire - * @param neverExpire whether the web content article is not set to auto - expire - * @param reviewDateMonth the month the web content article is set for - review - * @param reviewDateDay the calendar day the web content article is set for - review - * @param reviewDateYear the year the web content article is set for review - * @param reviewDateHour the hour the web content article is set for review - * @param reviewDateMinute the minute the web content article is set for - review - * @param neverReview whether the web content article is not set for review - * @param indexable whether the web content is searchable - * @param smallImage whether to update web content article's a small image. - A file must be passed in as smallImageFile value, - otherwise the current small image is deleted. - * @param smallImageURL the web content article's small image URL - (optionally null) - * @param smallImageFile the web content article's new small image file - (optionally null). Must pass in - smallImage value of true to replace the - article's small image file. - * @param images the web content's images (optionally null) - * @param articleURL the web content article's accessible URL (optionally - null) - * @param serviceContext the service context to be applied. Can set the - modification date, expando bridge attributes, asset category IDs, - asset tag names, asset link entry IDs, asset priority, workflow - actions, URL title , and can set whether to add the default - command update for the web content article. With respect to - social activities, by setting the service context's command to - {@link Constants#UPDATE}, the invocation is considered a web - content update activity; otherwise it is considered a web content - add activity. - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle updateArticle( - long userId, long groupId, long folderId, String articleId, - double version, java.util.Map titleMap, - java.util.Map descriptionMap, - String content, String ddmStructureKey, String ddmTemplateKey, - String layoutUuid, int displayDateMonth, int displayDateDay, - int displayDateYear, int displayDateHour, int displayDateMinute, - int expirationDateMonth, int expirationDateDay, - int expirationDateYear, int expirationDateHour, - int expirationDateMinute, boolean neverExpire, int reviewDateMonth, - int reviewDateDay, int reviewDateYear, int reviewDateHour, - int reviewDateMinute, boolean neverReview, boolean indexable, - boolean smallImage, String smallImageURL, - java.io.File smallImageFile, java.util.Map images, - String articleURL, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateArticle( - userId, groupId, folderId, articleId, version, titleMap, - descriptionMap, content, ddmStructureKey, ddmTemplateKey, - layoutUuid, displayDateMonth, displayDateDay, displayDateYear, - displayDateHour, displayDateMinute, expirationDateMonth, - expirationDateDay, expirationDateYear, expirationDateHour, - expirationDateMinute, neverExpire, reviewDateMonth, reviewDateDay, - reviewDateYear, reviewDateHour, reviewDateMinute, neverReview, - indexable, smallImage, smallImageURL, smallImageFile, images, - articleURL, serviceContext); - } - - /** - * Updates the web content article matching the version, replacing its - * folder and content. - * - * @param userId the primary key of the user updating the web content - article - * @param groupId the primary key of the web content article's group - * @param folderId the primary key of the web content article folder - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param content the HTML content wrapped in XML. For more information, - see the content example in the {@link #addArticle(long, long, - long, long, long, String, boolean, double, Map, Map, String, - String, String, String, int, int, int, int, int, int, int, int, - int, int, boolean, int, int, int, int, int, boolean, boolean, - boolean, String, File, Map, String, ServiceContext)} description. - * @param serviceContext the service context to be applied. Can set the - modification date, expando bridge attributes, asset category IDs, - asset tag names, asset link entry IDs, asset priority, workflow - actions, URL title, and can set whether to add the default - command update for the web content article. With respect to - social activities, by setting the service context's command to - {@link Constants#UPDATE}, the invocation is considered a web - content update activity; otherwise it is considered a web content - add activity. - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle updateArticle( - long userId, long groupId, long folderId, String articleId, - double version, String content, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateArticle( - userId, groupId, folderId, articleId, version, content, - serviceContext); - } - - /** - * Updates the URL title of the web content article. - * - * @param id the primary key of the web content article - * @param urlTitle the web content article's URL title - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle updateArticle( - long id, String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateArticle(id, urlTitle); - } - - /** - * Updates the translation of the web content article. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param locale the locale of the web content article's display template - * @param title the translated web content article title - * @param description the translated web content article description - * @param content the HTML content wrapped in XML. For more information, - see the content example in the {@link #addArticle(long, long, - long, long, long, String, boolean, double, Map, Map, String, - String, String, String, int, int, int, int, int, int, int, int, - int, int, boolean, int, int, int, int, int, boolean, boolean, - boolean, String, File, Map, String, ServiceContext)} description. - * @param images the web content's images - * @param serviceContext the service context to be applied. Can set the - modification date and URL title for the web content article. - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle - updateArticleTranslation( - long groupId, String articleId, double version, - java.util.Locale locale, String title, String description, - String content, java.util.Map images, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateArticleTranslation( - groupId, articleId, version, locale, title, description, content, - images, serviceContext); - } - - /** - * Updates the web content article's asset with the new asset categories, - * tag names, and link entries, removing and adding them as necessary. - * - * @param userId the primary key of the user updating the web content - article's asset - * @param article the web content article - * @param assetCategoryIds the primary keys of the new asset categories - * @param assetTagNames the new asset tag names - * @param assetLinkEntryIds the primary keys of the new asset link - entries - * @deprecated As of Wilberforce (7.0.x), replaced by {@link - #updateAsset(long, JournalArticle, long[], String[], long[], - Double)} - */ - @Deprecated - public static void updateAsset( - long userId, com.liferay.journal.model.JournalArticle article, - long[] assetCategoryIds, String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().updateAsset( - userId, article, assetCategoryIds, assetTagNames, - assetLinkEntryIds); - } - - /** - * Updates the web content article's asset with the new asset categories, - * tag names, and link entries, removing and adding them as necessary. - * - * @param userId the primary key of the user updating the web content - article's asset - * @param article the web content article - * @param assetCategoryIds the primary keys of the new asset categories - * @param assetTagNames the new asset tag names - * @param assetLinkEntryIds the primary keys of the new asset link entries - * @param priority the priority of the asset - */ - public static void updateAsset( - long userId, com.liferay.journal.model.JournalArticle article, - long[] assetCategoryIds, String[] assetTagNames, - long[] assetLinkEntryIds, Double priority) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().updateAsset( - userId, article, assetCategoryIds, assetTagNames, assetLinkEntryIds, - priority); - } - - /** - * Updates the web content article matching the group, article ID, and - * version, replacing its content. - * - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param content the HTML content wrapped in XML. For more information, - see the content example in the {@link #addArticle(long, long, - long, long, long, String, boolean, double, Map, Map, String, - String, String, String, int, int, int, int, int, int, int, int, - int, int, boolean, int, int, int, int, int, boolean, boolean, - boolean, String, File, Map, String, ServiceContext)} description. - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle updateContent( - long groupId, String articleId, double version, String content) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateContent(groupId, articleId, version, content); - } - - /** - * Updates the web content articles matching the group, class name ID, and - * DDM template key, replacing the DDM template key with a new one. - * - * @param groupId the primary key of the web content article's group - * @param classNameId the primary key of the DDMStructure class if the web - content article is related to a DDM structure, the primary key of - the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the journal-api - module otherwise - * @param oldDDMTemplateKey the primary key of the web content article's old - DDM template - * @param newDDMTemplateKey the primary key of the web content article's new - DDM template - */ - public static void updateDDMTemplateKey( - long groupId, long classNameId, String oldDDMTemplateKey, - String newDDMTemplateKey) { - - getService().updateDDMTemplateKey( - groupId, classNameId, oldDDMTemplateKey, newDDMTemplateKey); - } - - /** - * Updates the journal article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - *

    - * Important: Inspect JournalArticleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there. - *

    - * - * @param journalArticle the journal article - * @return the journal article that was updated - */ - public static com.liferay.journal.model.JournalArticle updateJournalArticle( - com.liferay.journal.model.JournalArticle journalArticle) { - - return getService().updateJournalArticle(journalArticle); - } - - /** - * Updates the workflow status of the web content article. - * - * @param userId the primary key of the user updating the web content - article's status - * @param article the web content article - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param articleURL the web content article's accessible URL - * @param serviceContext the service context to be applied. Can set the - modification date, status date, and portlet preferences. With - respect to social activities, by setting the service context's - command to {@link Constants#UPDATE}, the invocation is considered - a web content update activity; otherwise it is considered a web - content add activity. - * @param workflowContext the web content article's configured workflow - context - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle updateStatus( - long userId, com.liferay.journal.model.JournalArticle article, - int status, String articleURL, - com.liferay.portal.kernel.service.ServiceContext serviceContext, - java.util.Map workflowContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateStatus( - userId, article, status, articleURL, serviceContext, - workflowContext); - } - - /** - * Updates the workflow status of the web content article matching the class - * PK. - * - * @param userId the primary key of the user updating the web content - article's status - * @param classPK the primary key of the DDM structure, if the web content - article is related to a DDM structure, the primary key of the - class associated with the article, or 0 otherwise - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param workflowContext the web content article's configured workflow - * @param serviceContext the service context to be applied. Can set the - modification date, portlet preferences, and can set whether to - add the default command update for the web content article. - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle updateStatus( - long userId, long classPK, int status, - java.util.Map workflowContext, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateStatus( - userId, classPK, status, workflowContext, serviceContext); - } - - /** - * Updates the workflow status of the web content article matching the - * group, article ID, and version. - * - * @param userId the primary key of the user updating the web content - article's status - * @param groupId the primary key of the web content article's group - * @param articleId the primary key of the web content article - * @param version the web content article's version - * @param status the web content article's workflow status. For more - information see {@link WorkflowConstants} for constants starting - with the "STATUS_" prefix. - * @param articleURL the web content article's accessible URL - * @param workflowContext the web content article's configured workflow - * @param serviceContext the service context to be applied. Can set the - modification date, portlet preferences, and can set whether to - add the default command update for the web content article. - * @return the updated web content article - */ - public static com.liferay.journal.model.JournalArticle updateStatus( - long userId, long groupId, String articleId, double version, - int status, String articleURL, - java.util.Map workflowContext, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateStatus( - userId, groupId, articleId, version, status, articleURL, - workflowContext, serviceContext); - } - - /** - * Updates the web content articles matching the group, class name ID, and - * DDM template key, replacing the DDM template key with a new one. - * - * @param groupId the primary key of the web content article's group - * @param classNameId the primary key of the DDMStructure class if the - web content article is related to a DDM structure, the - primary key of the class name associated with the article, or - JournalArticleConstants.CLASSNAME_ID_DEFAULT in the - journal-api module otherwise - * @param oldDDMTemplateKey the primary key of the web content - article's old DDM template - * @param newDDMTemplateKey the primary key of the web content - article's new DDM template - * @deprecated As of Wilberforce (7.0.x), replaced by {@link - #updateDDMTemplateKey} - */ - @Deprecated - public static void updateTemplateId( - long groupId, long classNameId, String oldDDMTemplateKey, - String newDDMTemplateKey) { - - getService().updateTemplateId( - groupId, classNameId, oldDDMTemplateKey, newDDMTemplateKey); - } - - public static JournalArticleLocalService getService() { - return _serviceTracker.getService(); - } - - private static ServiceTracker - - _serviceTracker; - - static { - Bundle bundle = FrameworkUtil.getBundle( - JournalArticleLocalService.class); - - ServiceTracker - serviceTracker = - new ServiceTracker - ( - bundle.getBundleContext(), - JournalArticleLocalService.class, null); - - serviceTracker.open(); - - _serviceTracker = serviceTracker; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay71-deprecated-methods-test/Liferay71DeprecatedMethodsTestCase.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay71-deprecated-methods-test/Liferay71DeprecatedMethodsTestCase.java deleted file mode 100644 index d04a2ee620..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay71-deprecated-methods-test/Liferay71DeprecatedMethodsTestCase.java +++ /dev/null @@ -1,98 +0,0 @@ -package cz.datalite.zk.liferay.mock; - -import com.liferay.bookmarks.service.BookmarksFolderServiceUtil; - -import com.liferay.exportimport.kernel.lar.ExportImportHelperUtil; -import com.liferay.exportimport.kernel.lar.PortletDataContext; -import com.liferay.exportimport.kernel.staging.Staging; - -import com.liferay.message.boards.kernel.model.MBMessage; - -import com.liferay.portal.kernel.cache.MultiVMPoolUtil; -import com.liferay.portal.kernel.cache.SingleVMPoolUtil; -import com.liferay.portal.kernel.model.LayoutWrapper; -import com.liferay.portal.kernel.search.BooleanClauseFactory; -import com.liferay.portal.kernel.search.BooleanQueryFactory; -import com.liferay.portal.kernel.search.SearchEngineProxyWrapper; -import com.liferay.portal.kernel.search.SearchEngineUtil; -import com.liferay.portal.kernel.security.auth.AuthTokenWhitelistUtil; -import com.liferay.portal.kernel.theme.ThemeDisplay; -import com.liferay.portal.kernel.util.UnicodeProperties; -import com.liferay.portal.repository.util.ExternalRepositoryFactoryUtil; - -import com.liferay.util.servlet.NullSession; - -import java.lang.String; - -import java.util.Map; -import java.util.List; -import java.util.Set; - -public class Liferay71DeprecatedMethodsTestCase { - - public void testDeprecatedMethod() { - - String[] valueNames = _portalSession.getValueNames(); - - _portalSession.removeValue(""); - - Map stagingParameters = _staging.getStagingParameters(); - - _staging.lockGroup(_userId, _groupId); - - Map assetCategoryIdsMap = _portletDataContext.getAssetCategoryIdsMap(); - - Map> comments = _portletDataContext.getComments(); - - Layout exportableLayout = ExportImportHelperUtil.getExportableLayout(_themeDisplay); - - String exportLayoutReferences = ExportImportHelperUtil.replaceExportLayoutReferences(_portletDataContext, ""); - - Set sets = AuthTokenWhitelistUtil.resetPortletCSRFWhitelist(); - - Set _sets = AuthTokenWhitelistUtil.resetPortletInvocationWhitelist(); - - String unicodeProperties = _unicodeProperties.toSortedString(); - - SingleVMPoolUtil.removeCache(""); - - _portalCache = MultiVMPoolUtil.getCache(""); - - BooleanClauseFactory booleanClauseFactory = _searchEngineProxyWrapper.getBooleanClauseFactory(); - - BooleanQueryFactory booleanQueryFactory = _searchEngineProxyWrapper.getBooleanQueryFactory(); - - boolean isIndexReadOnly = SearchEngineUtil.isIndexReadOnly(); - - SearchEngineUtil.setIndexReadOnly(isIndexReadOnly); - - boolean isTypeArticle = _layoutWrapper.isTypeArticle(); - - String[] externalRepositoryClassNames = ExternalRepositoryFactoryUtil.getExternalRepositoryClassNames(); - - BookmarksFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds), _groupId, _folderId); - } - - private NullSession _portalSession = new NullSession(); - - @Reference - private Staging _staging; - - private long _userId = 1; - - private long _groupId = 1; - - private long _folderId = 1; - - private PortletDataContext _portletDataContext; - - private ThemeDisplay _themeDisplay; - - private UnicodeProperties _unicodeProperties = new UnicodeProperties(); - - private PortalCache _portalCache; - - private SearchEngineProxyWrapper _searchEngineProxyWrapper = new SearchEngineProxyWrapper(searchEngine, getIndexSearcher(), getIndexWriter()); - - private LayoutWrapper _layoutWrapper = new LayoutWrapper(_layout.toEscapedModel()); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay72-deprecated-methods-test/DLAppServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay72-deprecated-methods-test/DLAppServiceUtil.java deleted file mode 100644 index c8c6f434f2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay72-deprecated-methods-test/DLAppServiceUtil.java +++ /dev/null @@ -1,2418 +0,0 @@ -/** - * 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 com.liferay.document.library.kernel.service; - -import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; - -/** - * Provides the remote service utility for DLApp. This utility wraps - * com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl and is an - * 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 Brian Wing Shun Chan - * @see DLAppService - * @generated - */ -public class DLAppServiceUtil { - - /** - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds a file entry and associated metadata. It is created based on a byte - * array. - * - *

    - * This method takes two file names, the sourceFileName and the - * title. The sourceFileName corresponds to the - * name of the actual file being uploaded. The title - * corresponds to a name the client wishes to assign this file after it has - * been uploaded to the portal. If it is null, the - * sourceFileName will be used. - *

    - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the file entry's parent folder - * @param sourceFileName the original file's name - * @param mimeType the file's MIME type - * @param title the name to be assigned to the file (optionally null - ) - * @param description the file's description - * @param changeLog the file's version change log - * @param bytes the file's data (optionally null) - * @param serviceContext the service context to be applied. Can set the - asset category IDs, asset tag names, and expando bridge - attributes for the file entry. In a Liferay repository, it may - include:
    • fileEntryTypeId - ID for a custom file entry - type
    • fieldsMap - mapping for fields associated with a - custom file entry type
    - * @return the file entry - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - addFileEntry( - long repositoryId, long folderId, String sourceFileName, - String mimeType, String title, String description, - String changeLog, byte[] bytes, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addFileEntry( - repositoryId, folderId, sourceFileName, mimeType, title, - description, changeLog, bytes, serviceContext); - } - - /** - * Adds a file entry and associated metadata. It is created based on a - * {@link File} object. - * - *

    - * This method takes two file names, the sourceFileName and the - * title. The sourceFileName corresponds to the - * name of the actual file being uploaded. The title - * corresponds to a name the client wishes to assign this file after it has - * been uploaded to the portal. If it is null, the - * sourceFileName will be used. - *

    - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the file entry's parent folder - * @param sourceFileName the original file's name - * @param mimeType the file's MIME type - * @param title the name to be assigned to the file (optionally null - ) - * @param description the file's description - * @param changeLog the file's version change log - * @param file the file's data (optionally null) - * @param serviceContext the service context to be applied. Can set the - asset category IDs, asset tag names, and expando bridge - attributes for the file entry. In a Liferay repository, it may - include:
    • fileEntryTypeId - ID for a custom file entry - type
    • fieldsMap - mapping for fields associated with a - custom file entry type
    - * @return the file entry - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - addFileEntry( - long repositoryId, long folderId, String sourceFileName, - String mimeType, String title, String description, - String changeLog, java.io.File file, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addFileEntry( - repositoryId, folderId, sourceFileName, mimeType, title, - description, changeLog, file, serviceContext); - } - - /** - * Adds a file entry and associated metadata. It is created based on a - * {@link InputStream} object. - * - *

    - * This method takes two file names, the sourceFileName and the - * title. The sourceFileName corresponds to the - * name of the actual file being uploaded. The title - * corresponds to a name the client wishes to assign this file after it has - * been uploaded to the portal. If it is null, the - * sourceFileName will be used. - *

    - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the file entry's parent folder - * @param sourceFileName the original file's name - * @param mimeType the file's MIME type - * @param title the name to be assigned to the file (optionally null - ) - * @param description the file's description - * @param changeLog the file's version change log - * @param is the file's data (optionally null) - * @param size the file's size (optionally 0) - * @param serviceContext the service context to be applied. Can set the - asset category IDs, asset tag names, and expando bridge - attributes for the file entry. In a Liferay repository, it may - include:
    • fileEntryTypeId - ID for a custom file entry - type
    • fieldsMap - mapping for fields associated with a - custom file entry type
    - * @return the file entry - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - addFileEntry( - long repositoryId, long folderId, String sourceFileName, - String mimeType, String title, String description, - String changeLog, java.io.InputStream is, long size, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addFileEntry( - repositoryId, folderId, sourceFileName, mimeType, title, - description, changeLog, is, size, serviceContext); - } - - /** - * Adds a file shortcut to the existing file entry. This method is only - * supported by the Liferay repository. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the file shortcut's parent folder - * @param toFileEntryId the primary key of the file shortcut's file entry - * @param serviceContext the service context to be applied. Can set the - asset category IDs, asset tag names, and expando bridge - attributes for the file entry. - * @return the file shortcut - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileShortcut - addFileShortcut( - long repositoryId, long folderId, long toFileEntryId, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addFileShortcut( - repositoryId, folderId, toFileEntryId, serviceContext); - } - - /** - * Adds a folder. - * - * @param repositoryId the primary key of the repository - * @param parentFolderId the primary key of the folder's parent folder - * @param name the folder's name - * @param description the folder's description - * @param serviceContext the service context to be applied. In a Liferay - repository, it may include boolean mountPoint specifying whether - folder is a facade for mounting a third-party repository - * @return the folder - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.Folder addFolder( - long repositoryId, long parentFolderId, String name, - String description, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addFolder( - repositoryId, parentFolderId, name, description, serviceContext); - } - - /** - * Adds a temporary file entry. - * - *

    - * This allows a client to upload a file into a temporary location and - * manipulate its metadata prior to making it available for public usage. - * This is different from checking in and checking out a file entry. - *

    - * - * @param groupId the primary key of the group - * @param folderId the primary key of the folder where the file entry will - eventually reside - * @param folderName the temporary folder's name - * @param fileName the file's original name - * @param file the file's data (optionally null) - * @param mimeType the file's MIME type - * @return the temporary file entry - * @throws PortalException if a portal exception occurred - * @see TempFileEntryUtil - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - addTempFileEntry( - long groupId, long folderId, String folderName, String fileName, - java.io.File file, String mimeType) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addTempFileEntry( - groupId, folderId, folderName, fileName, file, mimeType); - } - - /** - * Adds a temporary file entry. It is created based on the {@link - * InputStream} object. - * - *

    - * This allows a client to upload a file into a temporary location and - * manipulate its metadata prior to making it available for public usage. - * This is different from checking in and checking out a file entry. - *

    - * - * @param groupId the primary key of the group - * @param folderId the primary key of the folder where the file entry will - eventually reside - * @param folderName the temporary folder's name - * @param fileName the file's original name - * @param inputStream the file's data - * @param mimeType the file's MIME type - * @return the temporary file entry - * @throws PortalException if a portal exception occurred - * @see TempFileEntryUtil - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - addTempFileEntry( - long groupId, long folderId, String folderName, String fileName, - java.io.InputStream inputStream, String mimeType) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().addTempFileEntry( - groupId, folderId, folderName, fileName, inputStream, mimeType); - } - - /** - * Cancels the check out of the file entry. If a user has not checked out - * the specified file entry, invoking this method will result in no changes. - * - *

    - * When a file entry is checked out, a PWC (private working copy) is created - * and the original file entry is locked. A client can make as many changes - * to the PWC as he desires without those changes being visible to other - * users. If the user is satisfied with the changes, he may elect to check - * in his changes, resulting in a new file version based on the PWC; the PWC - * will be removed and the file entry will be unlocked. If the user is not - * satisfied with the changes, he may elect to cancel his check out; this - * results in the deletion of the PWC and unlocking of the file entry. - *

    - * - * @param fileEntryId the primary key of the file entry to cancel the - checkout - * @throws PortalException if a portal exception occurred - * @see #checkInFileEntry(long, boolean, String, ServiceContext) - * @see #checkOutFileEntry(long, ServiceContext) - */ - public static void cancelCheckOut(long fileEntryId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().cancelCheckOut(fileEntryId); - } - - /** - * @deprecated As of Judson (7.1.x), replaced by {@link - #checkInFileEntry(long, DLVersionNumberIncrease, String, - ServiceContext)} - */ - @Deprecated - public static void checkInFileEntry( - long fileEntryId, boolean majorVersion, String changeLog, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().checkInFileEntry( - fileEntryId, majorVersion, changeLog, serviceContext); - } - - /** - * Checks in the file entry. If a user has not checked out the specified - * file entry, invoking this method will result in no changes. - * - *

    - * When a file entry is checked out, a PWC (private working copy) is created - * and the original file entry is locked. A client can make as many changes - * to the PWC as he desires without those changes being visible to other - * users. If the user is satisfied with the changes, he may elect to check - * in his changes, resulting in a new file version based on the PWC; the PWC - * will be removed and the file entry will be unlocked. If the user is not - * satisfied with the changes, he may elect to cancel his check out; this - * results in the deletion of the PWC and unlocking of the file entry. - *

    - * - * @param fileEntryId the primary key of the file entry to check in - * @param dlVersionNumberIncrease the kind of version number increase to - apply for these changes. - * @param changeLog the file's version change log - * @param serviceContext the service context to be applied - * @throws PortalException if a portal exception occurred - * @see #cancelCheckOut(long) - * @see #checkOutFileEntry(long, ServiceContext) - */ - public static void checkInFileEntry( - long fileEntryId, - com.liferay.document.library.kernel.model.DLVersionNumberIncrease - dlVersionNumberIncrease, - String changeLog, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().checkInFileEntry( - fileEntryId, dlVersionNumberIncrease, changeLog, serviceContext); - } - - /** - * Checks in the file entry using the lock's UUID. If a user has not checked - * out the specified file entry, invoking this method will result in no - * changes. This method is primarily used by WebDAV. - * - *

    - * When a file entry is checked out, a PWC (private working copy) is created - * and the original file entry is locked. A client can make as many changes - * to the PWC as he desires without those changes being visible to other - * users. If the user is satisfied with the changes, he may elect to check - * in his changes, resulting in a new file version based on the PWC; the PWC - * will be removed and the file entry will be unlocked. If the user is not - * satisfied with the changes, he may elect to cancel his check out; this - * results in the deletion of the PWC and unlocking of the file entry. - *

    - * - * @param fileEntryId the primary key of the file entry to check in - * @param lockUuid the lock's UUID - * @param serviceContext the service context to be applied - * @throws PortalException if a portal exception occurred - * @see #cancelCheckOut(long) - * @see #checkOutFileEntry(long, String, long, ServiceContext) - */ - public static void checkInFileEntry( - long fileEntryId, String lockUuid, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().checkInFileEntry(fileEntryId, lockUuid, serviceContext); - } - - /** - * Check out a file entry. - * - *

    - * When a file entry is checked out, a PWC (private working copy) is created - * and the original file entry is locked. A client can make as many changes - * to the PWC as he desires without those changes being visible to other - * users. If the user is satisfied with the changes, he may elect to check - * in his changes, resulting in a new file version based on the PWC; the PWC - * will be removed and the file entry will be unlocked. If the user is not - * satisfied with the changes, he may elect to cancel his check out; this - * results in the deletion of the PWC and unlocking of the file entry. - *

    - * - * @param fileEntryId the file entry to check out - * @param serviceContext the service context to be applied - * @throws PortalException if a portal exception occurred - * @see #cancelCheckOut(long) - * @see #checkInFileEntry(long, boolean, String, ServiceContext) - */ - public static void checkOutFileEntry( - long fileEntryId, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().checkOutFileEntry(fileEntryId, serviceContext); - } - - /** - * Checks out the file entry. This method is primarily used by WebDAV. - * - *

    - * When a file entry is checked out, a PWC (private working copy) is created - * and the original file entry is locked. A client can make as many changes - * to the PWC as he desires without those changes being visible to other - * users. If the user is satisfied with the changes, he may elect to check - * in his changes, resulting in a new file version based on the PWC; the PWC - * will be removed and the file entry will be unlocked. If the user is not - * satisfied with the changes, he may elect to cancel his check out; this - * results in the deletion of the PWC and unlocking of the file entry. - *

    - * - * @param fileEntryId the file entry to check out - * @param owner the owner string for the checkout (optionally - null) - * @param expirationTime the time in milliseconds before the lock expires. - If the value is 0, the default expiration time will - be used from portal.properties. - * @param serviceContext the service context to be applied - * @return the file entry - * @throws PortalException if a portal exception occurred - * @see #cancelCheckOut(long) - * @see #checkInFileEntry(long, String) - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - checkOutFileEntry( - long fileEntryId, String owner, long expirationTime, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().checkOutFileEntry( - fileEntryId, owner, expirationTime, serviceContext); - } - - /** - * Performs a deep copy of the folder. - * - * @param repositoryId the primary key of the repository - * @param sourceFolderId the primary key of the folder to copy - * @param parentFolderId the primary key of the new folder's parent folder - * @param name the new folder's name - * @param description the new folder's description - * @param serviceContext the service context to be applied - * @return the folder - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.Folder copyFolder( - long repositoryId, long sourceFolderId, long parentFolderId, - String name, String description, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().copyFolder( - repositoryId, sourceFolderId, parentFolderId, name, description, - serviceContext); - } - - /** - * Deletes the file entry with the primary key. - * - * @param fileEntryId the primary key of the file entry - * @throws PortalException if a portal exception occurred - */ - public static void deleteFileEntry(long fileEntryId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteFileEntry(fileEntryId); - } - - /** - * Deletes the file entry with the title in the folder. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the file entry's parent folder - * @param title the file entry's title - * @throws PortalException if a portal exception occurred - */ - public static void deleteFileEntryByTitle( - long repositoryId, long folderId, String title) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteFileEntryByTitle(repositoryId, folderId, title); - } - - /** - * Deletes the file shortcut with the primary key. This method is only - * supported by the Liferay repository. - * - * @param fileShortcutId the primary key of the file shortcut - * @throws PortalException if a portal exception occurred - */ - public static void deleteFileShortcut(long fileShortcutId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteFileShortcut(fileShortcutId); - } - - /** - * Deletes the file version. File versions can only be deleted if it is - * approved and there are other approved file versions available. - * - * @param fileVersionId the primary key of the file version - * @throws PortalException if a portal exception occurred - */ - public static void deleteFileVersion(long fileVersionId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteFileVersion(fileVersionId); - } - - /** - * Deletes the file version. File versions can only be deleted if it is - * approved and there are other approved file versions available. This - * method is only supported by the Liferay repository. - * - * @param fileEntryId the primary key of the file entry - * @param version the version label of the file version - * @throws PortalException if a portal exception occurred - */ - public static void deleteFileVersion(long fileEntryId, String version) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteFileVersion(fileEntryId, version); - } - - /** - * Deletes the folder with the primary key and all of its subfolders and - * file entries. - * - * @param folderId the primary key of the folder - * @throws PortalException if a portal exception occurred - */ - public static void deleteFolder(long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteFolder(folderId); - } - - /** - * Deletes the folder with the name in the parent folder and all of its - * subfolders and file entries. - * - * @param repositoryId the primary key of the repository - * @param parentFolderId the primary key of the folder's parent folder - * @param name the folder's name - * @throws PortalException if a portal exception occurred - */ - public static void deleteFolder( - long repositoryId, long parentFolderId, String name) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteFolder(repositoryId, parentFolderId, name); - } - - /** - * Deletes the temporary file entry. - * - * @param groupId the primary key of the group - * @param folderId the primary key of the folder where the file entry was - eventually to reside - * @param folderName the temporary folder's name - * @param fileName the file's original name - * @throws PortalException if a portal exception occurred - * @see TempFileEntryUtil - */ - public static void deleteTempFileEntry( - long groupId, long folderId, String folderName, String fileName) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().deleteTempFileEntry( - groupId, folderId, folderName, fileName); - } - - /** - * Returns all the file entries in the folder. - * - * @param repositoryId the primary key of the file entry's repository - * @param folderId the primary key of the file entry's folder - * @return the file entries in the folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFileEntries( - long repositoryId, long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntries(repositoryId, folderId); - } - - /** - * Returns a name-ordered range of all the file entries in the folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the file entry's repository - * @param folderId the primary key of the file entry's folder - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @return the name-ordered range of file entries in the folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFileEntries( - long repositoryId, long folderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntries(repositoryId, folderId, start, end); - } - - /** - * Returns an ordered range of all the file entries in the folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the file entry's repository - * @param folderId the primary key of the file entry's folder - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @param obc the comparator to order the file entries (optionally - null) - * @return the range of file entries in the folder ordered by comparator - obc - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFileEntries( - long repositoryId, long folderId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntries( - repositoryId, folderId, start, end, obc); - } - - /** - * Returns the file entries with the file entry type in the folder. - * - * @param repositoryId the primary key of the file entry's repository - * @param folderId the primary key of the file entry's folder - * @param fileEntryTypeId the primary key of the file entry type - * @return the file entries with the file entry type in the folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFileEntries( - long repositoryId, long folderId, long fileEntryTypeId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntries( - repositoryId, folderId, fileEntryTypeId); - } - - /** - * Returns a name-ordered range of all the file entries with the file entry - * type in the folder. - * - * @param repositoryId the primary key of the file entry's repository - * @param folderId the primary key of the file entry's folder - * @param fileEntryTypeId the primary key of the file entry type - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @return the name-ordered range of the file entries in the folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFileEntries( - long repositoryId, long folderId, long fileEntryTypeId, - int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntries( - repositoryId, folderId, fileEntryTypeId, start, end); - } - - /** - * Returns an ordered range of all the file entries with the file entry type - * in the folder. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the folder - * @param fileEntryTypeId the primary key of the file entry type - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @param obc the comparator to order the results by (optionally - null) - * @return the range of file entries with the file entry type in the folder - ordered by null - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFileEntries( - long repositoryId, long folderId, long fileEntryTypeId, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntries( - repositoryId, folderId, fileEntryTypeId, start, end, obc); - } - - public static java.util.List - getFileEntries( - long repositoryId, long folderId, String[] mimeTypes) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntries(repositoryId, folderId, mimeTypes); - } - - public static java.util.List - getFileEntries( - long repositoryId, long folderId, String[] mimeTypes, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntries( - repositoryId, folderId, mimeTypes, start, end, obc); - } - - /** - * Returns a range of all the file entries and shortcuts in the folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the folder - * @param status the workflow status - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @return the range of file entries and shortcuts in the folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List getFileEntriesAndFileShortcuts( - long repositoryId, long folderId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntriesAndFileShortcuts( - repositoryId, folderId, status, start, end); - } - - /** - * Returns the number of file entries and shortcuts in the folder. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the folder - * @param status the workflow status - * @return the number of file entries and shortcuts in the folder - * @throws PortalException if a portal exception occurred - */ - public static int getFileEntriesAndFileShortcutsCount( - long repositoryId, long folderId, int status) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntriesAndFileShortcutsCount( - repositoryId, folderId, status); - } - - /** - * Returns the number of file entries and shortcuts in the folder. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the folder - * @param status the workflow status - * @param mimeTypes allowed media types - * @return the number of file entries and shortcuts in the folder - * @throws PortalException if a portal exception occurred - */ - public static int getFileEntriesAndFileShortcutsCount( - long repositoryId, long folderId, int status, String[] mimeTypes) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntriesAndFileShortcutsCount( - repositoryId, folderId, status, mimeTypes); - } - - /** - * Returns the number of file entries in the folder. - * - * @param repositoryId the primary key of the file entry's repository - * @param folderId the primary key of the file entry's folder - * @return the number of file entries in the folder - * @throws PortalException if a portal exception occurred - */ - public static int getFileEntriesCount(long repositoryId, long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntriesCount(repositoryId, folderId); - } - - /** - * Returns the number of file entries with the file entry type in the - * folder. - * - * @param repositoryId the primary key of the file entry's repository - * @param folderId the primary key of the file entry's folder - * @param fileEntryTypeId the primary key of the file entry type - * @return the number of file entries with the file entry type in the folder - * @throws PortalException if a portal exception occurred - */ - public static int getFileEntriesCount( - long repositoryId, long folderId, long fileEntryTypeId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntriesCount( - repositoryId, folderId, fileEntryTypeId); - } - - public static int getFileEntriesCount( - long repositoryId, long folderId, String[] mimeTypes) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntriesCount( - repositoryId, folderId, mimeTypes); - } - - /** - * Returns the file entry with the primary key. - * - * @param fileEntryId the primary key of the file entry - * @return the file entry with the primary key - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - getFileEntry(long fileEntryId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntry(fileEntryId); - } - - /** - * Returns the file entry with the title in the folder. - * - * @param groupId the primary key of the file entry's group - * @param folderId the primary key of the file entry's folder - * @param title the file entry's title - * @return the file entry with the title in the folder - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - getFileEntry(long groupId, long folderId, String title) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntry(groupId, folderId, title); - } - - /** - * Returns the file entry with the UUID and group. - * - * @param uuid the file entry's UUID - * @param groupId the primary key of the file entry's group - * @return the file entry with the UUID and group - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - getFileEntryByUuidAndGroupId(String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileEntryByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the file shortcut with the primary key. This method is only - * supported by the Liferay repository. - * - * @param fileShortcutId the primary key of the file shortcut - * @return the file shortcut with the primary key - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileShortcut - getFileShortcut(long fileShortcutId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileShortcut(fileShortcutId); - } - - /** - * Returns the file version with the primary key. - * - * @param fileVersionId the primary key of the file version - * @return the file version with the primary key - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileVersion - getFileVersion(long fileVersionId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFileVersion(fileVersionId); - } - - /** - * Returns the folder with the primary key. - * - * @param folderId the primary key of the folder - * @return the folder with the primary key - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.Folder getFolder( - long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFolder(folderId); - } - - /** - * Returns the folder with the name in the parent folder. - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param name the folder's name - * @return the folder with the name in the parent folder - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.Folder getFolder( - long repositoryId, long parentFolderId, String name) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFolder(repositoryId, parentFolderId, name); - } - - /** - * Returns all immediate subfolders of the parent folder. - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @return the immediate subfolders of the parent folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFolders( - long repositoryId, long parentFolderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFolders(repositoryId, parentFolderId); - } - - /** - * Returns all immediate subfolders of the parent folder, optionally - * including mount folders for third-party repositories. - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param includeMountFolders whether to include mount folders for - third-party repositories - * @return the immediate subfolders of the parent folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFolders( - long repositoryId, long parentFolderId, - boolean includeMountFolders) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFolders( - repositoryId, parentFolderId, includeMountFolders); - } - - /** - * Returns a name-ordered range of all the immediate subfolders of the - * parent folder, optionally including mount folders for third-party - * repositories. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param includeMountFolders whether to include mount folders for - third-party repositories - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @return the name-ordered range of immediate subfolders of the parent - folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFolders( - long repositoryId, long parentFolderId, - boolean includeMountFolders, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFolders( - repositoryId, parentFolderId, includeMountFolders, start, end); - } - - /** - * Returns an ordered range of all the immediate subfolders of the parent - * folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param includeMountFolders whether to include mount folders for - third-party repositories - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @param obc the comparator to order the folders (optionally - null) - * @return the range of immediate subfolders of the parent folder ordered by - comparator obc - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFolders( - long repositoryId, long parentFolderId, - boolean includeMountFolders, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFolders( - repositoryId, parentFolderId, includeMountFolders, start, end, obc); - } - - /** - * Returns an ordered range of all the immediate subfolders of the parent - * folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param status the workflow status - * @param includeMountFolders whether to include mount folders for - third-party repositories - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @param obc the comparator to order the folders (optionally - null) - * @return the range of immediate subfolders of the parent folder ordered by - comparator obc - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFolders( - long repositoryId, long parentFolderId, int status, - boolean includeMountFolders, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFolders( - repositoryId, parentFolderId, status, includeMountFolders, start, - end, obc); - } - - /** - * Returns a name-ordered range of all the immediate subfolders of the - * parent folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @return the name-ordered range of immediate subfolders of the parent - folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFolders( - long repositoryId, long parentFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFolders( - repositoryId, parentFolderId, start, end); - } - - /** - * Returns an ordered range of all the immediate subfolders of the parent - * folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @param obc the comparator to order the folders (optionally - null) - * @return the range of immediate subfolders of the parent folder ordered by - comparator obc - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFolders( - long repositoryId, long parentFolderId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFolders( - repositoryId, parentFolderId, start, end, obc); - } - - /** - * Returns a name-ordered range of all the immediate subfolders, file - * entries, and file shortcuts in the parent folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the parent folder - * @param status the workflow status - * @param includeMountFolders whether to include mount folders for - third-party repositories - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @return the name-ordered range of immediate subfolders, file entries, and - file shortcuts in the parent folder - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFoldersAndFileEntriesAndFileShortcuts( - long repositoryId, long folderId, int status, - boolean includeMountFolders, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersAndFileEntriesAndFileShortcuts( - repositoryId, folderId, status, includeMountFolders, start, end); - } - - /** - * Returns an ordered range of all the immediate subfolders, file entries, - * and file shortcuts in the parent folder. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the parent folder - * @param status the workflow status - * @param includeMountFolders whether to include mount folders for - third-party repositories - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @param obc the comparator to order the results (optionally - null) - * @return the range of immediate subfolders, file entries, and file - shortcuts in the parent folder ordered by comparator - obc - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getFoldersAndFileEntriesAndFileShortcuts( - long repositoryId, long folderId, int status, - boolean includeMountFolders, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersAndFileEntriesAndFileShortcuts( - repositoryId, folderId, status, includeMountFolders, start, end, - obc); - } - - public static java.util.List - getFoldersAndFileEntriesAndFileShortcuts( - long repositoryId, long folderId, int status, - String[] mimeTypes, boolean includeMountFolders, - boolean includeOwner, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersAndFileEntriesAndFileShortcuts( - repositoryId, folderId, status, mimeTypes, includeMountFolders, - includeOwner, start, end, obc); - } - - public static java.util.List - getFoldersAndFileEntriesAndFileShortcuts( - long repositoryId, long folderId, int status, - String[] mimeTypes, boolean includeMountFolders, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersAndFileEntriesAndFileShortcuts( - repositoryId, folderId, status, mimeTypes, includeMountFolders, - start, end, obc); - } - - /** - * Returns the number of immediate subfolders, file entries, and file - * shortcuts in the parent folder. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the parent folder - * @param status the workflow status - * @param includeMountFolders whether to include mount folders for - third-party repositories - * @return the number of immediate subfolders, file entries, and file - shortcuts in the parent folder - * @throws PortalException if a portal exception occurred - */ - public static int getFoldersAndFileEntriesAndFileShortcutsCount( - long repositoryId, long folderId, int status, - boolean includeMountFolders) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersAndFileEntriesAndFileShortcutsCount( - repositoryId, folderId, status, includeMountFolders); - } - - public static int getFoldersAndFileEntriesAndFileShortcutsCount( - long repositoryId, long folderId, int status, String[] mimeTypes, - boolean includeMountFolders) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersAndFileEntriesAndFileShortcutsCount( - repositoryId, folderId, status, mimeTypes, includeMountFolders); - } - - public static int getFoldersAndFileEntriesAndFileShortcutsCount( - long repositoryId, long folderId, int status, String[] mimeTypes, - boolean includeMountFolders, boolean includeOwner) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersAndFileEntriesAndFileShortcutsCount( - repositoryId, folderId, status, mimeTypes, includeMountFolders, - includeOwner); - } - - /** - * Returns the number of immediate subfolders of the parent folder. - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @return the number of immediate subfolders of the parent folder - * @throws PortalException if a portal exception occurred - */ - public static int getFoldersCount(long repositoryId, long parentFolderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersCount(repositoryId, parentFolderId); - } - - /** - * Returns the number of immediate subfolders of the parent folder, - * optionally including mount folders for third-party repositories. - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param includeMountFolders whether to include mount folders for - third-party repositories - * @return the number of immediate subfolders of the parent folder - * @throws PortalException if a portal exception occurred - */ - public static int getFoldersCount( - long repositoryId, long parentFolderId, boolean includeMountFolders) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersCount( - repositoryId, parentFolderId, includeMountFolders); - } - - /** - * Returns the number of immediate subfolders of the parent folder, - * optionally including mount folders for third-party repositories. - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param status the workflow status - * @param includeMountFolders whether to include mount folders for - third-party repositories - * @return the number of immediate subfolders of the parent folder - * @throws PortalException if a portal exception occurred - */ - public static int getFoldersCount( - long repositoryId, long parentFolderId, int status, - boolean includeMountFolders) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersCount( - repositoryId, parentFolderId, status, includeMountFolders); - } - - /** - * Returns the number of immediate subfolders and file entries across the - * folders. - * - * @param repositoryId the primary key of the repository - * @param folderIds the primary keys of folders from which to count - immediate subfolders and file entries - * @param status the workflow status - * @return the number of immediate subfolders and file entries across the - folders - * @throws PortalException if a portal exception occurred - */ - public static int getFoldersFileEntriesCount( - long repositoryId, java.util.List folderIds, int status) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getFoldersFileEntriesCount( - repositoryId, folderIds, status); - } - - /** - * Returns an ordered range of all the file entries in the group starting at - * the repository default parent folder that are stored within the Liferay - * repository. This method is primarily used to search for recently modified - * file entries. It can be limited to the file entries modified by a given - * user. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the group - * @param userId the primary key of the user who created the file - (optionally 0) - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @return the range of matching file entries ordered by date modified - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - - getGroupFileEntries( - long groupId, long userId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getGroupFileEntries(groupId, userId, start, end); - } - - /** - * Returns an ordered range of all the file entries in the group that are - * stored within the Liferay repository. This method is primarily used to - * search for recently modified file entries. It can be limited to the file - * entries modified by a given user. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the group - * @param userId the primary key of the user who created the file - (optionally 0) - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @param obc the comparator to order the file entries (optionally - null) - * @return the range of matching file entries ordered by comparator - obc - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - - getGroupFileEntries( - long groupId, long userId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getGroupFileEntries( - groupId, userId, start, end, obc); - } - - /** - * Returns an ordered range of all the file entries in the group starting at - * the root folder that are stored within the Liferay repository. This - * method is primarily used to search for recently modified file entries. It - * can be limited to the file entries modified by a given user. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the group - * @param userId the primary key of the user who created the file - (optionally 0) - * @param rootFolderId the primary key of the root folder to begin the - search - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @return the range of matching file entries ordered by date modified - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - - getGroupFileEntries( - long groupId, long userId, long rootFolderId, int start, - int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getGroupFileEntries( - groupId, userId, rootFolderId, start, end); - } - - /** - * Returns an ordered range of all the file entries in the group starting at - * the root folder that are stored within the Liferay repository. This - * method is primarily used to search for recently modified file entries. It - * can be limited to the file entries modified by a given user. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the group - * @param userId the primary key of the user who created the file - (optionally 0) - * @param rootFolderId the primary key of the root folder to begin the - search - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @param obc the comparator to order the file entries (optionally - null) - * @return the range of matching file entries ordered by comparator - obc - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - - getGroupFileEntries( - long groupId, long userId, long rootFolderId, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator - - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getGroupFileEntries( - groupId, userId, rootFolderId, start, end, obc); - } - - public static java.util.List - - getGroupFileEntries( - long groupId, long userId, long rootFolderId, - String[] mimeTypes, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getGroupFileEntries( - groupId, userId, rootFolderId, mimeTypes, status, start, end, obc); - } - - /** - * Returns the number of file entries in a group starting at the repository - * default parent folder that are stored within the Liferay repository. This - * method is primarily used to search for recently modified file entries. It - * can be limited to the file entries modified by a given user. - * - * @param groupId the primary key of the group - * @param userId the primary key of the user who created the file - (optionally 0) - * @return the number of matching file entries - * @throws PortalException if a portal exception occurred - */ - public static int getGroupFileEntriesCount(long groupId, long userId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getGroupFileEntriesCount(groupId, userId); - } - - /** - * Returns the number of file entries in a group starting at the root folder - * that are stored within the Liferay repository. This method is primarily - * used to search for recently modified file entries. It can be limited to - * the file entries modified by a given user. - * - * @param groupId the primary key of the group - * @param userId the primary key of the user who created the file - (optionally 0) - * @param rootFolderId the primary key of the root folder to begin the - search - * @return the number of matching file entries - * @throws PortalException if a portal exception occurred - */ - public static int getGroupFileEntriesCount( - long groupId, long userId, long rootFolderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getGroupFileEntriesCount( - groupId, userId, rootFolderId); - } - - public static int getGroupFileEntriesCount( - long groupId, long userId, long rootFolderId, String[] mimeTypes, - int status) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getGroupFileEntriesCount( - groupId, userId, rootFolderId, mimeTypes, status); - } - - /** - * Returns all immediate subfolders of the parent folder that are used for - * mounting third-party repositories. This method is only supported by the - * Liferay repository. - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @return the immediate subfolders of the parent folder that are used for - mounting third-party repositories - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getMountFolders( - long repositoryId, long parentFolderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getMountFolders(repositoryId, parentFolderId); - } - - /** - * Returns a name-ordered range of all the immediate subfolders of the - * parent folder that are used for mounting third-party repositories. This - * method is only supported by the Liferay repository. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the repository - * @param parentFolderId the primary key of the parent folder - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @return the name-ordered range of immediate subfolders of the parent - folder that are used for mounting third-party repositories - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getMountFolders( - long repositoryId, long parentFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getMountFolders( - repositoryId, parentFolderId, start, end); - } - - /** - * Returns an ordered range of all the immediate subfolders of the parent - * folder that are used for mounting third-party repositories. This method - * is only supported by the Liferay repository. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param repositoryId the primary key of the folder's repository - * @param parentFolderId the primary key of the folder's parent folder - * @param start the lower bound of the range of results - * @param end the upper bound of the range of results (not inclusive) - * @param obc the comparator to order the folders (optionally - null) - * @return the range of immediate subfolders of the parent folder that are - used for mounting third-party repositories ordered by comparator - obc - * @throws PortalException if a portal exception occurred - */ - public static java.util.List - getMountFolders( - long repositoryId, long parentFolderId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator - obc) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getMountFolders( - repositoryId, parentFolderId, start, end, obc); - } - - /** - * Returns the number of immediate subfolders of the parent folder that are - * used for mounting third-party repositories. This method is only supported - * by the Liferay repository. - * - * @param repositoryId the primary key of the repository - * @param parentFolderId the primary key of the parent folder - * @return the number of folders of the parent folder that are used for - mounting third-party repositories - * @throws PortalException if a portal exception occurred - */ - public static int getMountFoldersCount( - long repositoryId, long parentFolderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getMountFoldersCount(repositoryId, parentFolderId); - } - - /** - * Returns the OSGi service identifier. - * - * @return the OSGi service identifier - */ - public static String getOSGiServiceIdentifier() { - return getService().getOSGiServiceIdentifier(); - } - - public static void getSubfolderIds( - long repositoryId, java.util.List folderIds, long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().getSubfolderIds(repositoryId, folderIds, folderId); - } - - /** - * Returns all the descendant folders of the folder with the primary key. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the folder - * @return the descendant folders of the folder with the primary key - * @throws PortalException if a portal exception occurred - */ - public static java.util.List getSubfolderIds( - long repositoryId, long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getSubfolderIds(repositoryId, folderId); - } - - /** - * Returns descendant folders of the folder with the primary key, optionally - * limiting to one level deep. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the folder - * @param recurse whether to recurse through each subfolder - * @return the descendant folders of the folder with the primary key - * @throws PortalException if a portal exception occurred - */ - public static java.util.List getSubfolderIds( - long repositoryId, long folderId, boolean recurse) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getSubfolderIds(repositoryId, folderId, recurse); - } - - /** - * Returns all the temporary file entry names. - * - * @param groupId the primary key of the group - * @param folderId the primary key of the folder where the file entry will - eventually reside - * @param folderName the temporary folder's name - * @return the temporary file entry names - * @throws PortalException if a portal exception occurred - * @see #addTempFileEntry(long, long, String, String, File, String) - * @see TempFileEntryUtil - */ - public static String[] getTempFileNames( - long groupId, long folderId, String folderName) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().getTempFileNames(groupId, folderId, folderName); - } - - /** - * Locks the folder. This method is primarily used by WebDAV. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the folder - * @return the lock object - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.lock.Lock lockFolder( - long repositoryId, long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().lockFolder(repositoryId, folderId); - } - - /** - * Locks the folder. This method is primarily used by WebDAV. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the folder - * @param owner the owner string for the checkout (optionally - null) - * @param inheritable whether the lock must propagate to descendants - * @param expirationTime the time in milliseconds before the lock expires. - If the value is 0, the default expiration time will - be used from portal.properties. - * @return the lock object - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.lock.Lock lockFolder( - long repositoryId, long folderId, String owner, boolean inheritable, - long expirationTime) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().lockFolder( - repositoryId, folderId, owner, inheritable, expirationTime); - } - - /** - * Moves the file entry to the new folder. - * - * @param fileEntryId the primary key of the file entry - * @param newFolderId the primary key of the new folder - * @param serviceContext the service context to be applied - * @return the file entry - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - moveFileEntry( - long fileEntryId, long newFolderId, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().moveFileEntry( - fileEntryId, newFolderId, serviceContext); - } - - /** - * Moves the folder to the new parent folder with the primary key. - * - * @param folderId the primary key of the folder - * @param parentFolderId the primary key of the new parent folder - * @param serviceContext the service context to be applied - * @return the file entry - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.Folder moveFolder( - long folderId, long parentFolderId, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().moveFolder( - folderId, parentFolderId, serviceContext); - } - - /** - * Refreshes the lock for the file entry. This method is primarily used by - * WebDAV. - * - * @param lockUuid the lock's UUID - * @param companyId the primary key of the file entry's company - * @param expirationTime the time in milliseconds before the lock expires. - If the value is 0, the default expiration time will - be used from portal.properties. - * @return the lock object - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.lock.Lock refreshFileEntryLock( - String lockUuid, long companyId, long expirationTime) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().refreshFileEntryLock( - lockUuid, companyId, expirationTime); - } - - /** - * Refreshes the lock for the folder. This method is primarily used by - * WebDAV. - * - * @param lockUuid the lock's UUID - * @param companyId the primary key of the file entry's company - * @param expirationTime the time in milliseconds before the lock expires. - If the value is 0, the default expiration time will - be used from portal.properties. - * @return the lock object - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.lock.Lock refreshFolderLock( - String lockUuid, long companyId, long expirationTime) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().refreshFolderLock( - lockUuid, companyId, expirationTime); - } - - /** - * Reverts the file entry to a previous version. A new version will be - * created based on the previous version and metadata. - * - * @param fileEntryId the primary key of the file entry - * @param version the version to revert back to - * @param serviceContext the service context to be applied - * @throws PortalException if a portal exception occurred - */ - public static void revertFileEntry( - long fileEntryId, String version, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().revertFileEntry(fileEntryId, version, serviceContext); - } - - public static com.liferay.portal.kernel.search.Hits search( - long repositoryId, long creatorUserId, int status, int start, - int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().search( - repositoryId, creatorUserId, status, start, end); - } - - public static com.liferay.portal.kernel.search.Hits search( - long repositoryId, long creatorUserId, long folderId, - String[] mimeTypes, int status, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().search( - repositoryId, creatorUserId, folderId, mimeTypes, status, start, - end); - } - - public static com.liferay.portal.kernel.search.Hits search( - long repositoryId, - com.liferay.portal.kernel.search.SearchContext searchContext) - throws com.liferay.portal.kernel.search.SearchException { - - return getService().search(repositoryId, searchContext); - } - - public static com.liferay.portal.kernel.search.Hits search( - long repositoryId, - com.liferay.portal.kernel.search.SearchContext searchContext, - com.liferay.portal.kernel.search.Query query) - throws com.liferay.portal.kernel.search.SearchException { - - return getService().search(repositoryId, searchContext, query); - } - - /** - * Subscribe the user to changes in documents of the file entry type. This - * method is only supported by the Liferay repository. - * - * @param groupId the primary key of the file entry type's group - * @param fileEntryTypeId the primary key of the file entry type - * @throws PortalException if a portal exception occurred - */ - public static void subscribeFileEntryType( - long groupId, long fileEntryTypeId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().subscribeFileEntryType(groupId, fileEntryTypeId); - } - - /** - * Subscribe the user to document changes in the folder. This method is only - * supported by the Liferay repository. - * - * @param groupId the primary key of the folder's group - * @param folderId the primary key of the folder - * @throws PortalException if a portal exception occurred - */ - public static void subscribeFolder(long groupId, long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().subscribeFolder(groupId, folderId); - } - - /** - * Unlocks the folder. This method is primarily used by WebDAV. - * - * @param repositoryId the primary key of the repository - * @param folderId the primary key of the folder - * @param lockUuid the lock's UUID - * @throws PortalException if a portal exception occurred - */ - public static void unlockFolder( - long repositoryId, long folderId, String lockUuid) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().unlockFolder(repositoryId, folderId, lockUuid); - } - - /** - * Unlocks the folder. This method is primarily used by WebDAV. - * - * @param repositoryId the primary key of the repository - * @param parentFolderId the primary key of the parent folder - * @param name the folder's name - * @param lockUuid the lock's UUID - * @throws PortalException if a portal exception occurred - */ - public static void unlockFolder( - long repositoryId, long parentFolderId, String name, - String lockUuid) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().unlockFolder(repositoryId, parentFolderId, name, lockUuid); - } - - /** - * Unsubscribe the user from changes in documents of the file entry type. - * This method is only supported by the Liferay repository. - * - * @param groupId the primary key of the file entry type's group - * @param fileEntryTypeId the primary key of the file entry type - * @throws PortalException if a portal exception occurred - */ - public static void unsubscribeFileEntryType( - long groupId, long fileEntryTypeId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().unsubscribeFileEntryType(groupId, fileEntryTypeId); - } - - /** - * Unsubscribe the user from document changes in the folder. This method is - * only supported by the Liferay repository. - * - * @param groupId the primary key of the folder's group - * @param folderId the primary key of the folder - * @throws PortalException if a portal exception occurred - */ - public static void unsubscribeFolder(long groupId, long folderId) - throws com.liferay.portal.kernel.exception.PortalException { - - getService().unsubscribeFolder(groupId, folderId); - } - - /** - * @deprecated As of Judson (7.1.x), replaced by {@link - #updateFileEntry(long, String, String, String, String, - String, DLVersionNumberIncrease, byte[], ServiceContext)} - */ - @Deprecated - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntry( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - boolean majorVersion, byte[] bytes, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntry( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, majorVersion, bytes, serviceContext); - } - - /** - * @deprecated As of Judson (7.1.x), replaced by {@link - #updateFileEntry(long, String, String, String, String, - String, DLVersionNumberIncrease, File, ServiceContext)} - */ - @Deprecated - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntry( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - boolean majorVersion, java.io.File file, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntry( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, majorVersion, file, serviceContext); - } - - /** - * @deprecated As of Judson (7.1.x), replaced by {@link - #updateFileEntry(long, String, String, String, String, - String, DLVersionNumberIncrease, InputStream, long, - ServiceContext)} - */ - @Deprecated - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntry( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - boolean majorVersion, java.io.InputStream is, long size, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntry( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, majorVersion, is, size, serviceContext); - } - - /** - * Updates a file entry and associated metadata based on a byte array - * object. If the file data is null, then only the associated - * metadata (i.e., title, description, and - * parameters in the serviceContext) will be updated. - * - *

    - * This method takes two file names, the sourceFileName and the - * title. The sourceFileName corresponds to the - * name of the actual file being uploaded. The title - * corresponds to a name the client wishes to assign this file after it has - * been uploaded to the portal. - *

    - * - * @param fileEntryId the primary key of the file entry - * @param sourceFileName the original file's name (optionally - null) - * @param mimeType the file's MIME type (optionally null) - * @param title the new name to be assigned to the file (optionally - null) - * @param description the file's new description - * @param changeLog the file's version change log (optionally - null) - * @param dlVersionNumberIncrease the kind of version number increase to - apply for these changes. - * @param bytes the file's data (optionally null) - * @param serviceContext the service context to be applied. Can set the - asset category IDs, asset tag names, and expando bridge - attributes for the file entry. In a Liferay repository, it may - include:
    • fileEntryTypeId - ID for a custom file entry - type
    • fieldsMap - mapping for fields associated with a - custom file entry type
    - * @return the file entry - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntry( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - com.liferay.document.library.kernel.model. - DLVersionNumberIncrease dlVersionNumberIncrease, - byte[] bytes, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntry( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, dlVersionNumberIncrease, bytes, serviceContext); - } - - /** - * Updates a file entry and associated metadata based on a {@link File} - * object. If the file data is null, then only the associated - * metadata (i.e., title, description, and - * parameters in the serviceContext) will be updated. - * - *

    - * This method takes two file names, the sourceFileName and the - * title. The sourceFileName corresponds to the - * name of the actual file being uploaded. The title - * corresponds to a name the client wishes to assign this file after it has - * been uploaded to the portal. - *

    - * - * @param fileEntryId the primary key of the file entry - * @param sourceFileName the original file's name (optionally - null) - * @param mimeType the file's MIME type (optionally null) - * @param title the new name to be assigned to the file (optionally - null) - * @param description the file's new description - * @param changeLog the file's version change log (optionally - null) - * @param dlVersionNumberIncrease the kind of version number increase to - apply for these changes. - * @param file the file's data (optionally null) - * @param serviceContext the service context to be applied. Can set the - asset category IDs, asset tag names, and expando bridge - attributes for the file entry. In a Liferay repository, it may - include:
    • fileEntryTypeId - ID for a custom file entry - type
    • fieldsMap - mapping for fields associated with a - custom file entry type
    - * @return the file entry - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntry( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - com.liferay.document.library.kernel.model. - DLVersionNumberIncrease dlVersionNumberIncrease, - java.io.File file, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntry( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, dlVersionNumberIncrease, file, serviceContext); - } - - /** - * Updates a file entry and associated metadata based on an {@link - * InputStream} object. If the file data is null, then only the - * associated metadata (i.e., title, description, - * and parameters in the serviceContext) will be updated. - * - *

    - * This method takes two file names, the sourceFileName and the - * title. The sourceFileName corresponds to the - * name of the actual file being uploaded. The title - * corresponds to a name the client wishes to assign this file after it has - * been uploaded to the portal. - *

    - * - * @param fileEntryId the primary key of the file entry - * @param sourceFileName the original file's name (optionally - null) - * @param mimeType the file's MIME type (optionally null) - * @param title the new name to be assigned to the file (optionally - null) - * @param description the file's new description - * @param changeLog the file's version change log (optionally - null) - * @param dlVersionNumberIncrease the kind of version number increase to - apply for these changes. - * @param is the file's data (optionally null) - * @param size the file's size (optionally 0) - * @param serviceContext the service context to be applied. Can set the - asset category IDs, asset tag names, and expando bridge - attributes for the file entry. In a Liferay repository, it may - include:
    • fileEntryTypeId - ID for a custom file entry - type
    • fieldsMap - mapping for fields associated with a - custom file entry type
    - * @return the file entry - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntry( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - com.liferay.document.library.kernel.model. - DLVersionNumberIncrease dlVersionNumberIncrease, - java.io.InputStream is, long size, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntry( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, dlVersionNumberIncrease, is, size, serviceContext); - } - - /** - * @deprecated As of Judson (7.1.x), As of Judson (7.1.x), replaced by - {@link #updateFileEntryAndCheckIn(long, String, String, - String, String, String, DLVersionNumberIncrease, File, - ServiceContext)} - */ - @Deprecated - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntryAndCheckIn( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - boolean majorVersion, java.io.File file, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntryAndCheckIn( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, majorVersion, file, serviceContext); - } - - /** - * @deprecated As of Judson (7.1.x), replaced by {@link - #updateFileEntryAndCheckIn(long, String, String, String, - String, String, DLVersionNumberIncrease, InputStream, long, - ServiceContext)} - */ - @Deprecated - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntryAndCheckIn( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - boolean majorVersion, java.io.InputStream is, long size, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntryAndCheckIn( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, majorVersion, is, size, serviceContext); - } - - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntryAndCheckIn( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - com.liferay.document.library.kernel.model. - DLVersionNumberIncrease dlVersionNumberIncrease, - java.io.File file, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntryAndCheckIn( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, dlVersionNumberIncrease, file, serviceContext); - } - - public static com.liferay.portal.kernel.repository.model.FileEntry - updateFileEntryAndCheckIn( - long fileEntryId, String sourceFileName, String mimeType, - String title, String description, String changeLog, - com.liferay.document.library.kernel.model. - DLVersionNumberIncrease dlVersionNumberIncrease, - java.io.InputStream is, long size, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileEntryAndCheckIn( - fileEntryId, sourceFileName, mimeType, title, description, - changeLog, dlVersionNumberIncrease, is, size, serviceContext); - } - - /** - * Updates a file shortcut to the existing file entry. This method is only - * supported by the Liferay repository. - * - * @param fileShortcutId the primary key of the file shortcut - * @param folderId the primary key of the file shortcut's parent folder - * @param toFileEntryId the primary key of the file shortcut's file entry - * @param serviceContext the service context to be applied. Can set the - asset category IDs, asset tag names, and expando bridge - attributes for the file entry. - * @return the file shortcut - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.FileShortcut - updateFileShortcut( - long fileShortcutId, long folderId, long toFileEntryId, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFileShortcut( - fileShortcutId, folderId, toFileEntryId, serviceContext); - } - - /** - * Updates the folder. - * - * @param folderId the primary key of the folder - * @param name the folder's new name - * @param description the folder's new description - * @param serviceContext the service context to be applied. In a Liferay - repository, it may include:
    • defaultFileEntryTypeId - - the file entry type to default all Liferay file entries to
    • -
    • dlFileEntryTypesSearchContainerPrimaryKeys - a - comma-delimited list of file entry type primary keys allowed in - the given folder and all descendants
    • restrictionType - - specifying restriction type of file entry types allowed
    • -
    • workflowDefinitionXYZ - the workflow definition name - specified per file entry type. The parameter name must be the - string workflowDefinition appended by the - fileEntryTypeId (optionally 0).
    • -
    - * @return the folder - * @throws PortalException if a portal exception occurred - */ - public static com.liferay.portal.kernel.repository.model.Folder - updateFolder( - long folderId, String name, String description, - com.liferay.portal.kernel.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().updateFolder( - folderId, name, description, serviceContext); - } - - /** - * Returns true if the file entry is checked out. This method - * is primarily used by WebDAV. - * - * @param repositoryId the primary key for the repository - * @param fileEntryId the primary key for the file entry - * @param lockUuid the lock's UUID - * @return true if the file entry is checked out; - false otherwise - * @throws PortalException if a portal exception occurred - */ - public static boolean verifyFileEntryCheckOut( - long repositoryId, long fileEntryId, String lockUuid) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().verifyFileEntryCheckOut( - repositoryId, fileEntryId, lockUuid); - } - - public static boolean verifyFileEntryLock( - long repositoryId, long fileEntryId, String lockUuid) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().verifyFileEntryLock( - repositoryId, fileEntryId, lockUuid); - } - - /** - * Returns true if the inheritable lock exists. This method is - * primarily used by WebDAV. - * - * @param repositoryId the primary key for the repository - * @param folderId the primary key for the folder - * @param lockUuid the lock's UUID - * @return true if the inheritable lock exists; - false otherwise - * @throws PortalException if a portal exception occurred - */ - public static boolean verifyInheritableLock( - long repositoryId, long folderId, String lockUuid) - throws com.liferay.portal.kernel.exception.PortalException { - - return getService().verifyInheritableLock( - repositoryId, folderId, lockUuid); - } - - public static DLAppService getService() { - if (_service == null) { - _service = (DLAppService)PortalBeanLocatorUtil.locate( - DLAppService.class.getName()); - } - - return _service; - } - - private static DLAppService _service; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay72-deprecated-methods-test/Liferay72DeprecatedMethodsTestCase.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay72-deprecated-methods-test/Liferay72DeprecatedMethodsTestCase.java deleted file mode 100644 index ae4d37dfeb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay72-deprecated-methods-test/Liferay72DeprecatedMethodsTestCase.java +++ /dev/null @@ -1,97 +0,0 @@ -package cz.datalite.zk.liferay.mock; - -import com.liferay.bean.portlet.cdi.extension.internal.BeanPortletInvokerPortlet; - -import com.liferay.calendar.model.CalendarBookingWrapper; - -import com.liferay.document.library.kernel.model.DLFileEntry; -import com.liferay.document.library.kernel.service.DLAppLocalServiceUtil; -import com.liferay.document.library.kernel.service.DLFileEntryLocalService; -import com.liferay.document.library.kernel.util.DLProcessorRegistry; -import com.liferay.document.library.kernel.util.DLProcessorRegistryUtil; -import com.liferay.document.library.kernel.util.DLValidator; -import com.liferay.document.library.kernel.util.DLValidatorUtil; - -import com.liferay.exportimport.internal.lar.ExportImportProcessCallbackUtil; - -import com.liferay.petra.encryptor.Encryptor; - -import com.liferay.portal.dao.jdbc.aop.DefaultDynamicDataSourceTargetSource; -import com.liferay.portal.deploy.DeployUtil; -import com.liferay.portal.kernel.trash.TrashHandler; -import com.liferay.portal.spring.transaction.TransactionStatusAdapter; -import com.liferay.portal.tools.ToolsUtil; - -import com.liferay.reading.time.model.ReadingTimeEntryWrapper; - -import java.security.Provider; - -import java.lang.String; - -import java.util.concurrent.Callable; -import java.util.List; -import java.util.Stack; - -import org.springframework.transaction.PlatformTransactionManager; - -public class Liferay72DeprecatedMethodsTestCase { - - public void testMethod() { - - DLAppLocalServiceUtil.deleteFileRanksByFileEntryId(_fileEntryId); - - DLAppLocalServiceUtil.deleteFileRanksByUserId(_userId); - - List dLFileEntryList = _dLFileEntryLocalServiceWrapper.getMisversionedFileEntries(); - - List _dLFileEntryList = _dLFileEntryLocalServiceWrapper.getOrphanedFileEntries(); - - DLValidator dLValidator = DLValidatorUtil.getDLValidator(); - - DLValidatorUtil.setDLValidator(dLValidator); - - DLProcessorRegistry dLProcessorRegistry = DLProcessorRegistryUtil.getDLProcessorRegistry(); - - DLProcessorRegistryUtil.setDLProcessorRegistry(dLProcessorRegistry); - - Stack stack = _dynamicDataSourceTargetSource.getMethodStack(); - - _dynamicDataSourceTargetSource.pushMethod(targetClass.getName()); - - String resourcePath = DeployUtil.getResourcePath("/"); - - PlatformTransactionManager platformTransactionManager = _transactionStatusAdapter.getPlatformTransactionManager(); - - String qualifiedClassNames = ToolsUtil.stripFullyQualifiedClassNames(StringUtil.replaceFirst(content, imports, newImports);); - - boolean isStrutsBridgePortlet = _beanPortletInvokerPortlet.isStrutsBridgePortlet(); - - boolean isStrutsPortlet = _beanPortletInvokerPortlet.isStrutsPortlet(); - - List> callbackList = ExportImportProcessCallbackUtil.popCallbackList(); - - ExportImportProcessCallbackUtil.pushCallbackList(); - - TrashHandler trashHandler = _calendarBookingWrapper.getTrashHandler(); - - Provider provider = Encryptor.getProvider(); - - TrashHandler _trashHandler = _readingTimeEntryWrapper.getTrashHandler(); - } - - private long _fileEntryId = 1; - - private long _userId = 1; - - private DLFileEntryLocalServiceWrapper _dLFileEntryLocalServiceWrapper = new DLFileEntryLocalServiceWrapper(dlFileEntryLocalService); - - private DefaultDynamicDataSourceTargetSource _dynamicDataSourceTargetSource = new DefaultDynamicDataSourceTargetSource(); - - private TransactionStatusAdapter _transactionStatusAdapter = new TransactionStatusAdapter(transactionStatus); - - private BeanPortletInvokerPortlet _beanPortletInvokerPortlet = new BeanPortletInvokerPortlet(beanPortlet.getBeanMethods()); - - private CalendarBookingWrapper _calendarBookingWrapper = new CalendarBookingWrapper(_calendarBooking.toUnescapedModel()); - - private ReadingTimeEntryWrapper _readingTimeEntryWrapper = new ReadingTimeEntryWrapper((ReadingTimeEntry)_readingTimeEntry.clone()); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay73-deprecated-methods-test/DLUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay73-deprecated-methods-test/DLUtil.java deleted file mode 100644 index a53ac018c0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay73-deprecated-methods-test/DLUtil.java +++ /dev/null @@ -1,416 +0,0 @@ -/** - * 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 com.liferay.document.library.kernel.util; - -import com.liferay.document.library.kernel.model.DLFileEntryType; -import com.liferay.document.library.kernel.model.DLFileVersion; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.repository.model.FileVersion; -import com.liferay.portal.kernel.repository.model.Folder; -import com.liferay.portal.kernel.search.Hits; -import com.liferay.portal.kernel.service.ServiceContext; -import com.liferay.portal.kernel.theme.ThemeDisplay; -import com.liferay.portal.kernel.util.OrderByComparator; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -import javax.portlet.PortletRequest; -import javax.portlet.RenderRequest; - -/** - * @author Brian Wing Shun Chan - * @author Julio Camarero - */ -public class DLUtil { - - public static int compareVersions(String version1, String version2) { - return getDL().compareVersions(version1, version2); - } - - public static String getAbsolutePath( - PortletRequest portletRequest, long folderId) - throws PortalException { - - return getDL().getAbsolutePath(portletRequest, folderId); - } - - public static Set getAllMediaGalleryMimeTypes() { - return getDL().getAllMediaGalleryMimeTypes(); - } - - public static String getDDMStructureKey(DLFileEntryType dlFileEntryType) { - return getDL().getDDMStructureKey(dlFileEntryType); - } - - public static String getDDMStructureKey(String fileEntryTypeUuid) { - return getDL().getDDMStructureKey(fileEntryTypeUuid); - } - - public static String getDeprecatedDDMStructureKey( - DLFileEntryType dlFileEntryType) { - - return getDL().getDeprecatedDDMStructureKey(dlFileEntryType); - } - - public static String getDeprecatedDDMStructureKey(long fileEntryTypeId) { - return getDL().getDeprecatedDDMStructureKey(fileEntryTypeId); - } - - public static String getDividedPath(long id) { - return getDL().getDividedPath(id); - } - - public static DL getDL() { - return _dl; - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getFileEntryControlPanelLink( - * PortletRequest, long)} - */ - @Deprecated - public static String getDLFileEntryControlPanelLink( - PortletRequest portletRequest, long fileEntryId) - throws PortalException { - - return getDL().getDLFileEntryControlPanelLink( - portletRequest, fileEntryId); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getFolderControlPanelLink( - * PortletRequest, long)} - */ - @Deprecated - public static String getDLFolderControlPanelLink( - PortletRequest portletRequest, long folderId) - throws PortalException { - - return getDL().getDLFolderControlPanelLink(portletRequest, folderId); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getDownloadURL( - * FileEntry, FileVersion, ThemeDisplay, String)} - */ - @Deprecated - public static String getDownloadURL( - FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay, - String queryString) { - - return getDL().getDownloadURL( - fileEntry, fileVersion, themeDisplay, queryString); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getDownloadURL( - * FileEntry, FileVersion, ThemeDisplay, String, boolean, - * boolean)} - */ - @Deprecated - public static String getDownloadURL( - FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay, - String queryString, boolean appendVersion, boolean absoluteURL) { - - return getDL().getDownloadURL( - fileEntry, fileVersion, themeDisplay, queryString, appendVersion, - absoluteURL); - } - - public static Map getEmailDefinitionTerms( - RenderRequest renderRequest, String emailFromAddress, - String emailFromName) { - - return getDL().getEmailDefinitionTerms( - renderRequest, emailFromAddress, emailFromName); - } - - public static Map getEmailFromDefinitionTerms( - RenderRequest renderRequest, String emailFromAddress, - String emailFromName) { - - return getDL().getEmailFromDefinitionTerms( - renderRequest, emailFromAddress, emailFromName); - } - - public static List getFileEntries(Hits hits) { - return getDL().getFileEntries(hits); - } - - public static String getFileEntryImage( - FileEntry fileEntry, ThemeDisplay themeDisplay) { - - return getDL().getFileEntryImage(fileEntry, themeDisplay); - } - - public static String getFileIcon(String extension) { - return getDL().getFileIcon(extension); - } - - public static String getFileIconCssClass(String extension) { - return getDL().getFileIconCssClass(extension); - } - - public static String getGenericName(String extension) { - return getDL().getGenericName(extension); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getImagePreviewURL( - * FileEntry, FileVersion, ThemeDisplay)} - */ - @Deprecated - public static String getImagePreviewURL( - FileEntry fileEntry, FileVersion fileVersion, - ThemeDisplay themeDisplay) - throws Exception { - - return getDL().getImagePreviewURL(fileEntry, fileVersion, themeDisplay); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getImagePreviewURL( - * FileEntry, FileVersion, ThemeDisplay, String, boolean, - * boolean)} - */ - @Deprecated - public static String getImagePreviewURL( - FileEntry fileEntry, FileVersion fileVersion, - ThemeDisplay themeDisplay, String queryString, - boolean appendVersion, boolean absoluteURL) - throws PortalException { - - return getDL().getImagePreviewURL( - fileEntry, fileVersion, themeDisplay, queryString, appendVersion, - absoluteURL); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getImagePreviewURL( - * FileEntry, FileVersion, ThemeDisplay)} - */ - @Deprecated - public static String getImagePreviewURL( - FileEntry fileEntry, ThemeDisplay themeDisplay) - throws Exception { - - return getDL().getImagePreviewURL(fileEntry, themeDisplay); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getPreviewURL( - * FileEntry, FileVersion, ThemeDisplay, String)} - */ - @Deprecated - public static String getPreviewURL( - FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay, - String queryString) { - - return getDL().getPreviewURL( - fileEntry, fileVersion, themeDisplay, queryString); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getPreviewURL( - * FileEntry, FileVersion, ThemeDisplay, String, boolean, - * boolean)} - */ - @Deprecated - public static String getPreviewURL( - FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay, - String queryString, boolean appendVersion, boolean absoluteURL) { - - return getDL().getPreviewURL( - fileEntry, fileVersion, themeDisplay, queryString, appendVersion, - absoluteURL); - } - - public static OrderByComparator getRepositoryModelOrderByComparator( - String orderByCol, String orderByType) { - - return getDL().getRepositoryModelOrderByComparator( - orderByCol, orderByType); - } - - public static OrderByComparator getRepositoryModelOrderByComparator( - String orderByCol, String orderByType, boolean orderByModel) { - - return getDL().getRepositoryModelOrderByComparator( - orderByCol, orderByType, orderByModel); - } - - public static String getSanitizedFileName(String title, String extension) { - return getDL().getSanitizedFileName(title, extension); - } - - public static String getTempFileId(long id, String version) { - return getDL().getTempFileId(id, version); - } - - public static String getTempFileId( - long id, String version, String languageId) { - - return getDL().getTempFileId(id, version, languageId); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getThumbnailSrc( - * FileEntry, FileVersion, ThemeDisplay)} - */ - @Deprecated - public static String getThumbnailSrc( - FileEntry fileEntry, FileVersion fileVersion, - ThemeDisplay themeDisplay) - throws Exception { - - return getDL().getThumbnailSrc(fileEntry, fileVersion, themeDisplay); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getThumbnailSrc( - * FileEntry, ThemeDisplay)} - */ - @Deprecated - public static String getThumbnailSrc( - FileEntry fileEntry, ThemeDisplay themeDisplay) - throws Exception { - - return getDL().getThumbnailSrc(fileEntry, themeDisplay); - } - - public static String getThumbnailStyle() { - return getDL().getThumbnailStyle(); - } - - public static String getThumbnailStyle(boolean max, int margin) { - return getDL().getThumbnailStyle(max, margin); - } - - public static String getThumbnailStyle( - boolean max, int margin, int height, int width) { - - return getDL().getThumbnailStyle(max, margin, height, width); - } - - public static String getTitleWithExtension(FileEntry fileEntry) { - return getDL().getTitleWithExtension(fileEntry); - } - - public static String getTitleWithExtension(String title, String extension) { - return getDL().getTitleWithExtension(title, extension); - } - - public static String getUniqueFileName( - long groupId, long folderId, String fileName) { - - return getDL().getUniqueFileName(groupId, folderId, fileName); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getWebDavURL( - * ThemeDisplay, Folder, FileEntry)} - */ - @Deprecated - public static String getWebDavURL( - ThemeDisplay themeDisplay, Folder folder, FileEntry fileEntry) - throws PortalException { - - return getDL().getWebDavURL(themeDisplay, folder, fileEntry); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getWebDavURL( - * ThemeDisplay, Folder, FileEntry, boolean)} - */ - @Deprecated - public static String getWebDavURL( - ThemeDisplay themeDisplay, Folder folder, FileEntry fileEntry, - boolean manualCheckInRequired) - throws PortalException { - - return getDL().getWebDavURL( - themeDisplay, folder, fileEntry, manualCheckInRequired); - } - - /** - * @deprecated As of Mueller (7.2.x), replaced by {@link - * com.liferay.document.library.util.DLURLHelper#getWebDavURL( - * ThemeDisplay, Folder, FileEntry, boolean, boolean)} - */ - @Deprecated - public static String getWebDavURL( - ThemeDisplay themeDisplay, Folder folder, FileEntry fileEntry, - boolean manualCheckInRequired, boolean officeExtensionRequired) - throws PortalException { - - return getDL().getWebDavURL( - themeDisplay, folder, fileEntry, manualCheckInRequired, - officeExtensionRequired); - } - - public static boolean hasWorkflowDefinitionLink( - long companyId, long groupId, long folderId, long fileEntryTypeId) { - - return getDL().hasWorkflowDefinitionLink( - companyId, groupId, folderId, fileEntryTypeId); - } - - public static boolean isAutoGeneratedDLFileEntryTypeDDMStructureKey( - String ddmStructureKey) { - - return getDL().isAutoGeneratedDLFileEntryTypeDDMStructureKey( - ddmStructureKey); - } - - public static boolean isOfficeExtension(String extension) { - return getDL().isOfficeExtension(extension); - } - - public static boolean isValidVersion(String version) { - return getDL().isValidVersion(version); - } - - public static void startWorkflowInstance( - long userId, DLFileVersion dlFileVersion, String syncEventType, - ServiceContext serviceContext) - throws PortalException { - - getDL().startWorkflowInstance( - userId, dlFileVersion, syncEventType, serviceContext); - } - - public void setDL(DL dl) { - _dl = dl; - } - - private static DL _dl; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay73-deprecated-methods-test/Liferay73DeprecatedMethodsTestCase.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay73-deprecated-methods-test/Liferay73DeprecatedMethodsTestCase.java deleted file mode 100644 index ad73646145..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay73-deprecated-methods-test/Liferay73DeprecatedMethodsTestCase.java +++ /dev/null @@ -1,103 +0,0 @@ -package cz.datalite.zk.liferay.mock; - -import com.liferay.document.library.kernel.util.DLUtil; - -import com.liferay.dynamic.data.mapping.model.DDMFormFieldValidation; - - -import com.liferay.portal.kernel.json.JSONArray; -import com.liferay.portal.kernel.json.JSONUtil; -import com.liferay.portal.kernel.messaging.proxy.ProxyModeThreadLocal; -import com.liferay.portal.kernel.model.CompanyWrapper; -import com.liferay.portal.kernel.model.LayoutSet; -import com.liferay.portal.kernel.model.VirtualHost; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.service.LayoutSetLocalService; -import com.liferay.portal.kernel.service.LayoutSetServiceUtil; -import com.liferay.portal.kernel.service.ServiceContext; -import com.liferay.portal.kernel.service.VirtualHostLocalServiceWrapper; -import com.liferay.portal.kernel.util.PortalUtil; -import com.liferay.portal.kernel.workflow.WorkflowInstanceManager; -import com.liferay.portal.output.stream.container.OutputStreamContainerFactoryTracker; -import com.liferay.portal.search.elasticsearch6.internal.document.DefaultElasticsearchDocumentFactory; -import com.liferay.portal.search.elasticsearch6.internal.document.ElasticsearchDocumentFactory; -import com.liferay.portal.security.ldap.util.LDAPUtil; -import com.liferay.portal.workflow.kaleo.model.KaleoDefinitionVersionWrapper; -import com.liferay.portal.workflow.kaleo.model.KaleoInstance; -import com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalService; - -import java.lang.String; - -import java.util.Date; - -public class Liferay73DeprecatedMethodsTestCase { - - public void testDeprecatedMethod() { - - String dLFileEntryControlPanelLink = DLUtil.getDLFileEntryControlPanelLink(portletRequest, dlFileEntry.getFileEntryId()); - - ProxyModeThreadLocal.setForceSync(forceSync); - - _ddmFormFieldValidation.setExpression("*/+"); - - _outputStreamContainerFactoryTracker.runWithSwappedLog(new AllVerifiersRunnable(outputStream, force),outputStreamContainer.getDescription(), outputStream); - - String elasticsearchDocument = _elasticsearchDocumentFactory.getElasticsearchDocument(document); - - int count = _workflowInstanceManager.searchCount(companyId, userId, assetType, nodeName, kaleoDefinitionName, completed); - - JSONArray valueJSONArray = JSONUtil.put(cpDefinitionOptionValueRel.getKey()); - - List kaleoInstanceList = _kaleoInstanceLocalService.search(userId, assetClassName, nodeName, kaleoDefinitionName, completed, start, end, orderByComparator, serviceContext); - - String baseDN = LDAPUtil.escapeCharacters(ldapServerConfiguration.baseDN()); - - LayoutSets returnValue = LayoutSetServiceUtil.updateVirtualHost(groupId, privateLayout, virtualHost); - - boolean hasIncompleteKaleoInstances = _kaleoDefinitionVersionWrapper.hasIncompleteKaleoInstances(); - - KaleoDefinition kaleoDefinition = _kaleoDefinitionVersionWrapper.fetchKaleoDefinition(); - - boolean isJOnAS = ServerDetector.isJOnAS(); - - boolean isGlassfish = ServerDetector.isGlassfish(); - - String virtualHostname = PortalUtil.getVirtualHostname(_layoutSet); - - boolean isSendPassword = _companyWrapper.isSendPassword(); - - VirtualHost _virtualHost = _virtualHostLocalServiceWrapper.fetchVirtualHost(_companyId, _layoutSetId); - - } - - @Reference - private OutputStreamContainerFactoryTracker _outputStreamContainerFactoryTracker; - - private DDMFormFieldValidation _ddmFormFieldValidation = new DDMFormFieldValidation(); - - private ElasticsearchDocumentFactory _elasticsearchDocumentFactory = new DefaultElasticsearchDocumentFactory(); - - private static WorkflowInstanceManager _workflowInstanceManager; - - private KaleoInstanceLocalService _kaleoInstanceLocalService; - - @Reference - private NPMRegistry _npmRegistry; - - private KaleoDefinitionVersionWrapper _kaleoDefinitionVersionWrapper = new KaleoDefinitionVersionWrapper(kaleoDefinitionVersion); - - Reference - private LayoutSetLocalService _layoutSetLocalService; - - private LayoutSet _layoutSet = _layoutSetLocalService.getLayoutSet(groupId, false); - - private CompanyWrapper _companyWrapper = new CompanyWrapper(company); - - private long _companyId = 1; - - private long _layoutSetId = 1; - - private VirtualHostLocalServiceWrapper _virtualHostLocalServiceWrapper = new VirtualHostLocalServiceWrapper(virtualHostLocalService); - - private Document _document; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay73-deprecated-methods-test/SSLSocketFactory.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay73-deprecated-methods-test/SSLSocketFactory.java deleted file mode 100644 index b437a93e79..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/deprecated-methods-test/liferay73-deprecated-methods-test/SSLSocketFactory.java +++ /dev/null @@ -1,507 +0,0 @@ -/* - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - */ - -package org.apache.http.conn.ssl; - -import org.apache.http.annotation.ThreadSafe; - -import org.apache.http.conn.ConnectTimeoutException; -import org.apache.http.conn.scheme.HostNameResolver; -import org.apache.http.conn.scheme.LayeredSchemeSocketFactory; -import org.apache.http.conn.scheme.LayeredSocketFactory; -import org.apache.http.params.HttpConnectionParams; -import org.apache.http.params.HttpParams; - -import javax.net.ssl.KeyManager; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.TrustManager; -import javax.net.ssl.TrustManagerFactory; -import javax.net.ssl.X509TrustManager; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.net.Socket; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; -import java.security.KeyManagementException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.security.UnrecoverableKeyException; - -/** - * Layered socket factory for TLS/SSL connections. - *

    - * SSLSocketFactory can be used to validate the identity of the HTTPS server against a list of - * trusted certificates and to authenticate to the HTTPS server using a private key. - *

    - * SSLSocketFactory will enable server authentication when supplied with - * a {@link KeyStore trust-store} file containing one or several trusted certificates. The client - * secure socket will reject the connection during the SSL session handshake if the target HTTPS - * server attempts to authenticate itself with a non-trusted certificate. - *

    - * Use JDK keytool utility to import a trusted certificate and generate a trust-store file: - *

    - *     keytool -import -alias "my server cert" -file server.crt -keystore my.truststore
    - *    
    - *

    - * In special cases the standard trust verification process can be bypassed by using a custom - * {@link TrustStrategy}. This interface is primarily intended for allowing self-signed - * certificates to be accepted as trusted without having to add them to the trust-store file. - *

    - * The following parameters can be used to customize the behavior of this - * class: - *

      - *
    • {@link org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT}
    • - *
    • {@link org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT}
    • - *
    • {@link org.apache.http.params.CoreConnectionPNames#SO_REUSEADDR}
    • - *
    - *

    - * SSLSocketFactory will enable client authentication when supplied with - * a {@link KeyStore key-store} file containing a private key/public certificate - * pair. The client secure socket will use the private key to authenticate - * itself to the target HTTPS server during the SSL session handshake if - * requested to do so by the server. - * The target HTTPS server will in its turn verify the certificate presented - * by the client in order to establish client's authenticity - *

    - * Use the following sequence of actions to generate a key-store file - *

    - *
      - *
    • - *

      - * Use JDK keytool utility to generate a new key - *

      keytool -genkey -v -alias "my client key" -validity 365 -keystore my.keystore
      - * For simplicity use the same password for the key as that of the key-store - *

      - *
    • - *
    • - *

      - * Issue a certificate signing request (CSR) - *

      keytool -certreq -alias "my client key" -file mycertreq.csr -keystore my.keystore
      - *

      - *
    • - *
    • - *

      - * Send the certificate request to the trusted Certificate Authority for signature. - * One may choose to act as her own CA and sign the certificate request using a PKI - * tool, such as OpenSSL. - *

      - *
    • - *
    • - *

      - * Import the trusted CA root certificate - *

      keytool -import -alias "my trusted ca" -file caroot.crt -keystore my.keystore
      - *

      - *
    • - *
    • - *

      - * Import the PKCS#7 file containg the complete certificate chain - *

      keytool -import -alias "my client key" -file mycert.p7 -keystore my.keystore
      - *

      - *
    • - *
    • - *

      - * Verify the content the resultant keystore file - *

      keytool -list -v -keystore my.keystore
      - *

      - *
    • - *
    - * - * @since 4.0 - */ -@SuppressWarnings("deprecation") -@ThreadSafe -public class SSLSocketFactory implements LayeredSchemeSocketFactory, LayeredSocketFactory { - - public static final String TLS = "TLS"; - public static final String SSL = "SSL"; - public static final String SSLV2 = "SSLv2"; - - public static final X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER - = new AllowAllHostnameVerifier(); - - public static final X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER - = new BrowserCompatHostnameVerifier(); - - public static final X509HostnameVerifier STRICT_HOSTNAME_VERIFIER - = new StrictHostnameVerifier(); - - /** - * Gets the default factory, which uses the default JVM settings for secure - * connections. - * - * @return the default factory - */ - public static SSLSocketFactory getSocketFactory() { - return new SSLSocketFactory(); - } - - private final javax.net.ssl.SSLSocketFactory socketfactory; - private final HostNameResolver nameResolver; - // TODO: make final - private volatile X509HostnameVerifier hostnameVerifier; - - private static SSLContext createSSLContext( - String algorithm, - final KeyStore keystore, - final String keystorePassword, - final KeyStore truststore, - final SecureRandom random, - final TrustStrategy trustStrategy) - throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException, KeyManagementException { - if (algorithm == null) { - algorithm = TLS; - } - KeyManagerFactory kmfactory = KeyManagerFactory.getInstance( - KeyManagerFactory.getDefaultAlgorithm()); - kmfactory.init(keystore, keystorePassword != null ? keystorePassword.toCharArray(): null); - KeyManager[] keymanagers = kmfactory.getKeyManagers(); - TrustManagerFactory tmfactory = TrustManagerFactory.getInstance( - TrustManagerFactory.getDefaultAlgorithm()); - tmfactory.init(truststore); - TrustManager[] trustmanagers = tmfactory.getTrustManagers(); - if (trustmanagers != null && trustStrategy != null) { - for (int i = 0; i < trustmanagers.length; i++) { - TrustManager tm = trustmanagers[i]; - if (tm instanceof X509TrustManager) { - trustmanagers[i] = new TrustManagerDecorator( - (X509TrustManager) tm, trustStrategy); - } - } - } - - SSLContext sslcontext = SSLContext.getInstance(algorithm); - sslcontext.init(keymanagers, trustmanagers, random); - return sslcontext; - } - - private static SSLContext createDefaultSSLContext() { - try { - return createSSLContext(TLS, null, null, null, null, null); - } catch (Exception ex) { - throw new IllegalStateException("Failure initializing default SSL context", ex); - } - } - - /** - * @deprecated Use {@link #SSLSocketFactory(String, KeyStore, String, KeyStore, SecureRandom, X509HostnameVerifier)} - */ - @Deprecated - public SSLSocketFactory( - final String algorithm, - final KeyStore keystore, - final String keystorePassword, - final KeyStore truststore, - final SecureRandom random, - final HostNameResolver nameResolver) - throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { - this(createSSLContext( - algorithm, keystore, keystorePassword, truststore, random, null), - nameResolver); - } - - /** - * @since 4.1 - */ - public SSLSocketFactory( - String algorithm, - final KeyStore keystore, - final String keystorePassword, - final KeyStore truststore, - final SecureRandom random, - final X509HostnameVerifier hostnameVerifier) - throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { - this(createSSLContext( - algorithm, keystore, keystorePassword, truststore, random, null), - hostnameVerifier); - } - - /** - * @since 4.1 - */ - public SSLSocketFactory( - String algorithm, - final KeyStore keystore, - final String keystorePassword, - final KeyStore truststore, - final SecureRandom random, - final TrustStrategy trustStrategy, - final X509HostnameVerifier hostnameVerifier) - throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { - this(createSSLContext( - algorithm, keystore, keystorePassword, truststore, random, trustStrategy), - hostnameVerifier); - } - - public SSLSocketFactory( - final KeyStore keystore, - final String keystorePassword, - final KeyStore truststore) - throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { - this(TLS, keystore, keystorePassword, truststore, null, null, BROWSER_COMPATIBLE_HOSTNAME_VERIFIER); - } - - public SSLSocketFactory( - final KeyStore keystore, - final String keystorePassword) - throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException{ - this(TLS, keystore, keystorePassword, null, null, null, BROWSER_COMPATIBLE_HOSTNAME_VERIFIER); - } - - public SSLSocketFactory( - final KeyStore truststore) - throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { - this(TLS, null, null, truststore, null, null, BROWSER_COMPATIBLE_HOSTNAME_VERIFIER); - } - - /** - * @since 4.1 - */ - public SSLSocketFactory( - final TrustStrategy trustStrategy, - final X509HostnameVerifier hostnameVerifier) - throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { - this(TLS, null, null, null, null, trustStrategy, hostnameVerifier); - } - - /** - * @since 4.1 - */ - public SSLSocketFactory( - final TrustStrategy trustStrategy) - throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { - this(TLS, null, null, null, null, trustStrategy, BROWSER_COMPATIBLE_HOSTNAME_VERIFIER); - } - - public SSLSocketFactory(final SSLContext sslContext) { - this(sslContext, BROWSER_COMPATIBLE_HOSTNAME_VERIFIER); - } - - /** - * @deprecated Use {@link #SSLSocketFactory(SSLContext)} - */ - @Deprecated - public SSLSocketFactory( - final SSLContext sslContext, final HostNameResolver nameResolver) { - super(); - this.socketfactory = sslContext.getSocketFactory(); - this.hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER; - this.nameResolver = nameResolver; - } - - /** - * @since 4.1 - */ - public SSLSocketFactory( - final SSLContext sslContext, final X509HostnameVerifier hostnameVerifier) { - super(); - this.socketfactory = sslContext.getSocketFactory(); - this.hostnameVerifier = hostnameVerifier != null ? hostnameVerifier : BROWSER_COMPATIBLE_HOSTNAME_VERIFIER; - this.nameResolver = null; - } - - private SSLSocketFactory() { - this(createDefaultSSLContext()); - } - - /** - * @param params Optional parameters. Parameters passed to this method will have no effect. - * This method will create a unconnected instance of {@link Socket} class. - * @since 4.1 - */ - public Socket createSocket(final HttpParams params) throws IOException { - return this.socketfactory.createSocket(); - } - - @Deprecated - public Socket createSocket() throws IOException { - return this.socketfactory.createSocket(); - } - - /** - * @since 4.1 - */ - public Socket connectSocket( - final Socket socket, - final InetSocketAddress remoteAddress, - final InetSocketAddress localAddress, - final HttpParams params) throws IOException, UnknownHostException, ConnectTimeoutException { - if (remoteAddress == null) { - throw new IllegalArgumentException("Remote address may not be null"); - } - if (params == null) { - throw new IllegalArgumentException("HTTP parameters may not be null"); - } - Socket sock = socket != null ? socket : new Socket(); - if (localAddress != null) { - sock.setReuseAddress(HttpConnectionParams.getSoReuseaddr(params)); - sock.bind(localAddress); - } - - int connTimeout = HttpConnectionParams.getConnectionTimeout(params); - int soTimeout = HttpConnectionParams.getSoTimeout(params); - - try { - sock.setSoTimeout(soTimeout); - sock.connect(remoteAddress, connTimeout); - } catch (SocketTimeoutException ex) { - throw new ConnectTimeoutException("Connect to " + remoteAddress + " timed out"); - } - - // HttpInetSocketAddress#toString() returns original hostname value of the remote address - String hostname = remoteAddress.toString(); - int port = remoteAddress.getPort(); - String s = ":" + port; - if (hostname.endsWith(s)) { - hostname = hostname.substring(0, hostname.length() - s.length()); - } - - SSLSocket sslsock; - // Setup SSL layering if necessary - if (sock instanceof SSLSocket) { - sslsock = (SSLSocket) sock; - } else { - sslsock = (SSLSocket) this.socketfactory.createSocket(sock, hostname, port, true); - } - try { - this.hostnameVerifier.verify(hostname, sslsock); - // verifyHostName() didn't blowup - good! - } catch (IOException iox) { - // close the socket before re-throwing the exception - try { sslsock.close(); } catch (Exception x) { /*ignore*/ } - throw iox; - } - return sslsock; - } - - - /** - * Checks whether a socket connection is secure. - * This factory creates TLS/SSL socket connections - * which, by default, are considered secure. - *
    - * Derived classes may override this method to perform - * runtime checks, for example based on the cypher suite. - * - * @param sock the connected socket - * - * @return true - * - * @throws IllegalArgumentException if the argument is invalid - */ - public boolean isSecure(final Socket sock) throws IllegalArgumentException { - if (sock == null) { - throw new IllegalArgumentException("Socket may not be null"); - } - // This instanceof check is in line with createSocket() above. - if (!(sock instanceof SSLSocket)) { - throw new IllegalArgumentException("Socket not created by this factory"); - } - // This check is performed last since it calls the argument object. - if (sock.isClosed()) { - throw new IllegalArgumentException("Socket is closed"); - } - return true; - } - - /** - * @since 4.1 - */ - public Socket createLayeredSocket( - final Socket socket, - final String host, - final int port, - final boolean autoClose) throws IOException, UnknownHostException { - SSLSocket sslSocket = (SSLSocket) this.socketfactory.createSocket( - socket, - host, - port, - autoClose - ); - this.hostnameVerifier.verify(host, sslSocket); - // verifyHostName() didn't blowup - good! - return sslSocket; - } - - @Deprecated - public void setHostnameVerifier(X509HostnameVerifier hostnameVerifier) { - if ( hostnameVerifier == null ) { - throw new IllegalArgumentException("Hostname verifier may not be null"); - } - this.hostnameVerifier = hostnameVerifier != null ? hostnameVerifier : BROWSER_COMPATIBLE_HOSTNAME_VERIFIER; - } - - public X509HostnameVerifier getHostnameVerifier() { - return this.hostnameVerifier; - } - - /** - * @deprecated Use {@link #connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)} - */ - @Deprecated - public Socket connectSocket( - final Socket socket, - final String host, int port, - final InetAddress localAddress, int localPort, - final HttpParams params) throws IOException, UnknownHostException, ConnectTimeoutException { - InetSocketAddress local = null; - if (localAddress != null || localPort > 0) { - // we need to bind explicitly - if (localPort < 0) { - localPort = 0; // indicates "any" - } - local = new InetSocketAddress(localAddress, localPort); - } - InetAddress remoteAddress; - if (this.nameResolver != null) { - remoteAddress = this.nameResolver.resolve(host); - } else { - remoteAddress = InetAddress.getByName(host); - } - InetSocketAddress remote = new InetSocketAddress(remoteAddress, port); - return connectSocket(socket, remote, local, params); - } - - /** - * @deprecated Use {@link #createLayeredSocket(Socket, String, int, boolean)} - */ - @Deprecated - public Socket createSocket( - final Socket socket, - final String host, int port, - boolean autoClose) throws IOException, UnknownHostException { - return createLayeredSocket(socket, host, port, autoClose); - } - -} - -/* @generated */ \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/emptyfiles/TestEmpty.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/emptyfiles/TestEmpty.java deleted file mode 100644 index f23acb5b36..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/emptyfiles/TestEmpty.java +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/emptyfiles/TestEmpty.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/emptyfiles/TestEmpty.jsp deleted file mode 100644 index dbd59358ba..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/emptyfiles/TestEmpty.jsp +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/emptyfiles/TestEmpty2.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/emptyfiles/TestEmpty2.java deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/AlbumIndexer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/AlbumIndexer.java deleted file mode 100644 index e9668942f6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/AlbumIndexer.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * 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 org.liferay.jukebox.util; - -import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.search.BaseIndexer; -import com.liferay.portal.kernel.search.BooleanQuery; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.RelatedEntryIndexer; -import com.liferay.portal.kernel.search.SearchContext; -import com.liferay.portal.kernel.search.SearchEngineUtil; -import com.liferay.portal.kernel.search.Summary; -import com.liferay.portal.kernel.search.filter.BooleanFilter; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.security.permission.ActionKeys; -import com.liferay.portal.kernel.security.permission.PermissionChecker; -import com.liferay.portal.kernel.util.PortalUtil; -import com.liferay.document.library.kernel.model.DLFileEntry; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Locale; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletResponse; -import javax.portlet.PortletURL; - -import org.liferay.jukebox.model.Album; -import org.liferay.jukebox.model.Artist; -import org.liferay.jukebox.service.AlbumLocalServiceUtil; -import org.liferay.jukebox.service.ArtistLocalServiceUtil; -import org.liferay.jukebox.service.permission.AlbumPermission; - -/** - * @author Eudaldo Alonso - */ -public class AlbumIndexer extends BaseIndexer implements RelatedEntryIndexer { - - public static final String[] CLASS_NAMES = {Album.class.getName()}; - - public static final String PORTLET_ID = PortletKeys.ALBUMS; - - public AlbumIndexer() { - setPermissionAware(true); - } - - @Override - public void addRelatedEntryFields(Document document, Object obj) - throws Exception { - - if (obj instanceof DLFileEntry) { - DLFileEntry dlFileEntry = (DLFileEntry)obj; - - Album album = AlbumLocalServiceUtil.getAlbum( - GetterUtil.getLong(dlFileEntry.getTitle())); - - document.addKeyword( - Field.CLASS_NAME_ID, - PortalUtil.getClassNameId(Album.class.getName())); - document.addKeyword(Field.CLASS_PK, album.getAlbumId()); - document.addKeyword(Field.RELATED_ENTRY, true); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getPortletId() { - return PORTLET_ID; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, String entryClassName, - long entryClassPK, String actionId) - throws Exception { - - return AlbumPermission.contains( - permissionChecker, entryClassPK, ActionKeys.VIEW); - } - - @Override - public void postProcessContextBooleanFilter(BooleanFilter contextBooleanFilter, SearchContext searchContext) throws Exception { - addStatus(contextBooleanFilter, searchContext); - } - - @Override - public void postProcessSearchQuery( - BooleanQuery searchQuery, SearchContext searchContext) - throws Exception { - - if (searchContext.getAttributes() == null) { - return; - } - - addSearchTerm(searchQuery, searchContext, Field.TITLE, true); - addSearchTerm(searchQuery, searchContext, "artist", true); - addSearchTerm(searchQuery, searchContext, "year", false); - } - - @Override - protected void doDelete(Object obj) throws Exception { - Album album = (Album)obj; - - deleteDocument(album.getCompanyId(), album.getAlbumId()); - } - - @Override - protected Document doGetDocument(Object obj) throws Exception { - Album album = (Album)obj; - - Document document = getBaseModelDocument(PORTLET_ID, album); - - document.addDate(Field.MODIFIED_DATE, album.getModifiedDate()); - document.addText(Field.TITLE, album.getName()); - document.addKeyword("year", album.getYear()); - - Artist artist = ArtistLocalServiceUtil.getArtist(album.getArtistId()); - - document.addText("artist", artist.getName()); - document.addKeyword("artistId", artist.getArtistId()); - - return document; - } - - @Override - protected Summary doGetSummary( - Document document, Locale locale, String snippet, - PortletRequest portletRequest, PortletResponse portletResponse) throws Exception { - - Summary summary = createSummary(document); - - summary.setMaxContentLength(200); - - return summary; - } - - @Override - protected void doReindex(Object obj) throws Exception { - Album album = (Album)obj; - - Document document = getDocument(album); - } - - @Override - protected void doReindex(String className, long classPK) throws Exception { - Album album = AlbumLocalServiceUtil.getAlbum(classPK); - - doReindex(album); - } - - @Override - protected void doReindex(String[] ids) throws Exception { - long companyId = GetterUtil.getLong(ids[0]); - - reindexEntries(companyId); - } - - @Override - protected String getPortletId(SearchContext searchContext) { - return PORTLET_ID; - } - - protected void reindexEntries(long companyId) throws PortalException { - final Collection documents = new ArrayList(); - - ActionableDynamicQuery actionableDynamicQuery = AlbumLocalServiceUtil.getActionableDynamicQuery(); - - actionableDynamicQuery.setCompanyId(companyId); - - actionableDynamicQuery.performActions(); - - SearchEngineUtil.updateDocuments( - getSearchEngineId(), companyId, documents); - } - - @Override - public String getClassName() { - return Album.class.getName(); - } - - @Override - public void addRelatedClassNames(BooleanFilter arg0, SearchContext arg1) throws Exception { - // TODO Auto-generated method stub - - } - - @Override - public void updateFullQuery(SearchContext arg0) { - // TODO Auto-generated method stub - - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/AssetEntriesFacet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/AssetEntriesFacet.java deleted file mode 100644 index 27a9f1d8b3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/AssetEntriesFacet.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * 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 com.liferay.portal.kernel.search.facet; - -import com.liferay.portal.kernel.json.JSONArray; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.search.BooleanClause; -import com.liferay.portal.kernel.search.BooleanClauseFactoryUtil; -import com.liferay.portal.kernel.search.BooleanClauseOccur; -import com.liferay.portal.kernel.search.BooleanQuery; -import com.liferay.portal.kernel.search.BooleanQueryFactoryUtil; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.Indexer; -import com.liferay.portal.kernel.search.IndexerPostProcessor; -import com.liferay.portal.kernel.search.IndexerRegistryUtil; -import com.liferay.portal.kernel.search.SearchContext; -import com.liferay.portal.kernel.search.SearchEngineUtil; -import com.liferay.portal.kernel.search.facet.config.FacetConfiguration; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.StringUtil; - -/** - * @author Raymond Augé - */ -public class AssetEntriesFacet extends MultiValueFacet { - - public AssetEntriesFacet(SearchContext searchContext) { - super(searchContext); - - setFieldName(Field.ENTRY_CLASS_NAME); - - initFacetClause(); - } - - @Override - public void setFacetConfiguration(FacetConfiguration facetConfiguration) { - super.setFacetConfiguration(facetConfiguration); - - initFacetClause(); - } - - @Override - protected BooleanClause doGetFacetClause() { - SearchContext searchContext = getSearchContext(); - - String[] entryClassNames = searchContext.getEntryClassNames(); - - BooleanQuery facetQuery = BooleanQueryFactoryUtil.create(searchContext); - - for (String entryClassName : entryClassNames) { - Indexer indexer = IndexerRegistryUtil.getIndexer(entryClassName); - - if (indexer == null) { - continue; - } - - String searchEngineId = searchContext.getSearchEngineId(); - - if (!searchEngineId.equals(indexer.getSearchEngineId())) { - continue; - } - - try { - BooleanQuery indexerBooleanQuery = indexer.getFacetQuery( - entryClassName, searchContext); - - if ((indexerBooleanQuery == null) || - !indexerBooleanQuery.hasClauses()) { - - continue; - } - - BooleanQuery entityQuery = BooleanQueryFactoryUtil.create( - searchContext); - - entityQuery.add(indexerBooleanQuery, BooleanClauseOccur.MUST); - - indexer.postProcessContextQuery(entityQuery, searchContext); - - for (IndexerPostProcessor indexerPostProcessor : - indexer.getIndexerPostProcessors()) { - - indexerPostProcessor.postProcessContextQuery( - entityQuery, searchContext); - } - - if (indexer.isStagingAware()) { - if (!searchContext.isIncludeLiveGroups() && - searchContext.isIncludeStagingGroups()) { - - entityQuery.addRequiredTerm(Field.STAGING_GROUP, true); - } - else if (searchContext.isIncludeLiveGroups() && - !searchContext.isIncludeStagingGroups()) { - - entityQuery.addRequiredTerm(Field.STAGING_GROUP, false); - } - } - - if (entityQuery.hasClauses()) { - facetQuery.add(entityQuery, BooleanClauseOccur.SHOULD); - } - } - catch (Exception e) { - _log.error(e, e); - } - } - - if (!facetQuery.hasClauses()) { - return null; - } - - return BooleanClauseFactoryUtil.create( - searchContext, facetQuery, BooleanClauseOccur.MUST.getName()); - } - - protected void initFacetClause() { - SearchContext searchContext = getSearchContext(); - - FacetConfiguration facetConfiguration = getFacetConfiguration(); - - JSONObject dataJSONObject = facetConfiguration.getData(); - - String[] entryClassNames = null; - - if (dataJSONObject.has("values")) { - JSONArray valuesJSONArray = dataJSONObject.getJSONArray("values"); - - entryClassNames = new String[valuesJSONArray.length()]; - - for (int i = 0; i < valuesJSONArray.length(); i++) { - entryClassNames[i] = valuesJSONArray.getString(i); - } - } - - if (ArrayUtil.isEmpty(entryClassNames)) { - entryClassNames = searchContext.getEntryClassNames(); - } - - if (!isStatic()) { - String[] entryClassNameParam = StringUtil.split( - GetterUtil.getString( - searchContext.getAttribute(getFieldName()))); - - if (ArrayUtil.isNotEmpty(entryClassNameParam)) { - entryClassNames = entryClassNameParam; - } - } - - if (ArrayUtil.isEmpty(entryClassNames)) { - entryClassNames = SearchEngineUtil.getEntryClassNames(); - - if (!dataJSONObject.has("values")) { - JSONArray entriesJSONArray = JSONFactoryUtil.createJSONArray(); - - for (String entryClassName : entryClassNames) { - entriesJSONArray.put(entryClassName); - } - - dataJSONObject.put("values", entriesJSONArray); - } - } - - searchContext.setEntryClassNames(entryClassNames); - } - - private static Log _log = LogFactoryUtil.getLog(AssetEntriesFacet.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/AssetTagPropertiesTestFile.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/AssetTagPropertiesTestFile.java deleted file mode 100644 index 53fafd2d17..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/AssetTagPropertiesTestFile.java +++ /dev/null @@ -1,16 +0,0 @@ -public class AssetTagPropertiesTestFile { - public static void main(String[] args){ - //1 - AssetTagPropertyLocalServiceUtil.getTagProperties(); - //2 - AssetTagPropertyServiceUtil.getService(); - String str = null; - String[] strs = null; - ServiceContext sc = null; - //3 - AssetTagLocalServiceUtil.addTag(1L , str , strs , sc ); - long[] longs = {1,1}; - //4 - AssetTagServiceUtil.getTags( longs , str , strs , 1 , 1 ); - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ConfigurationDDMFormDeclarationUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ConfigurationDDMFormDeclarationUtilTest.java deleted file mode 100644 index 11c2f1139b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ConfigurationDDMFormDeclarationUtilTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * 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 com.liferay.configuration.admin.internal.util.test; - -import com.liferay.arquillian.extension.junit.bridge.junit.Arquillian; -import com.liferay.configuration.admin.definition.ConfigurationDDMFormDeclaration; -import com.liferay.petra.string.StringPool; -import com.liferay.portal.kernel.util.HashMapDictionary; -import com.liferay.portal.kernel.util.UnsafeConsumer; -import com.liferay.portal.kernel.util.UnsafeFunction; -import com.liferay.portal.kernel.util.UnsafeRunnable; -import com.liferay.portal.osgi.util.test.OSGiServiceUtil; - -import java.lang.reflect.Method; - -import java.util.Dictionary; - -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; - -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceRegistration; -import org.osgi.service.cm.Configuration; -import org.osgi.service.cm.ConfigurationAdmin; - -/** - * @author Pei-Jung Lan - */ -@RunWith(Arquillian.class) -public class ConfigurationDDMFormDeclarationUtilTest { - - @Before - public void setUp() throws Exception { - _bundle = FrameworkUtil.getBundle( - ConfigurationDDMFormDeclarationUtilTest.class); - - _bundleContext = _bundle.getBundleContext(); - - _configuration = OSGiServiceUtil.callService( - _bundleContext, ConfigurationAdmin.class, - configurationAdmin -> configurationAdmin.createFactoryConfiguration( - "test.pid", StringPool.QUESTION)); - - ConfigurationDDMFormDeclaration configurationDDMFormDeclaration = - () -> TestConfigurationForm.class; - - _serviceRegistration = registerConfigurationDDMFormDeclaration( - configurationDDMFormDeclaration, _configuration.getPid()); - - Bundle bundle = null; - - for (Bundle installedBundle : _bundleContext.getBundles()) { - if ("com.liferay.configuration.admin.web".equals( - installedBundle.getSymbolicName())) { - - bundle = installedBundle; - - break; - } - } - - if (bundle == null) { - throw new IllegalStateException( - "com.liferay.configuration.admin.web bundle not found"); - } - - Class clazz = bundle.loadClass( - "com.liferay.configuration.admin.web.internal.util." + - "ConfigurationDDMFormDeclarationUtil"); - - _method = clazz.getDeclaredMethod( - "getConfigurationDDMFormClass", String.class); - } - - @After - public void tearDown() { - if (_serviceRegistration != null) { - _serviceRegistration.unregister(); - } - } - - @Test - public void testGetConfigurationFormClassFromPid() throws Exception { - Assert.assertEquals( - TestConfigurationForm.class, - _method.invoke(null, _configuration.getPid())); - } - - protected ServiceRegistration - registerConfigurationDDMFormDeclaration( - ConfigurationDDMFormDeclaration configurationDDMFormDeclaration, - String configurationPid) { - - Dictionary properties = new HashMapDictionary<>(); - - properties.put("configurationPid", configurationPid); - - return _bundleContext.registerService( - ConfigurationDDMFormDeclaration.class, - configurationDDMFormDeclaration, properties); - } - - private Bundle _bundle; - private BundleContext _bundleContext; - private Configuration _configuration; - private Method _method; - private ServiceRegistration _serviceRegistration; - - private class TestConfigurationForm { - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ContactNameExceptionImport.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ContactNameExceptionImport.java deleted file mode 100644 index fef4063168..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ContactNameExceptionImport.java +++ /dev/null @@ -1,6264 +0,0 @@ -/** - * 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 com.liferay.portal.service.impl; - -import com.liferay.portal.CompanyMaxUsersException; -import com.liferay.portal.ContactBirthdayException; -import com.liferay.portal.ContactFirstNameException; -import com.liferay.portal.ContactFullNameException; -import com.liferay.portal.ContactLastNameException; -import com.liferay.portal.DuplicateOpenIdException; -import com.liferay.portal.DuplicateUserEmailAddressException; -import com.liferay.portal.DuplicateUserScreenNameException; -import com.liferay.portal.GroupFriendlyURLException; -import com.liferay.portal.ModelListenerException; -import com.liferay.portal.NoSuchImageException; -import com.liferay.portal.NoSuchOrganizationException; -import com.liferay.portal.NoSuchRoleException; -import com.liferay.portal.NoSuchTicketException; -import com.liferay.portal.NoSuchUserException; -import com.liferay.portal.NoSuchUserGroupException; -import com.liferay.portal.PasswordExpiredException; -import com.liferay.portal.RequiredUserException; -import com.liferay.portal.ReservedUserEmailAddressException; -import com.liferay.portal.ReservedUserScreenNameException; -import com.liferay.portal.UserEmailAddressException; -import com.liferay.portal.UserIdException; -import com.liferay.portal.UserLockoutException; -import com.liferay.portal.UserPasswordException; -import com.liferay.portal.UserPortraitSizeException; -import com.liferay.portal.UserPortraitTypeException; -import com.liferay.portal.UserReminderQueryException; -import com.liferay.portal.UserScreenNameException; -import com.liferay.portal.UserSmsException; -import com.liferay.portal.kernel.dao.shard.ShardCallable; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.image.ImageBag; -import com.liferay.portal.kernel.image.ImageToolUtil; -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.messaging.DestinationNames; -import com.liferay.portal.kernel.messaging.Message; -import com.liferay.portal.kernel.messaging.MessageBusUtil; -import com.liferay.portal.kernel.search.Hits; -import com.liferay.portal.kernel.search.Indexer; -import com.liferay.portal.kernel.search.IndexerRegistryUtil; -import com.liferay.portal.kernel.search.QueryConfig; -import com.liferay.portal.kernel.search.SearchContext; -import com.liferay.portal.kernel.search.Sort; -import com.liferay.portal.kernel.spring.aop.Skip; -import com.liferay.portal.kernel.transaction.Propagation; -import com.liferay.portal.kernel.transaction.TransactionCommitCallbackRegistryUtil; -import com.liferay.portal.kernel.transaction.Transactional; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.CharPool; -import com.liferay.portal.kernel.util.Digester; -import com.liferay.portal.kernel.util.DigesterUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.KeyValuePair; -import com.liferay.portal.kernel.util.LocaleUtil; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.PropsKeys; -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.UnicodeProperties; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil; -import com.liferay.portal.kernel.workflow.WorkflowThreadLocal; -import com.liferay.portal.model.Account; -import com.liferay.portal.model.Company; -import com.liferay.portal.model.CompanyConstants; -import com.liferay.portal.model.Contact; -import com.liferay.portal.model.ContactConstants; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.GroupConstants; -import com.liferay.portal.model.Layout; -import com.liferay.portal.model.Organization; -import com.liferay.portal.model.PasswordPolicy; -import com.liferay.portal.model.ResourceConstants; -import com.liferay.portal.model.Role; -import com.liferay.portal.model.RoleConstants; -import com.liferay.portal.model.Team; -import com.liferay.portal.model.Ticket; -import com.liferay.portal.model.TicketConstants; -import com.liferay.portal.model.User; -import com.liferay.portal.model.UserGroup; -import com.liferay.portal.model.UserGroupRole; -import com.liferay.portal.model.impl.LayoutImpl; -import com.liferay.portal.security.auth.AuthPipeline; -import com.liferay.portal.security.auth.Authenticator; -import com.liferay.portal.security.auth.EmailAddressGenerator; -import com.liferay.portal.security.auth.EmailAddressGeneratorFactory; -import com.liferay.portal.security.auth.EmailAddressValidator; -import com.liferay.portal.security.auth.EmailAddressValidatorFactory; -import com.liferay.portal.security.auth.FullNameGenerator; -import com.liferay.portal.security.auth.FullNameGeneratorFactory; -import com.liferay.portal.security.auth.FullNameValidator; -import com.liferay.portal.security.auth.FullNameValidatorFactory; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.auth.ScreenNameGenerator; -import com.liferay.portal.security.auth.ScreenNameGeneratorFactory; -import com.liferay.portal.security.auth.ScreenNameValidator; -import com.liferay.portal.security.auth.ScreenNameValidatorFactory; -import com.liferay.portal.security.ldap.LDAPSettingsUtil; -import com.liferay.portal.security.permission.PermissionCacheUtil; -import com.liferay.portal.security.pwd.PasswordEncryptorUtil; -import com.liferay.portal.security.pwd.PwdAuthenticator; -import com.liferay.portal.security.pwd.PwdToolkitUtil; -import com.liferay.portal.security.pwd.RegExpToolkit; -import com.liferay.portal.service.BaseServiceImpl; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.base.UserLocalServiceBaseImpl; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.util.PrefsPropsUtil; -import com.liferay.portal.util.PropsValues; -import com.liferay.portal.util.SubscriptionSender; -import com.liferay.portlet.documentlibrary.ImageSizeException; -import com.liferay.portlet.messageboards.model.MBMessage; -import com.liferay.portlet.usersadmin.util.UsersAdminUtil; -import com.liferay.util.Encryptor; -import com.liferay.util.EncryptorException; -import com.liferay.util.PwdGenerator; - -import java.awt.image.RenderedImage; - -import java.io.IOException; -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.Callable; -import java.util.concurrent.ConcurrentHashMap; - -/** - * Provides the local service for accessing, adding, authenticating, deleting, - * and updating users. - * - * @author Brian Wing Shun Chan - * @author Scott Lee - * @author Raymond Augé - * @author Jorge Ferrer - * @author Julio Camarero - * @author Wesley Gong - * @author Zsigmond Rab - */ -public class UserLocalServiceImpl extends UserLocalServiceBaseImpl { - - /** - * Adds a default admin user for the company. - * - * @param companyId the primary key of the user's company - * @param screenName the user's screen name - * @param emailAddress the user's email address - * @param locale the user's locale - * @param firstName the user's first name - * @param middleName the user's middle name - * @param lastName the user's last name - * @return the new default admin user - * @throws PortalException n if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public User addDefaultAdminUser( - long companyId, String screenName, String emailAddress, - Locale locale, String firstName, String middleName, String lastName) - throws PortalException, SystemException { - - long creatorUserId = 0; - boolean autoPassword = false; - String password1 = PropsValues.DEFAULT_ADMIN_PASSWORD; - String password2 = password1; - boolean autoScreenName = false; - - screenName = getLogin(screenName); - - for (int i = 1;; i++) { - User screenNameUser = userPersistence.fetchByC_SN( - companyId, screenName); - - if (screenNameUser == null) { - break; - } - - screenName = screenName + i; - } - - long facebookId = 0; - String openId = StringPool.BLANK; - int prefixId = 0; - int suffixId = 0; - boolean male = true; - int birthdayMonth = Calendar.JANUARY; - int birthdayDay = 1; - int birthdayYear = 1970; - String jobTitle = StringPool.BLANK; - - Group guestGroup = groupLocalService.getGroup( - companyId, GroupConstants.GUEST); - - long[] groupIds = {guestGroup.getGroupId()}; - - long[] organizationIds = null; - - Role adminRole = roleLocalService.getRole( - companyId, RoleConstants.ADMINISTRATOR); - - Role powerUserRole = roleLocalService.getRole( - companyId, RoleConstants.POWER_USER); - - long[] roleIds = {adminRole.getRoleId(), powerUserRole.getRoleId()}; - - long[] userGroupIds = null; - boolean sendEmail = false; - ServiceContext serviceContext = new ServiceContext(); - - User defaultAdminUser = addUser( - creatorUserId, companyId, autoPassword, password1, password2, - autoScreenName, screenName, emailAddress, facebookId, openId, - locale, firstName, middleName, lastName, prefixId, suffixId, male, - birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds, - organizationIds, roleIds, userGroupIds, sendEmail, serviceContext); - - updateEmailAddressVerified(defaultAdminUser.getUserId(), true); - - updateLastLogin( - defaultAdminUser.getUserId(), defaultAdminUser.getLoginIP()); - - updatePasswordReset(defaultAdminUser.getUserId(), false); - - return defaultAdminUser; - } - - /** - * Adds the user to the default groups, unless the user is already in these - * groups. The default groups can be specified in - * portal.properties with the key - * admin.default.group.names. - * - * @param userId the primary key of the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public void addDefaultGroups(long userId) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - Set groupIdsSet = new HashSet(); - - String[] defaultGroupNames = PrefsPropsUtil.getStringArray( - user.getCompanyId(), PropsKeys.ADMIN_DEFAULT_GROUP_NAMES, - StringPool.NEW_LINE, PropsValues.ADMIN_DEFAULT_GROUP_NAMES); - - for (String defaultGroupName : defaultGroupNames) { - Company company = companyPersistence.findByPrimaryKey( - user.getCompanyId()); - - Account account = company.getAccount(); - - if (StringUtil.equalsIgnoreCase( - defaultGroupName, account.getName())) { - - defaultGroupName = GroupConstants.GUEST; - } - - Group group = groupPersistence.fetchByC_N( - user.getCompanyId(), defaultGroupName); - - if ((group != null) && - !userPersistence.containsGroup( - userId, group.getGroupId())) { - - groupIdsSet.add(group.getGroupId()); - } - } - - String[] defaultOrganizationGroupNames = PrefsPropsUtil.getStringArray( - user.getCompanyId(), - PropsKeys.ADMIN_DEFAULT_ORGANIZATION_GROUP_NAMES, - StringPool.NEW_LINE, - PropsValues.ADMIN_DEFAULT_ORGANIZATION_GROUP_NAMES); - - for (String defaultOrganizationGroupName : - defaultOrganizationGroupNames) { - - defaultOrganizationGroupName += - GroupLocalServiceImpl.ORGANIZATION_NAME_SUFFIX; - - Group group = groupPersistence.fetchByC_N( - user.getCompanyId(), defaultOrganizationGroupName); - - if ((group != null) && - !userPersistence.containsGroup( - userId, group.getGroupId())) { - - groupIdsSet.add(group.getGroupId()); - } - } - - long[] groupIds = ArrayUtil.toArray( - groupIdsSet.toArray(new Long[groupIdsSet.size()])); - - groupLocalService.addUserGroups(userId, groupIds); - } - - /** - * Adds the user to the default roles, unless the user already has these - * roles. The default roles can be specified in - * portal.properties with the key - * admin.default.role.names. - * - * @param userId the primary key of the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public void addDefaultRoles(long userId) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - Set roleIdSet = new HashSet(); - - String[] defaultRoleNames = PrefsPropsUtil.getStringArray( - user.getCompanyId(), PropsKeys.ADMIN_DEFAULT_ROLE_NAMES, - StringPool.NEW_LINE, PropsValues.ADMIN_DEFAULT_ROLE_NAMES); - - for (String defaultRoleName : defaultRoleNames) { - try { - Role role = rolePersistence.findByC_N( - user.getCompanyId(), defaultRoleName); - - if (!userPersistence.containsRole(userId, role.getRoleId())) { - roleIdSet.add(role.getRoleId()); - } - } - catch (NoSuchRoleException nsre) { - } - } - - long[] roleIds = ArrayUtil.toArray( - roleIdSet.toArray(new Long[roleIdSet.size()])); - - roleIds = UsersAdminUtil.addRequiredRoles(user, roleIds); - - userPersistence.addRoles(userId, roleIds); - } - - /** - * Adds the user to the default user groups, unless the user is already in - * these user groups. The default user groups can be specified in - * portal.properties with the property - * admin.default.user.group.names. - * - * @param userId the primary key of the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("deprecation") - public void addDefaultUserGroups(long userId) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - Set userGroupIdSet = new HashSet(); - - String[] defaultUserGroupNames = PrefsPropsUtil.getStringArray( - user.getCompanyId(), PropsKeys.ADMIN_DEFAULT_USER_GROUP_NAMES, - StringPool.NEW_LINE, PropsValues.ADMIN_DEFAULT_USER_GROUP_NAMES); - - for (String defaultUserGroupName : defaultUserGroupNames) { - try { - UserGroup userGroup = userGroupPersistence.findByC_N( - user.getCompanyId(), defaultUserGroupName); - - if (!userPersistence.containsUserGroup( - userId, userGroup.getUserGroupId())) { - - userGroupIdSet.add(userGroup.getUserGroupId()); - } - } - catch (NoSuchUserGroupException nsuge) { - } - } - - long[] userGroupIds = ArrayUtil.toArray( - userGroupIdSet.toArray(new Long[userGroupIdSet.size()])); - - if (PropsValues.USER_GROUPS_COPY_LAYOUTS_TO_USER_PERSONAL_SITE) { - for (long userGroupId : userGroupIds) { - userGroupLocalService.copyUserGroupLayouts(userGroupId, userId); - } - } - - userPersistence.addUserGroups(userId, userGroupIds); - } - - /** - * Adds the users to the group. - * - * @param groupId the primary key of the group - * @param userIds the primary keys of the users - * @throws PortalException if a group or user with the primary key could not - * be found - * @throws SystemException if a system exception occurred - */ - @Override - public void addGroupUsers(long groupId, long[] userIds) - throws PortalException, SystemException { - - groupPersistence.addUsers(groupId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - - addDefaultRolesAndTeams(groupId, userIds); - } - - /** - * Adds the users to the organization. - * - * @param organizationId the primary key of the organization - * @param userIds the primary keys of the users - * @throws PortalException if an organization or user with the primary key - * could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public void addOrganizationUsers(long organizationId, long[] userIds) - throws PortalException, SystemException { - - organizationPersistence.addUsers(organizationId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - } - - /** - * Assigns the password policy to the users, removing any other currently - * assigned password policies. - * - * @param passwordPolicyId the primary key of the password policy - * @param userIds the primary keys of the users - * @throws SystemException if a system exception occurred - */ - @Override - public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds) - throws SystemException { - - passwordPolicyRelLocalService.addPasswordPolicyRels( - passwordPolicyId, User.class.getName(), userIds); - } - - /** - * Adds the users to the role. - * - * @param roleId the primary key of the role - * @param userIds the primary keys of the users - * @throws PortalException if a role or user with the primary key could not - * be found - * @throws SystemException if a system exception occurred - */ - @Override - public void addRoleUsers(long roleId, long[] userIds) - throws PortalException, SystemException { - - rolePersistence.addUsers(roleId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - } - - /** - * Adds the users to the team. - * - * @param teamId the primary key of the team - * @param userIds the primary keys of the users - * @throws PortalException if a team or user with the primary key could not - * be found - * @throws SystemException if a system exception occurred - */ - @Override - public void addTeamUsers(long teamId, long[] userIds) - throws PortalException, SystemException { - - teamPersistence.addUsers(teamId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - } - - /** - * Adds a user. - * - *

    - * This method handles the creation and bookkeeping of the user including - * its resources, metadata, and internal data structures. It is not - * necessary to make subsequent calls to any methods to setup default - * groups, resources, etc. - *

    - * - * @param creatorUserId the primary key of the creator - * @param companyId the primary key of the user's company - * @param autoPassword whether a password should be automatically generated - * for the user - * @param password1 the user's password - * @param password2 the user's password confirmation - * @param autoScreenName whether a screen name should be automatically - * generated for the user - * @param screenName the user's screen name - * @param emailAddress the user's email address - * @param facebookId the user's facebook ID - * @param openId the user's OpenID - * @param locale the user's locale - * @param firstName the user's first name - * @param middleName the user's middle name - * @param lastName the user's last name - * @param prefixId the user's name prefix ID - * @param suffixId the user's name suffix ID - * @param male whether the user is male - * @param birthdayMonth the user's birthday month (0-based, meaning 0 for - * January) - * @param birthdayDay the user's birthday day - * @param birthdayYear the user's birthday year - * @param jobTitle the user's job title - * @param groupIds the primary keys of the user's groups - * @param organizationIds the primary keys of the user's organizations - * @param roleIds the primary keys of the roles this user possesses - * @param userGroupIds the primary keys of the user's user groups - * @param sendEmail whether to send the user an email notification about - * their new account - * @param serviceContext the service context to be applied (optionally - * null). Can set the UUID (with the uuid - * attribute), asset category IDs, asset tag names, and expando - * bridge attributes for the user. - * @return the new user - * @throws PortalException if the user's information was invalid - * @throws SystemException if a system exception occurred - */ - @Override - public User addUser( - long creatorUserId, long companyId, boolean autoPassword, - String password1, String password2, boolean autoScreenName, - String screenName, String emailAddress, long facebookId, - String openId, Locale locale, String firstName, String middleName, - String lastName, int prefixId, int suffixId, boolean male, - int birthdayMonth, int birthdayDay, int birthdayYear, - String jobTitle, long[] groupIds, long[] organizationIds, - long[] roleIds, long[] userGroupIds, boolean sendEmail, - ServiceContext serviceContext) - throws PortalException, SystemException { - - boolean workflowEnabled = WorkflowThreadLocal.isEnabled(); - - try { - WorkflowThreadLocal.setEnabled(false); - - if (serviceContext == null) { - serviceContext = new ServiceContext(); - } - - if (serviceContext.getWorkflowAction() != - WorkflowConstants.ACTION_PUBLISH) { - - serviceContext.setWorkflowAction( - WorkflowConstants.ACTION_PUBLISH); - } - - return addUserWithWorkflow( - creatorUserId, companyId, autoPassword, password1, password2, - autoScreenName, screenName, emailAddress, facebookId, openId, - locale, firstName, middleName, lastName, prefixId, suffixId, - male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, - groupIds, organizationIds, roleIds, userGroupIds, sendEmail, - serviceContext); - } - finally { - WorkflowThreadLocal.setEnabled(workflowEnabled); - } - } - - /** - * Adds the users to the user group. - * - * @param userGroupId the primary key of the user group - * @param userIds the primary keys of the users - * @throws PortalException if a user group or user with the primary could - * could not be found - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("deprecation") - public void addUserGroupUsers(long userGroupId, long[] userIds) - throws PortalException, SystemException { - - if (PropsValues.USER_GROUPS_COPY_LAYOUTS_TO_USER_PERSONAL_SITE) { - userGroupLocalService.copyUserGroupLayouts(userGroupId, userIds); - } - - userGroupPersistence.addUsers(userGroupId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - } - - /** - * Adds a user with workflow. - * - *

    - * This method handles the creation and bookkeeping of the user including - * its resources, metadata, and internal data structures. It is not - * necessary to make subsequent calls to any methods to setup default - * groups, resources, etc. - *

    - * - * @param creatorUserId the primary key of the creator - * @param companyId the primary key of the user's company - * @param autoPassword whether a password should be automatically generated - * for the user - * @param password1 the user's password - * @param password2 the user's password confirmation - * @param autoScreenName whether a screen name should be automatically - * generated for the user - * @param screenName the user's screen name - * @param emailAddress the user's email address - * @param facebookId the user's facebook ID - * @param openId the user's OpenID - * @param locale the user's locale - * @param firstName the user's first name - * @param middleName the user's middle name - * @param lastName the user's last name - * @param prefixId the user's name prefix ID - * @param suffixId the user's name suffix ID - * @param male whether the user is male - * @param birthdayMonth the user's birthday month (0-based, meaning 0 for - * January) - * @param birthdayDay the user's birthday day - * @param birthdayYear the user's birthday year - * @param jobTitle the user's job title - * @param groupIds the primary keys of the user's groups - * @param organizationIds the primary keys of the user's organizations - * @param roleIds the primary keys of the roles this user possesses - * @param userGroupIds the primary keys of the user's user groups - * @param sendEmail whether to send the user an email notification about - * their new account - * @param serviceContext the service context to be applied (optionally - * null). Can set the UUID (with the uuid - * attribute), asset category IDs, asset tag names, and expando - * bridge attributes for the user. - * @return the new user - * @throws PortalException if the user's information was invalid - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("deprecation") - public User addUserWithWorkflow( - long creatorUserId, long companyId, boolean autoPassword, - String password1, String password2, boolean autoScreenName, - String screenName, String emailAddress, long facebookId, - String openId, Locale locale, String firstName, String middleName, - String lastName, int prefixId, int suffixId, boolean male, - int birthdayMonth, int birthdayDay, int birthdayYear, - String jobTitle, long[] groupIds, long[] organizationIds, - long[] roleIds, long[] userGroupIds, boolean sendEmail, - ServiceContext serviceContext) - throws PortalException, SystemException { - - // User - - Company company = companyPersistence.findByPrimaryKey(companyId); - screenName = getLogin(screenName); - openId = StringUtil.trim(openId); - Date now = new Date(); - - if (PrefsPropsUtil.getBoolean( - companyId, PropsKeys.USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE)) { - - autoScreenName = true; - } - - // PLACEHOLDER 01 - - long userId = counterLocalService.increment(); - - EmailAddressGenerator emailAddressGenerator = - EmailAddressGeneratorFactory.getInstance(); - - if ((emailAddress == null) || - emailAddressGenerator.isGenerated(emailAddress)) { - - emailAddress = StringPool.BLANK; - } - else { - emailAddress = StringUtil.toLowerCase(emailAddress.trim()); - } - - if (!PrefsPropsUtil.getBoolean( - companyId, PropsKeys.USERS_EMAIL_ADDRESS_REQUIRED) && - Validator.isNull(emailAddress)) { - - emailAddress = emailAddressGenerator.generate(companyId, userId); - } - - validate( - companyId, userId, autoPassword, password1, password2, - autoScreenName, screenName, emailAddress, openId, firstName, - middleName, lastName, organizationIds); - - if (!autoPassword) { - if (Validator.isNull(password1) || Validator.isNull(password2)) { - throw new UserPasswordException( - UserPasswordException.PASSWORD_INVALID); - } - } - - if (autoScreenName) { - ScreenNameGenerator screenNameGenerator = - ScreenNameGeneratorFactory.getInstance(); - - try { - screenName = screenNameGenerator.generate( - companyId, userId, emailAddress); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - User defaultUser = getDefaultUser(companyId); - - FullNameGenerator fullNameGenerator = - FullNameGeneratorFactory.getInstance(); - - String fullName = fullNameGenerator.getFullName( - firstName, middleName, lastName); - - String greeting = LanguageUtil.format( - locale, "welcome-x", " " + fullName, false); - - User user = userPersistence.create(userId); - - if (serviceContext != null) { - String uuid = serviceContext.getUuid(); - - if (Validator.isNotNull(uuid)) { - user.setUuid(uuid); - } - } - - user.setCompanyId(companyId); - user.setCreateDate(now); - user.setModifiedDate(now); - user.setDefaultUser(false); - user.setContactId(counterLocalService.increment()); - - if (Validator.isNotNull(password1)) { - user.setPassword(PasswordEncryptorUtil.encrypt(password1)); - user.setPasswordUnencrypted(password1); - } - - user.setPasswordEncrypted(true); - - PasswordPolicy passwordPolicy = defaultUser.getPasswordPolicy(); - - boolean passwordReset = false; - - if (passwordPolicy != null) { - if (passwordPolicy.isChangeable() && - passwordPolicy.isChangeRequired()) { - - passwordReset = true; - } - - addPasswordPolicyUsers( - passwordPolicy.getPasswordPolicyId(), new long[] {userId}); - } - - user.setPasswordReset(passwordReset); - - user.setDigest(StringPool.BLANK); - user.setScreenName(screenName); - user.setEmailAddress(emailAddress); - user.setFacebookId(facebookId); - - Long ldapServerId = (Long)serviceContext.getAttribute("ldapServerId"); - - if (ldapServerId != null) { - user.setLdapServerId(ldapServerId); - } - else { - user.setLdapServerId(-1); - } - - user.setOpenId(openId); - user.setLanguageId(LocaleUtil.toLanguageId(locale)); - user.setTimeZoneId(defaultUser.getTimeZoneId()); - user.setGreeting(greeting); - user.setFirstName(firstName); - user.setMiddleName(middleName); - user.setLastName(lastName); - user.setJobTitle(jobTitle); - user.setStatus(WorkflowConstants.STATUS_DRAFT); - user.setExpandoBridgeAttributes(serviceContext); - - userPersistence.update(user, serviceContext); - - // Contact - - String creatorUserName = StringPool.BLANK; - - if (creatorUserId <= 0) { - creatorUserId = user.getUserId(); - - // Don't grab the full name from the User object because it doesn't - // have a corresponding Contact object yet - - //creatorUserName = user.getFullName(); - } - else { - User creatorUser = userPersistence.findByPrimaryKey(creatorUserId); - - creatorUserName = creatorUser.getFullName(); - } - - Date birthday = getBirthday(birthdayMonth, birthdayDay, birthdayYear); - - Contact contact = contactPersistence.create(user.getContactId()); - - contact.setCompanyId(user.getCompanyId()); - contact.setUserId(creatorUserId); - contact.setUserName(creatorUserName); - contact.setCreateDate(now); - contact.setModifiedDate(now); - contact.setClassName(User.class.getName()); - contact.setClassPK(user.getUserId()); - contact.setAccountId(company.getAccountId()); - contact.setParentContactId(ContactConstants.DEFAULT_PARENT_CONTACT_ID); - contact.setEmailAddress(user.getEmailAddress()); - contact.setFirstName(firstName); - contact.setMiddleName(middleName); - contact.setLastName(lastName); - contact.setPrefixId(prefixId); - contact.setSuffixId(suffixId); - contact.setMale(male); - contact.setBirthday(birthday); - contact.setJobTitle(jobTitle); - - contactPersistence.update(contact, serviceContext); - - // Group - - groupLocalService.addGroup( - user.getUserId(), GroupConstants.DEFAULT_PARENT_GROUP_ID, - User.class.getName(), user.getUserId(), null, null, 0, - StringPool.SLASH + screenName, false, true, null); - - // Groups - - if (groupIds != null) { - List groups = new ArrayList(); - - for (long groupId : groupIds) { - Group group = groupLocalService.fetchGroup(groupId); - - if (group != null) { - groups.add(group); - } - else { - if (_log.isWarnEnabled()) { - _log.warn("Group " + groupId + " does not exist"); - } - } - } - - groupLocalService.addUserGroups(userId, groups); - } - - addDefaultGroups(userId); - - // Organizations - - updateOrganizations(userId, organizationIds, false); - - // Roles - - if (roleIds != null) { - roleIds = UsersAdminUtil.addRequiredRoles(user, roleIds); - - userPersistence.setRoles(userId, roleIds); - } - - addDefaultRoles(userId); - - // User groups - - if (userGroupIds != null) { - if (PropsValues.USER_GROUPS_COPY_LAYOUTS_TO_USER_PERSONAL_SITE) { - for (long userGroupId : userGroupIds) { - userGroupLocalService.copyUserGroupLayouts( - userGroupId, new long[] {userId}); - } - } - - userPersistence.setUserGroups(userId, userGroupIds); - } - - addDefaultUserGroups(userId); - - // Resources - - resourceLocalService.addResources( - companyId, 0, creatorUserId, User.class.getName(), user.getUserId(), - false, false, false); - - // Asset - - if (serviceContext != null) { - updateAsset( - creatorUserId, user, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames()); - } - - // Indexer - - if ((serviceContext == null) || serviceContext.isIndexingEnabled()) { - reindex(user); - } - - // Workflow - - long workflowUserId = creatorUserId; - - if (workflowUserId == userId) { - workflowUserId = defaultUser.getUserId(); - } - - ServiceContext workflowServiceContext = serviceContext; - - if (workflowServiceContext == null) { - workflowServiceContext = new ServiceContext(); - } - - workflowServiceContext.setAttribute("autoPassword", autoPassword); - workflowServiceContext.setAttribute("passwordUnencrypted", password1); - workflowServiceContext.setAttribute("sendEmail", sendEmail); - - WorkflowHandlerRegistryUtil.startWorkflowInstance( - companyId, workflowUserId, User.class.getName(), userId, user, - workflowServiceContext); - - if (serviceContext != null) { - String passwordUnencrypted = (String)serviceContext.getAttribute( - "passwordUnencrypted"); - - if (Validator.isNotNull(passwordUnencrypted)) { - user.setPasswordUnencrypted(passwordUnencrypted); - } - } - - return user; - } - - /** - * Attempts to authenticate the user by their email address and password, - * while using the AuthPipeline. - * - * @param companyId the primary key of the user's company - * @param emailAddress the user's email address - * @param password the user's password - * @param headerMap the header map from the authentication request - * @param parameterMap the parameter map from the authentication request - * @param resultsMap the map of authentication results (may be nil). After - * a succesful authentication the user's primary key will be placed - * under the key userId. - * @return the authentication status. This can be {@link - * com.liferay.portal.security.auth.Authenticator#FAILURE} - * indicating that the user's credentials are invalid, {@link - * com.liferay.portal.security.auth.Authenticator#SUCCESS} - * indicating a successful login, or {@link - * com.liferay.portal.security.auth.Authenticator#DNE} indicating - * that a user with that login does not exist. - * @throws PortalException if emailAddress or - * password was null - * @throws SystemException if a system exception occurred - * @see com.liferay.portal.security.auth.AuthPipeline - */ - @Override - public int authenticateByEmailAddress( - long companyId, String emailAddress, String password, - Map headerMap, Map parameterMap, - Map resultsMap) - throws PortalException, SystemException { - - return authenticate( - companyId, emailAddress, password, CompanyConstants.AUTH_TYPE_EA, - headerMap, parameterMap, resultsMap); - } - - /** - * Attempts to authenticate the user by their screen name and password, - * while using the AuthPipeline. - * - * @param companyId the primary key of the user's company - * @param screenName the user's screen name - * @param password the user's password - * @param headerMap the header map from the authentication request - * @param parameterMap the parameter map from the authentication request - * @param resultsMap the map of authentication results (may be nil). After - * a succesful authentication the user's primary key will be placed - * under the key userId. - * @return the authentication status. This can be {@link - * com.liferay.portal.security.auth.Authenticator#FAILURE} - * indicating that the user's credentials are invalid, {@link - * com.liferay.portal.security.auth.Authenticator#SUCCESS} - * indicating a successful login, or {@link - * com.liferay.portal.security.auth.Authenticator#DNE} indicating - * that a user with that login does not exist. - * @throws PortalException if screenName or - * password was null - * @throws SystemException if a system exception occurred - * @see com.liferay.portal.security.auth.AuthPipeline - */ - @Override - public int authenticateByScreenName( - long companyId, String screenName, String password, - Map headerMap, Map parameterMap, - Map resultsMap) - throws PortalException, SystemException { - - return authenticate( - companyId, screenName, password, CompanyConstants.AUTH_TYPE_SN, - headerMap, parameterMap, resultsMap); - } - - /** - * Attempts to authenticate the user by their primary key and password, - * while using the AuthPipeline. - * - * @param companyId the primary key of the user's company - * @param userId the user's primary key - * @param password the user's password - * @param headerMap the header map from the authentication request - * @param parameterMap the parameter map from the authentication request - * @param resultsMap the map of authentication results (may be nil). After - * a succesful authentication the user's primary key will be placed - * under the key userId. - * @return the authentication status. This can be {@link - * com.liferay.portal.security.auth.Authenticator#FAILURE} - * indicating that the user's credentials are invalid, {@link - * com.liferay.portal.security.auth.Authenticator#SUCCESS} - * indicating a successful login, or {@link - * com.liferay.portal.security.auth.Authenticator#DNE} indicating - * that a user with that login does not exist. - * @throws PortalException if userId or password - * was null - * @throws SystemException if a system exception occurred - * @see com.liferay.portal.security.auth.AuthPipeline - */ - @Override - public int authenticateByUserId( - long companyId, long userId, String password, - Map headerMap, Map parameterMap, - Map resultsMap) - throws PortalException, SystemException { - - return authenticate( - companyId, String.valueOf(userId), password, - CompanyConstants.AUTH_TYPE_ID, headerMap, parameterMap, resultsMap); - } - - /** - * Attempts to authenticate the user using HTTP basic access authentication, - * without using the AuthPipeline. Primarily used for authenticating users - * of tunnel-web. - * - *

    - * Authentication type specifies what login contains.The valid - * values are: - *

    - * - *
      - *
    • - * CompanyConstants.AUTH_TYPE_EA - login is the - * user's email address - *
    • - *
    • - * CompanyConstants.AUTH_TYPE_SN - login is the - * user's screen name - *
    • - *
    • - * CompanyConstants.AUTH_TYPE_ID - login is the - * user's primary key - *
    • - *
    - * - * @param companyId the primary key of the user's company - * @param authType the type of authentication to perform - * @param login either the user's email address, screen name, or primary - * key depending on the value of authType - * @param password the user's password - * @return the authentication status. This can be {@link - * com.liferay.portal.security.auth.Authenticator#FAILURE} - * indicating that the user's credentials are invalid, {@link - * com.liferay.portal.security.auth.Authenticator#SUCCESS} - * indicating a successful login, or {@link - * com.liferay.portal.security.auth.Authenticator#DNE} indicating - * that a user with that login does not exist. - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public long authenticateForBasic( - long companyId, String authType, String login, String password) - throws PortalException, SystemException { - - if (PropsValues.AUTH_LOGIN_DISABLED) { - return 0; - } - - User user = null; - - if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) { - user = fetchUserByEmailAddress(companyId, login); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) { - user = fetchUserByScreenName(companyId, login); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) { - user = userPersistence.fetchByPrimaryKey(GetterUtil.getLong(login)); - } - - if (user == null) { - return 0; - } - - if (user.isDefaultUser()) { - if (_log.isInfoEnabled()) { - _log.info( - "Basic authentication is disabled for the default " + - "user"); - } - - return 0; - } - else if (!user.isActive()) { - if (_log.isInfoEnabled()) { - _log.info( - "Basic authentication is disabled for inactive user " + - user.getUserId()); - } - - return 0; - } - - if (!PropsValues.BASIC_AUTH_PASSWORD_REQUIRED) { - return user.getUserId(); - } - - String userPassword = user.getPassword(); - - if (!user.isPasswordEncrypted()) { - userPassword = PasswordEncryptorUtil.encrypt(userPassword); - } - - String encPassword = PasswordEncryptorUtil.encrypt( - password, userPassword); - - if (userPassword.equals(password) || userPassword.equals(encPassword)) { - return user.getUserId(); - } - - return 0; - } - - /** - * Attempts to authenticate the user using HTTP digest access - * authentication, without using the AuthPipeline. Primarily used for - * authenticating users of tunnel-web. - * - * @param companyId the primary key of the user's company - * @param username either the user's email address, screen name, or primary - * key - * @param realm unused - * @param nonce the number used once - * @param method the request method - * @param uri the request URI - * @param response the authentication response hash - * @return the user's primary key if authentication is succesful; - * 0 otherwise - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public long authenticateForDigest( - long companyId, String username, String realm, String nonce, - String method, String uri, String response) - throws PortalException, SystemException { - - if (PropsValues.AUTH_LOGIN_DISABLED) { - return 0; - } - - // Get User - - User user = fetchUserByEmailAddress(companyId, username); - - if (user == null) { - user = fetchUserByScreenName(companyId, username); - } - - if (user == null) { - user = userPersistence.fetchByPrimaryKey( - GetterUtil.getLong(username)); - } - - if (user == null) { - return 0; - } - - if (user.isDefaultUser()) { - if (_log.isInfoEnabled()) { - _log.info( - "Digest authentication is disabled for the default user"); - } - - return 0; - } - else if (!user.isActive()) { - if (_log.isInfoEnabled()) { - _log.info( - "Digest authentication is disabled for inactive user " + - user.getUserId()); - } - - return 0; - } - - // Verify digest - - String digest = user.getDigest(); - - if (Validator.isNull(digest)) { - _log.error( - "User must first login through the portal " + user.getUserId()); - - return 0; - } - - String[] digestArray = StringUtil.split(user.getDigest()); - - for (String ha1 : digestArray) { - String ha2 = DigesterUtil.digestHex(Digester.MD5, method, uri); - - String curResponse = DigesterUtil.digestHex( - Digester.MD5, ha1, nonce, ha2); - - if (response.equals(curResponse)) { - return user.getUserId(); - } - } - - return 0; - } - - /** - * Attempts to authenticate the user using JAAS credentials, without using - * the AuthPipeline. - * - * @param userId the primary key of the user - * @param encPassword the encrypted password - * @return true if authentication is successful; - * false otherwise - */ - @Override - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public boolean authenticateForJAAS(long userId, String encPassword) { - if (PropsValues.AUTH_LOGIN_DISABLED) { - return false; - } - - try { - User user = userPersistence.findByPrimaryKey(userId); - - if (user.isDefaultUser()) { - if (_log.isInfoEnabled()) { - _log.info( - "JAAS authentication is disabled for the default user"); - } - - return false; - } - else if (!user.isActive()) { - if (_log.isInfoEnabled()) { - _log.info( - "JAAS authentication is disabled for inactive user " + - userId); - } - - return false; - } - - String userPassword = user.getPassword(); - - if (user.isPasswordEncrypted()) { - if (userPassword.equals(encPassword)) { - return true; - } - - if (!PropsValues.PORTAL_JAAS_STRICT_PASSWORD) { - encPassword = PasswordEncryptorUtil.encrypt( - encPassword, userPassword); - - if (userPassword.equals(encPassword)) { - return true; - } - } - } - else { - if (!PropsValues.PORTAL_JAAS_STRICT_PASSWORD) { - if (userPassword.equals(encPassword)) { - return true; - } - } - - userPassword = PasswordEncryptorUtil.encrypt( - userPassword, encPassword); - - if (userPassword.equals(encPassword)) { - return true; - } - } - } - catch (Exception e) { - _log.error(e); - } - - return false; - } - - /** - * Checks if the user is currently locked out based on the password policy, - * and performs maintenance on the user's lockout and failed login data. - * - * @param user the user - * @throws PortalException if the user was determined to still be locked out - * @throws SystemException if a system exception occurred - */ - @Override - public void checkLockout(User user) - throws PortalException, SystemException { - - if (LDAPSettingsUtil.isPasswordPolicyEnabled(user.getCompanyId())) { - return; - } - - PasswordPolicy passwordPolicy = user.getPasswordPolicy(); - - if (!passwordPolicy.isLockout()) { - return; - } - - // Reset failure count - - Date now = new Date(); - int failedLoginAttempts = user.getFailedLoginAttempts(); - - if (failedLoginAttempts > 0) { - long failedLoginTime = user.getLastFailedLoginDate().getTime(); - long elapsedTime = now.getTime() - failedLoginTime; - long requiredElapsedTime = - passwordPolicy.getResetFailureCount() * 1000; - - if ((requiredElapsedTime != 0) && - (elapsedTime > requiredElapsedTime)) { - - user.setFailedLoginAttempts(0); - - userPersistence.update(user); - } - } - - // Reset lockout - - if (user.isLockout()) { - long lockoutTime = user.getLockoutDate().getTime(); - long elapsedTime = now.getTime() - lockoutTime; - long requiredElapsedTime = - passwordPolicy.getLockoutDuration() * 1000; - - if ((requiredElapsedTime != 0) && - (elapsedTime > requiredElapsedTime)) { - - user.setLockout(false); - user.setLockoutDate(null); - - userPersistence.update(user); - } - } - - if (user.isLockout()) { - throw new UserLockoutException(); - } - } - - /** - * Adds a failed login attempt to the user and updates the user's last - * failed login date. - * - * @param user the user - * @throws SystemException if a system exception occurred - */ - @Override - public void checkLoginFailure(User user) throws SystemException { - Date now = new Date(); - - int failedLoginAttempts = user.getFailedLoginAttempts(); - - user.setLastFailedLoginDate(now); - user.setFailedLoginAttempts(++failedLoginAttempts); - - userPersistence.update(user); - } - - /** - * Adds a failed login attempt to the user with the email address and - * updates the user's last failed login date. - * - * @param companyId the primary key of the user's company - * @param emailAddress the user's email address - * @throws PortalException if a user with the email address could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public void checkLoginFailureByEmailAddress( - long companyId, String emailAddress) - throws PortalException, SystemException { - - User user = getUserByEmailAddress(companyId, emailAddress); - - checkLoginFailure(user); - } - - /** - * Adds a failed login attempt to the user and updates the user's last - * failed login date. - * - * @param userId the primary key of the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public void checkLoginFailureById(long userId) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - checkLoginFailure(user); - } - - /** - * Adds a failed login attempt to the user with the screen name and updates - * the user's last failed login date. - * - * @param companyId the primary key of the user's company - * @param screenName the user's screen name - * @throws PortalException if a user with the screen name could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public void checkLoginFailureByScreenName(long companyId, String screenName) - throws PortalException, SystemException { - - User user = getUserByScreenName(companyId, screenName); - - checkLoginFailure(user); - } - - /** - * Checks if the user's password is expired based on the password policy, - * and performs maintenance on the user's grace login and password reset - * data. - * - * @param user the user - * @throws PortalException if the user's password has expired and the grace - * login limit has been exceeded - * @throws SystemException if a system exception occurred - */ - @Override - public void checkPasswordExpired(User user) - throws PortalException, SystemException { - - if (LDAPSettingsUtil.isPasswordPolicyEnabled(user.getCompanyId())) { - return; - } - - PasswordPolicy passwordPolicy = user.getPasswordPolicy(); - - // Check if password has expired - - if (isPasswordExpired(user)) { - int graceLoginCount = user.getGraceLoginCount(); - - if (graceLoginCount < passwordPolicy.getGraceLimit()) { - user.setGraceLoginCount(++graceLoginCount); - - userPersistence.update(user); - } - else { - user.setDigest(StringPool.BLANK); - - userPersistence.update(user); - - throw new PasswordExpiredException(); - } - } - - // Check if user should be forced to change password on first login - - if (passwordPolicy.isChangeable() && - passwordPolicy.isChangeRequired()) { - - if (user.getLastLoginDate() == null) { - user.setPasswordReset(true); - - userPersistence.update(user); - } - } - } - - /** - * Removes all the users from the organization. - * - * @param organizationId the primary key of the organization - * @throws SystemException if a system exception occurred - */ - @Override - public void clearOrganizationUsers(long organizationId) - throws SystemException { - - organizationPersistence.clearUsers(organizationId); - - PermissionCacheUtil.clearCache(); - } - - /** - * Removes all the users from the user group. - * - * @param userGroupId the primary key of the user group - * @throws SystemException if a system exception occurred - */ - @Override - public void clearUserGroupUsers(long userGroupId) throws SystemException { - userGroupPersistence.clearUsers(userGroupId); - - PermissionCacheUtil.clearCache(); - } - - /** - * Completes the user's registration by generating a password and sending - * the confirmation email. - * - * @param user the user - * @param serviceContext the service context to be applied. You can specify - * an unencrypted custom password for the user via attribute - * passwordUnencrypted. You automatically generate a - * password for the user by setting attribute - * autoPassword to true. You can send a - * confirmation email to the user by setting attribute - * sendEmail to true. - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void completeUserRegistration( - User user, ServiceContext serviceContext) - throws PortalException, SystemException { - - boolean autoPassword = ParamUtil.getBoolean( - serviceContext, "autoPassword"); - - String password = (String)serviceContext.getAttribute( - "passwordUnencrypted"); - - if (autoPassword) { - if (LDAPSettingsUtil.isPasswordPolicyEnabled(user.getCompanyId())) { - if (_log.isWarnEnabled()) { - StringBundler sb = new StringBundler(4); - - sb.append("When LDAP password policy is enabled, it is "); - sb.append("possible that portal generated passwords will "); - sb.append("not match the LDAP policy. Using "); - sb.append("RegExpToolkit to generate new password."); - - _log.warn(sb.toString()); - } - - RegExpToolkit regExpToolkit = new RegExpToolkit(); - - password = regExpToolkit.generate(null); - } - else { - PasswordPolicy passwordPolicy = - passwordPolicyLocalService.getPasswordPolicy( - user.getCompanyId(), user.getOrganizationIds()); - - password = PwdToolkitUtil.generate(passwordPolicy); - } - - serviceContext.setAttribute("passwordUnencrypted", password); - - user.setPassword(PasswordEncryptorUtil.encrypt(password)); - user.setPasswordUnencrypted(password); - user.setPasswordEncrypted(true); - user.setPasswordModified(true); - user.setPasswordModifiedDate(new Date()); - - userPersistence.update(user); - - user.setPasswordModified(false); - } - - if (user.hasCompanyMx()) { - mailService.addUser( - user.getCompanyId(), user.getUserId(), password, - user.getFirstName(), user.getMiddleName(), user.getLastName(), - user.getEmailAddress()); - } - - boolean sendEmail = ParamUtil.getBoolean(serviceContext, "sendEmail"); - - if (sendEmail) { - sendEmail(user, password, serviceContext); - } - - Company company = companyPersistence.findByPrimaryKey( - user.getCompanyId()); - - if (company.isStrangersVerify()) { - sendEmailAddressVerification( - user, user.getEmailAddress(), serviceContext); - } - } - - /** - * Decrypts the user's primary key and password from their encrypted forms. - * Used for decrypting a user's credentials from the values stored in an - * automatic login cookie. - * - * @param companyId the primary key of the user's company - * @param name the encrypted primary key of the user - * @param password the encrypted password of the user - * @return the user's primary key and password - * @throws PortalException if a user with the primary key could not be found - * or if the user's password was incorrect - * @throws SystemException if a system exception occurred - */ - @Override - public KeyValuePair decryptUserId( - long companyId, String name, String password) - throws PortalException, SystemException { - - Company company = companyPersistence.findByPrimaryKey(companyId); - - try { - name = Encryptor.decrypt(company.getKeyObj(), name); - } - catch (EncryptorException ee) { - throw new SystemException(ee); - } - - long userId = GetterUtil.getLong(name); - - User user = userPersistence.findByPrimaryKey(userId); - - try { - password = Encryptor.decrypt(company.getKeyObj(), password); - } - catch (EncryptorException ee) { - throw new SystemException(ee); - } - - String userPassword = user.getPassword(); - String encPassword = PasswordEncryptorUtil.encrypt( - password, userPassword); - - if (userPassword.equals(encPassword)) { - if (isPasswordExpired(user)) { - user.setPasswordReset(true); - - userPersistence.update(user); - } - - return new KeyValuePair(name, password); - } - else { - throw new PrincipalException(); - } - } - - /** - * Deletes the user's portrait image. - * - * @param userId the primary key of the user - * @throws PortalException if a user with the primary key could not be found - * or if the user's portrait could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public void deletePortrait(long userId) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - long portraitId = user.getPortraitId(); - - if (portraitId > 0) { - user.setPortraitId(0); - - userPersistence.update(user); - - imageLocalService.deleteImage(portraitId); - } - } - - /** - * Removes the user from the role. - * - * @param roleId the primary key of the role - * @param userId the primary key of the user - * @throws PortalException if a role or user with the primary key could not - * be found - * @throws SystemException if a system exception occurred - */ - @Override - public void deleteRoleUser(long roleId, long userId) - throws PortalException, SystemException { - - rolePersistence.removeUser(roleId, userId); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userId); - - PermissionCacheUtil.clearCache(); - } - - /** - * Deletes the user. - * - * @param userId the primary key of the user - * @return the deleted user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User deleteUser(long userId) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - return deleteUser(user); - } - - /** - * Deletes the user. - * - * @param user the user - * @return the deleted user - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public User deleteUser(User user) throws PortalException, SystemException { - if (!PropsValues.USERS_DELETE) { - throw new RequiredUserException(); - } - - // Browser tracker - - browserTrackerLocalService.deleteUserBrowserTracker(user.getUserId()); - - // Group - - Group group = null; - - if (!user.isDefaultUser()) { - group = user.getGroup(); - } - - if (group != null) { - groupLocalService.deleteGroup(group); - } - - // Portrait - - try { - imageLocalService.deleteImage(user.getPortraitId()); - } - catch (NoSuchImageException nsie) { - if (_log.isWarnEnabled()) { - _log.warn("Unable to delete image " + user.getPortraitId()); - } - } - - // Password policy relation - - passwordPolicyRelLocalService.deletePasswordPolicyRel( - User.class.getName(), user.getUserId()); - - // Old passwords - - passwordTrackerLocalService.deletePasswordTrackers(user.getUserId()); - - // Subscriptions - - subscriptionLocalService.deleteSubscriptions(user.getUserId()); - - // External user ids - - userIdMapperLocalService.deleteUserIdMappers(user.getUserId()); - - // Announcements - - announcementsDeliveryLocalService.deleteDeliveries(user.getUserId()); - - // Asset - - assetEntryLocalService.deleteEntry( - User.class.getName(), user.getUserId()); - - // Blogs - - blogsStatsUserLocalService.deleteStatsUserByUserId(user.getUserId()); - - // Document library - - dlFileRankLocalService.deleteFileRanksByUserId(user.getUserId()); - - // Expando - - expandoRowLocalService.deleteRows(user.getUserId()); - - // Message boards - - mbBanLocalService.deleteBansByBanUserId(user.getUserId()); - mbStatsUserLocalService.deleteStatsUsersByUserId(user.getUserId()); - mbThreadFlagLocalService.deleteThreadFlagsByUserId(user.getUserId()); - - // Membership requests - - membershipRequestLocalService.deleteMembershipRequestsByUserId( - user.getUserId()); - - // Shopping cart - - shoppingCartLocalService.deleteUserCarts(user.getUserId()); - - // Social - - socialActivityLocalService.deleteUserActivities(user.getUserId()); - socialRequestLocalService.deleteReceiverUserRequests(user.getUserId()); - socialRequestLocalService.deleteUserRequests(user.getUserId()); - - // Mail - - mailService.deleteUser(user.getCompanyId(), user.getUserId()); - - // Contact - - Contact contact = contactLocalService.fetchContact(user.getContactId()); - - if (contact != null) { - contactLocalService.deleteContact(contact); - } - - // Group roles - - userGroupRoleLocalService.deleteUserGroupRolesByUserId( - user.getUserId()); - - // Resources - - resourceLocalService.deleteResource( - user.getCompanyId(), User.class.getName(), - ResourceConstants.SCOPE_INDIVIDUAL, user.getUserId()); - - // User - - userPersistence.remove(user); - - // Permission cache - - PermissionCacheUtil.clearCache(); - - // Workflow - - workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks( - user.getCompanyId(), 0, User.class.getName(), user.getUserId()); - - return user; - } - - /** - * Removes the user from the user group. - * - * @param userGroupId the primary key of the user group - * @param userId the primary key of the user - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void deleteUserGroupUser(long userGroupId, long userId) - throws PortalException, SystemException { - - userGroupPersistence.removeUser(userGroupId, userId); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userId); - - PermissionCacheUtil.clearCache(); - } - - /** - * Encrypts the primary key of the user. Used when encrypting the user's - * credentials for storage in an automatic login cookie. - * - * @param name the primary key of the user - * @return the user's encrypted primary key - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public String encryptUserId(String name) - throws PortalException, SystemException { - - long userId = GetterUtil.getLong(name); - - User user = userPersistence.findByPrimaryKey(userId); - - Company company = companyPersistence.findByPrimaryKey( - user.getCompanyId()); - - try { - return Encryptor.encrypt(company.getKeyObj(), name); - } - catch (EncryptorException ee) { - throw new SystemException(ee); - } - } - - /** - * Returns the user with the email address. - * - * @param companyId the primary key of the user's company - * @param emailAddress the user's email address - * @return the user with the email address, or null if a user - * with the email address could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User fetchUserByEmailAddress(long companyId, String emailAddress) - throws SystemException { - - emailAddress = getLogin(emailAddress); - - return userPersistence.fetchByC_EA(companyId, emailAddress); - } - - /** - * Returns the user with the Facebook ID. - * - * @param companyId the primary key of the user's company - * @param facebookId the user's Facebook ID - * @return the user with the Facebook ID, or null if a user - * with the Facebook ID could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User fetchUserByFacebookId(long companyId, long facebookId) - throws SystemException { - - return userPersistence.fetchByC_FID(companyId, facebookId); - } - - /** - * Returns the user with the primary key. - * - * @param userId the primary key of the user - * @return the user with the primary key, or null if a user - * with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User fetchUserById(long userId) throws SystemException { - return userPersistence.fetchByPrimaryKey(userId); - } - - /** - * Returns the user with the OpenID. - * - * @param companyId the primary key of the user's company - * @param openId the user's OpenID - * @return the user with the OpenID, or null if a user with the - * OpenID could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User fetchUserByOpenId(long companyId, String openId) - throws SystemException { - - return userPersistence.fetchByC_O(companyId, openId); - } - - /** - * Returns the user with the screen name. - * - * @param companyId the primary key of the user's company - * @param screenName the user's screen name - * @return the user with the screen name, or null if a user - * with the screen name could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User fetchUserByScreenName(long companyId, String screenName) - throws SystemException { - - screenName = getLogin(screenName); - - return userPersistence.fetchByC_SN(companyId, screenName); - } - - /** - * Returns a range of all the users belonging to the company. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the company - * @param start the lower bound of the range of users - * @param end the upper bound of the range of users (not inclusive) - * @return the range of users belonging to the company - * @throws SystemException if a system exception occurred - */ - @Override - public List getCompanyUsers(long companyId, int start, int end) - throws SystemException { - - return userPersistence.findByCompanyId(companyId, start, end); - } - - /** - * Returns the number of users belonging to the company. - * - * @param companyId the primary key of the company - * @return the number of users belonging to the company - * @throws SystemException if a system exception occurred - */ - @Override - public int getCompanyUsersCount(long companyId) throws SystemException { - return userPersistence.countByCompanyId(companyId); - } - - /** - * Returns the default user for the company. - * - * @param companyId the primary key of the company - * @return the default user for the company - * @throws PortalException if a default user for the company could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - @Skip - public User getDefaultUser(long companyId) - throws PortalException, SystemException { - - User userModel = _defaultUsers.get(companyId); - - if (userModel == null) { - userModel = userLocalService.loadGetDefaultUser(companyId); - - _defaultUsers.put(companyId, userModel); - } - - return userModel; - } - - /** - * Returns the primary key of the default user for the company. - * - * @param companyId the primary key of the company - * @return the primary key of the default user for the company - * @throws PortalException if a default user for the company could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - @Skip - public long getDefaultUserId(long companyId) - throws PortalException, SystemException { - - User user = getDefaultUser(companyId); - - return user.getUserId(); - } - - /** - * Returns the primary keys of all the users belonging to the group. - * - * @param groupId the primary key of the group - * @return the primary keys of the users belonging to the group - * @throws SystemException if a system exception occurred - */ - @Override - public long[] getGroupUserIds(long groupId) throws SystemException { - return getUserIds(getGroupUsers(groupId)); - } - - /** - * Returns the number of users with the status belonging to the group. - * - * @param groupId the primary key of the group - * @param status the workflow status - * @return the number of users with the status belonging to the group - * @throws PortalException if a group with the primary key could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public int getGroupUsersCount(long groupId, int status) - throws PortalException, SystemException { - - Group group = groupPersistence.findByPrimaryKey(groupId); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("usersGroups", new Long(groupId)); - - return searchCount(group.getCompanyId(), null, status, params); - } - - @Override - public List getInheritedRoleUsers( - long roleId, int start, int end, OrderByComparator obc) - throws PortalException, SystemException { - - Role role = rolePersistence.findByPrimaryKey(roleId); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("inherit", Boolean.TRUE); - params.put("usersRoles", roleId); - - return search( - role.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, - params, start, end, obc); - } - - /** - * Returns all the users who have not had any announcements of the type - * delivered, excluding the default user. - * - * @param type the type of announcement - * @return the users who have not had any annoucements of the type delivered - * @throws SystemException if a system exception occurred - */ - @Override - public List getNoAnnouncementsDeliveries(String type) - throws SystemException { - - return userFinder.findByNoAnnouncementsDeliveries(type); - } - - /** - * Returns all the users who do not have any contacts. - * - * @return the users who do not have any contacts - * @throws SystemException if a system exception occurred - */ - @Override - public List getNoContacts() throws SystemException { - return userFinder.findByNoContacts(); - } - - /** - * Returns all the users who do not belong to any groups, excluding the - * default user. - * - * @return the users who do not belong to any groups - * @throws SystemException if a system exception occurred - */ - @Override - public List getNoGroups() throws SystemException { - return userFinder.findByNoGroups(); - } - - /** - * Returns the primary keys of all the users belonging to the organization. - * - * @param organizationId the primary key of the organization - * @return the primary keys of the users belonging to the organization - * @throws SystemException if a system exception occurred - */ - @Override - public long[] getOrganizationUserIds(long organizationId) - throws SystemException { - - return getUserIds(getOrganizationUsers(organizationId)); - } - - /** - * Returns the number of users with the status belonging to the - * organization. - * - * @param organizationId the primary key of the organization - * @param status the workflow status - * @return the number of users with the status belonging to the organization - * @throws PortalException if an organization with the primary key could not - * be found - * @throws SystemException if a system exception occurred - */ - @Override - public int getOrganizationUsersCount(long organizationId, int status) - throws PortalException, SystemException { - - Organization organization = organizationPersistence.findByPrimaryKey( - organizationId); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("usersOrgs", new Long(organizationId)); - - return searchCount(organization.getCompanyId(), null, status, params); - } - - /** - * Returns the primary keys of all the users belonging to the role. - * - * @param roleId the primary key of the role - * @return the primary keys of the users belonging to the role - * @throws SystemException if a system exception occurred - */ - @Override - public long[] getRoleUserIds(long roleId) throws SystemException { - return getUserIds(getRoleUsers(roleId)); - } - - /** - * Returns the number of users with the status belonging to the role. - * - * @param roleId the primary key of the role - * @param status the workflow status - * @return the number of users with the status belonging to the role - * @throws PortalException if an role with the primary key could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public int getRoleUsersCount(long roleId, int status) - throws PortalException, SystemException { - - Role role = rolePersistence.findByPrimaryKey(roleId); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("usersRoles", new Long(roleId)); - - return searchCount(role.getCompanyId(), null, status, params); - } - - /** - * Returns an ordered range of all the users with a social relation of the - * type with the user. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param userId the primary key of the user - * @param type the type of social relation. The possible types can be found - * in {@link - * com.liferay.portlet.social.model.SocialRelationConstants}. - * @param start the lower bound of the range of users - * @param end the upper bound of the range of users (not inclusive) - * @param obc the comparator to order the users by (optionally - * null) - * @return the ordered range of users with a social relation of the type - * with the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public List getSocialUsers( - long userId, int type, int start, int end, OrderByComparator obc) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("socialRelationType", new Long[] {userId, new Long(type)}); - - return search( - user.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, - params, start, end, obc); - } - - /** - * Returns an ordered range of all the users with a social relation with the - * user. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param userId the primary key of the user - * @param start the lower bound of the range of users - * @param end the upper bound of the range of users (not inclusive) - * @param obc the comparator to order the users by (optionally - * null) - * @return the ordered range of users with a social relation with the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public List getSocialUsers( - long userId, int start, int end, OrderByComparator obc) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("socialRelation", new Long[] {userId}); - - return search( - user.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, - params, start, end, obc); - } - - /** - * Returns an ordered range of all the users with a mutual social relation - * of the type with both of the given users. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param userId1 the primary key of the first user - * @param userId2 the primary key of the second user - * @param type the type of social relation. The possible types can be found - * in {@link - * com.liferay.portlet.social.model.SocialRelationConstants}. - * @param start the lower bound of the range of users - * @param end the upper bound of the range of users (not inclusive) - * @param obc the comparator to order the users by (optionally - * null) - * @return the ordered range of users with a mutual social relation of the - * type with the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public List getSocialUsers( - long userId1, long userId2, int type, int start, int end, - OrderByComparator obc) - throws PortalException, SystemException { - - User user1 = userPersistence.findByPrimaryKey(userId1); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put( - "socialMutualRelationType", - new Long[] {userId1, new Long(type), userId2, new Long(type)}); - - return search( - user1.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, - params, start, end, obc); - } - - /** - * Returns an ordered range of all the users with a mutual social relation - * with both of the given users. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param userId1 the primary key of the first user - * @param userId2 the primary key of the second user - * @param start the lower bound of the range of users - * @param end the upper bound of the range of users (not inclusive) - * @param obc the comparator to order the users by (optionally - * null) - * @return the ordered range of users with a mutual social relation with the - * user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public List getSocialUsers( - long userId1, long userId2, int start, int end, - OrderByComparator obc) - throws PortalException, SystemException { - - User user1 = userPersistence.findByPrimaryKey(userId1); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("socialMutualRelation", new Long[] {userId1, userId2}); - - return search( - user1.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, - params, start, end, obc); - } - - /** - * Returns the number of users with a social relation with the user. - * - * @param userId the primary key of the user - * @return the number of users with a social relation with the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public int getSocialUsersCount(long userId) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("socialRelation", new Long[] {userId}); - - return searchCount( - user.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, - params); - } - - /** - * Returns the number of users with a social relation of the type with the - * user. - * - * @param userId the primary key of the user - * @param type the type of social relation. The possible types can be found - * in {@link - * com.liferay.portlet.social.model.SocialRelationConstants}. - * @return the number of users with a social relation of the type with the - * user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public int getSocialUsersCount(long userId, int type) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("socialRelationType", new Long[] {userId, new Long(type)}); - - return searchCount( - user.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, - params); - } - - /** - * Returns the number of users with a mutual social relation with both of - * the given users. - * - * @param userId1 the primary key of the first user - * @param userId2 the primary key of the second user - * @return the number of users with a mutual social relation with the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public int getSocialUsersCount(long userId1, long userId2) - throws PortalException, SystemException { - - User user1 = userPersistence.findByPrimaryKey(userId1); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("socialMutualRelation", new Long[] {userId1, userId2}); - - return searchCount( - user1.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, - params); - } - - /** - * Returns the number of users with a mutual social relation of the type - * with both of the given users. - * - * @param userId1 the primary key of the first user - * @param userId2 the primary key of the second user - * @param type the type of social relation. The possible types can be found - * in {@link - * com.liferay.portlet.social.model.SocialRelationConstants}. - * @return the number of users with a mutual social relation of the type - * with the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public int getSocialUsersCount(long userId1, long userId2, int type) - throws PortalException, SystemException { - - User user1 = userPersistence.findByPrimaryKey(userId1); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put( - "socialMutualRelationType", - new Long[] {userId1, new Long(type), userId2, new Long(type)}); - - return searchCount( - user1.getCompanyId(), null, WorkflowConstants.STATUS_APPROVED, - params); - } - - /** - * Returns the user with the contact ID. - * - * @param contactId the user's contact ID - * @return the user with the contact ID - * @throws PortalException if a user with the contact ID could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User getUserByContactId(long contactId) - throws PortalException, SystemException { - - return userPersistence.findByContactId(contactId); - } - - /** - * Returns the user with the email address. - * - * @param companyId the primary key of the user's company - * @param emailAddress the user's email address - * @return the user with the email address - * @throws PortalException if a user with the email address could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public User getUserByEmailAddress(long companyId, String emailAddress) - throws PortalException, SystemException { - - emailAddress = getLogin(emailAddress); - - return userPersistence.findByC_EA(companyId, emailAddress); - } - - /** - * Returns the user with the Facebook ID. - * - * @param companyId the primary key of the user's company - * @param facebookId the user's Facebook ID - * @return the user with the Facebook ID - * @throws PortalException if a user with the Facebook ID could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User getUserByFacebookId(long companyId, long facebookId) - throws PortalException, SystemException { - - return userPersistence.findByC_FID(companyId, facebookId); - } - - /** - * Returns the user with the primary key. - * - * @param userId the primary key of the user - * @return the user with the primary key - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User getUserById(long userId) - throws PortalException, SystemException { - - return userPersistence.findByPrimaryKey(userId); - } - - /** - * Returns the user with the primary key from the company. - * - * @param companyId the primary key of the user's company - * @param userId the primary key of the user - * @return the user with the primary key - * @throws PortalException if a user with the primary key from the company - * could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User getUserById(long companyId, long userId) - throws PortalException, SystemException { - - return userPersistence.findByC_U(companyId, userId); - } - - /** - * Returns the user with the OpenID. - * - * @param companyId the primary key of the user's company - * @param openId the user's OpenID - * @return the user with the OpenID - * @throws PortalException if a user with the OpenID could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User getUserByOpenId(long companyId, String openId) - throws PortalException, SystemException { - - return userPersistence.findByC_O(companyId, openId); - } - - /** - * Returns the user with the portrait ID. - * - * @param portraitId the user's portrait ID - * @return the user with the portrait ID - * @throws PortalException if a user with the portrait ID could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User getUserByPortraitId(long portraitId) - throws PortalException, SystemException { - - return userPersistence.findByPortraitId(portraitId); - } - - /** - * Returns the user with the screen name. - * - * @param companyId the primary key of the user's company - * @param screenName the user's screen name - * @return the user with the screen name - * @throws PortalException if a user with the screen name could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User getUserByScreenName(long companyId, String screenName) - throws PortalException, SystemException { - - screenName = getLogin(screenName); - - return userPersistence.findByC_SN(companyId, screenName); - } - - /** - * Returns the user with the UUID. - * - * @param uuid the user's UUID - * @return the user with the UUID - * @throws PortalException if a user with the UUID could not be found - * @throws SystemException if a system exception occurred - * @deprecated As of 6.2.0, replaced by {@link - * #getUserByUuidAndCompanyId(String, long)} - */ - @Override - public User getUserByUuid(String uuid) - throws PortalException, SystemException { - - List users = userPersistence.findByUuid(uuid); - - if (users.isEmpty()) { - throw new NoSuchUserException("{uuid=" + uuid + "}"); - } - else { - return users.get(0); - } - } - - /** - * Returns the user with the UUID. - * - * @param uuid the user's UUID - * @param companyId the primary key of the user's company - * @return the user with the UUID - * @throws PortalException if a user with the UUID could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User getUserByUuidAndCompanyId(String uuid, long companyId) - throws PortalException, SystemException { - - List users = userPersistence.findByUuid_C(uuid, companyId); - - if (users.isEmpty()) { - StringBundler sb = new StringBundler(5); - - sb.append("{uuid="); - sb.append(uuid); - sb.append(", companyId="); - sb.append(companyId); - sb.append("}"); - - throw new NoSuchUserException(sb.toString()); - } - else { - return users.get(0); - } - } - - /** - * Returns the number of users with the status belonging to the user group. - * - * @param userGroupId the primary key of the user group - * @param status the workflow status - * @return the number of users with the status belonging to the user group - * @throws PortalException if a user group with the primary key could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public int getUserGroupUsersCount(long userGroupId, int status) - throws PortalException, SystemException { - - UserGroup userGroup = userGroupPersistence.findByPrimaryKey( - userGroupId); - - LinkedHashMap params = - new LinkedHashMap(); - - params.put("usersUserGroups", new Long(userGroupId)); - - return searchCount(userGroup.getCompanyId(), null, status, params); - } - - /** - * Returns the primary key of the user with the email address. - * - * @param companyId the primary key of the user's company - * @param emailAddress the user's email address - * @return the primary key of the user with the email address - * @throws PortalException if a user with the email address could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public long getUserIdByEmailAddress(long companyId, String emailAddress) - throws PortalException, SystemException { - - emailAddress = StringUtil.toLowerCase(emailAddress.trim()); - - User user = userPersistence.findByC_EA(companyId, emailAddress); - - return user.getUserId(); - } - - /** - * Returns the primary key of the user with the screen name. - * - * @param companyId the primary key of the user's company - * @param screenName the user's screen name - * @return the primary key of the user with the screen name - * @throws PortalException if a user with the screen name could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public long getUserIdByScreenName(long companyId, String screenName) - throws PortalException, SystemException { - - screenName = getLogin(screenName); - - User user = userPersistence.findByC_SN(companyId, screenName); - - return user.getUserId(); - } - - /** - * Returns true if the password policy has been assigned to the - * user. - * - * @param passwordPolicyId the primary key of the password policy - * @param userId the primary key of the user - * @return true if the password policy is assigned to the user; - * false otherwise - * @throws SystemException if a system exception occurred - */ - @Override - public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId) - throws SystemException { - - return passwordPolicyRelLocalService.hasPasswordPolicyRel( - passwordPolicyId, User.class.getName(), userId); - } - - /** - * Returns true if the user has the role with the name, - * optionally through inheritance. - * - * @param companyId the primary key of the role's company - * @param name the name of the role (must be a regular role, not an - * organization, site or provider role) - * @param userId the primary key of the user - * @param inherited whether to include roles inherited from organizations, - * sites, etc. - * @return true if the user has the role; false - * otherwise - * @throws PortalException if a role with the name could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public boolean hasRoleUser( - long companyId, String name, long userId, boolean inherited) - throws PortalException, SystemException { - - return roleLocalService.hasUserRole(userId, companyId, name, inherited); - } - - /** - * Returns true if the user's password is expired. - * - * @param user the user - * @return true if the user's password is expired; - * false otherwise - * @throws PortalException if the password policy for the user could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public boolean isPasswordExpired(User user) - throws PortalException, SystemException { - - PasswordPolicy passwordPolicy = user.getPasswordPolicy(); - - if ((passwordPolicy != null) && passwordPolicy.getExpireable()) { - Date now = new Date(); - - if (user.getPasswordModifiedDate() == null) { - user.setPasswordModifiedDate(now); - - userLocalService.updateUser(user); - } - - long passwordStartTime = user.getPasswordModifiedDate().getTime(); - long elapsedTime = now.getTime() - passwordStartTime; - - if (elapsedTime > (passwordPolicy.getMaxAge() * 1000)) { - return true; - } - else { - return false; - } - } - - return false; - } - - /** - * Returns true if the password policy is configured to warn - * the user that his password is expiring and the remaining time until - * expiration is equal or less than the configured warning time. - * - * @param user the user - * @return true if the user's password is expiring soon; - * false otherwise - * @throws PortalException if the password policy for the user could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public boolean isPasswordExpiringSoon(User user) - throws PortalException, SystemException { - - PasswordPolicy passwordPolicy = user.getPasswordPolicy(); - - if ((passwordPolicy != null) && passwordPolicy.isExpireable() && - (passwordPolicy.getWarningTime() > 0)) { - - Date now = new Date(); - - if (user.getPasswordModifiedDate() == null) { - user.setPasswordModifiedDate(now); - - userLocalService.updateUser(user); - } - - long timeModified = user.getPasswordModifiedDate().getTime(); - long passwordExpiresOn = - (passwordPolicy.getMaxAge() * 1000) + timeModified; - - long timeStartWarning = - passwordExpiresOn - (passwordPolicy.getWarningTime() * 1000); - - if (now.getTime() > timeStartWarning) { - return true; - } - else { - return false; - } - } - - return false; - } - - /** - * Returns the default user for the company. - * - * @param companyId the primary key of the company - * @return the default user for the company - * @throws PortalException if the user could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User loadGetDefaultUser(long companyId) - throws PortalException, SystemException { - - return userPersistence.findByC_DU(companyId, true); - } - - /** - * Returns an ordered range of all the users who match the keywords and - * status, without using the indexer. It is preferable to use the indexed - * version {@link #search(long, String, int, LinkedHashMap, int, int, Sort)} - * instead of this method wherever possible for performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the user's company - * @param keywords the keywords (space separated), which may occur in the - * user's first name, middle name, last name, screen name, or email - * address - * @param status the workflow status - * @param params the finder parameters (optionally null). For - * more information see {@link - * com.liferay.portal.service.persistence.UserFinder}. - * @param start the lower bound of the range of users - * @param end the upper bound of the range of users (not inclusive) - * @param obc the comparator to order the users by (optionally - * null) - * @return the matching users - * @throws SystemException if a system exception occurred - * @see com.liferay.portal.service.persistence.UserFinder - */ - @Override - public List search( - long companyId, String keywords, int status, - LinkedHashMap params, int start, int end, - OrderByComparator obc) - throws SystemException { - - return userFinder.findByKeywords( - companyId, keywords, status, params, start, end, obc); - } - - /** - * Returns an ordered range of all the users who match the keywords and - * status, using the indexer. It is preferable to use this method instead of - * the non-indexed version whenever possible for performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the user's company - * @param keywords the keywords (space separated), which may occur in the - * user's first name, middle name, last name, screen name, or email - * address - * @param status the workflow status - * @param params the indexer parameters (optionally null). For - * more information see {@link - * com.liferay.portlet.usersadmin.util.UserIndexer}. - * @param start the lower bound of the range of users - * @param end the upper bound of the range of users (not inclusive) - * @param sort the field and direction to sort by (optionally - * null) - * @return the matching users - * @throws SystemException if a system exception occurred - * @see com.liferay.portlet.usersadmin.util.UserIndexer - */ - @Override - public Hits search( - long companyId, String keywords, int status, - LinkedHashMap params, int start, int end, Sort sort) - throws SystemException { - - String firstName = null; - String middleName = null; - String lastName = null; - String fullName = null; - String screenName = null; - String emailAddress = null; - String street = null; - String city = null; - String zip = null; - String region = null; - String country = null; - boolean andOperator = false; - - if (Validator.isNotNull(keywords)) { - firstName = keywords; - middleName = keywords; - lastName = keywords; - fullName = keywords; - screenName = keywords; - emailAddress = keywords; - street = keywords; - city = keywords; - zip = keywords; - region = keywords; - country = keywords; - } - else { - andOperator = true; - } - - if (params != null) { - params.put("keywords", keywords); - } - - return search( - companyId, firstName, middleName, lastName, fullName, screenName, - emailAddress, street, city, zip, region, country, status, params, - andOperator, start, end, sort); - } - - /** - * Returns an ordered range of all the users with the status, and whose - * first name, middle name, last name, screen name, and email address match - * the keywords specified for them, without using the indexer. It is - * preferable to use the indexed version {@link #search(long, String, - * String, String, String, String, int, LinkedHashMap, boolean, int, int, - * Sort)} instead of this method wherever possible for performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the user's company - * @param firstName the first name keywords (space separated) - * @param middleName the middle name keywords - * @param lastName the last name keywords - * @param screenName the screen name keywords - * @param emailAddress the email address keywords - * @param status the workflow status - * @param params the finder parameters (optionally null). For - * more information see {@link - * com.liferay.portal.service.persistence.UserFinder}. - * @param andSearch whether every field must match its keywords, or just - * one field. For example, "users with the first name 'bob' and - * last name 'smith'" vs "users with the first name 'bob' - * or the last name 'smith'". - * @param start the lower bound of the range of users - * @param end the upper bound of the range of users (not inclusive) - * @param obc the comparator to order the users by (optionally - * null) - * @return the matching users - * @throws SystemException if a system exception occurred - * @see com.liferay.portal.service.persistence.UserFinder - */ - @Override - public List search( - long companyId, String firstName, String middleName, - String lastName, String screenName, String emailAddress, int status, - LinkedHashMap params, boolean andSearch, int start, - int end, OrderByComparator obc) - throws SystemException { - - return userFinder.findByC_FN_MN_LN_SN_EA_S( - companyId, firstName, middleName, lastName, screenName, - emailAddress, status, params, andSearch, start, end, obc); - } - - /** - * Returns an ordered range of all the users with the status, and whose - * first name, middle name, last name, screen name, and email address match - * the keywords specified for them, using the indexer. It is preferable to - * use this method instead of the non-indexed version whenever possible for - * performance reasons. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the user's company - * @param firstName the first name keywords (space separated) - * @param middleName the middle name keywords - * @param lastName the last name keywords - * @param screenName the screen name keywords - * @param emailAddress the email address keywords - * @param status the workflow status - * @param params the indexer parameters (optionally null). For - * more information see {@link - * com.liferay.portlet.usersadmin.util.UserIndexer}. - * @param andSearch whether every field must match its keywords, or just - * one field. For example, "users with the first name 'bob' and - * last name 'smith'" vs "users with the first name 'bob' - * or the last name 'smith'". - * @param start the lower bound of the range of users - * @param end the upper bound of the range of users (not inclusive) - * @param sort the field and direction to sort by (optionally - * null) - * @return the matching users - * @throws SystemException if a system exception occurred - * @see com.liferay.portlet.usersadmin.util.UserIndexer - */ - @Override - public Hits search( - long companyId, String firstName, String middleName, - String lastName, String screenName, String emailAddress, int status, - LinkedHashMap params, boolean andSearch, int start, - int end, Sort sort) - throws SystemException { - - return search( - companyId, firstName, middleName, lastName, null, screenName, - emailAddress, null, null, null, null, null, status, params, - andSearch, start, end, sort); - } - - /** - * Returns the number of users who match the keywords and status. - * - * @param companyId the primary key of the user's company - * @param keywords the keywords (space separated), which may occur in the - * user's first name, middle name, last name, screen name, or email - * address - * @param status the workflow status - * @param params the finder parameters (optionally null). For - * more information see {@link - * com.liferay.portal.service.persistence.UserFinder}. - * @return the number matching users - * @throws SystemException if a system exception occurred - */ - @Override - public int searchCount( - long companyId, String keywords, int status, - LinkedHashMap params) - throws SystemException { - - return userFinder.countByKeywords(companyId, keywords, status, params); - } - - /** - * Returns the number of users with the status, and whose first name, middle - * name, last name, screen name, and email address match the keywords - * specified for them. - * - * @param companyId the primary key of the user's company - * @param firstName the first name keywords (space separated) - * @param middleName the middle name keywords - * @param lastName the last name keywords - * @param screenName the screen name keywords - * @param emailAddress the email address keywords - * @param status the workflow status - * @param params the finder parameters (optionally null). For - * more information see {@link - * com.liferay.portal.service.persistence.UserFinder}. - * @param andSearch whether every field must match its keywords, or just - * one field. For example, "users with the first name 'bob' and - * last name 'smith'" vs "users with the first name 'bob' - * or the last name 'smith'". - * @return the number of matching users - * @throws SystemException if a system exception occurred - */ - @Override - public int searchCount( - long companyId, String firstName, String middleName, - String lastName, String screenName, String emailAddress, int status, - LinkedHashMap params, boolean andSearch) - throws SystemException { - - return userFinder.countByC_FN_MN_LN_SN_EA_S( - companyId, firstName, middleName, lastName, screenName, - emailAddress, status, params, andSearch); - } - - /** - * Sends an email address verification to the user. - * - * @param user the verification email recipient - * @param emailAddress the recipient's email address - * @param serviceContext the service context to be applied. Must set the - * portal URL, main path, primary key of the layout, remote address, - * remote host, and agent for the user. - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void sendEmailAddressVerification( - User user, String emailAddress, ServiceContext serviceContext) - throws PortalException, SystemException { - - if (user.isEmailAddressVerified() && - StringUtil.equalsIgnoreCase(emailAddress, user.getEmailAddress())) { - - return; - } - - Ticket ticket = ticketLocalService.addTicket( - user.getCompanyId(), User.class.getName(), user.getUserId(), - TicketConstants.TYPE_EMAIL_ADDRESS, emailAddress, null, - serviceContext); - - String verifyEmailAddressURL = - serviceContext.getPortalURL() + serviceContext.getPathMain() + - "/portal/verify_email_address?ticketKey=" + ticket.getKey(); - - long plid = serviceContext.getPlid(); - - if (plid > 0) { - Layout layout = layoutLocalService.fetchLayout(plid); - - if (layout != null) { - Group group = layout.getGroup(); - - if (!layout.isPrivateLayout() && !group.isUser()) { - verifyEmailAddressURL += - "&p_l_id=" + serviceContext.getPlid(); - } - } - } - - String fromName = PrefsPropsUtil.getString( - user.getCompanyId(), PropsKeys.ADMIN_EMAIL_FROM_NAME); - String fromAddress = PrefsPropsUtil.getString( - user.getCompanyId(), PropsKeys.ADMIN_EMAIL_FROM_ADDRESS); - - String toName = user.getFullName(); - String toAddress = emailAddress; - - String subject = PrefsPropsUtil.getContent( - user.getCompanyId(), PropsKeys.ADMIN_EMAIL_VERIFICATION_SUBJECT); - - String body = PrefsPropsUtil.getContent( - user.getCompanyId(), PropsKeys.ADMIN_EMAIL_VERIFICATION_BODY); - - SubscriptionSender subscriptionSender = new SubscriptionSender(); - - subscriptionSender.setBody(body); - subscriptionSender.setCompanyId(user.getCompanyId()); - subscriptionSender.setContextAttributes( - "[$EMAIL_VERIFICATION_CODE$]", ticket.getKey(), - "[$EMAIL_VERIFICATION_URL$]", verifyEmailAddressURL, - "[$REMOTE_ADDRESS$]", serviceContext.getRemoteAddr(), - "[$REMOTE_HOST$]", serviceContext.getRemoteHost(), "[$USER_ID$]", - user.getUserId(), "[$USER_SCREENNAME$]", user.getScreenName()); - subscriptionSender.setFrom(fromAddress, fromName); - subscriptionSender.setHtmlFormat(true); - subscriptionSender.setMailId( - "user", user.getUserId(), System.currentTimeMillis(), - PwdGenerator.getPassword()); - subscriptionSender.setServiceContext(serviceContext); - subscriptionSender.setSubject(subject); - subscriptionSender.setUserId(user.getUserId()); - - subscriptionSender.addRuntimeSubscribers(toAddress, toName); - - subscriptionSender.flushNotificationsAsync(); - } - - /** - * Sends the password email to the user with the email address. The content - * of this email can be specified in portal.properties with the - * admin.email.password keys. - * - * @param companyId the primary key of the user's company - * @param emailAddress the user's email address - * @param fromName the name of the individual that the email should be from - * @param fromAddress the address of the individual that the email should - * be from - * @param subject the email subject. If null, the subject - * specified in portal.properties will be used. - * @param body the email body. If null, the body specified in - * portal.properties will be used. - * @param serviceContext the service context to be applied - * @throws PortalException if a user with the email address could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public void sendPassword( - long companyId, String emailAddress, String fromName, - String fromAddress, String subject, String body, - ServiceContext serviceContext) - throws PortalException, SystemException { - - Company company = companyPersistence.findByPrimaryKey(companyId); - - if (!company.isSendPassword() && !company.isSendPasswordResetLink()) { - return; - } - - emailAddress = StringUtil.toLowerCase(emailAddress.trim()); - - if (Validator.isNull(emailAddress)) { - throw new UserEmailAddressException(); - } - - User user = userPersistence.findByC_EA(companyId, emailAddress); - - PasswordPolicy passwordPolicy = user.getPasswordPolicy(); - - String newPassword = StringPool.BLANK; - String passwordResetURL = StringPool.BLANK; - - if (company.isSendPasswordResetLink()) { - Date expirationDate = null; - - if ((passwordPolicy != null) && - (passwordPolicy.getResetTicketMaxAge() > 0)) { - - expirationDate = new Date( - System.currentTimeMillis() + - (passwordPolicy.getResetTicketMaxAge() * 1000)); - } - - Ticket ticket = ticketLocalService.addTicket( - companyId, User.class.getName(), user.getUserId(), - TicketConstants.TYPE_PASSWORD, null, expirationDate, - serviceContext); - - passwordResetURL = - serviceContext.getPortalURL() + serviceContext.getPathMain() + - "/portal/update_password?p_l_id="+ - serviceContext.getPlid() + - "&ticketKey=" + ticket.getKey(); - } - else { - if (!PasswordEncryptorUtil.PASSWORDS_ENCRYPTION_ALGORITHM.equals( - PasswordEncryptorUtil.TYPE_NONE)) { - - if (LDAPSettingsUtil.isPasswordPolicyEnabled( - user.getCompanyId())) { - - if (_log.isWarnEnabled()) { - StringBundler sb = new StringBundler(5); - - sb.append("When LDAP password policy is enabled, "); - sb.append("it is possible that portal generated "); - sb.append("passwords will not match the LDAP policy."); - sb.append("Using RegExpToolkit to generate new "); - sb.append("password."); - - _log.warn(sb.toString()); - } - - RegExpToolkit regExpToolkit = new RegExpToolkit(); - - newPassword = regExpToolkit.generate(null); - } - else { - newPassword = PwdToolkitUtil.generate(passwordPolicy); - } - - boolean passwordReset = false; - - if (passwordPolicy.getChangeable() && - passwordPolicy.getChangeRequired()) { - - passwordReset = true; - } - - user.setPassword(PasswordEncryptorUtil.encrypt(newPassword)); - user.setPasswordUnencrypted(newPassword); - user.setPasswordEncrypted(true); - user.setPasswordReset(passwordReset); - user.setPasswordModified(true); - user.setPasswordModifiedDate(new Date()); - - userPersistence.update(user); - - user.setPasswordModified(false); - } - else { - newPassword = user.getPassword(); - } - } - - if (Validator.isNull(fromName)) { - fromName = PrefsPropsUtil.getString( - companyId, PropsKeys.ADMIN_EMAIL_FROM_NAME); - } - - if (Validator.isNull(fromAddress)) { - fromAddress = PrefsPropsUtil.getString( - companyId, PropsKeys.ADMIN_EMAIL_FROM_ADDRESS); - } - - String toName = user.getFullName(); - String toAddress = user.getEmailAddress(); - - if (Validator.isNull(subject)) { - if (company.isSendPasswordResetLink()) { - subject = PrefsPropsUtil.getContent( - companyId, PropsKeys.ADMIN_EMAIL_PASSWORD_RESET_SUBJECT); - } - else { - subject = PrefsPropsUtil.getContent( - companyId, PropsKeys.ADMIN_EMAIL_PASSWORD_SENT_SUBJECT); - } - } - - if (Validator.isNull(body)) { - if (company.isSendPasswordResetLink()) { - body = PrefsPropsUtil.getContent( - companyId, PropsKeys.ADMIN_EMAIL_PASSWORD_RESET_BODY); - } - else { - body = PrefsPropsUtil.getContent( - companyId, PropsKeys.ADMIN_EMAIL_PASSWORD_SENT_BODY); - } - } - - SubscriptionSender subscriptionSender = new SubscriptionSender(); - - subscriptionSender.setBody(body); - subscriptionSender.setCompanyId(companyId); - subscriptionSender.setContextAttributes( - "[$PASSWORD_RESET_URL$]", passwordResetURL, "[$REMOTE_ADDRESS$]", - serviceContext.getRemoteAddr(), "[$REMOTE_HOST$]", - serviceContext.getRemoteHost(), "[$USER_ID$]", user.getUserId(), - "[$USER_PASSWORD$]", newPassword, "[$USER_SCREENNAME$]", - user.getScreenName()); - subscriptionSender.setFrom(fromAddress, fromName); - subscriptionSender.setHtmlFormat(true); - subscriptionSender.setMailId( - "user", user.getUserId(), System.currentTimeMillis(), - PwdGenerator.getPassword()); - subscriptionSender.setServiceContext(serviceContext); - subscriptionSender.setSubject(subject); - subscriptionSender.setUserId(user.getUserId()); - - subscriptionSender.addRuntimeSubscribers(toAddress, toName); - - subscriptionSender.flushNotificationsAsync(); - } - - /** - * Sets the users in the role, removing and adding users to the role as - * necessary. - * - * @param roleId the primary key of the role - * @param userIds the primary keys of the users - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void setRoleUsers(long roleId, long[] userIds) - throws PortalException, SystemException { - - rolePersistence.setUsers(roleId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - } - - /** - * Sets the users in the user group, removing and adding users to the user - * group as necessary. - * - * @param userGroupId the primary key of the user group - * @param userIds the primary keys of the users - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("deprecation") - public void setUserGroupUsers(long userGroupId, long[] userIds) - throws PortalException, SystemException { - - if (PropsValues.USER_GROUPS_COPY_LAYOUTS_TO_USER_PERSONAL_SITE) { - userGroupLocalService.copyUserGroupLayouts(userGroupId, userIds); - } - - userGroupPersistence.setUsers(userGroupId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - } - - /** - * Removes the users from the teams of a group. - * - * @param groupId the primary key of the group - * @param userIds the primary keys of the users - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void unsetGroupTeamsUsers(long groupId, long[] userIds) - throws PortalException, SystemException { - - List teams = teamPersistence.findByGroupId(groupId); - - for (Team team : teams) { - unsetTeamUsers(team.getTeamId(), userIds); - } - - PermissionCacheUtil.clearCache(); - } - - /** - * Removes the users from the group. - * - * @param groupId the primary key of the group - * @param userIds the primary keys of the users - * @param serviceContext the service context to be applied (optionally - * null) - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void unsetGroupUsers( - final long groupId, final long[] userIds, - ServiceContext serviceContext) - throws PortalException, SystemException { - - userGroupRoleLocalService.deleteUserGroupRoles( - userIds, groupId, RoleConstants.TYPE_SITE); - - userLocalService.unsetGroupTeamsUsers(groupId, userIds); - - groupPersistence.removeUsers(groupId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - - Callable callable = new Callable() { - - @Override - public Void call() throws Exception { - Message message = new Message(); - - message.put("groupId", groupId); - message.put("userIds", userIds); - - MessageBusUtil.sendMessage( - DestinationNames.SUBSCRIPTION_CLEAN_UP, message); - - return null; - } - - }; - - TransactionCommitCallbackRegistryUtil.registerCallback(callable); - } - - /** - * Removes the users from the organization. - * - * @param organizationId the primary key of the organization - * @param userIds the primary keys of the users - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void unsetOrganizationUsers( - long organizationId, final long[] userIds) - throws PortalException, SystemException { - - Organization organization = organizationPersistence.findByPrimaryKey( - organizationId); - - final Group group = organization.getGroup(); - - userGroupRoleLocalService.deleteUserGroupRoles( - userIds, group.getGroupId()); - - organizationPersistence.removeUsers(organizationId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - - Callable callable = new Callable() { - - @Override - public Void call() throws Exception { - Message message = new Message(); - - message.put("groupId", group.getGroupId()); - message.put("userIds", userIds); - - MessageBusUtil.sendMessage( - DestinationNames.SUBSCRIPTION_CLEAN_UP, message); - - return null; - } - - }; - - TransactionCommitCallbackRegistryUtil.registerCallback(callable); - } - - /** - * Removes the users from the password policy. - * - * @param passwordPolicyId the primary key of the password policy - * @param userIds the primary keys of the users - * @throws SystemException if a system exception occurred - */ - @Override - public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds) - throws SystemException { - - passwordPolicyRelLocalService.deletePasswordPolicyRels( - passwordPolicyId, User.class.getName(), userIds); - } - - /** - * Removes the users from the role. - * - * @param roleId the primary key of the role - * @param users the users - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void unsetRoleUsers(long roleId, List users) - throws PortalException, SystemException { - - Role role = rolePersistence.findByPrimaryKey(roleId); - - String roleName = role.getName(); - - if ((roleName.equals(RoleConstants.ADMINISTRATOR) && - (getRoleUsersCount(role.getRoleId()) <= 1)) || - roleName.equals(RoleConstants.USER)) { - - return; - } - - rolePersistence.removeUsers(roleId, users); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(users); - - PermissionCacheUtil.clearCache(); - } - - /** - * Removes the users from the role. - * - * @param roleId the primary key of the role - * @param userIds the primary keys of the users - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void unsetRoleUsers(long roleId, long[] userIds) - throws PortalException, SystemException { - - Role role = rolePersistence.findByPrimaryKey(roleId); - - String roleName = role.getName(); - - if (roleName.equals(RoleConstants.USER) || - (roleName.equals(RoleConstants.ADMINISTRATOR) && - getRoleUsersCount(role.getRoleId()) <= 1)) { - - return; - } - - rolePersistence.removeUsers(roleId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - } - - /** - * Removes the users from the team. - * - * @param teamId the primary key of the team - * @param userIds the primary keys of the users - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void unsetTeamUsers(long teamId, long[] userIds) - throws PortalException, SystemException { - - teamPersistence.removeUsers(teamId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - } - - /** - * Removes the users from the user group. - * - * @param userGroupId the primary key of the user group - * @param userIds the primary keys of the users - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void unsetUserGroupUsers(long userGroupId, long[] userIds) - throws PortalException, SystemException { - - userGroupPersistence.removeUsers(userGroupId, userIds); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class); - - indexer.reindex(userIds); - - PermissionCacheUtil.clearCache(); - } - - /** - * Updates whether the user has agreed to the terms of use. - * - * @param userId the primary key of the user - * @param agreedToTermsOfUse whether the user has agreet to the terms of - * use - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateAgreedToTermsOfUse( - long userId, boolean agreedToTermsOfUse) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - user.setAgreedToTermsOfUse(agreedToTermsOfUse); - - userPersistence.update(user); - - return user; - } - - /** - * Updates the user's asset with the new asset categories and tag names, - * removing and adding asset categories and tag names as necessary. - * - * @param userId the primary key of the user - * @param user ID the primary key of the user - * @param assetCategoryIds the primary key's of the new asset categories - * @param assetTagNames the new asset tag names - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public void updateAsset( - long userId, User user, long[] assetCategoryIds, - String[] assetTagNames) - throws PortalException, SystemException { - - User owner = userPersistence.findByPrimaryKey(userId); - - Company company = companyPersistence.findByPrimaryKey( - owner.getCompanyId()); - - Group companyGroup = company.getGroup(); - - assetEntryLocalService.updateEntry( - userId, companyGroup.getGroupId(), user.getCreateDate(), - user.getModifiedDate(), User.class.getName(), user.getUserId(), - user.getUuid(), 0, assetCategoryIds, assetTagNames, false, null, - null, null, null, user.getFullName(), null, null, null, null, 0, 0, - null, false); - } - - /** - * Updates the user's creation date. - * - * @param userId the primary key of the user - * @param createDate the new creation date - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateCreateDate(long userId, Date createDate) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - user.setCreateDate(createDate); - - userPersistence.update(user); - - return user; - } - - /** - * Updates the user's email address. - * - * @param userId the primary key of the user - * @param password the user's password - * @param emailAddress1 the user's new email address - * @param emailAddress2 the user's new email address confirmation - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateEmailAddress( - long userId, String password, String emailAddress1, - String emailAddress2) - throws PortalException, SystemException { - - emailAddress1 = StringUtil.toLowerCase(emailAddress1.trim()); - emailAddress2 = StringUtil.toLowerCase(emailAddress2.trim()); - - User user = userPersistence.findByPrimaryKey(userId); - - validateEmailAddress(user, emailAddress1, emailAddress2); - - setEmailAddress( - user, password, user.getFirstName(), user.getMiddleName(), - user.getLastName(), emailAddress1); - - userPersistence.update(user); - - Contact contact = user.getContact(); - - contact.setEmailAddress(user.getEmailAddress()); - - contactPersistence.update(contact); - - return user; - } - - /** - * Updates the user's email address or sends verification email. - * - * @param userId the primary key of the user - * @param password the user's password - * @param emailAddress1 the user's new email address - * @param emailAddress2 the user's new email address confirmation - * @param serviceContext the service context to be applied. Must set the - * portal URL, main path, primary key of the layout, remote address, - * remote host, and agent for the user. - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateEmailAddress( - long userId, String password, String emailAddress1, - String emailAddress2, ServiceContext serviceContext) - throws PortalException, SystemException { - - emailAddress1 = StringUtil.toLowerCase(emailAddress1.trim()); - emailAddress2 = StringUtil.toLowerCase(emailAddress2.trim()); - - User user = userPersistence.findByPrimaryKey(userId); - - validateEmailAddress(user, emailAddress1, emailAddress2); - - Company company = companyPersistence.findByPrimaryKey( - user.getCompanyId()); - - if (!company.isStrangersVerify()) { - setEmailAddress( - user, password, user.getFirstName(), user.getMiddleName(), - user.getLastName(), emailAddress1); - - userPersistence.update(user); - - Contact contact = user.getContact(); - - contact.setEmailAddress(user.getEmailAddress()); - - contactPersistence.update(contact); - } - else { - sendEmailAddressVerification(user, emailAddress1, serviceContext); - } - - return user; - } - - /** - * Updates whether the user has verified email address. - * - * @param userId the primary key of the user - * @param emailAddressVerified whether the user has verified email address - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateEmailAddressVerified( - long userId, boolean emailAddressVerified) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - user.setEmailAddressVerified(emailAddressVerified); - - userPersistence.update(user); - - return user; - } - - /** - * Updates the user's Facebook ID. - * - * @param userId the primary key of the user - * @param facebookId the user's new Facebook ID - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateFacebookId(long userId, long facebookId) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - user.setFacebookId(facebookId); - - userPersistence.update(user); - - return user; - } - - /** - * Sets the groups the user is in, removing and adding groups as necessary. - * - * @param userId the primary key of the user - * @param newGroupIds the primary keys of the groups - * @param serviceContext the service context to be applied (optionally - * null) - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public void updateGroups( - long userId, long[] newGroupIds, ServiceContext serviceContext) - throws PortalException, SystemException { - - updateGroups( - userId, newGroupIds, serviceContext, - serviceContext.isIndexingEnabled()); - } - - /** - * Updates a user account that was automatically created when a guest user - * participated in an action (e.g. posting a comment) and only provided his - * name and email address. - * - * @param creatorUserId the primary key of the creator - * @param companyId the primary key of the user's company - * @param autoPassword whether a password should be automatically generated - * for the user - * @param password1 the user's password - * @param password2 the user's password confirmation - * @param autoScreenName whether a screen name should be automatically - * generated for the user - * @param screenName the user's screen name - * @param emailAddress the user's email address - * @param facebookId the user's facebook ID - * @param openId the user's OpenID - * @param locale the user's locale - * @param firstName the user's first name - * @param middleName the user's middle name - * @param lastName the user's last name - * @param prefixId the user's name prefix ID - * @param suffixId the user's name suffix ID - * @param male whether the user is male - * @param birthdayMonth the user's birthday month (0-based, meaning 0 for - * January) - * @param birthdayDay the user's birthday day - * @param birthdayYear the user's birthday year - * @param jobTitle the user's job title - * @param updateUserInformation whether to update the user's information - * @param sendEmail whether to send the user an email notification about - * their new account - * @param serviceContext the service context to be applied (optionally - * null). Can set expando bridge attributes for the - * user. - * @return the user - * @throws PortalException if the user's information was invalid - * @throws SystemException if a system exception occurred - */ - @Override - public User updateIncompleteUser( - long creatorUserId, long companyId, boolean autoPassword, - String password1, String password2, boolean autoScreenName, - String screenName, String emailAddress, long facebookId, - String openId, Locale locale, String firstName, String middleName, - String lastName, int prefixId, int suffixId, boolean male, - int birthdayMonth, int birthdayDay, int birthdayYear, - String jobTitle, boolean updateUserInformation, boolean sendEmail, - ServiceContext serviceContext) - throws PortalException, SystemException { - - User user = getUserByEmailAddress(companyId, emailAddress); - - if (user.getStatus() != WorkflowConstants.STATUS_INCOMPLETE) { - throw new PortalException("Invalid user status"); - } - - User defaultUser = getDefaultUser(companyId); - - if (facebookId > 0) { - autoPassword = false; - - if ((password1 == null) || (password2 == null)) { - password1 = PwdGenerator.getPassword(); - password2 = password1; - } - - sendEmail = false; - } - - if (updateUserInformation) { - autoScreenName = false; - - if (PrefsPropsUtil.getBoolean( - companyId, - PropsKeys.USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE)) { - - autoScreenName = true; - } - - validate( - companyId, user.getUserId(), autoPassword, password1, password2, - autoScreenName, screenName, emailAddress, openId, firstName, - middleName, lastName, null); - - if (!autoPassword) { - if (Validator.isNull(password1) || - Validator.isNull(password2)) { - throw new UserPasswordException( - UserPasswordException.PASSWORD_INVALID); - } - } - - if (autoScreenName) { - ScreenNameGenerator screenNameGenerator = - ScreenNameGeneratorFactory.getInstance(); - - try { - screenName = screenNameGenerator.generate( - companyId, user.getUserId(), emailAddress); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - FullNameGenerator fullNameGenerator = - FullNameGeneratorFactory.getInstance(); - - String fullName = fullNameGenerator.getFullName( - firstName, middleName, lastName); - - String greeting = LanguageUtil.format( - locale, "welcome-x", " " + fullName, false); - - if (Validator.isNotNull(password1)) { - user.setPassword(PasswordEncryptorUtil.encrypt(password1)); - user.setPasswordUnencrypted(password1); - } - - user.setPasswordEncrypted(true); - - PasswordPolicy passwordPolicy = defaultUser.getPasswordPolicy(); - - if ((passwordPolicy != null) && passwordPolicy.isChangeable() && - passwordPolicy.isChangeRequired()) { - - user.setPasswordReset(true); - } - else { - user.setPasswordReset(false); - } - - user.setScreenName(screenName); - user.setFacebookId(facebookId); - user.setOpenId(openId); - user.setLanguageId(locale.toString()); - user.setTimeZoneId(defaultUser.getTimeZoneId()); - user.setGreeting(greeting); - user.setFirstName(firstName); - user.setMiddleName(middleName); - user.setLastName(lastName); - user.setJobTitle(jobTitle); - user.setExpandoBridgeAttributes(serviceContext); - - Date birthday = getBirthday( - birthdayMonth, birthdayDay, birthdayYear); - - Contact contact = user.getContact(); - - contact.setFirstName(firstName); - contact.setMiddleName(middleName); - contact.setLastName(lastName); - contact.setPrefixId(prefixId); - contact.setSuffixId(suffixId); - contact.setMale(male); - contact.setBirthday(birthday); - contact.setJobTitle(jobTitle); - - contactPersistence.update(contact, serviceContext); - - // Indexer - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer( - User.class); - - indexer.reindex(user); - } - - user.setStatus(WorkflowConstants.STATUS_DRAFT); - - userPersistence.update(user, serviceContext); - - // Workflow - - long workflowUserId = creatorUserId; - - if (workflowUserId == user.getUserId()) { - workflowUserId = defaultUser.getUserId(); - } - - ServiceContext workflowServiceContext = serviceContext; - - if (workflowServiceContext == null) { - workflowServiceContext = new ServiceContext(); - } - - workflowServiceContext.setAttribute("autoPassword", autoPassword); - workflowServiceContext.setAttribute("passwordUnencrypted", password1); - workflowServiceContext.setAttribute("sendEmail", sendEmail); - - WorkflowHandlerRegistryUtil.startWorkflowInstance( - companyId, workflowUserId, User.class.getName(), user.getUserId(), - user, workflowServiceContext); - - return getUserByEmailAddress(companyId, emailAddress); - } - - /** - * Updates the user's job title. - * - * @param userId the primary key of the user - * @param jobTitle the user's job title - * @return the user - * @throws PortalException if a user with the primary key could not be found - * or if a contact could not be found matching the user's contact ID - * @throws SystemException if a system exception occurred - */ - @Override - public User updateJobTitle(long userId, String jobTitle) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - user.setJobTitle(jobTitle); - - userPersistence.update(user); - - Contact contact = contactPersistence.findByPrimaryKey( - user.getContactId()); - - contact.setJobTitle(jobTitle); - - contactPersistence.update(contact); - - return user; - } - - /** - * Updates the user's last login with the current time and the IP address. - * - * @param userId the primary key of the user - * @param loginIP the IP address the user logged in from - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateLastLogin(long userId, String loginIP) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - Date lastLoginDate = user.getLoginDate(); - - if (lastLoginDate == null) { - lastLoginDate = new Date(); - } - - user.setLoginDate(new Date()); - user.setLoginIP(loginIP); - user.setLastLoginDate(lastLoginDate); - user.setLastLoginIP(user.getLoginIP()); - user.setFailedLoginAttempts(0); - - userPersistence.update(user); - - return user; - } - - /** - * Updates whether the user is locked out from logging in. - * - * @param user the user - * @param lockout whether the user is locked out - * @return the user - * @throws PortalException if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - @Override - public User updateLockout(User user, boolean lockout) - throws PortalException, SystemException { - - PasswordPolicy passwordPolicy = user.getPasswordPolicy(); - - if ((passwordPolicy == null) || !passwordPolicy.isLockout()) { - return user; - } - - Date lockoutDate = null; - - if (lockout) { - lockoutDate = new Date(); - } - - user.setLockout(lockout); - user.setLockoutDate(lockoutDate); - - if (!lockout) { - user.setLastFailedLoginDate(lockoutDate); - user.setFailedLoginAttempts(0); - } - - userPersistence.update(user); - - return user; - } - - /** - * Updates whether the user is locked out from logging in. - * - * @param companyId the primary key of the user's company - * @param emailAddress the user's email address - * @param lockout whether the user is locked out - * @return the user - * @throws PortalException if a user with the email address could not be - * found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateLockoutByEmailAddress( - long companyId, String emailAddress, boolean lockout) - throws PortalException, SystemException { - - User user = getUserByEmailAddress(companyId, emailAddress); - - return updateLockout(user, lockout); - } - - /** - * Updates whether the user is locked out from logging in. - * - * @param userId the primary key of the user - * @param lockout whether the user is locked out - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateLockoutById(long userId, boolean lockout) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - return updateLockout(user, lockout); - } - - /** - * Updates whether the user is locked out from logging in. - * - * @param companyId the primary key of the user's company - * @param screenName the user's screen name - * @param lockout whether the user is locked out - * @return the user - * @throws PortalException if a user with the screen name could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateLockoutByScreenName( - long companyId, String screenName, boolean lockout) - throws PortalException, SystemException { - - User user = getUserByScreenName(companyId, screenName); - - return updateLockout(user, lockout); - } - - /** - * Updates the user's modified date. - * - * @param userId the primary key of the user - * @param modifiedDate the new modified date - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateModifiedDate(long userId, Date modifiedDate) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - user.setModifiedDate(modifiedDate); - - userPersistence.update(user); - - return user; - } - - /** - * Updates the user's OpenID. - * - * @param userId the primary key of the user - * @param openId the new OpenID - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateOpenId(long userId, String openId) - throws PortalException, SystemException { - - openId = openId.trim(); - - User user = userPersistence.findByPrimaryKey(userId); - - user.setOpenId(openId); - - userPersistence.update(user); - - return user; - } - - /** - * Sets the organizations that the user is in, removing and adding - * organizations as necessary. - * - * @param userId the primary key of the user - * @param newOrganizationIds the primary keys of the organizations - * @param serviceContext the service context to be applied. Must set - * whether user indexing is enabled. - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public void updateOrganizations( - long userId, long[] newOrganizationIds, - ServiceContext serviceContext) - throws PortalException, SystemException { - - updateOrganizations( - userId, newOrganizationIds, serviceContext.isIndexingEnabled()); - } - - /** - * Updates the user's password without tracking or validation of the change. - * - * @param userId the primary key of the user - * @param password1 the user's new password - * @param password2 the user's new password confirmation - * @param passwordReset whether the user should be asked to reset their - * password the next time they log in - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updatePassword( - long userId, String password1, String password2, - boolean passwordReset) - throws PortalException, SystemException { - - return updatePassword( - userId, password1, password2, passwordReset, false); - } - - /** - * Updates the user's password, optionally with tracking and validation of - * the change. - * - * @param userId the primary key of the user - * @param password1 the user's new password - * @param password2 the user's new password confirmation - * @param passwordReset whether the user should be asked to reset their - * password the next time they login - * @param silentUpdate whether the password should be updated without being - * tracked, or validated. Primarily used for password imports. - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updatePassword( - long userId, String password1, String password2, - boolean passwordReset, boolean silentUpdate) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - if (!silentUpdate) { - validatePassword(user.getCompanyId(), userId, password1, password2); - } - - String oldEncPwd = user.getPassword(); - - if (!user.isPasswordEncrypted()) { - oldEncPwd = PasswordEncryptorUtil.encrypt(user.getPassword()); - } - - String newEncPwd = PasswordEncryptorUtil.encrypt(password1); - - if (user.hasCompanyMx()) { - mailService.updatePassword(user.getCompanyId(), userId, password1); - } - - user.setPassword(newEncPwd); - user.setPasswordUnencrypted(password1); - user.setPasswordEncrypted(true); - user.setPasswordReset(passwordReset); - user.setPasswordModifiedDate(new Date()); - user.setDigest(StringPool.BLANK); - user.setGraceLoginCount(0); - - if (!silentUpdate) { - user.setPasswordModified(true); - } - - try { - userPersistence.update(user); - } - catch (ModelListenerException mle) { - String msg = GetterUtil.getString(mle.getCause().getMessage()); - - if (LDAPSettingsUtil.isPasswordPolicyEnabled(user.getCompanyId())) { - String passwordHistory = PrefsPropsUtil.getString( - user.getCompanyId(), PropsKeys.LDAP_ERROR_PASSWORD_HISTORY); - - if (msg.contains(passwordHistory)) { - throw new UserPasswordException( - UserPasswordException.PASSWORD_ALREADY_USED); - } - } - - throw new UserPasswordException( - UserPasswordException.PASSWORD_INVALID); - } - - if (!silentUpdate) { - user.setPasswordModified(false); - - passwordTrackerLocalService.trackPassword(userId, oldEncPwd); - } - - return user; - } - - /** - * Updates the user's password with manually input information. This method - * should only be used when performing maintenance. - * - * @param userId the primary key of the user - * @param password the user's new password - * @param passwordEncrypted the user's new encrypted password - * @param passwordReset whether the user should be asked to reset their - * password the next time they login - * @param passwordModifiedDate the new password modified date - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updatePasswordManually( - long userId, String password, boolean passwordEncrypted, - boolean passwordReset, Date passwordModifiedDate) - throws PortalException, SystemException { - - // This method should only be used to manually massage data - - User user = userPersistence.findByPrimaryKey(userId); - - user.setPassword(password); - user.setPasswordEncrypted(passwordEncrypted); - user.setPasswordReset(passwordReset); - user.setPasswordModifiedDate(passwordModifiedDate); - user.setDigest(StringPool.BLANK); - - userPersistence.update(user); - - return user; - } - - /** - * Updates whether the user should be asked to reset their password the next - * time they login. - * - * @param userId the primary key of the user - * @param passwordReset whether the user should be asked to reset their - * password the next time they login - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updatePasswordReset(long userId, boolean passwordReset) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - user.setPasswordReset(passwordReset); - - userPersistence.update(user); - - return user; - } - - /** - * Updates the user's portrait image. - * - * @param userId the primary key of the user - * @param bytes the new portrait image data - * @return the user - * @throws PortalException if a user with the primary key could not be found - * or if the new portrait was invalid - * @throws SystemException if a system exception occurred - */ - @Override - public User updatePortrait(long userId, byte[] bytes) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - long imageMaxSize = PrefsPropsUtil.getLong( - PropsKeys.USERS_IMAGE_MAX_SIZE); - - if ((imageMaxSize > 0) && - ((bytes == null) || (bytes.length > imageMaxSize))) { - - throw new UserPortraitSizeException(); - } - - long portraitId = user.getPortraitId(); - - if (portraitId <= 0) { - portraitId = counterLocalService.increment(); - - user.setPortraitId(portraitId); - } - - try { - ImageBag imageBag = ImageToolUtil.read(bytes); - - RenderedImage renderedImage = imageBag.getRenderedImage(); - - if (renderedImage == null) { - throw new UserPortraitTypeException(); - } - - renderedImage = ImageToolUtil.scale( - renderedImage, PropsValues.USERS_IMAGE_MAX_HEIGHT, - PropsValues.USERS_IMAGE_MAX_WIDTH); - - String contentType = imageBag.getType(); - - imageLocalService.updateImage( - portraitId, - ImageToolUtil.getBytes(renderedImage, contentType)); - } - catch (IOException ioe) { - throw new ImageSizeException(ioe); - } - - userPersistence.update(user); - - return user; - } - - /** - * Updates the user's password reset question and answer. - * - * @param userId the primary key of the user - * @param question the user's new password reset question - * @param answer the user's new password reset answer - * @return the user - * @throws PortalException if a user with the primary key could not be found - * or if the new question or answer were invalid - * @throws SystemException if a system exception occurred - */ - @Override - public User updateReminderQuery(long userId, String question, String answer) - throws PortalException, SystemException { - - validateReminderQuery(question, answer); - - User user = userPersistence.findByPrimaryKey(userId); - - user.setReminderQueryQuestion(question); - user.setReminderQueryAnswer(answer); - - userPersistence.update(user); - - return user; - } - - /** - * Updates the user's screen name. - * - * @param userId the primary key of the user - * @param screenName the user's new screen name - * @return the user - * @throws PortalException if a user with the primary key could not be found - * or if the new screen name was invalid - * @throws SystemException if a system exception occurred - */ - @Override - public User updateScreenName(long userId, String screenName) - throws PortalException, SystemException { - - // User - - User user = userPersistence.findByPrimaryKey(userId); - - screenName = getLogin(screenName); - - validateScreenName(user.getCompanyId(), userId, screenName); - - if (!StringUtil.equalsIgnoreCase(user.getScreenName(), screenName)) { - user.setDigest(StringPool.BLANK); - } - - user.setScreenName(screenName); - - userPersistence.update(user); - - // Group - - Group group = groupLocalService.getUserGroup( - user.getCompanyId(), userId); - - group.setFriendlyURL(StringPool.SLASH + screenName); - - groupPersistence.update(group); - - return user; - } - - /** - * Updates the user's workflow status. - * - * @param userId the primary key of the user - * @param status the user's new workflow status - * @return the user - * @throws PortalException if a user with the primary key could not be - * found - * @throws SystemException if a system exception occurred - * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, int, - * ServiceContext)} - */ - @Deprecated - @Override - public User updateStatus(long userId, int status) - throws PortalException, SystemException { - - return updateStatus(userId, status, new ServiceContext()); - } - - /** - * Updates the user's workflow status. - * - * @param userId the primary key of the user - * @param status the user's new workflow status - * @param serviceContext the service context to be applied. You can specify - * an unencrypted custom password (used by an LDAP listener) for the - * user via attribute passwordUnencrypted. - * @return the user - * @throws PortalException if a user with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public User updateStatus( - long userId, int status, ServiceContext serviceContext) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - if ((status == WorkflowConstants.STATUS_APPROVED) && - (user.getStatus() != WorkflowConstants.STATUS_APPROVED)) { - - validateCompanyMaxUsers(user.getCompanyId()); - } - - String passwordUnencrypted = (String)serviceContext.getAttribute( - "passwordUnencrypted"); - - if (Validator.isNotNull(passwordUnencrypted)) { - user.setPasswordUnencrypted(passwordUnencrypted); - } - - user.setStatus(status); - - userPersistence.update(user); - - reindex(user); - - return user; - } - - /** - * Updates the user. - * - * @param userId the primary key of the user - * @param oldPassword the user's old password - * @param newPassword1 the user's new password (optionally - * null) - * @param newPassword2 the user's new password confirmation (optionally - * null) - * @param passwordReset whether the user should be asked to reset their - * password the next time they login - * @param reminderQueryQuestion the user's new password reset question - * @param reminderQueryAnswer the user's new password reset answer - * @param screenName the user's new screen name - * @param emailAddress the user's new email address - * @param facebookId the user's new Facebook ID - * @param openId the user's new OpenID - * @param languageId the user's new language ID - * @param timeZoneId the user's new time zone ID - * @param greeting the user's new greeting - * @param comments the user's new comments - * @param firstName the user's new first name - * @param middleName the user's new middle name - * @param lastName the user's new last name - * @param prefixId the user's new name prefix ID - * @param suffixId the user's new name suffix ID - * @param male whether user is male - * @param birthdayMonth the user's new birthday month (0-based, meaning 0 - * for January) - * @param birthdayDay the user's new birthday day - * @param birthdayYear the user's birthday year - * @param smsSn the user's new SMS screen name - * @param aimSn the user's new AIM screen name - * @param facebookSn the user's new Facebook screen name - * @param icqSn the user's new ICQ screen name - * @param jabberSn the user's new Jabber screen name - * @param msnSn the user's new MSN screen name - * @param mySpaceSn the user's new MySpace screen name - * @param skypeSn the user's new Skype screen name - * @param twitterSn the user's new Twitter screen name - * @param ymSn the user's new Yahoo! Messenger screen name - * @param jobTitle the user's new job title - * @param groupIds the primary keys of the user's groups - * @param organizationIds the primary keys of the user's organizations - * @param roleIds the primary keys of the user's roles - * @param userGroupRoles the user user's group roles - * @param userGroupIds the primary keys of the user's user groups - * @param serviceContext the service context to be applied (optionally - * null). Can set the UUID (with the uuid - * attribute), asset category IDs, asset tag names, and expando - * bridge attributes for the user. - * @return the user - * @throws PortalException if a user with the primary key could not be found - * or if the new information was invalid - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("deprecation") - public User updateUser( - long userId, String oldPassword, String newPassword1, - String newPassword2, boolean passwordReset, - String reminderQueryQuestion, String reminderQueryAnswer, - String screenName, String emailAddress, long facebookId, - String openId, String languageId, String timeZoneId, - String greeting, String comments, String firstName, - String middleName, String lastName, int prefixId, int suffixId, - boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, - String smsSn, String aimSn, String facebookSn, String icqSn, - String jabberSn, String msnSn, String mySpaceSn, String skypeSn, - String twitterSn, String ymSn, String jobTitle, long[] groupIds, - long[] organizationIds, long[] roleIds, - List userGroupRoles, long[] userGroupIds, - ServiceContext serviceContext) - throws PortalException, SystemException { - - // User - - User user = userPersistence.findByPrimaryKey(userId); - Company company = companyPersistence.findByPrimaryKey( - user.getCompanyId()); - String password = oldPassword; - screenName = getLogin(screenName); - emailAddress = StringUtil.toLowerCase(emailAddress.trim()); - openId = openId.trim(); - String oldFullName = user.getFullName(); - aimSn = StringUtil.toLowerCase(aimSn.trim()); - facebookSn = StringUtil.toLowerCase(facebookSn.trim()); - icqSn = StringUtil.toLowerCase(icqSn.trim()); - jabberSn = StringUtil.toLowerCase(jabberSn.trim()); - msnSn = StringUtil.toLowerCase(msnSn.trim()); - mySpaceSn = StringUtil.toLowerCase(mySpaceSn.trim()); - skypeSn = StringUtil.toLowerCase(skypeSn.trim()); - twitterSn = StringUtil.toLowerCase(twitterSn.trim()); - ymSn = StringUtil.toLowerCase(ymSn.trim()); - Date now = new Date(); - - EmailAddressGenerator emailAddressGenerator = - EmailAddressGeneratorFactory.getInstance(); - - if (emailAddressGenerator.isGenerated(emailAddress)) { - emailAddress = StringPool.BLANK; - } - - if (!PropsValues.USERS_EMAIL_ADDRESS_REQUIRED && - Validator.isNull(emailAddress)) { - - emailAddress = emailAddressGenerator.generate( - user.getCompanyId(), userId); - } - - validate( - userId, screenName, emailAddress, openId, firstName, middleName, - lastName, smsSn); - - if (Validator.isNotNull(newPassword1) || - Validator.isNotNull(newPassword2)) { - - user = updatePassword( - userId, newPassword1, newPassword2, passwordReset); - - password = newPassword1; - - user.setDigest(StringPool.BLANK); - } - - user.setModifiedDate(now); - - if (user.getContactId() <= 0) { - user.setContactId(counterLocalService.increment()); - } - - user.setPasswordReset(passwordReset); - - if (Validator.isNotNull(reminderQueryQuestion) && - Validator.isNotNull(reminderQueryAnswer)) { - - user.setReminderQueryQuestion(reminderQueryQuestion); - user.setReminderQueryAnswer(reminderQueryAnswer); - } - - if (!StringUtil.equalsIgnoreCase(user.getScreenName(), screenName)) { - user.setScreenName(screenName); - - user.setDigest(StringPool.BLANK); - } - - boolean sendEmailAddressVerification = false; - - if (!company.isStrangersVerify()) { - setEmailAddress( - user, password, firstName, middleName, lastName, emailAddress); - } - else { - sendEmailAddressVerification = true; - } - - if (serviceContext != null) { - String uuid = serviceContext.getUuid(); - - if (Validator.isNotNull(uuid)) { - user.setUuid(uuid); - } - } - - user.setFacebookId(facebookId); - - Long ldapServerId = (Long)serviceContext.getAttribute("ldapServerId"); - - if (ldapServerId != null) { - user.setLdapServerId(ldapServerId); - } - - user.setOpenId(openId); - user.setLanguageId(languageId); - user.setTimeZoneId(timeZoneId); - user.setGreeting(greeting); - user.setComments(comments); - user.setFirstName(firstName); - user.setMiddleName(middleName); - user.setLastName(lastName); - user.setJobTitle(jobTitle); - user.setExpandoBridgeAttributes(serviceContext); - - userPersistence.update(user, serviceContext); - - // Contact - - Date birthday = getBirthday(birthdayMonth, birthdayDay, birthdayYear); - - long contactId = user.getContactId(); - - Contact contact = contactPersistence.fetchByPrimaryKey(contactId); - - if (contact == null) { - contact = contactPersistence.create(contactId); - - contact.setCompanyId(user.getCompanyId()); - contact.setUserName(StringPool.BLANK); - contact.setCreateDate(now); - contact.setClassName(User.class.getName()); - contact.setClassPK(user.getUserId()); - contact.setAccountId(company.getAccountId()); - contact.setParentContactId( - ContactConstants.DEFAULT_PARENT_CONTACT_ID); - } - - contact.setModifiedDate(now); - contact.setEmailAddress(user.getEmailAddress()); - contact.setFirstName(firstName); - contact.setMiddleName(middleName); - contact.setLastName(lastName); - contact.setPrefixId(prefixId); - contact.setSuffixId(suffixId); - contact.setMale(male); - contact.setBirthday(birthday); - contact.setSmsSn(smsSn); - contact.setAimSn(aimSn); - contact.setFacebookSn(facebookSn); - contact.setIcqSn(icqSn); - contact.setJabberSn(jabberSn); - contact.setMsnSn(msnSn); - contact.setMySpaceSn(mySpaceSn); - contact.setSkypeSn(skypeSn); - contact.setTwitterSn(twitterSn); - contact.setYmSn(ymSn); - contact.setJobTitle(jobTitle); - - contactPersistence.update(contact, serviceContext); - - // Group - - Group group = groupLocalService.getUserGroup( - user.getCompanyId(), userId); - - group.setFriendlyURL(StringPool.SLASH + screenName); - - groupPersistence.update(group); - - // Groups and organizations - - // See LPS-33205. Cache the user's list of user group roles because - // adding or removing groups may add or remove user group roles - // depending on the site default user associations. - - List previousUserGroupRoles = - userGroupRolePersistence.findByUserId(userId); - - updateGroups(userId, groupIds, serviceContext, false); - updateOrganizations(userId, organizationIds, false); - - // Roles - - if (roleIds != null) { - roleIds = UsersAdminUtil.addRequiredRoles(user, roleIds); - - userPersistence.setRoles(userId, roleIds); - } - - // User group roles - - updateUserGroupRoles( - user, groupIds, organizationIds, userGroupRoles, - previousUserGroupRoles); - - // User groups - - if (userGroupIds != null) { - if (PropsValues.USER_GROUPS_COPY_LAYOUTS_TO_USER_PERSONAL_SITE) { - userGroupLocalService.copyUserGroupLayouts( - userGroupIds, userId); - } - - userPersistence.setUserGroups(userId, userGroupIds); - } - - // Announcements - - announcementsDeliveryLocalService.getUserDeliveries(user.getUserId()); - - // Asset - - if (serviceContext != null) { - updateAsset( - userId, user, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames()); - } - - // Message boards - - if (GetterUtil.getBoolean( - PropsKeys.USERS_UPDATE_USER_NAME + MBMessage.class.getName()) && - !oldFullName.equals(user.getFullName())) { - - mbMessageLocalService.updateUserName(userId, user.getFullName()); - } - - // Indexer - - if ((serviceContext == null) || serviceContext.isIndexingEnabled()) { - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer( - User.class); - - indexer.reindex(user); - } - - // Email address verification - - if ((serviceContext != null) && sendEmailAddressVerification) { - sendEmailAddressVerification(user, emailAddress, serviceContext); - } - - // Permission cache - - PermissionCacheUtil.clearCache(); - - return user; - } - - /** - * Verifies the email address of the ticket. - * - * @param ticketKey the ticket key - * @throws PortalException if a ticket matching the ticket key could not be - * found, if the ticket has expired, if the ticket is an email - * address ticket, or if the email address is invalid - * @throws SystemException if a system exception occurred - */ - @Override - public void verifyEmailAddress(String ticketKey) - throws PortalException, SystemException { - - Ticket ticket = ticketLocalService.getTicket(ticketKey); - - if (ticket.isExpired() || - (ticket.getType() != TicketConstants.TYPE_EMAIL_ADDRESS)) { - - throw new NoSuchTicketException("{ticketKey=" + ticketKey + "}"); - } - - User user = userPersistence.findByPrimaryKey(ticket.getClassPK()); - - String emailAddress = ticket.getExtraInfo(); - - emailAddress = StringUtil.toLowerCase(emailAddress).trim(); - - if (!emailAddress.equals(user.getEmailAddress())) { - if (userPersistence.fetchByC_EA( - user.getCompanyId(), emailAddress) != null) { - - throw new DuplicateUserEmailAddressException( - "{userId=" + user.getUserId() + "}"); - } - - setEmailAddress( - user, StringPool.BLANK, user.getFirstName(), - user.getMiddleName(), user.getLastName(), emailAddress); - - Contact contact = user.getContact(); - - contact.setEmailAddress(user.getEmailAddress()); - - contactPersistence.update(contact); - } - - user.setEmailAddressVerified(true); - - userPersistence.update(user); - - ticketLocalService.deleteTicket(ticket); - } - - protected void addDefaultRolesAndTeams(long groupId, long[] userIds) - throws PortalException, SystemException { - - List defaultSiteRoles = new ArrayList(); - - Group group = groupLocalService.getGroup(groupId); - - UnicodeProperties typeSettingsProperties = - group.getTypeSettingsProperties(); - - long[] defaultSiteRoleIds = StringUtil.split( - typeSettingsProperties.getProperty("defaultSiteRoleIds"), 0L); - - for (long defaultSiteRoleId : defaultSiteRoleIds) { - Role defaultSiteRole = rolePersistence.fetchByPrimaryKey( - defaultSiteRoleId); - - if (defaultSiteRole == null) { - if (_log.isWarnEnabled()) { - _log.warn("Unable to find role " + defaultSiteRoleId); - } - - continue; - } - - defaultSiteRoles.add(defaultSiteRole); - } - - List defaultTeams = new ArrayList(); - - long[] defaultTeamIds = StringUtil.split( - typeSettingsProperties.getProperty("defaultTeamIds"), 0L); - - for (long defaultTeamId : defaultTeamIds) { - Team defaultTeam = teamPersistence.findByPrimaryKey(defaultTeamId); - - if (defaultTeam == null) { - if (_log.isWarnEnabled()) { - _log.warn("Unable to find team " + defaultTeamId); - } - - continue; - } - - defaultTeams.add(defaultTeam); - } - - for (long userId : userIds) { - Set userRoleIdsSet = new HashSet(); - - for (Role role : defaultSiteRoles) { - if (!userPersistence.containsRole(userId, role.getRoleId())) { - userRoleIdsSet.add(role.getRoleId()); - } - } - - long[] userRoleIds = ArrayUtil.toArray( - userRoleIdsSet.toArray(new Long[userRoleIdsSet.size()])); - - userGroupRoleLocalService.addUserGroupRoles( - userId, groupId, userRoleIds); - - Set userTeamIdsSet = new HashSet(); - - for (Team team : defaultTeams) { - if (!userPersistence.containsTeam(userId, team.getTeamId())) { - userTeamIdsSet.add(team.getTeamId()); - } - } - - long[] userTeamIds = ArrayUtil.toArray( - userTeamIdsSet.toArray(new Long[userTeamIdsSet.size()])); - - userPersistence.addTeams(userId, userTeamIds); - } - } - - /** - * Attempts to authenticate the user by their login and password, while - * using the AuthPipeline. - * - *

    - * Authentication type specifies what login contains.The valid - * values are: - *

    - * - *
      - *
    • - * CompanyConstants.AUTH_TYPE_EA - login is the - * user's email address - *
    • - *
    • - * CompanyConstants.AUTH_TYPE_SN - login is the - * user's screen name - *
    • - *
    • - * CompanyConstants.AUTH_TYPE_ID - login is the - * user's primary key - *
    • - *
    - * - * @param companyId the primary key of the user's company - * @param login either the user's email address, screen name, or primary - * key depending on the value of authType - * @param password the user's password - * @param authType the type of authentication to perform - * @param headerMap the header map from the authentication request - * @param parameterMap the parameter map from the authentication request - * @param resultsMap the map of authentication results (may be nil). After - * a succesful authentication the user's primary key will be placed - * under the key userId. - * @return the authentication status. This can be {@link - * com.liferay.portal.security.auth.Authenticator#FAILURE} - * indicating that the user's credentials are invalid, {@link - * com.liferay.portal.security.auth.Authenticator#SUCCESS} - * indicating a successful login, or {@link - * com.liferay.portal.security.auth.Authenticator#DNE} indicating - * that a user with that login does not exist. - * @throws PortalException if login or password - * was null - * @throws SystemException if a system exception occurred - * @see com.liferay.portal.security.auth.AuthPipeline - */ - protected int authenticate( - long companyId, String login, String password, String authType, - Map headerMap, Map parameterMap, - Map resultsMap) - throws PortalException, SystemException { - - if (PropsValues.AUTH_LOGIN_DISABLED) { - return Authenticator.FAILURE; - } - - login = StringUtil.toLowerCase(login.trim()); - - long userId = GetterUtil.getLong(login); - - // User input validation - - if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) { - if (Validator.isNull(login)) { - throw new UserEmailAddressException(); - } - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) { - if (Validator.isNull(login)) { - throw new UserScreenNameException(); - } - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) { - if (Validator.isNull(login)) { - throw new UserIdException(); - } - } - - if (Validator.isNull(password)) { - throw new UserPasswordException( - UserPasswordException.PASSWORD_INVALID); - } - - int authResult = Authenticator.FAILURE; - - // Pre-authentication pipeline - - if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) { - authResult = AuthPipeline.authenticateByEmailAddress( - PropsKeys.AUTH_PIPELINE_PRE, companyId, login, password, - headerMap, parameterMap); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) { - authResult = AuthPipeline.authenticateByScreenName( - PropsKeys.AUTH_PIPELINE_PRE, companyId, login, password, - headerMap, parameterMap); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) { - authResult = AuthPipeline.authenticateByUserId( - PropsKeys.AUTH_PIPELINE_PRE, companyId, userId, password, - headerMap, parameterMap); - } - - // Get user - - User user = null; - - if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) { - user = fetchUserByEmailAddress(companyId, login); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) { - user = fetchUserByScreenName(companyId, login); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) { - user = userPersistence.fetchByPrimaryKey(GetterUtil.getLong(login)); - } - - if (user == null) { - return Authenticator.DNE; - } - - if (user.isDefaultUser()) { - if (_log.isInfoEnabled()) { - _log.info("Authentication is disabled for the default user"); - } - - return Authenticator.DNE; - } - else if (!user.isActive()) { - if (_log.isInfoEnabled()) { - _log.info( - "Authentication is disabled for inactive user " + - user.getUserId()); - } - - return Authenticator.FAILURE; - } - - if (!user.isPasswordEncrypted()) { - user.setPassword(PasswordEncryptorUtil.encrypt(user.getPassword())); - user.setPasswordEncrypted(true); - - userPersistence.update(user); - } - - // Check password policy to see if the is account locked out or if the - // password is expired - - checkLockout(user); - - checkPasswordExpired(user); - - // Authenticate against the User_ table - - boolean skipLiferayCheck = false; - - if (authResult == Authenticator.SKIP_LIFERAY_CHECK) { - authResult = Authenticator.SUCCESS; - - skipLiferayCheck = true; - } - else if ((authResult == Authenticator.SUCCESS) && - PropsValues.AUTH_PIPELINE_ENABLE_LIFERAY_CHECK) { - - boolean authenticated = PwdAuthenticator.authenticate( - login, password, user.getPassword()); - - if (authenticated) { - authResult = Authenticator.SUCCESS; - } - else { - authResult = Authenticator.FAILURE; - } - } - - // Post-authentication pipeline - - if (authResult == Authenticator.SUCCESS) { - if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) { - authResult = AuthPipeline.authenticateByEmailAddress( - PropsKeys.AUTH_PIPELINE_POST, companyId, login, password, - headerMap, parameterMap); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) { - authResult = AuthPipeline.authenticateByScreenName( - PropsKeys.AUTH_PIPELINE_POST, companyId, login, password, - headerMap, parameterMap); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) { - authResult = AuthPipeline.authenticateByUserId( - PropsKeys.AUTH_PIPELINE_POST, companyId, userId, password, - headerMap, parameterMap); - } - } - - if (authResult == Authenticator.SUCCESS) { - if (resultsMap != null) { - resultsMap.put("userId", user.getUserId()); - } - - // Update digest - - if (skipLiferayCheck || - !PropsValues.AUTH_PIPELINE_ENABLE_LIFERAY_CHECK || - Validator.isNull(user.getDigest())) { - - String digest = user.getDigest(password); - - user.setDigest(digest); - - userPersistence.update(user); - } - } - - // Execute code triggered by authentication failure - - if (authResult == Authenticator.FAILURE) { - try { - if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) { - AuthPipeline.onFailureByEmailAddress( - PropsKeys.AUTH_FAILURE, companyId, login, headerMap, - parameterMap); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) { - AuthPipeline.onFailureByScreenName( - PropsKeys.AUTH_FAILURE, companyId, login, headerMap, - parameterMap); - } - else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) { - AuthPipeline.onFailureByUserId( - PropsKeys.AUTH_FAILURE, companyId, userId, headerMap, - parameterMap); - } - - user = userPersistence.fetchByPrimaryKey(user.getUserId()); - - if (user == null) { - return Authenticator.DNE; - } - - // Let LDAP handle max failure event - - if (!LDAPSettingsUtil.isPasswordPolicyEnabled( - user.getCompanyId())) { - - PasswordPolicy passwordPolicy = user.getPasswordPolicy(); - - user = userPersistence.fetchByPrimaryKey(user.getUserId()); - - int failedLoginAttempts = user.getFailedLoginAttempts(); - int maxFailures = passwordPolicy.getMaxFailure(); - - if ((failedLoginAttempts >= maxFailures) && - (maxFailures != 0)) { - - if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) { - AuthPipeline.onMaxFailuresByEmailAddress( - PropsKeys.AUTH_MAX_FAILURES, companyId, login, - headerMap, parameterMap); - } - else if (authType.equals( - CompanyConstants.AUTH_TYPE_SN)) { - - AuthPipeline.onMaxFailuresByScreenName( - PropsKeys.AUTH_MAX_FAILURES, companyId, login, - headerMap, parameterMap); - } - else if (authType.equals( - CompanyConstants.AUTH_TYPE_ID)) { - - AuthPipeline.onMaxFailuresByUserId( - PropsKeys.AUTH_MAX_FAILURES, companyId, userId, - headerMap, parameterMap); - } - } - } - } - catch (Exception e) { - _log.error(e, e); - } - } - - // PLACEHOLDER 02 - - return authResult; - } - - protected Date getBirthday( - int birthdayMonth, int birthdayDay, int birthdayYear) - throws PortalException { - - Date birthday = PortalUtil.getDate( - birthdayMonth, birthdayDay, birthdayYear, - ContactBirthdayException.class); - - Date now = new Date(); - - if (birthday.after(now)) { - throw new ContactBirthdayException(); - } - - return birthday; - } - - protected String getLogin(String login) { - return StringUtil.lowerCase(StringUtil.trim(login)); - } - - protected long[] getUserIds(List users) { - long[] userIds = new long[users.size()]; - - for (int i = 0; i < users.size(); i++) { - User user = users.get(i); - - userIds[i] = user.getUserId(); - } - - return userIds; - } - - protected void reindex(final User user) { - final Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer( - User.class); - - Callable callable = new ShardCallable( - user.getCompanyId()) { - - @Override - protected Void doCall() throws Exception { - indexer.reindex(user); - - return null; - } - - }; - - TransactionCommitCallbackRegistryUtil.registerCallback(callable); - } - - protected Hits search( - long companyId, String firstName, String middleName, - String lastName, String fullName, String screenName, - String emailAddress, String street, String city, String zip, - String region, String country, int status, - LinkedHashMap params, boolean andSearch, int start, - int end, Sort sort) - throws SystemException { - - try { - SearchContext searchContext = new SearchContext(); - - searchContext.setAndSearch(andSearch); - - Map attributes = - new HashMap(); - - attributes.put("city", city); - attributes.put("country", country); - attributes.put("emailAddress", emailAddress); - attributes.put("firstName", firstName); - attributes.put("fullName", fullName); - attributes.put("lastName", lastName); - attributes.put("middleName", middleName); - attributes.put("params", params); - attributes.put("region", region); - attributes.put("screenName", screenName); - attributes.put("street", street); - attributes.put("status", status); - attributes.put("zip", zip); - - searchContext.setAttributes(attributes); - - searchContext.setCompanyId(companyId); - searchContext.setEnd(end); - - if (params != null) { - String keywords = (String)params.remove("keywords"); - - if (Validator.isNotNull(keywords)) { - searchContext.setKeywords(keywords); - } - } - - QueryConfig queryConfig = new QueryConfig(); - - queryConfig.setHighlightEnabled(false); - queryConfig.setScoreEnabled(false); - - searchContext.setQueryConfig(queryConfig); - - if (sort != null) { - searchContext.setSorts(sort); - } - - searchContext.setStart(start); - - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer( - User.class); - - return indexer.search(searchContext); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - protected void sendEmail( - User user, String password, ServiceContext serviceContext) - throws SystemException { - - if (!PrefsPropsUtil.getBoolean( - user.getCompanyId(), - PropsKeys.ADMIN_EMAIL_USER_ADDED_ENABLED)) { - - return; - } - - String fromName = PrefsPropsUtil.getString( - user.getCompanyId(), PropsKeys.ADMIN_EMAIL_FROM_NAME); - String fromAddress = PrefsPropsUtil.getString( - user.getCompanyId(), PropsKeys.ADMIN_EMAIL_FROM_ADDRESS); - - String toName = user.getFullName(); - String toAddress = user.getEmailAddress(); - - String subject = PrefsPropsUtil.getContent( - user.getCompanyId(), PropsKeys.ADMIN_EMAIL_USER_ADDED_SUBJECT); - - String body = null; - - if (Validator.isNotNull(password)) { - body = PrefsPropsUtil.getContent( - user.getCompanyId(), PropsKeys.ADMIN_EMAIL_USER_ADDED_BODY); - } - else { - body = PrefsPropsUtil.getContent( - user.getCompanyId(), - PropsKeys.ADMIN_EMAIL_USER_ADDED_NO_PASSWORD_BODY); - } - - SubscriptionSender subscriptionSender = new SubscriptionSender(); - - subscriptionSender.setBody(body); - subscriptionSender.setCompanyId(user.getCompanyId()); - subscriptionSender.setContextAttributes( - "[$USER_ID$]", user.getUserId(), "[$USER_PASSWORD$]", password, - "[$USER_SCREENNAME$]", user.getScreenName()); - subscriptionSender.setFrom(fromAddress, fromName); - subscriptionSender.setHtmlFormat(true); - subscriptionSender.setMailId( - "user", user.getUserId(), System.currentTimeMillis(), - PwdGenerator.getPassword()); - subscriptionSender.setServiceContext(serviceContext); - subscriptionSender.setSubject(subject); - subscriptionSender.setUserId(user.getUserId()); - - subscriptionSender.addRuntimeSubscribers(toAddress, toName); - - subscriptionSender.flushNotificationsAsync(); - } - - protected void setEmailAddress( - User user, String password, String firstName, String middleName, - String lastName, String emailAddress) - throws PortalException, SystemException { - - if (StringUtil.equalsIgnoreCase(emailAddress, user.getEmailAddress())) { - return; - } - - long userId = user.getUserId(); - - // test@test.com -> test@liferay.com - - if (!user.hasCompanyMx() && user.hasCompanyMx(emailAddress) && - Validator.isNotNull(password)) { - - mailService.addUser( - user.getCompanyId(), userId, password, firstName, middleName, - lastName, emailAddress); - } - - // test@liferay.com -> bob@liferay.com - - else if (user.hasCompanyMx() && user.hasCompanyMx(emailAddress)) { - mailService.updateEmailAddress( - user.getCompanyId(), userId, emailAddress); - } - - // test@liferay.com -> test@test.com - - else if (user.hasCompanyMx() && !user.hasCompanyMx(emailAddress)) { - mailService.deleteEmailAddress(user.getCompanyId(), userId); - } - - user.setEmailAddress(emailAddress); - user.setDigest(StringPool.BLANK); - } - - protected void updateGroups( - long userId, long[] newGroupIds, ServiceContext serviceContext, - boolean indexingEnabled) - throws PortalException, SystemException { - - if (newGroupIds == null) { - return; - } - - List oldGroups = userPersistence.getGroups(userId); - - Set oldGroupIds = new HashSet(oldGroups.size()); - - for (Group oldGroup : oldGroups) { - long oldGroupId = oldGroup.getGroupId(); - - oldGroupIds.add(oldGroupId); - - if (!ArrayUtil.contains(newGroupIds, oldGroupId)) { - unsetGroupUsers( - oldGroupId, new long[] {userId}, serviceContext); - } - } - - for (long newGroupId : newGroupIds) { - if (!oldGroupIds.contains(newGroupId)) { - addGroupUsers(newGroupId, new long[] {userId}); - } - } - - if (indexingEnabled) { - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer( - User.class); - - indexer.reindex(new long[] {userId}); - } - - PermissionCacheUtil.clearCache(); - } - - protected void updateOrganizations( - long userId, long[] newOrganizationIds, boolean indexingEnabled) - throws PortalException, SystemException { - - if (newOrganizationIds == null) { - return; - } - - List oldOrganizations = userPersistence.getOrganizations( - userId); - - Set oldOrganizationIds = new HashSet( - oldOrganizations.size()); - - for (Organization oldOrganization : oldOrganizations) { - long oldOrganizationId = oldOrganization.getOrganizationId(); - - oldOrganizationIds.add(oldOrganizationId); - - if (!ArrayUtil.contains(newOrganizationIds, oldOrganizationId)) { - unsetOrganizationUsers(oldOrganizationId, new long[] {userId}); - } - } - - for (long newOrganizationId : newOrganizationIds) { - if (!oldOrganizationIds.contains(newOrganizationId)) { - addOrganizationUsers(newOrganizationId, new long[] {userId}); - } - } - - if (indexingEnabled) { - Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer( - User.class); - - indexer.reindex(new long[] {userId}); - } - - PermissionCacheUtil.clearCache(); - } - - protected void updateUserGroupRoles( - User user, long[] groupIds, long[] organizationIds, - List userGroupRoles, - List previousUserGroupRoles) - throws PortalException, SystemException { - - if (userGroupRoles == null) { - return; - } - - userGroupRoles = new ArrayList(userGroupRoles); - - for (UserGroupRole userGroupRole : previousUserGroupRoles) { - if (userGroupRoles.contains(userGroupRole)) { - userGroupRoles.remove(userGroupRole); - } - else { - userGroupRoleLocalService.deleteUserGroupRole(userGroupRole); - } - } - - if (userGroupRoles.isEmpty()) { - return; - } - - long[] validGroupIds = null; - - if (groupIds != null) { - validGroupIds = ArrayUtil.clone(groupIds); - } - else { - validGroupIds = user.getGroupIds(); - } - - if (organizationIds == null) { - organizationIds = user.getOrganizationIds(); - } - - long[] organizationGroupIds = new long[organizationIds.length]; - - for (int i = 0; i < organizationIds.length; i++) { - long organizationId = organizationIds[i]; - - Organization organization = - organizationPersistence.findByPrimaryKey(organizationId); - - organizationGroupIds[i] = organization.getGroupId(); - } - - validGroupIds = ArrayUtil.append(validGroupIds, organizationGroupIds); - - Arrays.sort(validGroupIds); - - for (UserGroupRole userGroupRole : userGroupRoles) { - if (Arrays.binarySearch( - validGroupIds, userGroupRole.getGroupId()) >= 0) { - - userGroupRoleLocalService.addUserGroupRole(userGroupRole); - } - } - } - - protected void validate( - long companyId, long userId, boolean autoPassword, String password1, - String password2, boolean autoScreenName, String screenName, - String emailAddress, String openId, String firstName, - String middleName, String lastName, long[] organizationIds) - throws PortalException, SystemException { - - validateCompanyMaxUsers(companyId); - - if (!autoScreenName) { - validateScreenName(companyId, userId, screenName); - } - - if (!autoPassword) { - PasswordPolicy passwordPolicy = - passwordPolicyLocalService.getDefaultPasswordPolicy(companyId); - - PwdToolkitUtil.validate( - companyId, 0, password1, password2, passwordPolicy); - } - - validateEmailAddress(companyId, emailAddress); - - if (Validator.isNotNull(emailAddress)) { - User user = userPersistence.fetchByC_EA(companyId, emailAddress); - - if ((user != null) && (user.getUserId() != userId)) { - throw new DuplicateUserEmailAddressException( - "{userId=" + userId + "}"); - } - } - - validateOpenId(companyId, userId, openId); - - validateFullName(companyId, firstName, middleName, lastName); - - if (organizationIds != null) { - for (long organizationId : organizationIds) { - Organization organization = - organizationPersistence.fetchByPrimaryKey(organizationId); - - if (organization == null) { - throw new NoSuchOrganizationException( - "{organizationId=" + organizationId + "}"); - } - } - } - } - - protected void validate( - long userId, String screenName, String emailAddress, String openId, - String firstName, String middleName, String lastName, String smsSn) - throws PortalException, SystemException { - - User user = userPersistence.findByPrimaryKey(userId); - - if (!StringUtil.equalsIgnoreCase(user.getScreenName(), screenName)) { - validateScreenName(user.getCompanyId(), userId, screenName); - } - - validateEmailAddress(user.getCompanyId(), emailAddress); - - validateOpenId(user.getCompanyId(), userId, openId); - - if (!user.isDefaultUser()) { - if (Validator.isNotNull(emailAddress) && - !StringUtil.equalsIgnoreCase( - user.getEmailAddress(), emailAddress)) { - - if (userPersistence.fetchByC_EA( - user.getCompanyId(), emailAddress) != null) { - - throw new DuplicateUserEmailAddressException( - "{userId=" + userId + "}"); - } - } - - validateFullName( - user.getCompanyId(), firstName, middleName, lastName); - } - - if (Validator.isNotNull(smsSn) && !Validator.isEmailAddress(smsSn)) { - throw new UserSmsException(); - } - } - - protected void validateCompanyMaxUsers(long companyId) - throws PortalException, SystemException { - - Company company = companyPersistence.findByPrimaryKey(companyId); - - if (company.isSystem() || (company.getMaxUsers() == 0)) { - return; - } - - int userCount = searchCount( - companyId, null, WorkflowConstants.STATUS_APPROVED, null); - - if (userCount >= company.getMaxUsers()) { - throw new CompanyMaxUsersException(); - } - } - - protected void validateEmailAddress(long companyId, String emailAddress) - throws PortalException, SystemException { - - if (Validator.isNull(emailAddress) && - !PropsValues.USERS_EMAIL_ADDRESS_REQUIRED) { - - return; - } - - EmailAddressValidator emailAddressValidator = - EmailAddressValidatorFactory.getInstance(); - - if (!emailAddressValidator.validate(companyId, emailAddress)) { - throw new UserEmailAddressException(); - } - - String pop3User = PrefsPropsUtil.getString( - PropsKeys.MAIL_SESSION_MAIL_POP3_USER, - PropsValues.MAIL_SESSION_MAIL_POP3_USER); - - if (StringUtil.equalsIgnoreCase(emailAddress, pop3User)) { - throw new ReservedUserEmailAddressException(); - } - - String[] reservedEmailAddresses = PrefsPropsUtil.getStringArray( - companyId, PropsKeys.ADMIN_RESERVED_EMAIL_ADDRESSES, - StringPool.NEW_LINE, PropsValues.ADMIN_RESERVED_EMAIL_ADDRESSES); - - for (String reservedEmailAddress : reservedEmailAddresses) { - if (StringUtil.equalsIgnoreCase( - emailAddress, reservedEmailAddress)) { - - throw new ReservedUserEmailAddressException(); - } - } - } - - protected void validateEmailAddress( - User user, String emailAddress1, String emailAddress2) - throws PortalException, SystemException { - - if (!emailAddress1.equals(emailAddress2)) { - throw new UserEmailAddressException(); - } - - validateEmailAddress(user.getCompanyId(), emailAddress1); - validateEmailAddress(user.getCompanyId(), emailAddress2); - - if (!StringUtil.equalsIgnoreCase( - emailAddress1, user.getEmailAddress())) { - - if (userPersistence.fetchByC_EA( - user.getCompanyId(), emailAddress1) != null) { - - throw new DuplicateUserEmailAddressException( - "{userId=" + user.getUserId() + "}"); - } - } - } - - protected void validateFullName( - long companyId, String firstName, String middleName, - String lastName) - throws PortalException, SystemException { - - if (Validator.isNull(firstName)) { - throw new ContactFirstNameException(); - } - else if (Validator.isNull(lastName) && - PrefsPropsUtil.getBoolean( - companyId, PropsKeys.USERS_LAST_NAME_REQUIRED, - PropsValues.USERS_LAST_NAME_REQUIRED)) { - - throw new ContactLastNameException(); - } - - FullNameValidator fullNameValidator = - FullNameValidatorFactory.getInstance(); - - if (!fullNameValidator.validate( - companyId, firstName, middleName, lastName)) { - - throw new ContactFullNameException(); - } - } - - protected void validateOpenId(long companyId, long userId, String openId) - throws PortalException, SystemException { - - if (Validator.isNull(openId)) { - return; - } - - User user = userPersistence.fetchByC_O(companyId, openId); - - if ((user != null) && (user.getUserId() != userId)) { - throw new DuplicateOpenIdException("{userId=" + userId + "}"); - } - } - - protected void validatePassword( - long companyId, long userId, String password1, String password2) - throws PortalException, SystemException { - - if (Validator.isNull(password1) || Validator.isNull(password2)) { - throw new UserPasswordException( - UserPasswordException.PASSWORD_INVALID); - } - - if (!password1.equals(password2)) { - throw new UserPasswordException( - UserPasswordException.PASSWORDS_DO_NOT_MATCH); - } - - PasswordPolicy passwordPolicy = - passwordPolicyLocalService.getPasswordPolicyByUserId(userId); - - PwdToolkitUtil.validate( - companyId, userId, password1, password2, passwordPolicy); - } - - protected void validateReminderQuery(String question, String answer) - throws PortalException { - - if (!PropsValues.USERS_REMINDER_QUERIES_ENABLED) { - return; - } - - if (Validator.isNull(question)) { - throw new UserReminderQueryException("Question is null"); - } - - if (Validator.isNull(answer)) { - throw new UserReminderQueryException("Answer is null"); - } - } - - protected void validateScreenName( - long companyId, long userId, String screenName) - throws PortalException, SystemException { - - if (Validator.isNull(screenName)) { - throw new UserScreenNameException(); - } - - ScreenNameValidator screenNameValidator = - ScreenNameValidatorFactory.getInstance(); - - if (!screenNameValidator.validate(companyId, screenName)) { - throw new UserScreenNameException(); - } - - if (Validator.isNumber(screenName)) { - if (!PropsValues.USERS_SCREEN_NAME_ALLOW_NUMERIC) { - throw new UserScreenNameException(); - } - - if (!screenName.equals(String.valueOf(userId))) { - Group group = groupPersistence.fetchByPrimaryKey( - GetterUtil.getLong(screenName)); - - if (group != null) { - throw new UserScreenNameException(); - } - } - } - - for (char c : screenName.toCharArray()) { - if (!Validator.isChar(c) && !Validator.isDigit(c) && - (c != CharPool.DASH) && (c != CharPool.PERIOD) && - (c != CharPool.UNDERLINE)) { - - throw new UserScreenNameException(); - } - } - - String[] anonymousNames = BaseServiceImpl.ANONYMOUS_NAMES; - - for (String anonymousName : anonymousNames) { - if (StringUtil.equalsIgnoreCase(screenName, anonymousName)) { - throw new UserScreenNameException(); - } - } - - User user = userPersistence.fetchByC_SN(companyId, screenName); - - if ((user != null) && (user.getUserId() != userId)) { - throw new DuplicateUserScreenNameException( - "{userId=" + userId + "}"); - } - - String friendlyURL = StringPool.SLASH + screenName; - - Group group = groupPersistence.fetchByC_F(companyId, friendlyURL); - - if ((group != null) && (group.getClassPK() != userId)) { - throw new GroupFriendlyURLException( - GroupFriendlyURLException.DUPLICATE); - } - - int exceptionType = LayoutImpl.validateFriendlyURL(friendlyURL); - - if (exceptionType != -1) { - throw new UserScreenNameException( - new GroupFriendlyURLException(exceptionType)); - } - - String[] reservedScreenNames = PrefsPropsUtil.getStringArray( - companyId, PropsKeys.ADMIN_RESERVED_SCREEN_NAMES, - StringPool.NEW_LINE, PropsValues.ADMIN_RESERVED_SCREEN_NAMES); - - for (String reservedScreenName : reservedScreenNames) { - if (StringUtil.equalsIgnoreCase(screenName, reservedScreenName)) { - throw new ReservedUserScreenNameException(); - } - } - } - - private static Log _log = LogFactoryUtil.getLog(UserLocalServiceImpl.class); - - private Map _defaultUsers = new ConcurrentHashMap(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ConvertDatabase.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ConvertDatabase.java deleted file mode 100644 index 66a5cf756f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ConvertDatabase.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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 com.liferay.portal.convert; - -/** - * @author Alexander Chow - */ -public class ConvertDatabase extends ConvertProcess { - - @Override - public String getDescription() { - return "migrate-data-from-one-database-to-another"; - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMStructureLocalServiceAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMStructureLocalServiceAPITest.java deleted file mode 100644 index d78a203a95..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMStructureLocalServiceAPITest.java +++ /dev/null @@ -1,12 +0,0 @@ -package blade.migrate.liferay70; -public class DDMStructureLocalServiceUtilTest { - public static void main(String[] args) - { - try - { - DDMStructureLocalServiceUtil.updateXSDFieldMetadata(structureId,fieldName,metadataEntryName,metadataEntryValue,serviceContext); - } - catch (DuplicateUserScreenNameException e) - { - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMStructureLocalServiceUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMStructureLocalServiceUtilTest.java deleted file mode 100644 index 35a66e0f68..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMStructureLocalServiceUtilTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package blade.migrate.liferay70; - -public class DDMStructureLocalServiceUtilTest { - - public static void main(String[] args) { - - DDMStructureLocalServiceUtil.updateStructure( - _ddmStructure.getStructureId(), - _ddmStructure.getParentStructureId(), _ddmStructure.getNameMap(), - _ddmStructure.getDescriptionMap(), ddmForm, ddmFormLayout, - serviceContext); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMTemplateLocalServiceUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMTemplateLocalServiceUtilTest.java deleted file mode 100644 index 14ddbba361..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMTemplateLocalServiceUtilTest.java +++ /dev/null @@ -1,16 +0,0 @@ -package blade.migrate.liferay70; - -public class DDMTemplateLocalServiceUtilTest { - - public static void main(String[] args) { - - DDMTemplateLocalServiceUtil.updateTemplate( - template.getTemplateId(), template.getClassPK(), - template.getNameMap(), template.getDescriptionMap(), - template.getType(), template.getMode(), template.getLanguage(), - template.getScript(), template.isCacheable(), - template.isSmallImage(), template.getSmallImageURL(), null, - ServiceContextTestUtil.getServiceContext()); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMTemplateServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMTemplateServiceSoap.java deleted file mode 100644 index 13cd5f7b2e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMTemplateServiceSoap.java +++ /dev/null @@ -1,964 +0,0 @@ -/** - * 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 com.liferay.portlet.dynamicdatamapping.service.http; - -import aQute.bnd.annotation.ProviderType; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.LocalizationUtil; - -import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil; - -import java.rmi.RemoteException; - -import java.util.Locale; -import java.util.Map; - -/** - * Provides the SOAP utility for the - * {@link com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil} 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. - * - *

    - * 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 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap}. - * If the method in the service utility returns a - * {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplate}, that is translated to a - * {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

    - * - *

    - * 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). - *

    - * - *

    - * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

    - * - *

    - * The SOAP utility is only generated for remote services. - *

    - * - * @author Brian Wing Shun Chan - * @see DDMTemplateServiceHttp - * @see com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap - * @see com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil - * @generated - */ -@ProviderType -public class DDMTemplateServiceSoap { - /** - * Adds a template. - * - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param classPK the primary key of the template's related entity - * @param nameMap the template's locales and localized names - * @param descriptionMap the template's locales and localized descriptions - * @param type the template's type. For more information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param mode the template's mode. For more information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param language the template's script language. For more information, - see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param script the template's script - * @param serviceContext the service context to be applied. Must have the - ddmResource attribute to check permissions. Can set - the UUID, creation date, modification date, guest permissions, - and group permissions for the template. - * @return the template - * @throws PortalException if the user did not have permission to add the - template or if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap addTemplate( - long groupId, long classNameId, long classPK, - java.lang.String[] nameMapLanguageIds, - java.lang.String[] nameMapValues, - java.lang.String[] descriptionMapLanguageIds, - java.lang.String[] descriptionMapValues, java.lang.String type, - java.lang.String mode, java.lang.String language, - java.lang.String script, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - Map nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds, - nameMapValues); - Map descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, - descriptionMapValues); - - com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = - DDMTemplateServiceUtil.addTemplate(groupId, classNameId, - classPK, nameMap, descriptionMap, type, mode, language, - script, serviceContext); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Copies the template, creating a new template with all the values - * extracted from the original one. This method supports defining a new name - * and description. - * - * @param templateId the primary key of the template to be copied - * @param nameMap the new template's locales and localized names - * @param descriptionMap the new template's locales and localized - descriptions - * @param serviceContext the service context to be applied. Must have the - ddmResource attribute to check permissions. Can set - the UUID, creation date, modification date, guest permissions, - and group permissions for the template. - * @return the new template - * @throws PortalException if the user did not have permission to add the - template or if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap copyTemplate( - long templateId, java.lang.String[] nameMapLanguageIds, - java.lang.String[] nameMapValues, - java.lang.String[] descriptionMapLanguageIds, - java.lang.String[] descriptionMapValues, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - Map nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds, - nameMapValues); - Map descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, - descriptionMapValues); - - com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = - DDMTemplateServiceUtil.copyTemplate(templateId, nameMap, - descriptionMap, serviceContext); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap copyTemplate( - long templateId, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = - DDMTemplateServiceUtil.copyTemplate(templateId, serviceContext); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Copies all the templates matching the class name ID, class PK, and type. - * This method creates new templates, extracting all the values from the old - * ones and updating their class PKs. - * - * @param classNameId the primary key of the class name for template's - related model - * @param classPK the primary key of the original template's related entity - * @param newClassPK the primary key of the new template's related entity - * @param type the template's type. For more information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param serviceContext the service context to be applied. Must have the - ddmResource attribute to check permissions. Can set - the UUID, creation date, modification date, guest permissions, - and group permissions for the template. - * @return the new template - * @throws PortalException if the user did not have permission to add the - template or if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] copyTemplates( - long classNameId, long classPK, long newClassPK, java.lang.String type, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.copyTemplates(classNameId, classPK, - newClassPK, type, serviceContext); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Deletes the template and its resources. - * - * @param templateId the primary key of the template to be deleted - * @throws PortalException if the user did not have permission to delete the - template or if a portal exception occurred - * @throws SystemException if a system exception occurred - */ - public static void deleteTemplate(long templateId) - throws RemoteException { - try { - DDMTemplateServiceUtil.deleteTemplate(templateId); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns the template matching the group and template key. - * - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param templateKey the unique string identifying the template - * @return the matching template, or null if a matching - template could not be found - * @throws PortalException if the user did not have permission to view the - template - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap fetchTemplate( - long groupId, long classNameId, java.lang.String templateKey) - throws RemoteException { - try { - com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = - DDMTemplateServiceUtil.fetchTemplate(groupId, classNameId, - templateKey); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns the template with the ID. - * - * @param templateId the primary key of the template - * @return the template with the ID - * @throws PortalException if the user did not have permission to view the - template or if a matching template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap getTemplate( - long templateId) throws RemoteException { - try { - com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = - DDMTemplateServiceUtil.getTemplate(templateId); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns the template matching the group and template key. - * - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param templateKey the unique string identifying the template - * @return the matching template - * @throws PortalException if a matching template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap getTemplate( - long groupId, long classNameId, java.lang.String templateKey) - throws RemoteException { - try { - com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = - DDMTemplateServiceUtil.getTemplate(groupId, classNameId, - templateKey); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns the template matching the group and template key, optionally in - * the global scope. - * - *

    - * This method first searches in the group. If the template is still not - * found and includeGlobalTemplates is set to - * true, this method searches the global group. - *

    - * - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param templateKey the unique string identifying the template - * @param includeGlobalTemplates whether to include the global scope in the - search - * @return the matching template - * @throws PortalException if a matching template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap getTemplate( - long groupId, long classNameId, java.lang.String templateKey, - boolean includeGlobalTemplates) throws RemoteException { - try { - com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = - DDMTemplateServiceUtil.getTemplate(groupId, classNameId, - templateKey, includeGlobalTemplates); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns all the templates matching the group and class name ID. - * - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @return the matching templates - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( - long groupId, long classNameId) throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.getTemplates(groupId, classNameId); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns all the templates matching the group, class name ID, and class - * PK. - * - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param classPK the primary key of the template's related entity - * @return the matching templates - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( - long groupId, long classNameId, long classPK) throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.getTemplates(groupId, classNameId, - classPK); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns all the templates matching the class name ID, class PK, type, and - * mode. - * - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param classPK the primary key of the template's related entity - * @param type the template's type. For more information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @return the matching templates - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( - long groupId, long classNameId, long classPK, java.lang.String type) - throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.getTemplates(groupId, classNameId, - classPK, type); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( - long groupId, long classNameId, long classPK, java.lang.String type, - java.lang.String mode) throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.getTemplates(groupId, classNameId, - classPK, type, mode); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns all the templates matching the group and class PK. - * - * @param groupId the primary key of the group - * @param classPK the primary key of the template's related entity - * @return the matching templates - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplatesByClassPK( - long groupId, long classPK) throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.getTemplatesByClassPK(groupId, classPK); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns an ordered range of all the templates matching the group and - * structure class name ID and all the generic templates matching the group. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param groupId the primary key of the group - * @param structureClassNameId the primary key of the class name for the - template's related structure (optionally 0). Specify - 0 to return generic templates only. - * @param start the lower bound of the range of templates to return - * @param end the upper bound of the range of templates to return (not - inclusive) - * @param orderByComparator the comparator to order the templates - (optionally null) - * @return the range of matching templates ordered by the comparator - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplatesByStructureClassNameId( - long groupId, long structureClassNameId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.getTemplatesByStructureClassNameId(groupId, - structureClassNameId, start, end, orderByComparator); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns the number of templates matching the group and structure class - * name ID plus the number of generic templates matching the group. - * - * @param groupId the primary key of the group - * @param structureClassNameId the primary key of the class name for the - template's related structure (optionally 0). Specify - 0 to count generic templates only. - * @return the number of matching templates plus the number of matching - generic templates - * @throws SystemException if a system exception occurred - */ - public static int getTemplatesByStructureClassNameIdCount(long groupId, - long structureClassNameId) throws RemoteException { - try { - int returnValue = DDMTemplateServiceUtil.getTemplatesByStructureClassNameIdCount(groupId, - structureClassNameId); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns an ordered range of all the templates matching the group, class - * name ID, class PK, type, and mode, and matching the keywords in the - * template names and descriptions. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the template's company - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param classPK the primary key of the template's related entity - * @param keywords the keywords (space separated), which may occur in the - template's name or description (optionally null) - * @param type the template's type (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param mode the template's mode (optionally null) For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param start the lower bound of the range of templates to return - * @param end the upper bound of the range of templates to return (not - inclusive) - * @param orderByComparator the comparator to order the templates - (optionally null) - * @return the matching templates ordered by the comparator - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( - long companyId, long groupId, long classNameId, long classPK, - java.lang.String keywords, java.lang.String type, - java.lang.String mode, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.search(companyId, groupId, classNameId, - classPK, keywords, type, mode, start, end, orderByComparator); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns an ordered range of all the templates matching the group, class - * name ID, class PK, name keyword, description keyword, type, mode, and - * language. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the template's company - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param classPK the primary key of the template's related entity - * @param name the name keywords (optionally null) - * @param description the description keywords (optionally - null) - * @param type the template's type (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param mode the template's mode (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param language the template's script language (optionally - null). For more information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param andOperator whether every field must match its keywords, or just - one field. - * @param start the lower bound of the range of templates to return - * @param end the upper bound of the range of templates to return (not - inclusive) - * @param orderByComparator the comparator to order the templates - (optionally null) - * @return the matching templates ordered by the comparator - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( - long companyId, long groupId, long classNameId, long classPK, - java.lang.String name, java.lang.String description, - java.lang.String type, java.lang.String mode, - java.lang.String language, boolean andOperator, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.search(companyId, groupId, classNameId, - classPK, name, description, type, mode, language, - andOperator, start, end, orderByComparator); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns an ordered range of all the templates matching the group IDs, - * class name IDs, class PK, type, and mode, and matching the keywords in - * the template names and descriptions. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the template's company - * @param groupIds the primary keys of the groups - * @param classNameIds the primary keys of the entity's instances the - templates are related to - * @param classPKs the primary keys of the template's related entities - * @param keywords the keywords (space separated), which may occur in the - template's name or description (optionally null) - * @param type the template's type (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param mode the template's mode (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param start the lower bound of the range of templates to return - * @param end the upper bound of the range of templates to return (not - inclusive) - * @param orderByComparator the comparator to order the templates - (optionally null) - * @return the matching templates ordered by the comparator - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( - long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, - java.lang.String keywords, java.lang.String type, - java.lang.String mode, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.search(companyId, groupIds, - classNameIds, classPKs, keywords, type, mode, start, end, - orderByComparator); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns an ordered range of all the templates matching the group IDs, - * class name IDs, class PK, name keyword, description keyword, type, mode, - * and language. - * - *

    - * Useful when paginating results. Returns a maximum of end - - * start instances. start and end are not - * primary keys, they are indexes in the result set. Thus, 0 - * refers to the first result in the set. Setting both start - * and end to {@link - * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full - * result set. - *

    - * - * @param companyId the primary key of the template's company - * @param groupIds the primary keys of the groups - * @param classNameIds the primary keys of the entity's instances the - templates are related to - * @param classPKs the primary keys of the template's related entities - * @param name the name keywords (optionally null) - * @param description the description keywords (optionally - null) - * @param type the template's type (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param mode the template's mode (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param language the template's script language (optionally - null). For more information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param andOperator whether every field must match its keywords, or just - one field. - * @param start the lower bound of the range of templates to return - * @param end the upper bound of the range of templates to return (not - inclusive) - * @param orderByComparator the comparator to order the templates - (optionally null) - * @return the matching templates ordered by the comparator - * @throws SystemException if a system exception occurred - */ - public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( - long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, - java.lang.String name, java.lang.String description, - java.lang.String type, java.lang.String mode, - java.lang.String language, boolean andOperator, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - DDMTemplateServiceUtil.search(companyId, groupIds, - classNameIds, classPKs, name, description, type, mode, - language, andOperator, start, end, orderByComparator); - - return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns the number of templates matching the group, class name ID, class - * PK, type, and mode, and matching the keywords in the template names and - * descriptions. - * - * @param companyId the primary key of the template's company - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param classPK the primary key of the template's related entity - * @param keywords the keywords (space separated), which may occur in the - template's name or description (optionally null) - * @param type the template's type (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param mode the template's mode (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @return the number of matching templates - * @throws SystemException if a system exception occurred - */ - public static int searchCount(long companyId, long groupId, - long classNameId, long classPK, java.lang.String keywords, - java.lang.String type, java.lang.String mode) throws RemoteException { - try { - int returnValue = DDMTemplateServiceUtil.searchCount(companyId, - groupId, classNameId, classPK, keywords, type, mode); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns the number of templates matching the group, class name ID, class - * PK, name keyword, description keyword, type, mode, and language. - * - * @param companyId the primary key of the template's company - * @param groupId the primary key of the group - * @param classNameId the primary key of the class name for template's - related model - * @param classPK the primary key of the template's related entity - * @param name the name keywords (optionally null) - * @param description the description keywords (optionally - null) - * @param type the template's type (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param mode the template's mode (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param language the template's script language (optionally - null). For more information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param andOperator whether every field must match its keywords, or just - one field. - * @return the number of matching templates - * @throws SystemException if a system exception occurred - */ - public static int searchCount(long companyId, long groupId, - long classNameId, long classPK, java.lang.String name, - java.lang.String description, java.lang.String type, - java.lang.String mode, java.lang.String language, boolean andOperator) - throws RemoteException { - try { - int returnValue = DDMTemplateServiceUtil.searchCount(companyId, - groupId, classNameId, classPK, name, description, type, - mode, language, andOperator); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns the number of templates matching the group IDs, class name IDs, - * class PK, type, and mode, and matching the keywords in the template names - * and descriptions. - * - * @param companyId the primary key of the template's company - * @param groupIds the primary keys of the groups - * @param classNameIds the primary keys of the entity's instances the - templates are related to - * @param classPKs the primary keys of the template's related entities - * @param keywords the keywords (space separated), which may occur in the - template's name or description (optionally null) - * @param type the template's type (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param mode the template's mode (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @return the number of matching templates - * @throws SystemException if a system exception occurred - */ - public static int searchCount(long companyId, long[] groupIds, - long[] classNameIds, long[] classPKs, java.lang.String keywords, - java.lang.String type, java.lang.String mode) throws RemoteException { - try { - int returnValue = DDMTemplateServiceUtil.searchCount(companyId, - groupIds, classNameIds, classPKs, keywords, type, mode); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * Returns the number of templates matching the group IDs, class name IDs, - * class PK, name keyword, description keyword, type, mode, and language. - * - * @param companyId the primary key of the template's company - * @param groupIds the primary keys of the groups - * @param classNameIds the primary keys of the entity's instances the - templates are related to - * @param classPKs the primary keys of the template's related entities - * @param name the name keywords (optionally null) - * @param description the description keywords (optionally - null) - * @param type the template's type (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param mode the template's mode (optionally null). For more - information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param language the template's script language (optionally - null). For more information, see {@link - com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. - * @param andOperator whether every field must match its keywords, or just - one field. - * @return the number of matching templates - * @throws SystemException if a system exception occurred - */ - public static int searchCount(long companyId, long[] groupIds, - long[] classNameIds, long[] classPKs, java.lang.String name, - java.lang.String description, java.lang.String type, - java.lang.String mode, java.lang.String language, boolean andOperator) - throws RemoteException { - try { - int returnValue = DDMTemplateServiceUtil.searchCount(companyId, - groupIds, classNameIds, classPKs, name, description, type, - mode, language, andOperator); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(DDMTemplateServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMTemplateServiceTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMTemplateServiceTest.java deleted file mode 100644 index 898ef07479..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DDMTemplateServiceTest.java +++ /dev/null @@ -1,268 +0,0 @@ -/** - * 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 com.liferay.portlet.dynamicdatamapping.service; - -import com.liferay.portal.kernel.template.TemplateConstants; -import com.liferay.portal.kernel.test.ExecutionTestListeners; -import com.liferay.portal.kernel.transaction.Transactional; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.service.ServiceTestUtil; -import com.liferay.portal.test.EnvironmentExecutionTestListener; -import com.liferay.portal.test.LiferayIntegrationJUnitTestRunner; -import com.liferay.portal.test.Sync; -import com.liferay.portal.test.SynchronousDestinationExecutionTestListener; -import com.liferay.portal.test.TransactionalExecutionTestListener; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.util.TestPropsValues; -import com.liferay.portlet.asset.model.AssetEntry; -import com.liferay.portlet.dynamicdatamapping.RequiredTemplateException; -import com.liferay.portlet.dynamicdatamapping.TemplateDuplicateTemplateKeyException; -import com.liferay.portlet.dynamicdatamapping.TemplateNameException; -import com.liferay.portlet.dynamicdatamapping.TemplateScriptException; -import com.liferay.portlet.dynamicdatamapping.model.DDMStructure; -import com.liferay.portlet.dynamicdatamapping.model.DDMTemplate; -import com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants; -import com.liferay.portlet.journal.model.JournalArticle; -import com.liferay.portlet.journal.util.JournalTestUtil; - -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * @author Eduardo Garcia - */ -@ExecutionTestListeners( - listeners = { - EnvironmentExecutionTestListener.class, - SynchronousDestinationExecutionTestListener.class, - TransactionalExecutionTestListener.class - }) -@RunWith(LiferayIntegrationJUnitTestRunner.class) -@Sync -@Transactional -public class DDMTemplateServiceTest extends BaseDDMServiceTestCase { - - @Test - public void testAddTemplateWithDuplicateKey() throws Exception { - String templateKey = ServiceTestUtil.randomString(); - String language = TemplateConstants.LANG_TYPE_VM; - - try { - addTemplate( - _classNameId, 0, templateKey, "Test Template 1", - DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY, - DDMTemplateConstants.TEMPLATE_MODE_CREATE, language, - getTestTemplateScript(language)); - addTemplate( - _classNameId, 0, templateKey, "Test Template 2", - DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY, - DDMTemplateConstants.TEMPLATE_MODE_CREATE, language, - getTestTemplateScript(language)); - - Assert.fail(); - } - catch (TemplateDuplicateTemplateKeyException tdtke) { - } - } - - @Test - public void testAddTemplateWithoutName() throws Exception { - String language = TemplateConstants.LANG_TYPE_VM; - - try { - addTemplate( - _classNameId, 0, null, StringPool.BLANK, - DDMTemplateConstants.TEMPLATE_TYPE_DISPLAY, - DDMTemplateConstants.TEMPLATE_MODE_CREATE, language, - getTestTemplateScript(language)); - - Assert.fail(); - } - catch (TemplateNameException tne) { - } - } - - @Test - public void testAddTemplateWithoutScript() throws Exception { - try { - addTemplate( - _classNameId, 0, null, "Test Template", - DDMTemplateConstants.TEMPLATE_TYPE_FORM, - DDMTemplateConstants.TEMPLATE_MODE_CREATE, - TemplateConstants.LANG_TYPE_VM, StringPool.BLANK); - - Assert.fail(); - } - catch (TemplateScriptException tse) { - } - } - - @Test - public void testCopyTemplates() throws Exception { - DDMTemplate template = addDisplayTemplate( - _classNameId, 0, "Test Template"); - - List templates = copyTemplate(template); - - Assert.assertTrue(templates.size() >= 1); - } - - @Test - public void testDeleteTemplate() throws Exception { - DDMTemplate template = addDisplayTemplate( - _classNameId, 0, "Test Template"); - - DDMTemplateLocalServiceUtil.deleteTemplate(template.getTemplateId()); - - Assert.assertNull( - DDMTemplateLocalServiceUtil.fetchDDMTemplate( - template.getTemplateId())); - } - - @Test - public void testDeleteTemplateReferencedByJournalArticles() - throws Exception { - - DDMStructure structure = addStructure( - PortalUtil.getClassNameId(JournalArticle.class.getName()), - "Test Structure"); - - DDMTemplate template = addDisplayTemplate( - structure.getPrimaryKey(), "Test Display Template"); - - JournalTestUtil.addArticleWithXMLContent( - group.getGroupId(), "Test Article", - structure.getStructureKey(), template.getTemplateKey()); - - try { - DDMTemplateLocalServiceUtil.deleteTemplate( - template.getTemplateId()); - - Assert.fail(); - } - catch (RequiredTemplateException rse) { - } - } - - @Test - public void testFetchTemplate() throws Exception { - DDMTemplate template = addDisplayTemplate( - _classNameId, 0, "Test Template"); - - Assert.assertNotNull( - DDMTemplateLocalServiceUtil.fetchTemplate( - template.getGroupId(), _classNameId, - template.getTemplateKey())); - } - - @Test - public void testGetTemplates() throws Exception { - DDMTemplate template = addDisplayTemplate( - _classNameId, 0, "Test Template"); - - List templates = DDMTemplateLocalServiceUtil.getTemplates( - template.getGroupId(), template.getClassNameId()); - - Assert.assertTrue(templates.contains(template)); - } - - @Test - public void testSearch() throws Exception { - DDMTemplate template = addDisplayTemplate( - _classNameId, 0, "Test Template 1"); - - addDisplayTemplate(_classNameId, 0, "Test Template 2"); - - List templates = DDMTemplateLocalServiceUtil.search( - template.getCompanyId(), template.getGroupId(), - template.getClassNameId(), template.getClassPK(), - template.getName(), template.getDescription(), template.getType(), - template.getMode(), template.getLanguage(), false, 0, 1, null); - - Assert.assertEquals(1, templates.size()); - } - - @Test - public void testSearchByKeywords() throws Exception { - DDMTemplate template = addDisplayTemplate( - _classNameId, 0, "Test Template 1"); - - addDisplayTemplate(_classNameId, 0, "Test Template 2"); - - List templates = DDMTemplateLocalServiceUtil.search( - template.getCompanyId(), template.getGroupId(), - template.getClassNameId(), template.getClassPK(), null, - template.getType(), template.getMode(), 0, 1, null); - - Assert.assertEquals(1, templates.size()); - } - - @Test - public void testSearchCount() throws Exception { - int initialCount = DDMTemplateLocalServiceUtil.searchCount( - TestPropsValues.getCompanyId(), group.getGroupId(), _classNameId, 0, - "Test Template", null, null, null, null, false); - - addDisplayTemplate(_classNameId, 0, "Test Template"); - - int count = DDMTemplateLocalServiceUtil.searchCount( - TestPropsValues.getCompanyId(), group.getGroupId(), _classNameId, 0, - "Test Template", null, null, null, null, false); - - Assert.assertEquals(initialCount + 1, count); - } - - @Test - public void testSearchCountByKeywords() throws Exception { - int initialCount = DDMTemplateLocalServiceUtil.searchCount( - TestPropsValues.getCompanyId(), group.getGroupId(), _classNameId, 0, - null, null, null); - - addDisplayTemplate(_classNameId, 0, "Test Template"); - - int count = DDMTemplateLocalServiceUtil.searchCount( - TestPropsValues.getCompanyId(), group.getGroupId(), _classNameId, 0, - null, null, null); - - Assert.assertEquals(initialCount + 1, count); - } - - protected List copyTemplate(DDMTemplate template) - throws Exception { - - return DDMTemplateLocalServiceUtil.copyTemplates( - template.getUserId(), template.getClassNameId(), - template.getClassPK(), -1, template.getType(), - ServiceTestUtil.getServiceContext(group.getGroupId())); - } - - protected DDMTemplate updateTemplate(DDMTemplate template) - throws Exception { - - return DDMTemplateLocalServiceUtil.updateTemplate( - template.getTemplateId(), template.getClassPK(), - template.getNameMap(), template.getDescriptionMap(), - template.getType(), template.getMode(), template.getLanguage(), - template.getScript(), template.isCacheable(), - template.isSmallImage(), template.getSmallImageURL(), null, - ServiceTestUtil.getServiceContext()); - } - - private long _classNameId = PortalUtil.getClassNameId(AssetEntry.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DLGetEntriesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DLGetEntriesTest.java deleted file mode 100644 index 0336939ab6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DLGetEntriesTest.java +++ /dev/null @@ -1,26 +0,0 @@ - -public class DLDLImplDLUtilgetEntriesTest { - - public void testMethod(DLImpl dlImpl){ - DL dl = new DLImpl(); - Hits hits = null; - //var call - dl.getEntries(hits); - dl.getEntries(); - - //static call - DL.getEntries(hits); - - //passed var call - dlImpl.getEntries(hits); - } - - - public List getEntries(Hits hits) { - //field call - return dlUtil.getEntries(hits); - } - - private DLUtil dlUtil; - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DLPreviewableProcessor.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DLPreviewableProcessor.java deleted file mode 100644 index 06e946cd9f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DLPreviewableProcessor.java +++ /dev/null @@ -1,1298 +0,0 @@ -/** - * 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 com.liferay.portlet.documentlibrary.util; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.image.ImageBag; -import com.liferay.portal.kernel.image.ImageToolUtil; -import com.liferay.portal.kernel.io.FileFilter; -import com.liferay.portal.kernel.lar.ExportImportPathUtil; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.messaging.MessageBusUtil; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.repository.model.FileVersion; -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.PrefsPropsUtil; -import com.liferay.portal.kernel.util.PropsKeys; -import com.liferay.portal.kernel.util.PropsUtil; -import com.liferay.portal.kernel.util.StreamUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.SystemProperties; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.model.CompanyConstants; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.util.PortletKeys; -import com.liferay.portlet.documentlibrary.DuplicateDirectoryException; -import com.liferay.portlet.documentlibrary.store.DLStoreUtil; - -import java.awt.image.RenderedImage; - -import java.io.File; -import java.io.InputStream; - -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; - -/** - * @author Alexander Chow - * @author Ivica Cardic - */ -public abstract class DLPreviewableProcessor implements DLProcessor { - - public static final String PREVIEW_PATH = "document_preview/"; - - public static final String PREVIEW_TMP_PATH = - SystemProperties.get(SystemProperties.TMP_DIR) + - "/liferay/" + PREVIEW_PATH; - - public static final long REPOSITORY_ID = CompanyConstants.SYSTEM; - - public static final int THUMBNAIL_INDEX_CUSTOM_1 = 1; - - public static final int THUMBNAIL_INDEX_CUSTOM_2 = 2; - - public static final int THUMBNAIL_INDEX_DEFAULT = 0; - - public static final String THUMBNAIL_PATH = "document_thumbnail/"; - - public static final String THUMBNAIL_TMP_PATH = - SystemProperties.get(SystemProperties.TMP_DIR) + - "/liferay/" + THUMBNAIL_PATH; - - public static void deleteFiles() { - long[] companyIds = PortalUtil.getCompanyIds(); - - for (long companyId : companyIds) { - try { - DLStoreUtil.deleteDirectory( - companyId, REPOSITORY_ID, PREVIEW_PATH); - } - catch (Exception e) { - } - - try { - DLStoreUtil.deleteDirectory( - companyId, REPOSITORY_ID, THUMBNAIL_PATH); - } - catch (Exception e) { - } - } - } - - @Override - public void cleanUp(FileEntry fileEntry) { - deleteFiles(fileEntry, getThumbnailType()); - } - - @Override - public void cleanUp(FileVersion fileVersion) { - deleteFiles(fileVersion, getThumbnailType()); - } - - @Override - public void copy( - FileVersion sourceFileVersion, FileVersion destinationFileVersion) { - - if (sourceFileVersion.getFileVersionId() == - destinationFileVersion.getFileVersionId()) { - - return; - } - - copyPreviews(sourceFileVersion, destinationFileVersion); - copyThumbnails(sourceFileVersion, destinationFileVersion); - } - - public void deleteFiles(FileEntry fileEntry, String thumbnailType) { - deleteFiles( - fileEntry.getCompanyId(), fileEntry.getGroupId(), - fileEntry.getFileEntryId(), -1, thumbnailType); - } - - public void deleteFiles(FileVersion fileVersion, String thumbnailType) { - deleteFiles( - fileVersion.getCompanyId(), fileVersion.getGroupId(), - fileVersion.getFileEntryId(), fileVersion.getFileVersionId(), - thumbnailType); - } - - @Override - public void exportGeneratedFiles( - PortletDataContext portletDataContext, FileEntry fileEntry, - Element fileEntryElement) - throws Exception { - - doExportGeneratedFiles(portletDataContext, fileEntry, fileEntryElement); - } - - @Override - public void importGeneratedFiles( - PortletDataContext portletDataContext, FileEntry fileEntry, - FileEntry importedFileEntry, Element fileEntryElement) - throws Exception { - - cleanUp(importedFileEntry.getFileVersion()); - - doImportGeneratedFiles( - portletDataContext, fileEntry, importedFileEntry, fileEntryElement); - } - - @Override - public boolean isSupported(FileVersion fileVersion) { - if (fileVersion == null) { - return false; - } - - if (!DLProcessorRegistryUtil.isPreviewableSize(fileVersion)) { - return false; - } - - return isSupported(fileVersion.getMimeType()); - } - - @Override - public void trigger( - FileVersion sourceFileVersion, FileVersion destinationFileVersion) { - - if (getFileVersionIds().contains( - destinationFileVersion.getFileVersionId())) { - - String processIdentity = Long.toString( - destinationFileVersion.getFileVersionId()); - - destroyProcess(processIdentity); - - getFileVersionIds().remove( - destinationFileVersion.getFileVersionId()); - } - } - - protected static String getPathSegment( - FileVersion fileVersion, boolean preview) { - - return getPathSegment( - fileVersion.getGroupId(), fileVersion.getFileEntryId(), - fileVersion.getFileVersionId(), preview); - } - - protected static String getPathSegment( - long groupId, long fileEntryId, long fileVersionId, boolean preview) { - - StringBundler sb = null; - - if (fileVersionId > 0) { - sb = new StringBundler(5); - } - else { - sb = new StringBundler(3); - } - - if (preview) { - sb.append(PREVIEW_PATH); - } - else { - sb.append(THUMBNAIL_PATH); - } - - sb.append(groupId); - sb.append(DLUtil.getDividedPath(fileEntryId)); - - if (fileVersionId > 0) { - sb.append(StringPool.SLASH); - sb.append(fileVersionId); - } - - return sb.toString(); - } - - protected void addFileToStore( - long companyId, String dirName, String filePath, File srcFile) - throws PortalException, SystemException { - - try { - DLStoreUtil.addDirectory(companyId, REPOSITORY_ID, dirName); - } - catch (DuplicateDirectoryException dde) { - } - - DLStoreUtil.addFile(companyId, REPOSITORY_ID, filePath, false, srcFile); - } - - protected void addFileToStore( - long companyId, String dirName, String filePath, InputStream is) - throws PortalException, SystemException { - - try { - DLStoreUtil.addDirectory(companyId, REPOSITORY_ID, dirName); - } - catch (DuplicateDirectoryException dde) { - } - - DLStoreUtil.addFile(companyId, REPOSITORY_ID, filePath, false, is); - } - - protected void copyPreviews( - FileVersion sourceFileVersion, FileVersion destinationFileVersion) { - - try { - String[] previewTypes = getPreviewTypes(); - - for (String previewType : previewTypes) { - if (hasPreview(sourceFileVersion, previewType) && - !hasPreview(destinationFileVersion, previewType)) { - - String previewFilePath = getPreviewFilePath( - destinationFileVersion, previewType); - - InputStream is = doGetPreviewAsStream( - sourceFileVersion, previewType); - - addFileToStore( - destinationFileVersion.getCompanyId(), PREVIEW_PATH, - previewFilePath, is); - } - } - } - catch (Exception e) { - _log.error(e, e); - } - } - - protected void copyThumbnail( - FileVersion sourceFileVersion, FileVersion destinationFileVersion, - int index) { - - try { - if (isThumbnailEnabled(index) && - hasThumbnail(sourceFileVersion, index) && - !hasThumbnail(destinationFileVersion, index)) { - - InputStream is = doGetThumbnailAsStream( - sourceFileVersion, index); - - String thumbnailFilePath = getThumbnailFilePath( - destinationFileVersion, - getThumbnailType(destinationFileVersion), index); - - addFileToStore( - destinationFileVersion.getCompanyId(), THUMBNAIL_PATH, - thumbnailFilePath, is); - } - } - catch (Exception e) { - _log.error(e, e); - } - } - - protected void copyThumbnails( - FileVersion sourceFileVersion, FileVersion destinationFileVersion) { - - copyThumbnail( - sourceFileVersion, destinationFileVersion, THUMBNAIL_INDEX_DEFAULT); - copyThumbnail( - sourceFileVersion, destinationFileVersion, - THUMBNAIL_INDEX_CUSTOM_1); - copyThumbnail( - sourceFileVersion, destinationFileVersion, - THUMBNAIL_INDEX_CUSTOM_2); - } - - protected void deleteFiles( - long companyId, long groupId, long fileEntryId, long fileVersionId, - String thumbnailType) { - - deletePreviews(companyId, groupId, fileEntryId, fileVersionId); - deleteThumbnails( - companyId, groupId, fileEntryId, fileVersionId, thumbnailType); - } - - protected void deletePreviews( - long companyId, long groupId, long fileEntryId, long fileVersionId) { - - String path = getPreviewFilePath( - groupId, fileEntryId, fileVersionId, null); - - try { - DLStoreUtil.deleteFile(companyId, REPOSITORY_ID, path); - } - catch (Exception e) { - } - } - - protected void deleteThumbnail( - long companyId, long groupId, long fileEntryId, long fileVersionId, - String thumbnailType, int index) { - - try { - String dirName = getThumbnailFilePath( - groupId, fileEntryId, fileVersionId, thumbnailType, index); - - DLStoreUtil.deleteFile(companyId, REPOSITORY_ID, dirName); - } - catch (Exception e) { - } - } - - protected void deleteThumbnails( - long companyId, long groupId, long fileEntryId, long fileVersionId, - String thumbnailType) { - - deleteThumbnail( - companyId, groupId, fileEntryId, fileVersionId, thumbnailType, - THUMBNAIL_INDEX_DEFAULT); - deleteThumbnail( - companyId, groupId, fileEntryId, fileVersionId, thumbnailType, - THUMBNAIL_INDEX_CUSTOM_1); - deleteThumbnail( - companyId, groupId, fileEntryId, fileVersionId, thumbnailType, - THUMBNAIL_INDEX_CUSTOM_2); - } - - protected void destroyProcess(String processIdentity) { - synchronized (DLPreviewableProcessor.class) { - Future future = futures.get(processIdentity); - - if (future != null) { - future.cancel(true); - - futures.remove(processIdentity); - - if (_log.isInfoEnabled()) { - _log.info("Cancellation requested for " + processIdentity); - } - } - } - } - - protected abstract void doExportGeneratedFiles( - PortletDataContext portletDataContext, FileEntry fileEntry, - Element fileEntryElement) - throws Exception; - - protected InputStream doGetPreviewAsStream( - FileVersion fileVersion, int index, String type) - throws PortalException, SystemException { - - return DLStoreUtil.getFileAsStream( - fileVersion.getCompanyId(), CompanyConstants.SYSTEM, - getPreviewFilePath(fileVersion, index, type)); - } - - protected InputStream doGetPreviewAsStream( - FileVersion fileVersion, String type) - throws PortalException, SystemException { - - return doGetPreviewAsStream(fileVersion, 0, type); - } - - protected int doGetPreviewFileCount(FileVersion fileVersion) - throws Exception { - - try { - String[] fileNames = DLStoreUtil.getFileNames( - fileVersion.getCompanyId(), REPOSITORY_ID, - getPathSegment(fileVersion, true)); - - return fileNames.length; - } - catch (Exception e) { - } - - return 0; - } - - protected long doGetPreviewFileSize(FileVersion fileVersion, int index) - throws PortalException, SystemException { - - return doGetPreviewFileSize(fileVersion, index, getPreviewType()); - } - - protected long doGetPreviewFileSize( - FileVersion fileVersion, int index, String type) - throws PortalException, SystemException { - - return DLStoreUtil.getFileSize( - fileVersion.getCompanyId(), CompanyConstants.SYSTEM, - getPreviewFilePath(fileVersion, index, type)); - } - - protected long doGetPreviewFileSize(FileVersion fileVersion, String type) - throws PortalException, SystemException { - - return doGetPreviewFileSize(fileVersion, 0, type); - } - - protected InputStream doGetThumbnailAsStream( - FileVersion fileVersion, int index) - throws PortalException, SystemException { - - String type = getThumbnailType(fileVersion); - - return DLStoreUtil.getFileAsStream( - fileVersion.getCompanyId(), CompanyConstants.SYSTEM, - getThumbnailFilePath(fileVersion, type, index)); - } - - protected long doGetThumbnailFileSize(FileVersion fileVersion, int index) - throws PortalException, SystemException { - - String type = getThumbnailType(fileVersion); - - return DLStoreUtil.getFileSize( - fileVersion.getCompanyId(), CompanyConstants.SYSTEM, - getThumbnailFilePath(fileVersion, type, index)); - } - - protected abstract void doImportGeneratedFiles( - PortletDataContext portletDataContext, FileEntry fileEntry, - FileEntry importedFileEntry, Element fileEntryElement) - throws Exception; - - protected void exportBinary( - PortletDataContext portletDataContext, Element fileEntryElement, - FileVersion fileVersion, InputStream is, String binPath, - String binPathName) - throws SystemException { - - fileEntryElement.addAttribute(binPathName, binPath); - - if (is == null) { - if (_log.isWarnEnabled()) { - _log.warn( - "No input stream found for file entry " + - fileVersion.getFileEntryId()); - } - - fileEntryElement.detach(); - - return; - } - - if (portletDataContext.isPathNotProcessed(binPath)) { - portletDataContext.addZipEntry(binPath, is); - } - } - - protected void exportPreview( - PortletDataContext portletDataContext, FileEntry fileEntry, - Element fileEntryElement, String binPathSuffix, String previewType) - throws Exception { - - exportPreview( - portletDataContext, fileEntry, fileEntryElement, binPathSuffix, - previewType, -1); - } - - protected void exportPreview( - PortletDataContext portletDataContext, FileEntry fileEntry, - Element fileEntryElement, String binPathSuffix, String previewType, - int fileIndex) - throws Exception { - - if (portletDataContext.isPerformDirectBinaryImport()) { - return; - } - - FileVersion fileVersion = fileEntry.getFileVersion(); - - if (!hasPreview(fileVersion, previewType)) { - if (_log.isWarnEnabled()) { - _log.warn( - "No preview found for file entry " + - fileEntry.getFileEntryId()); - } - - return; - } - - String binPathSegment = null; - - if (fileIndex < 0) { - binPathSegment = previewType; - } - else { - binPathSegment = Integer.toString(fileIndex + 1); - } - - String binPath = getBinPath( - portletDataContext, fileEntry, binPathSegment); - - StringBundler sb = new StringBundler(4); - - sb.append("bin-path-preview-"); - sb.append(binPathSegment); - sb.append("-"); - sb.append(binPathSuffix); - - String binPathName = sb.toString(); - - fileEntryElement.addAttribute(binPathName, binPath); - - InputStream is = null; - - try { - if (fileIndex < 0) { - is = doGetPreviewAsStream(fileVersion, previewType); - } - else { - is = doGetPreviewAsStream( - fileVersion, fileIndex + 1, previewType); - } - - exportBinary( - portletDataContext, fileEntryElement, fileVersion, is, binPath, - binPathName); - } - finally { - StreamUtil.cleanUp(is); - } - } - - protected void exportThumbnail( - PortletDataContext portletDataContext, FileEntry fileEntry, - Element fileEntryElement, String binPathName, int index) - throws PortalException, SystemException { - - if (!isThumbnailEnabled(index)) { - return; - } - - FileVersion fileVersion = fileEntry.getFileVersion(); - - if (!hasThumbnail(fileVersion, index)) { - if (_log.isWarnEnabled()) { - _log.warn( - "No thumbnail found for file entry " + - fileEntry.getFileEntryId()); - } - - return; - } - - InputStream is = null; - - try { - is = doGetThumbnailAsStream(fileVersion, index); - - String binPath = getBinPath(portletDataContext, fileEntry, index); - - fileEntryElement.addAttribute(binPathName, binPath); - - exportBinary( - portletDataContext, fileEntryElement, fileVersion, is, binPath, - binPathName); - } - finally { - StreamUtil.cleanUp(is); - } - } - - protected void exportThumbnails( - PortletDataContext portletDataContext, FileEntry fileEntry, - Element fileEntryElement, String binPathSuffix) - throws PortalException, SystemException { - - FileVersion fileVersion = fileEntry.getFileVersion(); - - if (!isSupported(fileVersion)) { - return; - } - - if (!portletDataContext.isPerformDirectBinaryImport()) { - exportThumbnail( - portletDataContext, fileEntry, fileEntryElement, - "bin-path-thumbnail-default-" + binPathSuffix, - THUMBNAIL_INDEX_DEFAULT); - exportThumbnail( - portletDataContext, fileEntry, fileEntryElement, - "bin-path-thumbnail-custom-1-" + binPathSuffix, - THUMBNAIL_INDEX_CUSTOM_1); - exportThumbnail( - portletDataContext, fileEntry, fileEntryElement, - "bin-path-thumbnail-custom-2-" + binPathSuffix, - THUMBNAIL_INDEX_CUSTOM_2); - } - } - - protected String getBinPath( - PortletDataContext portletDataContext, FileEntry fileEntry, int index) { - - StringBundler sb = new StringBundler(8); - - sb.append( - ExportImportPathUtil.getPortletPath( - portletDataContext, PortletKeys.DOCUMENT_LIBRARY)); - sb.append("/bin/"); - sb.append(fileEntry.getFileEntryId()); - sb.append(StringPool.SLASH); - sb.append(THUMBNAIL_PATH); - sb.append(fileEntry.getVersion()); - sb.append(StringPool.SLASH); - sb.append(index); - - return sb.toString(); - } - - protected String getBinPath( - PortletDataContext portletDataContext, FileEntry fileEntry, - String type) { - - StringBundler sb = new StringBundler(8); - - sb.append( - ExportImportPathUtil.getPortletPath( - portletDataContext, PortletKeys.DOCUMENT_LIBRARY)); - sb.append("/bin/"); - sb.append(fileEntry.getFileEntryId()); - sb.append(StringPool.SLASH); - sb.append(PREVIEW_PATH); - sb.append(fileEntry.getVersion()); - sb.append(StringPool.SLASH); - sb.append(type); - - return sb.toString(); - } - - protected abstract List getFileVersionIds(); - - protected String getPreviewFilePath(FileVersion fileVersion) { - return getPreviewFilePath(fileVersion, 0); - } - - protected String getPreviewFilePath(FileVersion fileVersion, int index) { - return getPreviewFilePath(fileVersion, index, getPreviewType()); - } - - protected String getPreviewFilePath( - FileVersion fileVersion, int index, String type) { - - return getPreviewFilePath( - fileVersion.getGroupId(), fileVersion.getFileEntryId(), - fileVersion.getFileVersionId(), index, type); - } - - protected String getPreviewFilePath(FileVersion fileVersion, String type) { - return getPreviewFilePath(fileVersion, 0, type); - } - - protected String getPreviewFilePath( - long groupId, long fileEntryId, long fileVersionId, int index, - String type) { - - StringBundler sb = null; - - if (index > 0) { - sb = new StringBundler(5); - } - else { - sb = new StringBundler(3); - } - - sb.append(getPathSegment(groupId, fileEntryId, fileVersionId, true)); - - if (index > 0) { - sb.append(StringPool.SLASH); - sb.append(index - 1); - } - - if (Validator.isNotNull(type)) { - sb.append(StringPool.PERIOD); - sb.append(type); - } - - return sb.toString(); - } - - protected String getPreviewFilePath( - long groupId, long fileEntryId, long fileVersionId, String type) { - - return getPreviewFilePath(groupId, fileEntryId, fileVersionId, 0, type); - } - - protected File getPreviewTempFile(String id) { - return getPreviewTempFile(id, 0); - } - - protected File getPreviewTempFile(String id, int index) { - return getPreviewTempFile(id, index, getPreviewType()); - } - - protected File getPreviewTempFile(String id, int index, String type) { - String previewTempFilePath = getPreviewTempFilePath(id, index, type); - - return new File(previewTempFilePath); - } - - protected File getPreviewTempFile(String id, String type) { - return getPreviewTempFile(id, 0, type); - } - - protected int getPreviewTempFileCount(FileVersion fileVersion) { - return getPreviewTempFileCount(fileVersion, getPreviewType()); - } - - protected int getPreviewTempFileCount( - FileVersion fileVersion, String type) { - - String tempFileId = DLUtil.getTempFileId( - fileVersion.getFileEntryId(), fileVersion.getVersion()); - - StringBundler sb = new StringBundler(5); - - sb.append(tempFileId); - sb.append(StringPool.DASH); - sb.append("(.*)"); - - if (Validator.isNotNull(type)) { - sb.append(StringPool.PERIOD); - sb.append(type); - } - - File dir = new File(PREVIEW_TMP_PATH); - - File[] files = dir.listFiles(new FileFilter(sb.toString())); - - if (_log.isDebugEnabled()) { - for (File file : files) { - _log.debug("Preview page for " + tempFileId + " " + file); - } - } - - return files.length; - } - - protected String getPreviewTempFilePath(String id) { - return getPreviewTempFilePath(id, 0); - } - - protected String getPreviewTempFilePath(String id, int index) { - return getPreviewTempFilePath(id, index, getPreviewType()); - } - - protected String getPreviewTempFilePath(String id, int index, String type) { - StringBundler sb = null; - - if (index > 0) { - sb = new StringBundler(6); - } - else { - sb = new StringBundler(4); - } - - sb.append(PREVIEW_TMP_PATH); - sb.append(id); - - if (index > 0) { - sb.append(StringPool.DASH); - sb.append(index - 1); - } - else if (index == -1) { - sb.append("-%d"); - } - - if (Validator.isNotNull(type)) { - sb.append(StringPool.PERIOD); - sb.append(type); - } - - return sb.toString(); - } - - protected String getPreviewTempFilePath(String id, String type) { - return getPreviewTempFilePath(id, 0, type); - } - - protected String getPreviewType() { - return getPreviewType(null); - } - - protected abstract String getPreviewType(FileVersion fileVersion); - - protected String getPreviewType(int index) { - String[] previewTypes = getPreviewTypes(); - - if ((previewTypes != null) && (previewTypes.length > index)) { - return previewTypes[index]; - } - else { - return getPreviewType(); - } - } - - protected String[] getPreviewTypes() { - return new String[] {getPreviewType()}; - } - - protected String getThumbnailFilePath(FileVersion fileVersion, int index) { - return getThumbnailFilePath(fileVersion, getThumbnailType(), index); - } - - protected String getThumbnailFilePath( - FileVersion fileVersion, String type, int index) { - - return getThumbnailFilePath( - fileVersion.getGroupId(), fileVersion.getFileEntryId(), - fileVersion.getFileVersionId(), type, index); - } - - protected String getThumbnailFilePath( - long groupId, long fileEntryId, long fileVersionId, - String thumbnailType, int index) { - - StringBundler sb = new StringBundler(5); - - sb.append(getPathSegment(groupId, fileEntryId, fileVersionId, false)); - - if (index != THUMBNAIL_INDEX_DEFAULT) { - sb.append(StringPool.DASH); - sb.append(index); - } - - if ((fileVersionId > 0) && Validator.isNotNull(thumbnailType)) { - sb.append(StringPool.PERIOD); - sb.append(thumbnailType); - } - - return sb.toString(); - } - - protected File getThumbnailTempFile(String id) { - return getThumbnailTempFile(id, getThumbnailType()); - } - - protected File getThumbnailTempFile(String id, String type) { - String thumbnailTempFilePath = getThumbnailTempFilePath(id, type); - - return new File(thumbnailTempFilePath); - } - - protected String getThumbnailTempFilePath(String id) { - return getThumbnailTempFilePath(id, getThumbnailType()); - } - - protected String getThumbnailTempFilePath(String id, String type) { - StringBundler sb = new StringBundler(4); - - sb.append(THUMBNAIL_TMP_PATH); - sb.append(id); - - if (Validator.isNotNull(type)) { - sb.append(StringPool.PERIOD); - sb.append(type); - } - - return sb.toString(); - } - - protected String getThumbnailType() { - return getThumbnailType(null); - } - - protected abstract String getThumbnailType(FileVersion fileVersion); - - protected boolean hasPreview(FileVersion fileVersion, String type) - throws Exception { - - String previewFilePath = getPreviewFilePath(fileVersion, type); - - if (DLStoreUtil.hasFile( - fileVersion.getCompanyId(), REPOSITORY_ID, previewFilePath)) { - - return true; - } - else { - return false; - } - } - - protected boolean hasPreviews(FileVersion fileVersion) throws Exception { - int count = 0; - - String[] previewTypes = getPreviewTypes(); - - for (String previewType : previewTypes) { - if (hasPreview(fileVersion, previewType)) { - count++; - } - } - - if (count == previewTypes.length) { - return true; - } - else { - return false; - } - } - - protected boolean hasThumbnail(FileVersion fileVersion, int index) { - try { - String imageType = getThumbnailType(fileVersion); - - return DLStoreUtil.hasFile( - fileVersion.getCompanyId(), REPOSITORY_ID, - getThumbnailFilePath(fileVersion, imageType, index)); - } - catch (Exception e) { - _log.error(e, e); - } - - return false; - } - - protected boolean hasThumbnails(FileVersion fileVersion) - throws SystemException { - - if ((isThumbnailEnabled(THUMBNAIL_INDEX_DEFAULT) && - !hasThumbnail(fileVersion, THUMBNAIL_INDEX_DEFAULT)) || - (isThumbnailEnabled(THUMBNAIL_INDEX_CUSTOM_1) && - !hasThumbnail(fileVersion, THUMBNAIL_INDEX_CUSTOM_1)) || - (isThumbnailEnabled(THUMBNAIL_INDEX_CUSTOM_2) && - !hasThumbnail(fileVersion, THUMBNAIL_INDEX_CUSTOM_2))) { - - return false; - } - - return true; - } - - protected void importPreview( - PortletDataContext portletDataContext, FileEntry fileEntry, - FileEntry importedFileEntry, Element fileEntryElement, - String binPathSuffix, String previewType) - throws Exception { - - importPreview( - portletDataContext, fileEntry, importedFileEntry, fileEntryElement, - binPathSuffix, previewType, -1); - } - - protected void importPreview( - PortletDataContext portletDataContext, FileEntry fileEntry, - FileEntry importedFileEntry, Element fileEntryElement, - String binPathSuffix, String previewType, int fileIndex) - throws Exception { - - if (!portletDataContext.isPerformDirectBinaryImport()) { - importPreviewFromLAR( - portletDataContext, importedFileEntry, fileEntryElement, - binPathSuffix, previewType, fileIndex); - } - else { - FileVersion importedFileVersion = - importedFileEntry.getFileVersion(); - - String previewFilePath = getPreviewFilePath( - importedFileVersion, previewType); - - FileVersion fileVersion = fileEntry.getFileVersion(); - - if (!hasPreview(fileVersion, previewType)) { - return; - } - - InputStream is = null; - - try { - if (fileIndex < 0) { - is = doGetPreviewAsStream(fileVersion, previewType); - } - else { - is = doGetPreviewAsStream( - fileVersion, fileIndex, previewType); - } - - addFileToStore( - portletDataContext.getCompanyId(), PREVIEW_PATH, - previewFilePath, is); - } - finally { - StreamUtil.cleanUp(is); - } - } - } - - protected void importPreviewFromLAR( - PortletDataContext portletDataContext, FileEntry fileEntry, - Element fileEntryElement, String binPathSuffix, String previewType, - int fileIndex) - throws Exception { - - FileVersion fileVersion = fileEntry.getFileVersion(); - - String binPathSegment = null; - - if (fileIndex < 0) { - binPathSegment = previewType; - } - else { - binPathSegment = Integer.toString(fileIndex + 1); - } - - StringBundler sb = new StringBundler(4); - - sb.append("bin-path-preview-"); - sb.append(binPathSegment); - sb.append("-"); - sb.append(binPathSuffix); - - String binPathName = sb.toString(); - - String binPath = fileEntryElement.attributeValue(binPathName); - - InputStream is = null; - - try { - is = portletDataContext.getZipEntryAsInputStream(binPath); - - if (is == null) { - return; - } - - String previewFilePath = null; - - if (fileIndex < 0) { - previewFilePath = getPreviewFilePath(fileVersion, previewType); - } - else { - previewFilePath = getPreviewFilePath( - fileVersion, fileIndex + 1); - } - - addFileToStore( - portletDataContext.getCompanyId(), PREVIEW_PATH, - previewFilePath, is); - } - finally { - StreamUtil.cleanUp(is); - } - } - - protected void importThumbnail( - PortletDataContext portletDataContext, FileEntry fileEntry, - FileEntry importedFileEntry, Element fileEntryElement, - String binPathName, int index) - throws Exception { - - if (!isThumbnailEnabled(index)) { - return; - } - - if (!portletDataContext.isPerformDirectBinaryImport()) { - importThumbnailFromLAR( - portletDataContext, importedFileEntry, fileEntryElement, - binPathName, index); - } - else { - FileVersion fileVersion = fileEntry.getFileVersion(); - - if (!hasThumbnail(fileVersion, index)) { - return; - } - - InputStream is = null; - - try { - is = doGetThumbnailAsStream(fileVersion, index); - - FileVersion importedFileVersion = - importedFileEntry.getFileVersion(); - - String thumbnailFilePath = getThumbnailFilePath( - importedFileVersion, getThumbnailType(importedFileVersion), - index); - - addFileToStore( - portletDataContext.getCompanyId(), THUMBNAIL_PATH, - thumbnailFilePath, is); - } - finally { - StreamUtil.cleanUp(is); - } - } - } - - protected void importThumbnailFromLAR( - PortletDataContext portletDataContext, FileEntry fileEntry, - Element fileEntryElement, String binPathName, int index) - throws Exception { - - FileVersion fileVersion = fileEntry.getFileVersion(); - - String binPath = fileEntryElement.attributeValue(binPathName); - - InputStream is = null; - - try { - is = portletDataContext.getZipEntryAsInputStream(binPath); - - if (is == null) { - return; - } - - String thumbnailFilePath = getThumbnailFilePath( - fileVersion, getThumbnailType(fileVersion), index); - - addFileToStore( - portletDataContext.getCompanyId(), THUMBNAIL_PATH, - thumbnailFilePath, is); - } - finally { - StreamUtil.cleanUp(is); - } - } - - protected void importThumbnails( - PortletDataContext portletDataContext, FileEntry fileEntry, - FileEntry importedFileEntry, Element fileEntryElement, - String binPathSuffix) - throws Exception { - - importThumbnail( - portletDataContext, fileEntry, importedFileEntry, fileEntryElement, - "bin-path-thumbnail-default-" + binPathSuffix, - THUMBNAIL_INDEX_DEFAULT); - importThumbnail( - portletDataContext, fileEntry, importedFileEntry, fileEntryElement, - "bin-path-thumbnail-custom-1-" + binPathSuffix, - THUMBNAIL_INDEX_CUSTOM_1); - importThumbnail( - portletDataContext, fileEntry, importedFileEntry, fileEntryElement, - "bin-path-thumbnail-custom-2-" + binPathSuffix, - THUMBNAIL_INDEX_CUSTOM_2); - } - - protected boolean isThumbnailEnabled(int index) throws SystemException { - if ((index == THUMBNAIL_INDEX_DEFAULT) && - GetterUtil.getBoolean( - PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_ENABLED))) { - - return true; - } - else if ((index == THUMBNAIL_INDEX_CUSTOM_1) && - ((PrefsPropsUtil.getInteger( - PropsKeys. - DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_HEIGHT) > 0) || - (PrefsPropsUtil.getInteger( - PropsKeys. - DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_WIDTH) > 0))) { - - return true; - } - else if ((index == THUMBNAIL_INDEX_CUSTOM_2) && - ((PrefsPropsUtil.getInteger( - PropsKeys. - DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_HEIGHT) > 0) || - (PrefsPropsUtil.getInteger( - PropsKeys. - DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_WIDTH) > 0))) { - - return true; - } - - return false; - } - - protected void sendGenerationMessage( - String destinationName, FileVersion sourceFileVersion, - FileVersion destinationFileVersion) { - - Object[] payload = {sourceFileVersion, destinationFileVersion}; - - MessageBusUtil.sendMessage(destinationName, payload); - } - - protected void storeThumbnailImage( - FileVersion fileVersion, RenderedImage renderedImage, int index) - throws Exception { - - if (!isThumbnailEnabled(index) || hasThumbnail(fileVersion, index)) { - return; - } - - String type = getThumbnailType(fileVersion); - - String maxHeightPropsKey = PropsKeys.DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT; - String maxWidthPropsKey = PropsKeys.DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH; - - if (index == THUMBNAIL_INDEX_CUSTOM_1) { - maxHeightPropsKey = - PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_HEIGHT; - maxWidthPropsKey = - PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_WIDTH; - } - else if (index == THUMBNAIL_INDEX_CUSTOM_2) { - maxHeightPropsKey = - PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_HEIGHT; - maxWidthPropsKey = - PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_WIDTH; - } - - RenderedImage thumbnailRenderedImage = ImageToolUtil.scale( - renderedImage, PrefsPropsUtil.getInteger(maxHeightPropsKey), - PrefsPropsUtil.getInteger(maxWidthPropsKey)); - - byte[] bytes = ImageToolUtil.getBytes(thumbnailRenderedImage, type); - - File file = null; - - try { - file = FileUtil.createTempFile(bytes); - - addFileToStore( - fileVersion.getCompanyId(), THUMBNAIL_PATH, - getThumbnailFilePath(fileVersion, type, index), file); - } - finally { - FileUtil.delete(file); - } - } - - protected void storeThumbnailImages(FileVersion fileVersion, File file) - throws Exception { - - ImageBag imageBag = ImageToolUtil.read(file); - - RenderedImage renderedImage = imageBag.getRenderedImage(); - - storeThumbnailImages(fileVersion, renderedImage); - } - - protected void storeThumbnailImages( - FileVersion fileVersion, RenderedImage renderedImage) - throws Exception { - - storeThumbnailImage( - fileVersion, renderedImage, THUMBNAIL_INDEX_DEFAULT); - storeThumbnailImage( - fileVersion, renderedImage, THUMBNAIL_INDEX_CUSTOM_1); - storeThumbnailImage( - fileVersion, renderedImage, THUMBNAIL_INDEX_CUSTOM_2); - } - - protected Map> futures = - new ConcurrentHashMap>(); - - private static Log _log = LogFactoryUtil.getLog( - DLPreviewableProcessor.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DefaultScreenNameValidator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DefaultScreenNameValidator.java deleted file mode 100644 index be1d861f74..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DefaultScreenNameValidator.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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 com.liferay.portal.security.auth; - -import com.liferay.portal.kernel.util.CharPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; - -/** - * @author Brian Wing Shun Chan - */ -public class DefaultScreenNameValidator implements ScreenNameValidator { - - public static final String CYRUS = "cyrus"; - - public static final String POSTFIX = "postfix"; - - @Override - public boolean validate(long companyId, String screenName) { - if (Validator.isEmailAddress(screenName) || - StringUtil.equalsIgnoreCase(screenName, CYRUS) || - StringUtil.equalsIgnoreCase(screenName, POSTFIX) || - (screenName.indexOf(CharPool.SLASH) != -1) || - (screenName.indexOf(CharPool.UNDERLINE) != -1)) { - - return false; - } - else { - return true; - } - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DroppedSupportOfServiceLoaderConditionTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DroppedSupportOfServiceLoaderConditionTest.java deleted file mode 100644 index 8698a2995a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/DroppedSupportOfServiceLoaderConditionTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.test; - -import com.liferay.portal.kernel.util.DefaultServiceLoaderCondition; -import com.liferay.portal.kernel.util.ServiceLoaderCondition; - -public class DroppedSupportOfServiceLoaderConditionTest { - public static void main(String[] args) { - DefaultServiceLoaderCondition dslc = New DefaultServiceLoaderCondition(); - - dslc.isLoad(new URL("")); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/EditConfigurationAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/EditConfigurationAction.java deleted file mode 100644 index b1a55743a7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/EditConfigurationAction.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * 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 com.liferay.portlet.portletconfiguration.action; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.portlet.ConfigurationAction; -import com.liferay.portal.kernel.portlet.ResourceServingConfigurationAction; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.Portlet; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.struts.PortletAction; -import com.liferay.portal.util.WebKeys; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.ResourceRequest; -import javax.portlet.ResourceResponse; - -import org.apache.struts.action.ActionForm; -import org.apache.struts.action.ActionForward; -import org.apache.struts.action.ActionMapping; - -/** - * @author Brian Wing Shun Chan - * @author Raymond Augé - */ -public class EditConfigurationAction extends PortletAction { - - @Override - public void processAction( - ActionMapping actionMapping, ActionForm actionForm, - PortletConfig portletConfig, ActionRequest actionRequest, - ActionResponse actionResponse) - throws Exception { - - Portlet portlet = null; - - try { - portlet = ActionUtil.getPortlet(actionRequest); - } - catch (PrincipalException pe) { - SessionErrors.add( - actionRequest, PrincipalException.class.getName()); - - setForward(actionRequest, "portlet.portlet_configuration.error"); - - return; - } - - actionRequest = ActionUtil.getWrappedActionRequest(actionRequest, null); - - ConfigurationAction configurationAction = getConfigurationAction( - portlet); - - if (configurationAction == null) { - return; - } - - configurationAction.processAction( - portletConfig, actionRequest, actionResponse); - } - - @Override - public ActionForward render( - ActionMapping actionMapping, ActionForm actionForm, - PortletConfig portletConfig, RenderRequest renderRequest, - RenderResponse renderResponse) - throws Exception { - - Portlet portlet = null; - - try { - portlet = ActionUtil.getPortlet(renderRequest); - } - catch (PrincipalException pe) { - SessionErrors.add( - renderRequest, PrincipalException.class.getName()); - - return actionMapping.findForward( - "portlet.portlet_configuration.error"); - } - - renderRequest = ActionUtil.getWrappedRenderRequest(renderRequest, null); - - renderResponse.setTitle(ActionUtil.getTitle(portlet, renderRequest)); - - ConfigurationAction configurationAction = getConfigurationAction( - portlet); - - if (configurationAction != null) { - String path = configurationAction.render( - portletConfig, renderRequest, renderResponse); - - if (_log.isDebugEnabled()) { - _log.debug("Configuration action returned render path " + path); - } - - if (Validator.isNotNull(path)) { - renderRequest.setAttribute( - WebKeys.CONFIGURATION_ACTION_PATH, path); - } - else { - _log.error("Configuration action returned a null path"); - } - } - - return actionMapping.findForward( - getForward( - renderRequest, - "portlet.portlet_configuration.edit_configuration")); - } - - @Override - public void serveResource( - ActionMapping actionMapping, ActionForm actionForm, - PortletConfig portletConfig, ResourceRequest resourceRequest, - ResourceResponse resourceResponse) - throws Exception { - - Portlet portlet = null; - - try { - portlet = ActionUtil.getPortlet(resourceRequest); - } - catch (PrincipalException pe) { - return; - } - - resourceRequest = ActionUtil.getWrappedResourceRequest( - resourceRequest, null); - - ResourceServingConfigurationAction resourceServingConfigurationAction = - (ResourceServingConfigurationAction)getConfigurationAction(portlet); - - if (resourceServingConfigurationAction == null) { - return; - } - - resourceServingConfigurationAction.serveResource( - portletConfig, resourceRequest, resourceResponse); - } - - protected ConfigurationAction getConfigurationAction(Portlet portlet) - throws Exception { - - if (portlet == null) { - return null; - } - - ConfigurationAction configurationAction = - portlet.getConfigurationActionInstance(); - - if (configurationAction == null) { - _log.error( - "Configuration action for portlet " + portlet.getPortletId() + - " is null"); - } - - return configurationAction; - } - - private static Log _log = LogFactoryUtil.getLog( - EditConfigurationAction.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/EditDiscussionAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/EditDiscussionAction.java deleted file mode 100644 index e3908084d6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/EditDiscussionAction.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * 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 com.liferay.portlet.messageboards.action; - -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.util.Constants; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.User; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.auth.PrincipalThreadLocal; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.service.SubscriptionLocalServiceUtil; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portal.struts.PortletAction; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.util.WebKeys; -import com.liferay.portlet.messageboards.MessageBodyException; -import com.liferay.portlet.messageboards.NoSuchMessageException; -import com.liferay.portlet.messageboards.RequiredMessageException; -import com.liferay.portlet.messageboards.model.MBMessage; -import com.liferay.portlet.messageboards.service.MBMessageServiceUtil; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import org.apache.struts.action.ActionForm; -import org.apache.struts.action.ActionForward; -import org.apache.struts.action.ActionMapping; - -/** - * @author Brian Wing Shun Chan - * @author Sergio González - */ -public class EditDiscussionAction extends PortletAction { - - @Override - public void processAction( - ActionMapping actionMapping, ActionForm actionForm, - PortletConfig portletConfig, ActionRequest actionRequest, - ActionResponse actionResponse) - throws Exception { - - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - - try { - String redirect = PortalUtil.escapeRedirect( - ParamUtil.getString(actionRequest, "redirect")); - - if (cmd.equals(Constants.ADD) || cmd.equals(Constants.UPDATE)) { - MBMessage message = updateMessage(actionRequest); - - boolean ajax = ParamUtil.getBoolean(actionRequest, "ajax"); - - if (ajax) { - String randomNamespace = ParamUtil.getString( - actionRequest, "randomNamespace"); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - jsonObject.put("messageId", message.getMessageId()); - jsonObject.put("randomNamespace", randomNamespace); - - writeJSON(actionRequest, actionResponse, jsonObject); - - return; - } - } - else if (cmd.equals(Constants.DELETE)) { - deleteMessage(actionRequest); - } - else if (cmd.equals(Constants.SUBSCRIBE_TO_COMMENTS)) { - subscribeToComments(actionRequest, true); - } - else if (cmd.equals(Constants.UNSUBSCRIBE_FROM_COMMENTS)) { - subscribeToComments(actionRequest, false); - } - - sendRedirect(actionRequest, actionResponse, redirect); - } - catch (Exception e) { - if (e instanceof MessageBodyException || - e instanceof NoSuchMessageException || - e instanceof PrincipalException || - e instanceof RequiredMessageException) { - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - jsonObject.putException(e); - - writeJSON(actionRequest, actionResponse, jsonObject); - } - else { - throw e; - } - } - } - - @Override - public ActionForward render( - ActionMapping actionMapping, ActionForm actionForm, - PortletConfig portletConfig, RenderRequest renderRequest, - RenderResponse renderResponse) - throws Exception { - - try { - ActionUtil.getMessage(renderRequest); - } - catch (Exception e) { - if (e instanceof NoSuchMessageException || - e instanceof PrincipalException) { - - SessionErrors.add(renderRequest, e.getClass()); - - return actionMapping.findForward( - "portlet.message_boards.error"); - } - else { - throw e; - } - } - - return actionMapping.findForward( - getForward( - renderRequest, "portlet.message_boards.edit_discussion")); - } - - protected void deleteMessage(ActionRequest actionRequest) throws Exception { - long groupId = PortalUtil.getScopeGroupId(actionRequest); - - String className = ParamUtil.getString(actionRequest, "className"); - long classPK = ParamUtil.getLong(actionRequest, "classPK"); - String permissionClassName = ParamUtil.getString( - actionRequest, "permissionClassName"); - long permissionClassPK = ParamUtil.getLong( - actionRequest, "permissionClassPK"); - long permissionOwnerId = ParamUtil.getLong( - actionRequest, "permissionOwnerId"); - - long messageId = ParamUtil.getLong(actionRequest, "messageId"); - - MBMessageServiceUtil.deleteDiscussionMessage( - groupId, className, classPK, permissionClassName, permissionClassPK, - permissionOwnerId, messageId); - } - - @Override - protected boolean isCheckMethodOnProcessAction() { - return _CHECK_METHOD_ON_PROCESS_ACTION; - } - - protected void subscribeToComments( - ActionRequest actionRequest, boolean subscribe) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String className = ParamUtil.getString(actionRequest, "className"); - long classPK = ParamUtil.getLong(actionRequest, "classPK"); - - if (subscribe) { - SubscriptionLocalServiceUtil.addSubscription( - themeDisplay.getUserId(), themeDisplay.getScopeGroupId(), - className, classPK); - } - else { - SubscriptionLocalServiceUtil.deleteSubscription( - themeDisplay.getUserId(), className, classPK); - } - } - - protected MBMessage updateMessage(ActionRequest actionRequest) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String className = ParamUtil.getString(actionRequest, "className"); - long classPK = ParamUtil.getLong(actionRequest, "classPK"); - String permissionClassName = ParamUtil.getString( - actionRequest, "permissionClassName"); - long permissionClassPK = ParamUtil.getLong( - actionRequest, "permissionClassPK"); - long permissionOwnerId = ParamUtil.getLong( - actionRequest, "permissionOwnerId"); - - long messageId = ParamUtil.getLong(actionRequest, "messageId"); - - long threadId = ParamUtil.getLong(actionRequest, "threadId"); - long parentMessageId = ParamUtil.getLong( - actionRequest, "parentMessageId"); - String subject = ParamUtil.getString(actionRequest, "subject"); - String body = ParamUtil.getString(actionRequest, "body"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - MBMessage.class.getName(), actionRequest); - - MBMessage message = null; - - if (messageId <= 0) { - - // Add message - - User user = null; - - if (themeDisplay.isSignedIn()) { - user = themeDisplay.getUser(); - } - else { - String emailAddress = ParamUtil.getString( - actionRequest, "emailAddress"); - - user = UserLocalServiceUtil.fetchUserByEmailAddress( - themeDisplay.getCompanyId(), emailAddress); - - if ((user == null) || - (user.getStatus() != WorkflowConstants.STATUS_INCOMPLETE)) { - - return null; - } - } - - String name = PrincipalThreadLocal.getName(); - - PrincipalThreadLocal.setName(user.getUserId()); - - try { - message = MBMessageServiceUtil.addDiscussionMessage( - serviceContext.getScopeGroupId(), className, classPK, - permissionClassName, permissionClassPK, permissionOwnerId, - threadId, parentMessageId, subject, body, serviceContext); - } - finally { - PrincipalThreadLocal.setName(name); - } - } - else { - - // Update message - - message = MBMessageServiceUtil.updateDiscussionMessage( - className, classPK, permissionClassName, permissionClassPK, - permissionOwnerId, messageId, subject, body, serviceContext); - } - - // Subscription - - boolean subscribe = ParamUtil.getBoolean(actionRequest, "subscribe"); - - if (subscribe) { - SubscriptionLocalServiceUtil.addSubscription( - themeDisplay.getUserId(), themeDisplay.getScopeGroupId(), - className, classPK); - } - - return message; - } - - private static final boolean _CHECK_METHOD_ON_PROCESS_ACTION = false; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/IndexerWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/IndexerWrapper.java deleted file mode 100644 index 46863ffba5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/IndexerWrapper.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * 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 com.liferay.portal.kernel.search; - -import com.liferay.portal.security.permission.PermissionChecker; - -import java.util.List; -import java.util.Locale; - -import javax.portlet.PortletURL; - -/** - * @author Brian Wing Shun Chan - */ -public class IndexerWrapper implements Indexer { - - public IndexerWrapper(Indexer indexer) { - _indexer = indexer; - } - - @Override - public void addRelatedEntryFields(Document document, Object obj) - throws Exception { - - _indexer.addRelatedEntryFields(document, obj); - } - - @Override - public void delete(long companyId, String uid) throws SearchException { - _indexer.delete(companyId, uid); - } - - @Override - public void delete(Object obj) throws SearchException { - _indexer.delete(obj); - } - - @Override - public String[] getClassNames() { - return _indexer.getClassNames(); - } - - @Override - public Document getDocument(Object obj) throws SearchException { - return _indexer.getDocument(obj); - } - - @Override - public BooleanQuery getFacetQuery( - String className, SearchContext searchContext) - throws Exception { - - return _indexer.getFacetQuery(className, searchContext); - } - - @Override - public BooleanQuery getFullQuery(SearchContext searchContext) - throws SearchException { - - return _indexer.getFullQuery(searchContext); - } - - @Override - public IndexerPostProcessor[] getIndexerPostProcessors() { - return _indexer.getIndexerPostProcessors(); - } - - @Override - public String getPortletId() { - return _indexer.getPortletId(); - } - - @Override - public String getSearchEngineId() { - return _indexer.getSearchEngineId(); - } - - @Override - public String getSortField(String orderByCol) { - return _indexer.getSortField(orderByCol); - } - - @Override - public String getSortField(String orderByCol, int sortType) { - return _indexer.getSortField(orderByCol, sortType); - } - - @Override - public Summary getSummary( - Document document, Locale locale, String snippet, - PortletURL portletURL) - throws SearchException { - - return _indexer.getSummary(document, locale, snippet, portletURL); - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, String entryClassName, - long entryClassPK, String actionId) - throws Exception { - - return _indexer.hasPermission( - permissionChecker, entryClassName, entryClassPK, actionId); - } - - @Override - public boolean isFilterSearch() { - return _indexer.isFilterSearch(); - } - - @Override - public boolean isPermissionAware() { - return _indexer.isPermissionAware(); - } - - @Override - public boolean isStagingAware() { - return _indexer.isStagingAware(); - } - - @Override - public void postProcessContextQuery( - BooleanQuery contextQuery, SearchContext searchContext) - throws Exception { - - _indexer.postProcessContextQuery(contextQuery, searchContext); - } - - @Override - public void postProcessSearchQuery( - BooleanQuery searchQuery, SearchContext searchContext) - throws Exception { - - _indexer.postProcessSearchQuery(searchQuery, searchContext); - } - - @Override - public void registerIndexerPostProcessor( - IndexerPostProcessor indexerPostProcessor) { - - _indexer.registerIndexerPostProcessor(indexerPostProcessor); - } - - @Override - public void reindex(Object obj) throws SearchException { - _indexer.reindex(obj); - } - - @Override - public void reindex(String className, long classPK) throws SearchException { - _indexer.reindex(className, classPK); - } - - @Override - public void reindex(String[] ids) throws SearchException { - _indexer.reindex(ids); - } - - @Override - public void reindexDDMStructures(List ddmStructureIds) - throws SearchException { - - _indexer.reindexDDMStructures(ddmStructureIds); - } - - @Override - public Hits search(SearchContext searchContext) throws SearchException { - return _indexer.search(searchContext); - } - - @Override - public void unregisterIndexerPostProcessor( - IndexerPostProcessor indexerPostProcessor) { - - _indexer.unregisterIndexerPostProcessor(indexerPostProcessor); - } - - private Indexer _indexer; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/InvokableServiceInterfaceImplementeTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/InvokableServiceInterfaceImplementeTest.java deleted file mode 100644 index 7fd1dd8305..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/InvokableServiceInterfaceImplementeTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.test - -import com.liferay.portal.kernel.service.InvokableService; -import com.liferay.portal.kernel.service.InvokableLocalService; - -public class InvokableServiceTest implements InvokableService { - @Override - public Object invokeMethod(String name, String[] parameterTypes, Object[] arguments) throws Throwable{ - return null; - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/JavaFileCheckerTestFile.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/JavaFileCheckerTestFile.java deleted file mode 100644 index d80b6257b7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/JavaFileCheckerTestFile.java +++ /dev/null @@ -1,50 +0,0 @@ -package blade.migrate.liferay70; - -public class JavaFileChecker { - boolean value = false; - - public static void main(String[] args) { - Foo foo = new Foo(); - - System.out.println( - foo. - bar(value)); - - System.out.println( - String. - valueOf(1)); - - foo.bar("1"); - JavaFileChecker andyTest = new Test(); - String str = null; - andyTest.call(str , str , str); - andyTest.call(str , new String() , str); - andyTest.call(str , new String() , andyTest.getString()); - andyTest.call(str , new String() , strange.getString()); - andyTest.call2(str,str,str); - JavaFileChecker.staticCall(str+"ss", str, str); - JavaFileChecker.staticCall(str , new String() , str); - JavaFileChecker.staticCall(str , new String() , andyTest.getString()); - JavaFileChecker.staticCall(str , new String() , strange.getString()); - } - - Foo foo = new Foo(); - - public void anotherMethod() { - foo.bar("2"); - } - - public void typeTest() { - NotFoo foo = new NotFoo(); - foo.bar(false); - } - - public String getString(){ - return new String(); - } - - - public static void staticCall(String str1 , String str2 , String str3){ - - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/KBArticleModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/KBArticleModelImpl.java deleted file mode 100644 index bff0c83910..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/KBArticleModelImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleModel; - -import com.liferay.portal.kernel.json.JSON; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.model.impl.BaseModelImpl; -import java.util.Date; - -@JSON(strict = true) -public class KBArticleModelImpl extends BaseModelImpl - implements KBArticleModel { - - @JSON - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _columnBitmask = -1L; - - _modifiedDate = modifiedDate; - } - - @Override - public int compareTo(KBArticle kbArticle) { - int value = 0; - - value = DateUtil.compareTo(getModifiedDate(), - kbArticle.getModifiedDate(),true); - - value = DateUtil.compareTo(getModifiedDate(), - kbArticle.getModifiedDate()); - - value = value * -1; - - if (value != 0) { - return value; - } - - return 0; - } - - private Date _modifiedDate; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/LiferayPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/LiferayPortlet.java deleted file mode 100644 index 6ee4eaf5bc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/LiferayPortlet.java +++ /dev/null @@ -1,427 +0,0 @@ -/** - * 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 com.liferay.portal.kernel.portlet; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.servlet.ServletResponseUtil; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.servlet.SessionMessages; -import com.liferay.portal.kernel.util.ContentTypes; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.JavaConstants; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; - -import java.io.IOException; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.GenericPortlet; -import javax.portlet.MimeResponse; -import javax.portlet.PortletConfig; -import javax.portlet.PortletException; -import javax.portlet.PortletMode; -import javax.portlet.PortletRequest; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.ResourceRequest; -import javax.portlet.ResourceResponse; -import javax.portlet.WindowState; - -import javax.servlet.http.HttpServletResponse; - -/** - * @author Brian Wing Shun Chan - */ -public class LiferayPortlet extends GenericPortlet { - - @Override - public void init() throws PortletException { - super.init(); - - addProcessActionSuccessMessage = GetterUtil.getBoolean( - getInitParameter("add-process-action-success-action"), true); - } - - @Override - public void processAction( - ActionRequest actionRequest, ActionResponse actionResponse) - throws IOException, PortletException { - - try { - if (!isProcessActionRequest(actionRequest)) { - return; - } - - if (!callActionMethod(actionRequest, actionResponse)) { - return; - } - - if (!SessionErrors.isEmpty(actionRequest)) { - return; - } - - if (!SessionMessages.isEmpty(actionRequest)) { - return; - } - - addSuccessMessage(actionRequest, actionResponse); - - sendRedirect(actionRequest, actionResponse); - } - catch (PortletException pe) { - Throwable cause = pe.getCause(); - - if (isSessionErrorException(cause)) { - SessionErrors.add(actionRequest, cause.getClass(), cause); - } - else { - throw pe; - } - } - } - - @Override - public void serveResource( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws IOException, PortletException { - - if (!isProcessResourceRequest(resourceRequest)) { - return; - } - - super.serveResource(resourceRequest, resourceResponse); - } - - protected void addSuccessMessage( - ActionRequest actionRequest, ActionResponse actionResponse) { - - if (!addProcessActionSuccessMessage) { - return; - } - - String successMessage = ParamUtil.getString( - actionRequest, "successMessage"); - - SessionMessages.add(actionRequest, "requestProcessed", successMessage); - } - - protected boolean callActionMethod( - ActionRequest actionRequest, ActionResponse actionResponse) - throws PortletException { - - String actionName = ParamUtil.getString( - actionRequest, ActionRequest.ACTION_NAME); - - if (Validator.isNull(actionName) || - actionName.equals("callActionMethod") || - actionName.equals("processAction")) { - - return false; - } - - try { - Method method = getActionMethod(actionName); - - method.invoke(this, actionRequest, actionResponse); - - return true; - } - catch (NoSuchMethodException nsme) { - try { - super.processAction(actionRequest, actionResponse); - - return true; - } - catch (Exception e) { - throw new PortletException(nsme); - } - } - catch (InvocationTargetException ite) { - Throwable cause = ite.getCause(); - - if (cause != null) { - throw new PortletException(cause); - } - else { - throw new PortletException(ite); - } - } - catch (Exception e) { - throw new PortletException(e); - } - } - - @SuppressWarnings("unused") - protected void doAbout( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - throw new PortletException("doAbout method not implemented"); - } - - @SuppressWarnings("unused") - protected void doConfig( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - throw new PortletException("doConfig method not implemented"); - } - - @Override - protected void doDispatch( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - if (!isProcessRenderRequest(renderRequest)) { - renderRequest.setAttribute(WebKeys.PORTLET_DECORATE, Boolean.FALSE); - - return; - } - - WindowState windowState = renderRequest.getWindowState(); - - if (windowState.equals(WindowState.MINIMIZED)) { - return; - } - - PortletMode portletMode = renderRequest.getPortletMode(); - - if (portletMode.equals(PortletMode.VIEW)) { - doView(renderRequest, renderResponse); - } - else if (portletMode.equals(LiferayPortletMode.ABOUT)) { - doAbout(renderRequest, renderResponse); - } - else if (portletMode.equals(LiferayPortletMode.CONFIG)) { - doConfig(renderRequest, renderResponse); - } - else if (portletMode.equals(PortletMode.EDIT)) { - doEdit(renderRequest, renderResponse); - } - else if (portletMode.equals(LiferayPortletMode.EDIT_DEFAULTS)) { - doEditDefaults(renderRequest, renderResponse); - } - else if (portletMode.equals(LiferayPortletMode.EDIT_GUEST)) { - doEditGuest(renderRequest, renderResponse); - } - else if (portletMode.equals(PortletMode.HELP)) { - doHelp(renderRequest, renderResponse); - } - else if (portletMode.equals(LiferayPortletMode.PREVIEW)) { - doPreview(renderRequest, renderResponse); - } - else if (portletMode.equals(LiferayPortletMode.PRINT)) { - doPrint(renderRequest, renderResponse); - } - else { - throw new PortletException(portletMode.toString()); - } - } - - @SuppressWarnings("unused") - protected void doEditDefaults( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - throw new PortletException("doEditDefaults method not implemented"); - } - - @SuppressWarnings("unused") - protected void doEditGuest( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - throw new PortletException("doEditGuest method not implemented"); - } - - @SuppressWarnings("unused") - protected void doPreview( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - throw new PortletException("doPreview method not implemented"); - } - - @SuppressWarnings("unused") - protected void doPrint( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - throw new PortletException("doPrint method not implemented"); - } - - protected Method getActionMethod(String actionName) - throws NoSuchMethodException { - - Method method = _actionMethods.get(actionName); - - if (method != null) { - return method; - } - - Class clazz = getClass(); - - method = clazz.getMethod( - actionName, ActionRequest.class, ActionResponse.class); - - _actionMethods.put(actionName, method); - - return method; - } - - protected String getRedirect( - ActionRequest actionRequest, ActionResponse actionResponse) { - - String redirect = (String)actionRequest.getAttribute(WebKeys.REDIRECT); - - if (Validator.isNull(redirect)) { - redirect = ParamUtil.getString(actionRequest, "redirect"); - } - - return redirect; - } - - @Override - protected String getTitle(RenderRequest renderRequest) { - try { - return PortalUtil.getPortletTitle(renderRequest); - } - catch (Exception e) { - return super.getTitle(renderRequest); - } - } - - protected boolean isProcessActionRequest(ActionRequest actionRequest) { - return isProcessPortletRequest(actionRequest); - } - - protected boolean isProcessPortletRequest(PortletRequest portletRequest) { - return _PROCESS_PORTLET_REQUEST; - } - - protected boolean isProcessRenderRequest(RenderRequest renderRequest) { - return isProcessPortletRequest(renderRequest); - } - - protected boolean isProcessResourceRequest( - ResourceRequest resourceRequest) { - - return isProcessPortletRequest(resourceRequest); - } - - protected boolean isSessionErrorException(Throwable cause) { - if (cause instanceof PortalException) { - return true; - } - - return false; - } - - protected void sendRedirect( - ActionRequest actionRequest, ActionResponse actionResponse) - throws IOException { - - String redirect = getRedirect(actionRequest, actionResponse); - - if (Validator.isNotNull(redirect)) { - actionResponse.sendRedirect(redirect); - } - } - - protected String translate(PortletRequest portletRequest, String key) { - PortletConfig portletConfig = - (PortletConfig)portletRequest.getAttribute( - JavaConstants.JAVAX_PORTLET_CONFIG); - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - return LanguageUtil.get(portletConfig, themeDisplay.getLocale(), key); - } - - protected String translate( - PortletRequest portletRequest, String key, Object argument) { - - PortletConfig portletConfig = - (PortletConfig)portletRequest.getAttribute( - JavaConstants.JAVAX_PORTLET_CONFIG); - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - return LanguageUtil.format( - portletConfig, themeDisplay.getLocale(), key, argument); - } - - protected String translate( - PortletRequest portletRequest, String key, Object[] arguments) { - - PortletConfig portletConfig = - (PortletConfig)portletRequest.getAttribute( - JavaConstants.JAVAX_PORTLET_CONFIG); - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - return LanguageUtil.format( - portletConfig, themeDisplay.getLocale(), key, arguments); - } - - protected void writeJSON( - PortletRequest portletRequest, ActionResponse actionResponse, - Object json) - throws IOException { - - HttpServletResponse response = PortalUtil.getHttpServletResponse( - actionResponse); - - response.setContentType(ContentTypes.APPLICATION_JSON); - - ServletResponseUtil.write(response, json.toString()); - - response.flushBuffer(); - } - - protected void writeJSON( - PortletRequest portletRequest, MimeResponse mimeResponse, - Object json) - throws IOException { - - mimeResponse.setContentType(ContentTypes.APPLICATION_JSON); - - PortletResponseUtil.write(mimeResponse, json.toString()); - - mimeResponse.flushBuffer(); - } - - protected boolean addProcessActionSuccessMessage; - - private static final boolean _PROCESS_PORTLET_REQUEST = true; - - private Map _actionMethods = - new ConcurrentHashMap(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/MediaWikiImporter.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/MediaWikiImporter.java deleted file mode 100644 index e96c0b1d3a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/MediaWikiImporter.java +++ /dev/null @@ -1,713 +0,0 @@ -/** - * 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 com.liferay.portlet.wiki.importers.mediawiki; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.io.unsync.UnsyncBufferedReader; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.CharPool; -import com.liferay.portal.kernel.util.MapUtil; -import com.liferay.portal.kernel.util.ObjectValuePair; -import com.liferay.portal.kernel.util.ProgressTracker; -import com.liferay.portal.kernel.util.ProgressTrackerThreadLocal; -import com.liferay.portal.kernel.util.SetUtil; -import com.liferay.portal.kernel.util.StreamUtil; -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.Validator; -import com.liferay.portal.kernel.xml.Attribute; -import com.liferay.portal.kernel.xml.Document; -import com.liferay.portal.kernel.xml.DocumentException; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.kernel.xml.SAXReaderUtil; -import com.liferay.portal.kernel.zip.ZipReader; -import com.liferay.portal.kernel.zip.ZipReaderFactoryUtil; -import com.liferay.portal.model.User; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portal.util.PropsValues; -import com.liferay.portlet.asset.NoSuchTagException; -import com.liferay.portlet.asset.model.AssetTag; -import com.liferay.portlet.asset.service.AssetTagLocalServiceUtil; -import com.liferay.portlet.asset.service.AssetTagPropertyLocalServiceUtil; -import com.liferay.portlet.asset.util.AssetUtil; -import com.liferay.portlet.documentlibrary.store.DLStoreUtil; -import com.liferay.portlet.wiki.ImportFilesException; -import com.liferay.portlet.wiki.NoSuchPageException; -import com.liferay.portlet.wiki.importers.WikiImporter; -import com.liferay.portlet.wiki.importers.WikiImporterKeys; -import com.liferay.portlet.wiki.model.WikiNode; -import com.liferay.portlet.wiki.model.WikiPage; -import com.liferay.portlet.wiki.model.WikiPageConstants; -import com.liferay.portlet.wiki.service.WikiPageLocalServiceUtil; -import com.liferay.portlet.wiki.translators.MediaWikiToCreoleTranslator; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @author Alvaro del Castillo - * @author Jorge Ferrer - */ -public class MediaWikiImporter implements WikiImporter { - - public static final String SHARED_IMAGES_CONTENT = "See attachments"; - - public static final String SHARED_IMAGES_TITLE = "SharedImages"; - - @Override - public void importPages( - long userId, WikiNode node, InputStream[] inputStreams, - Map options) - throws PortalException { - - if ((inputStreams.length < 1) || (inputStreams[0] == null)) { - throw new PortalException("The pages file is mandatory"); - } - - InputStream pagesInputStream = inputStreams[0]; - InputStream usersInputStream = inputStreams[1]; - InputStream imagesInputStream = inputStreams[2]; - - try { - Document document = SAXReaderUtil.read(pagesInputStream); - - Map usersMap = readUsersFile(usersInputStream); - - Element rootElement = document.getRootElement(); - - List specialNamespaces = readSpecialNamespaces(rootElement); - - processSpecialPages(userId, node, rootElement, specialNamespaces); - processRegularPages( - userId, node, rootElement, specialNamespaces, usersMap, - imagesInputStream, options); - processImages(userId, node, imagesInputStream); - - moveFrontPage(userId, node, options); - } - catch (DocumentException de) { - throw new ImportFilesException("Invalid XML file provided"); - } - catch (IOException ioe) { - throw new ImportFilesException("Error reading the files provided"); - } - catch (PortalException pe) { - throw pe; - } - catch (Exception e) { - throw new PortalException(e); - } - } - - protected long getUserId( - long userId, WikiNode node, String author, - Map usersMap) - throws SystemException { - - User user = null; - - String emailAddress = usersMap.get(author); - - if (Validator.isNotNull(emailAddress)) { - user = UserLocalServiceUtil.fetchUserByEmailAddress( - node.getCompanyId(), emailAddress); - } - else { - user = UserLocalServiceUtil.fetchUserByScreenName( - node.getCompanyId(), StringUtil.toLowerCase(author)); - } - - if (user != null) { - return user.getUserId(); - } - - return userId; - } - - protected void importPage( - long userId, String author, WikiNode node, String title, - String content, String summary, Map usersMap, - boolean strictImportMode) - throws PortalException { - - try { - long authorUserId = getUserId(userId, node, author, usersMap); - String parentTitle = readParentTitle(content); - String redirectTitle = readRedirectTitle(content); - - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - serviceContext.setAssetTagNames( - readAssetTagNames(userId, node, content)); - - if (Validator.isNull(redirectTitle)) { - _translator.setStrictImportMode(strictImportMode); - - content = _translator.translate(content); - } - else { - content = - StringPool.DOUBLE_OPEN_BRACKET + redirectTitle + - StringPool.DOUBLE_CLOSE_BRACKET; - } - - WikiPage page = null; - - try { - page = WikiPageLocalServiceUtil.getPage( - node.getNodeId(), title); - } - catch (NoSuchPageException nspe) { - page = WikiPageLocalServiceUtil.addPage( - authorUserId, node.getNodeId(), title, - WikiPageConstants.NEW, null, true, serviceContext); - } - - WikiPageLocalServiceUtil.updatePage( - authorUserId, node.getNodeId(), title, page.getVersion(), - content, summary, true, "creole", parentTitle, redirectTitle, - serviceContext); - } - catch (Exception e) { - throw new PortalException("Error importing page " + title, e); - } - } - - protected boolean isSpecialMediaWikiPage( - String title, List specialNamespaces) { - - for (String namespace : specialNamespaces) { - if (title.startsWith(namespace + StringPool.COLON)) { - return true; - } - } - - return false; - } - - protected boolean isValidImage(String[] paths, InputStream inputStream) { - if (_specialMediaWikiDirs.contains(paths[0])) { - return false; - } - - if ((paths.length > 1) && _specialMediaWikiDirs.contains(paths[1])) { - return false; - } - - String fileName = paths[paths.length - 1]; - - try { - DLStoreUtil.validate(fileName, true, inputStream); - } - catch (PortalException pe) { - return false; - } - catch (SystemException se) { - return false; - } - - return true; - } - - protected void moveFrontPage( - long userId, WikiNode node, Map options) { - - String frontPageTitle = MapUtil.getString( - options, WikiImporterKeys.OPTIONS_FRONT_PAGE); - - if (Validator.isNotNull(frontPageTitle)) { - frontPageTitle = normalizeTitle(frontPageTitle); - - try { - if (WikiPageLocalServiceUtil.getPagesCount( - node.getNodeId(), frontPageTitle, true) > 0) { - - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - - WikiPageLocalServiceUtil.movePage( - userId, node.getNodeId(), frontPageTitle, - WikiPageConstants.FRONT_PAGE, false, serviceContext); - } - } - catch (Exception e) { - if (_log.isWarnEnabled()) { - StringBundler sb = new StringBundler(4); - - sb.append("Could not move "); - sb.append(WikiPageConstants.FRONT_PAGE); - sb.append(" to the title provided: "); - sb.append(frontPageTitle); - - _log.warn(sb.toString(), e); - } - } - } - } - - protected String normalize(String categoryName, int length) { - categoryName = AssetUtil.toWord(categoryName.trim()); - - return StringUtil.shorten(categoryName, length); - } - - protected String normalizeDescription(String description) { - description = description.replaceAll( - _categoriesPattern.pattern(), StringPool.BLANK); - - return normalize(description, 255); - } - - protected String normalizeTitle(String title) { - title = title.replaceAll( - PropsValues.WIKI_PAGE_TITLES_REMOVE_REGEXP, StringPool.BLANK); - - return StringUtil.shorten(title, 75); - } - - protected void processImages( - long userId, WikiNode node, InputStream imagesInputStream) - throws Exception { - - if (imagesInputStream == null) { - return; - } - - ProgressTracker progressTracker = - ProgressTrackerThreadLocal.getProgressTracker(); - - int count = 0; - - ZipReader zipReader = ZipReaderFactoryUtil.getZipReader( - imagesInputStream); - - List entries = zipReader.getEntries(); - - int total = entries.size(); - - if (total > 0) { - try { - WikiPageLocalServiceUtil.getPage( - node.getNodeId(), SHARED_IMAGES_TITLE); - } - catch (NoSuchPageException nspe) { - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - - WikiPageLocalServiceUtil.addPage( - userId, node.getNodeId(), SHARED_IMAGES_TITLE, - SHARED_IMAGES_CONTENT, null, true, serviceContext); - } - } - - List> inputStreamOVPs = - new ArrayList>(); - - try { - int percentage = 50; - - for (int i = 0; i < entries.size(); i++) { - String entry = entries.get(i); - - String key = entry; - - InputStream inputStream = zipReader.getEntryAsInputStream( - entry); - - String[] paths = StringUtil.split(key, CharPool.SLASH); - - if (!isValidImage(paths, inputStream)) { - if (_log.isInfoEnabled()) { - _log.info("Ignoring " + key); - } - - continue; - } - - String fileName = StringUtil.toLowerCase( - paths[paths.length - 1]); - - ObjectValuePair inputStreamOVP = - new ObjectValuePair( - fileName, inputStream); - - inputStreamOVPs.add(inputStreamOVP); - - count++; - - if ((i % 5) == 0) { - WikiPageLocalServiceUtil.addPageAttachments( - userId, node.getNodeId(), SHARED_IMAGES_TITLE, - inputStreamOVPs); - - inputStreamOVPs.clear(); - - percentage = Math.min(50 + (i * 50) / total, 99); - - progressTracker.setPercent(percentage); - } - } - - if (!inputStreamOVPs.isEmpty()) { - WikiPageLocalServiceUtil.addPageAttachments( - userId, node.getNodeId(), SHARED_IMAGES_TITLE, - inputStreamOVPs); - } - } - finally { - for (ObjectValuePair inputStreamOVP : - inputStreamOVPs) { - - InputStream inputStream = inputStreamOVP.getValue(); - - StreamUtil.cleanUp(inputStream); - } - } - - zipReader.close(); - - if (_log.isInfoEnabled()) { - _log.info("Imported " + count + " images into " + node.getName()); - } - } - - protected void processRegularPages( - long userId, WikiNode node, Element rootElement, - List specialNamespaces, Map usersMap, - InputStream imagesInputStream, Map options) { - - boolean importLatestVersion = MapUtil.getBoolean( - options, WikiImporterKeys.OPTIONS_IMPORT_LATEST_VERSION); - boolean strictImportMode = MapUtil.getBoolean( - options, WikiImporterKeys.OPTIONS_STRICT_IMPORT_MODE); - - ProgressTracker progressTracker = - ProgressTrackerThreadLocal.getProgressTracker(); - - int count = 0; - - int percentage = 10; - - int maxPercentage = 50; - - if (imagesInputStream == null) { - maxPercentage = 99; - } - - List pageElements = rootElement.elements("page"); - - for (int i = 0; i < pageElements.size(); i++) { - Element pageElement = pageElements.get(i); - - String title = pageElement.elementText("title"); - - if (isSpecialMediaWikiPage(title, specialNamespaces)) { - continue; - } - - title = normalizeTitle(title); - - percentage = Math.min( - 10 + (i * (maxPercentage - percentage)) / pageElements.size(), - maxPercentage); - - progressTracker.setPercent(percentage); - - List revisionElements = pageElement.elements("revision"); - - if (importLatestVersion) { - Element lastRevisionElement = revisionElements.get( - revisionElements.size() - 1); - - revisionElements = new ArrayList(); - - revisionElements.add(lastRevisionElement); - } - - for (Element revisionElement : revisionElements) { - Element contributorElement = revisionElement.element( - "contributor"); - - String author = contributorElement.elementText("username"); - - String content = revisionElement.elementText("text"); - String summary = revisionElement.elementText("comment"); - - try { - importPage( - userId, author, node, title, content, summary, usersMap, - strictImportMode); - } - catch (Exception e) { - if (_log.isWarnEnabled()) { - _log.warn( - "Page with title " + title + - " could not be imported", - e); - } - } - } - - count++; - } - - if (_log.isInfoEnabled()) { - _log.info("Imported " + count + " pages into " + node.getName()); - } - } - - protected void processSpecialPages( - long userId, WikiNode node, Element rootElement, - List specialNamespaces) - throws PortalException { - - ProgressTracker progressTracker = - ProgressTrackerThreadLocal.getProgressTracker(); - - List pageElements = rootElement.elements("page"); - - for (int i = 0; i < pageElements.size(); i++) { - Element pageElement = pageElements.get(i); - - String title = pageElement.elementText("title"); - - if (!title.startsWith("Category:")) { - if (isSpecialMediaWikiPage(title, specialNamespaces)) { - rootElement.remove(pageElement); - } - - continue; - } - - String categoryName = title.substring("Category:".length()); - - categoryName = normalize(categoryName, 75); - - Element revisionElement = pageElement.element("revision"); - - String description = revisionElement.elementText("text"); - - description = normalizeDescription(description); - - try { - AssetTag assetTag = null; - - try { - assetTag = AssetTagLocalServiceUtil.getTag( - node.getGroupId(), categoryName); - } - catch (NoSuchTagException nste) { - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - serviceContext.setScopeGroupId(node.getGroupId()); - - assetTag = AssetTagLocalServiceUtil.addTag( - userId, categoryName, null, serviceContext); - - if (PropsValues.ASSET_TAG_PROPERTIES_ENABLED && - Validator.isNotNull(description)) { - - AssetTagPropertyLocalServiceUtil.addTagProperty( - userId, assetTag.getTagId(), "description", - description); - } - } - } - catch (SystemException se) { - _log.error(se, se); - } - - if ((i % 5) == 0) { - progressTracker.setPercent((i * 10) / pageElements.size()); - } - } - } - - protected String[] readAssetTagNames( - long userId, WikiNode node, String content) - throws PortalException, SystemException { - - Matcher matcher = _categoriesPattern.matcher(content); - - List assetTagNames = new ArrayList(); - - while (matcher.find()) { - String categoryName = matcher.group(1); - - categoryName = normalize(categoryName, 75); - - AssetTag assetTag = null; - - try { - assetTag = AssetTagLocalServiceUtil.getTag( - node.getGroupId(), categoryName); - } - catch (NoSuchTagException nste) { - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - serviceContext.setScopeGroupId(node.getGroupId()); - - assetTag = AssetTagLocalServiceUtil.addTag( - userId, categoryName, null, serviceContext); - } - - assetTagNames.add(assetTag.getName()); - } - - if (content.contains(_WORK_IN_PROGRESS)) { - assetTagNames.add(_WORK_IN_PROGRESS_TAG); - } - - return assetTagNames.toArray(new String[assetTagNames.size()]); - } - - protected String readParentTitle(String content) { - Matcher matcher = _parentPattern.matcher(content); - - String redirectTitle = StringPool.BLANK; - - if (matcher.find()) { - redirectTitle = matcher.group(1); - - redirectTitle = normalizeTitle(redirectTitle); - - redirectTitle += " (disambiguation)"; - } - - return redirectTitle; - } - - protected String readRedirectTitle(String content) { - Matcher matcher = _redirectPattern.matcher(content); - - String redirectTitle = StringPool.BLANK; - - if (matcher.find()) { - redirectTitle = matcher.group(1); - - redirectTitle = normalizeTitle(redirectTitle); - } - - return redirectTitle; - } - - protected List readSpecialNamespaces(Element root) - throws ImportFilesException { - - List namespaces = new ArrayList(); - - Element siteinfoElement = root.element("siteinfo"); - - if (siteinfoElement == null) { - throw new ImportFilesException("Invalid pages XML file"); - } - - Element namespacesElement = siteinfoElement.element("namespaces"); - - List namespaceElements = namespacesElement.elements( - "namespace"); - - for (Element namespaceElement : namespaceElements) { - Attribute attribute = namespaceElement.attribute("key"); - - String value = attribute.getValue(); - - if (!value.equals("0")) { - namespaces.add(namespaceElement.getText()); - } - } - - return namespaces; - } - - protected Map readUsersFile(InputStream usersInputStream) - throws IOException { - - if (usersInputStream == null) { - return Collections.emptyMap(); - } - - Map usersMap = new HashMap(); - - UnsyncBufferedReader unsyncBufferedReader = new UnsyncBufferedReader( - new InputStreamReader(usersInputStream)); - - String line = unsyncBufferedReader.readLine(); - - while (line != null) { - String[] array = StringUtil.split(line); - - if ((array.length == 2) && Validator.isNotNull(array[0]) && - Validator.isNotNull(array[1])) { - - usersMap.put(array[0], array[1]); - } - else { - if (_log.isInfoEnabled()) { - _log.info( - "Ignoring line " + line + - " because it does not contain exactly 2 columns"); - } - } - - line = unsyncBufferedReader.readLine(); - } - - return usersMap; - } - - private static final String _WORK_IN_PROGRESS = "{{Work in progress}}"; - - private static final String _WORK_IN_PROGRESS_TAG = "work in progress"; - - private static Log _log = LogFactoryUtil.getLog(MediaWikiImporter.class); - - private static Pattern _categoriesPattern = Pattern.compile( - "\\[\\[[Cc]ategory:([^\\]]*)\\]\\][\\n]*"); - private static Pattern _parentPattern = Pattern.compile( - "\\{{2}OtherTopics\\|([^\\}]*)\\}{2}"); - private static Pattern _redirectPattern = Pattern.compile( - "#REDIRECT \\[\\[([^\\]]*)\\]\\]"); - private static Set _specialMediaWikiDirs = SetUtil.fromArray( - new String[] {"archive", "temp", "thumb"}); - - private MediaWikiToCreoleTranslator _translator = - new MediaWikiToCreoleTranslator(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/PortalServiceImports.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/PortalServiceImports.java deleted file mode 100644 index a62a42045a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/PortalServiceImports.java +++ /dev/null @@ -1,12 +0,0 @@ -import com.liferay.portal.kernel.mobile.device.rulegroup.action.ActionHandler; -import com.liferay.portal.kernel.mobile.device.rulegroup.ActionHandlerManager; - -import com.liferay.blogs.kernel.model.BlogsEntry; -import com.liferay.blogs.kernel.model.BlogsEntryModel; - -import com.liferay.portal.kernel.cache.cluster.PortalCacheClusterException; -import com.liferay.portal.kernel.cache.cluster.PortalCacheClusterLink; - -public class MovedClassesImports { - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/PortletsPackageTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/PortletsPackageTest.java deleted file mode 100644 index 1428d72fca..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/PortletsPackageTest.java +++ /dev/null @@ -1,5312 +0,0 @@ -/** - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * The contents of this file are subject to the terms of the Liferay Enterprise - * Subscription License ("License"). You may not use this file except in - * compliance with the License. You can obtain a copy of the License by - * contacting Liferay, Inc. See the License for the specific language governing - * permissions and limitations under the License, including but not limited to - * distribution rights of the Software. - * - * - * - */ - -package com.liferay.portlet.wiki.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.SQLQuery; -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.SetUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.security.permission.InlineSQLHelperUtil; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import com.liferay.portlet.wiki.NoSuchNodeException; -import com.liferay.portlet.wiki.model.WikiNode; -import com.liferay.portlet.wiki.model.impl.WikiNodeImpl; -import com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * The persistence implementation for the wiki node service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see WikiNodePersistence - * @see WikiNodeUtil - * @generated - */ -public class WikiNodePersistenceImpl extends BasePersistenceImpl - implements WikiNodePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link WikiNodeUtil} to access the wiki node persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = WikiNodeImpl.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(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.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_UUID = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", - new String[] { String.class.getName() }, - WikiNodeModelImpl.UUID_COLUMN_BITMASK | - WikiNodeModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", - new String[] { String.class.getName() }); - - /** - * Returns all the wiki nodes where uuid = ?. - * - * @param uuid the uuid - * @return the matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid) throws SystemException { - return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the wiki nodes where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @return the range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, int start, int end) - throws SystemException { - return findByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the wiki nodes where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, 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_UUID; - finderArgs = new Object[] { uuid }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; - finderArgs = new Object[] { uuid, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (WikiNode wikiNode : list) { - if (!Validator.equals(uuid, wikiNode.getUuid())) { - 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_WIKINODE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(WikiNodeModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 wiki node in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByUuid_First(String uuid, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByUuid_First(uuid, orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the first wiki node in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByUuid_First(String uuid, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid(uuid, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last wiki node in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByUuid_Last(String uuid, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByUuid_Last(uuid, orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the last wiki node in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByUuid_Last(String uuid, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid(uuid); - - if (count == 0) { - return null; - } - - List list = findByUuid(uuid, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the wiki nodes before and after the current wiki node in the ordered set where uuid = ?. - * - * @param nodeId the primary key of the current wiki node - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode[] findByUuid_PrevAndNext(long nodeId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = findByPrimaryKey(nodeId); - - Session session = null; - - try { - session = openSession(); - - WikiNode[] array = new WikiNodeImpl[3]; - - array[0] = getByUuid_PrevAndNext(session, wikiNode, uuid, - orderByComparator, true); - - array[1] = wikiNode; - - array[2] = getByUuid_PrevAndNext(session, wikiNode, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected WikiNode getByUuid_PrevAndNext(Session session, - WikiNode wikiNode, String uuid, 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_WIKINODE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_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(WikiNodeModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(wikiNode); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the wiki nodes where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid(String uuid) throws SystemException { - for (WikiNode wikiNode : findByUuid(uuid, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(wikiNode); - } - } - - /** - * Returns the number of wiki nodes where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid(String uuid) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; - - Object[] finderArgs = new Object[] { uuid }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_WIKINODE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_UUID_1 = "wikiNode.uuid IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2 = "wikiNode.uuid = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3 = "(wikiNode.uuid IS NULL OR wikiNode.uuid = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }, - WikiNodeModelImpl.UUID_COLUMN_BITMASK | - WikiNodeModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns the wiki node where uuid = ? and groupId = ? or throws a {@link com.liferay.portlet.wiki.NoSuchNodeException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByUUID_G(String uuid, long groupId) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByUUID_G(uuid, groupId); - - if (wikiNode == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchNodeException(msg.toString()); - } - - return wikiNode; - } - - /** - * Returns the wiki node where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByUUID_G(String uuid, long groupId) - throws SystemException { - return fetchByUUID_G(uuid, groupId, true); - } - - /** - * Returns the wiki node where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByUUID_G(String uuid, long groupId, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { uuid, groupId }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, this); - } - - if (result instanceof WikiNode) { - WikiNode wikiNode = (WikiNode)result; - - if (!Validator.equals(uuid, wikiNode.getUuid()) || - (groupId != wikiNode.getGroupId())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_WIKINODE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, list); - } - else { - WikiNode wikiNode = list.get(0); - - result = wikiNode; - - cacheResult(wikiNode); - - if ((wikiNode.getUuid() == null) || - !wikiNode.getUuid().equals(uuid) || - (wikiNode.getGroupId() != groupId)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, wikiNode); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (WikiNode)result; - } - } - - /** - * Removes the wiki node where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the wiki node that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode removeByUUID_G(String uuid, long groupId) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = findByUUID_G(uuid, groupId); - - return remove(wikiNode); - } - - /** - * Returns the number of wiki nodes where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUUID_G(String uuid, long groupId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; - - Object[] finderArgs = new Object[] { uuid, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_WIKINODE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - 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_UUID_G_UUID_1 = "wikiNode.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "wikiNode.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(wikiNode.uuid IS NULL OR wikiNode.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "wikiNode.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", - new String[] { - String.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = - new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }, - WikiNodeModelImpl.UUID_COLUMN_BITMASK | - WikiNodeModelImpl.COMPANYID_COLUMN_BITMASK | - WikiNodeModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns all the wiki nodes where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId) - throws SystemException { - return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the wiki nodes where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @return the range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId, int start, - int end) throws SystemException { - return findByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the wiki nodes where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, 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_UUID_C; - finderArgs = new Object[] { uuid, companyId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; - finderArgs = new Object[] { - uuid, companyId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (WikiNode wikiNode : list) { - if (!Validator.equals(uuid, wikiNode.getUuid()) || - (companyId != wikiNode.getCompanyId())) { - 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_WIKINODE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(WikiNodeModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 wiki node in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByUuid_C_First(uuid, companyId, - orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the first wiki node in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid_C(uuid, companyId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last wiki node in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByUuid_C_Last(uuid, companyId, - orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the last wiki node in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid_C(uuid, companyId); - - if (count == 0) { - return null; - } - - List list = findByUuid_C(uuid, companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the wiki nodes before and after the current wiki node in the ordered set where uuid = ? and companyId = ?. - * - * @param nodeId the primary key of the current wiki node - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode[] findByUuid_C_PrevAndNext(long nodeId, String uuid, - long companyId, OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = findByPrimaryKey(nodeId); - - Session session = null; - - try { - session = openSession(); - - WikiNode[] array = new WikiNodeImpl[3]; - - array[0] = getByUuid_C_PrevAndNext(session, wikiNode, uuid, - companyId, orderByComparator, true); - - array[1] = wikiNode; - - array[2] = getByUuid_C_PrevAndNext(session, wikiNode, uuid, - companyId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected WikiNode getByUuid_C_PrevAndNext(Session session, - WikiNode wikiNode, String uuid, 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_WIKINODE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_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(WikiNodeModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(wikiNode); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the wiki nodes where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid_C(String uuid, long companyId) - throws SystemException { - for (WikiNode wikiNode : findByUuid_C(uuid, companyId, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(wikiNode); - } - } - - /** - * Returns the number of wiki nodes where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid_C(String uuid, long companyId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; - - Object[] finderArgs = new Object[] { uuid, companyId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_WIKINODE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_C_UUID_1 = "wikiNode.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "wikiNode.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(wikiNode.uuid IS NULL OR wikiNode.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "wikiNode.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByGroupId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID = - new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByGroupId", - new String[] { Long.class.getName() }, - WikiNodeModelImpl.GROUPID_COLUMN_BITMASK | - WikiNodeModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_GROUPID = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByGroupId", - new String[] { Long.class.getName() }); - - /** - * Returns all the wiki nodes where groupId = ?. - * - * @param groupId the group ID - * @return the matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId) throws SystemException { - return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the wiki nodes where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @return the range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, int start, int end) - throws SystemException { - return findByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the wiki nodes where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, 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_GROUPID; - finderArgs = new Object[] { groupId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID; - finderArgs = new Object[] { groupId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (WikiNode wikiNode : list) { - if ((groupId != wikiNode.getGroupId())) { - 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_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(WikiNodeModelImpl.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(groupId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 wiki node in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByGroupId_First(long groupId, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByGroupId_First(groupId, orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the first wiki node in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByGroupId_First(long groupId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByGroupId(groupId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last wiki node in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByGroupId_Last(long groupId, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByGroupId_Last(groupId, orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the last wiki node in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByGroupId_Last(long groupId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByGroupId(groupId); - - if (count == 0) { - return null; - } - - List list = findByGroupId(groupId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the wiki nodes before and after the current wiki node in the ordered set where groupId = ?. - * - * @param nodeId the primary key of the current wiki node - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode[] findByGroupId_PrevAndNext(long nodeId, long groupId, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = findByPrimaryKey(nodeId); - - Session session = null; - - try { - session = openSession(); - - WikiNode[] array = new WikiNodeImpl[3]; - - array[0] = getByGroupId_PrevAndNext(session, wikiNode, groupId, - orderByComparator, true); - - array[1] = wikiNode; - - array[2] = getByGroupId_PrevAndNext(session, wikiNode, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected WikiNode getByGroupId_PrevAndNext(Session session, - WikiNode wikiNode, long groupId, 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_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_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(WikiNodeModelImpl.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(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(wikiNode); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the wiki nodes that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching wiki nodes that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId) - throws SystemException { - return filterFindByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the wiki nodes that the user has permission to view where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @return the range of matching wiki nodes that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, int end) - throws SystemException { - return filterFindByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the wiki nodes that the user has permissions to view where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching wiki nodes that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId(groupId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(3 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_WIKINODE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(WikiNodeModelImpl.ORDER_BY_JPQL); - } - else { - query.append(WikiNodeModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - WikiNode.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, WikiNodeImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, WikiNodeImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the wiki nodes before and after the current wiki node in the ordered set of wiki nodes that the user has permission to view where groupId = ?. - * - * @param nodeId the primary key of the current wiki node - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode[] filterFindByGroupId_PrevAndNext(long nodeId, - long groupId, OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId_PrevAndNext(nodeId, groupId, orderByComparator); - } - - WikiNode wikiNode = findByPrimaryKey(nodeId); - - Session session = null; - - try { - session = openSession(); - - WikiNode[] array = new WikiNodeImpl[3]; - - array[0] = filterGetByGroupId_PrevAndNext(session, wikiNode, - groupId, orderByComparator, true); - - array[1] = wikiNode; - - array[2] = filterGetByGroupId_PrevAndNext(session, wikiNode, - groupId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected WikiNode filterGetByGroupId_PrevAndNext(Session session, - WikiNode wikiNode, long groupId, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_WIKINODE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(WikiNodeModelImpl.ORDER_BY_JPQL); - } - else { - query.append(WikiNodeModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - WikiNode.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, WikiNodeImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, WikiNodeImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(wikiNode); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the wiki nodes where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByGroupId(long groupId) throws SystemException { - for (WikiNode wikiNode : findByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(wikiNode); - } - } - - /** - * Returns the number of wiki nodes where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public int countByGroupId(long groupId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_GROUPID; - - Object[] finderArgs = new Object[] { groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - 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(); - } - - /** - * Returns the number of wiki nodes that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching wiki nodes that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByGroupId(long groupId) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByGroupId(groupId); - } - - StringBundler query = new StringBundler(2); - - query.append(_FILTER_SQL_COUNT_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - WikiNode.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 = "wikiNode.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_COMPANYID = - new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.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(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByCompanyId", - new String[] { Long.class.getName() }, - WikiNodeModelImpl.COMPANYID_COLUMN_BITMASK | - WikiNodeModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByCompanyId", - new String[] { Long.class.getName() }); - - /** - * Returns all the wiki nodes where companyId = ?. - * - * @param companyId the company ID - * @return the matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId) - throws SystemException { - return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the wiki nodes where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @return the range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId, int start, int end) - throws SystemException { - return findByCompanyId(companyId, start, end, null); - } - - /** - * Returns an ordered range of all the wiki nodes where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (WikiNode wikiNode : list) { - if ((companyId != wikiNode.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_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(WikiNodeModelImpl.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)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 wiki node in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByCompanyId_First(long companyId, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByCompanyId_First(companyId, orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - 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 NoSuchNodeException(msg.toString()); - } - - /** - * Returns the first wiki node in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByCompanyId_First(long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByCompanyId(companyId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last wiki node in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByCompanyId_Last(companyId, orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - 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 NoSuchNodeException(msg.toString()); - } - - /** - * Returns the last wiki node in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByCompanyId(companyId); - - if (count == 0) { - return null; - } - - List list = findByCompanyId(companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the wiki nodes before and after the current wiki node in the ordered set where companyId = ?. - * - * @param nodeId the primary key of the current wiki node - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode[] findByCompanyId_PrevAndNext(long nodeId, long companyId, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = findByPrimaryKey(nodeId); - - Session session = null; - - try { - session = openSession(); - - WikiNode[] array = new WikiNodeImpl[3]; - - array[0] = getByCompanyId_PrevAndNext(session, wikiNode, companyId, - orderByComparator, true); - - array[1] = wikiNode; - - array[2] = getByCompanyId_PrevAndNext(session, wikiNode, companyId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected WikiNode getByCompanyId_PrevAndNext(Session session, - WikiNode wikiNode, 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_WIKINODE_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(WikiNodeModelImpl.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(wikiNode); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the wiki nodes 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 (WikiNode wikiNode : findByCompanyId(companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(wikiNode); - } - } - - /** - * Returns the number of wiki nodes where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching wiki nodes - * @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_WIKINODE_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 = "wikiNode.companyId = ?"; - public static final FinderPath FINDER_PATH_FETCH_BY_G_N = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByG_N", - new String[] { Long.class.getName(), String.class.getName() }, - WikiNodeModelImpl.GROUPID_COLUMN_BITMASK | - WikiNodeModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_N = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_N", - new String[] { Long.class.getName(), String.class.getName() }); - - /** - * Returns the wiki node where groupId = ? and name = ? or throws a {@link com.liferay.portlet.wiki.NoSuchNodeException} if it could not be found. - * - * @param groupId the group ID - * @param name the name - * @return the matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByG_N(long groupId, String name) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByG_N(groupId, name); - - if (wikiNode == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", name="); - msg.append(name); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchNodeException(msg.toString()); - } - - return wikiNode; - } - - /** - * Returns the wiki node where groupId = ? and name = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param name the name - * @return the matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByG_N(long groupId, String name) - throws SystemException { - return fetchByG_N(groupId, name, true); - } - - /** - * Returns the wiki node where groupId = ? and name = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param name the name - * @param retrieveFromCache whether to use the finder cache - * @return the matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByG_N(long groupId, String name, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { groupId, name }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_G_N, - finderArgs, this); - } - - if (result instanceof WikiNode) { - WikiNode wikiNode = (WikiNode)result; - - if ((groupId != wikiNode.getGroupId()) || - !Validator.equals(name, wikiNode.getName())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_G_N_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_N_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_N_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_N_NAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name); - } - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_N, - finderArgs, list); - } - else { - WikiNode wikiNode = list.get(0); - - result = wikiNode; - - cacheResult(wikiNode); - - if ((wikiNode.getGroupId() != groupId) || - (wikiNode.getName() == null) || - !wikiNode.getName().equals(name)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_N, - finderArgs, wikiNode); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_N, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (WikiNode)result; - } - } - - /** - * Removes the wiki node where groupId = ? and name = ? from the database. - * - * @param groupId the group ID - * @param name the name - * @return the wiki node that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode removeByG_N(long groupId, String name) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = findByG_N(groupId, name); - - return remove(wikiNode); - } - - /** - * Returns the number of wiki nodes where groupId = ? and name = ?. - * - * @param groupId the group ID - * @param name the name - * @return the number of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_N(long groupId, String name) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_N; - - Object[] finderArgs = new Object[] { groupId, name }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_G_N_GROUPID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_N_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_N_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_N_NAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (bindName) { - qPos.add(name); - } - - 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_G_N_GROUPID_2 = "wikiNode.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_N_NAME_1 = "wikiNode.name IS NULL"; - private static final String _FINDER_COLUMN_G_N_NAME_2 = "wikiNode.name = ?"; - private static final String _FINDER_COLUMN_G_N_NAME_3 = "(wikiNode.name IS NULL OR wikiNode.name = '')"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - WikiNodeModelImpl.GROUPID_COLUMN_BITMASK | - WikiNodeModelImpl.STATUS_COLUMN_BITMASK | - WikiNodeModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_S = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the wiki nodes where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status) - throws SystemException { - return findByG_S(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the wiki nodes where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @return the range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, int start, int end) - throws SystemException { - return findByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the wiki nodes where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, 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_G_S; - finderArgs = new Object[] { groupId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S; - finderArgs = new Object[] { - groupId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (WikiNode wikiNode : list) { - if ((groupId != wikiNode.getGroupId()) || - (status != wikiNode.getStatus())) { - 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_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(WikiNodeModelImpl.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(groupId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 wiki node in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByG_S_First(groupId, status, orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the first wiki node in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_S(groupId, status, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last wiki node in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByG_S_Last(groupId, status, orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the last wiki node in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_S(groupId, status); - - if (count == 0) { - return null; - } - - List list = findByG_S(groupId, status, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the wiki nodes before and after the current wiki node in the ordered set where groupId = ? and status = ?. - * - * @param nodeId the primary key of the current wiki node - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode[] findByG_S_PrevAndNext(long nodeId, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = findByPrimaryKey(nodeId); - - Session session = null; - - try { - session = openSession(); - - WikiNode[] array = new WikiNodeImpl[3]; - - array[0] = getByG_S_PrevAndNext(session, wikiNode, groupId, status, - orderByComparator, true); - - array[1] = wikiNode; - - array[2] = getByG_S_PrevAndNext(session, wikiNode, groupId, status, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected WikiNode getByG_S_PrevAndNext(Session session, WikiNode wikiNode, - long groupId, int status, 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_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_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(WikiNodeModelImpl.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(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(wikiNode); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the wiki nodes that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching wiki nodes that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status) - throws SystemException { - return filterFindByG_S(groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the wiki nodes that the user has permission to view where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @return the range of matching wiki nodes that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end) throws SystemException { - return filterFindByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the wiki nodes that the user has permissions to view where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching wiki nodes that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S(groupId, status, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_WIKINODE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(WikiNodeModelImpl.ORDER_BY_JPQL); - } - else { - query.append(WikiNodeModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - WikiNode.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, WikiNodeImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, WikiNodeImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the wiki nodes before and after the current wiki node in the ordered set of wiki nodes that the user has permission to view where groupId = ? and status = ?. - * - * @param nodeId the primary key of the current wiki node - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode[] filterFindByG_S_PrevAndNext(long nodeId, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S_PrevAndNext(nodeId, groupId, status, - orderByComparator); - } - - WikiNode wikiNode = findByPrimaryKey(nodeId); - - Session session = null; - - try { - session = openSession(); - - WikiNode[] array = new WikiNodeImpl[3]; - - array[0] = filterGetByG_S_PrevAndNext(session, wikiNode, groupId, - status, orderByComparator, true); - - array[1] = wikiNode; - - array[2] = filterGetByG_S_PrevAndNext(session, wikiNode, groupId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected WikiNode filterGetByG_S_PrevAndNext(Session session, - WikiNode wikiNode, long groupId, int status, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_WIKINODE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(WikiNodeModelImpl.ORDER_BY_JPQL); - } - else { - query.append(WikiNodeModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - WikiNode.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, WikiNodeImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, WikiNodeImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(wikiNode); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the wiki nodes where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_S(long groupId, int status) throws SystemException { - for (WikiNode wikiNode : findByG_S(groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(wikiNode); - } - } - - /** - * Returns the number of wiki nodes where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_S(long groupId, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_S; - - Object[] finderArgs = new Object[] { groupId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of wiki nodes that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching wiki nodes that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_S(long groupId, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_S(groupId, status); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - WikiNode.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_S_GROUPID_2 = "wikiNode.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_S_STATUS_2 = "wikiNode.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_C_S = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByC_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_S = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, WikiNodeImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByC_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - WikiNodeModelImpl.COMPANYID_COLUMN_BITMASK | - WikiNodeModelImpl.STATUS_COLUMN_BITMASK | - WikiNodeModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_C_S = new FinderPath(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByC_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the wiki nodes where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @return the matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_S(long companyId, int status) - throws SystemException { - return findByC_S(companyId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the wiki nodes where companyId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param status the status - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @return the range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_S(long companyId, int status, int start, - int end) throws SystemException { - return findByC_S(companyId, status, start, end, null); - } - - /** - * Returns an ordered range of all the wiki nodes where companyId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param status the status - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_S(long companyId, int status, 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_C_S; - finderArgs = new Object[] { companyId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_C_S; - finderArgs = new Object[] { - companyId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (WikiNode wikiNode : list) { - if ((companyId != wikiNode.getCompanyId()) || - (status != wikiNode.getStatus())) { - 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_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_C_S_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(WikiNodeModelImpl.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); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 wiki node in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByC_S_First(long companyId, int status, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByC_S_First(companyId, status, - orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("companyId="); - msg.append(companyId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the first wiki node in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByC_S_First(long companyId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByC_S(companyId, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last wiki node in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByC_S_Last(long companyId, int status, - OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByC_S_Last(companyId, status, orderByComparator); - - if (wikiNode != null) { - return wikiNode; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("companyId="); - msg.append(companyId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchNodeException(msg.toString()); - } - - /** - * Returns the last wiki node in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching wiki node, or null if a matching wiki node could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByC_S_Last(long companyId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByC_S(companyId, status); - - if (count == 0) { - return null; - } - - List list = findByC_S(companyId, status, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the wiki nodes before and after the current wiki node in the ordered set where companyId = ? and status = ?. - * - * @param nodeId the primary key of the current wiki node - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode[] findByC_S_PrevAndNext(long nodeId, long companyId, - int status, OrderByComparator orderByComparator) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = findByPrimaryKey(nodeId); - - Session session = null; - - try { - session = openSession(); - - WikiNode[] array = new WikiNodeImpl[3]; - - array[0] = getByC_S_PrevAndNext(session, wikiNode, companyId, - status, orderByComparator, true); - - array[1] = wikiNode; - - array[2] = getByC_S_PrevAndNext(session, wikiNode, companyId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected WikiNode getByC_S_PrevAndNext(Session session, WikiNode wikiNode, - long companyId, int status, 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_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_C_S_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_S_STATUS_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(WikiNodeModelImpl.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); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(wikiNode); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the wiki nodes where companyId = ? and status = ? from the database. - * - * @param companyId the company ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByC_S(long companyId, int status) - throws SystemException { - for (WikiNode wikiNode : findByC_S(companyId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(wikiNode); - } - } - - /** - * Returns the number of wiki nodes where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @return the number of matching wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public int countByC_S(long companyId, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_C_S; - - Object[] finderArgs = new Object[] { companyId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_WIKINODE_WHERE); - - query.append(_FINDER_COLUMN_C_S_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(companyId); - - qPos.add(status); - - 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_C_S_COMPANYID_2 = "wikiNode.companyId = ? AND "; - private static final String _FINDER_COLUMN_C_S_STATUS_2 = "wikiNode.status = ?"; - - public WikiNodePersistenceImpl() { - setModelClass(WikiNode.class); - } - - /** - * Caches the wiki node in the entity cache if it is enabled. - * - * @param wikiNode the wiki node - */ - @Override - public void cacheResult(WikiNode wikiNode) { - EntityCacheUtil.putResult(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeImpl.class, wikiNode.getPrimaryKey(), wikiNode); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - new Object[] { wikiNode.getUuid(), wikiNode.getGroupId() }, wikiNode); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_N, - new Object[] { wikiNode.getGroupId(), wikiNode.getName() }, wikiNode); - - wikiNode.resetOriginalValues(); - } - - /** - * Caches the wiki nodes in the entity cache if it is enabled. - * - * @param wikiNodes the wiki nodes - */ - @Override - public void cacheResult(List wikiNodes) { - for (WikiNode wikiNode : wikiNodes) { - if (EntityCacheUtil.getResult( - WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeImpl.class, wikiNode.getPrimaryKey()) == null) { - cacheResult(wikiNode); - } - else { - wikiNode.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all wiki nodes. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(WikiNodeImpl.class.getName()); - } - - EntityCacheUtil.clearCache(WikiNodeImpl.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 wiki node. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache(WikiNode wikiNode) { - EntityCacheUtil.removeResult(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeImpl.class, wikiNode.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(wikiNode); - } - - @Override - public void clearCache(List wikiNodes) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (WikiNode wikiNode : wikiNodes) { - EntityCacheUtil.removeResult(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeImpl.class, wikiNode.getPrimaryKey()); - - clearUniqueFindersCache(wikiNode); - } - } - - protected void cacheUniqueFindersCache(WikiNode wikiNode) { - if (wikiNode.isNew()) { - Object[] args = new Object[] { - wikiNode.getUuid(), wikiNode.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - wikiNode); - - args = new Object[] { wikiNode.getGroupId(), wikiNode.getName() }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_N, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_N, args, wikiNode); - } - else { - WikiNodeModelImpl wikiNodeModelImpl = (WikiNodeModelImpl)wikiNode; - - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - wikiNode.getUuid(), wikiNode.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - wikiNode); - } - - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_N.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - wikiNode.getGroupId(), wikiNode.getName() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_N, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_N, args, - wikiNode); - } - } - } - - protected void clearUniqueFindersCache(WikiNode wikiNode) { - WikiNodeModelImpl wikiNodeModelImpl = (WikiNodeModelImpl)wikiNode; - - Object[] args = new Object[] { wikiNode.getUuid(), wikiNode.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - args = new Object[] { - wikiNodeModelImpl.getOriginalUuid(), - wikiNodeModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - } - - args = new Object[] { wikiNode.getGroupId(), wikiNode.getName() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_N, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_N, args); - - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_N.getColumnBitmask()) != 0) { - args = new Object[] { - wikiNodeModelImpl.getOriginalGroupId(), - wikiNodeModelImpl.getOriginalName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_N, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_N, args); - } - } - - /** - * Creates a new wiki node with the primary key. Does not add the wiki node to the database. - * - * @param nodeId the primary key for the new wiki node - * @return the new wiki node - */ - @Override - public WikiNode create(long nodeId) { - WikiNode wikiNode = new WikiNodeImpl(); - - wikiNode.setNew(true); - wikiNode.setPrimaryKey(nodeId); - - String uuid = PortalUUIDUtil.generate(); - - wikiNode.setUuid(uuid); - - return wikiNode; - } - - /** - * Removes the wiki node with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param nodeId the primary key of the wiki node - * @return the wiki node that was removed - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode remove(long nodeId) - throws NoSuchNodeException, SystemException { - return remove((Serializable)nodeId); - } - - /** - * Removes the wiki node with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the wiki node - * @return the wiki node that was removed - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode remove(Serializable primaryKey) - throws NoSuchNodeException, SystemException { - Session session = null; - - try { - session = openSession(); - - WikiNode wikiNode = (WikiNode)session.get(WikiNodeImpl.class, - primaryKey); - - if (wikiNode == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchNodeException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(wikiNode); - } - catch (NoSuchNodeException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected WikiNode removeImpl(WikiNode wikiNode) throws SystemException { - wikiNode = toUnwrappedModel(wikiNode); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(wikiNode)) { - wikiNode = (WikiNode)session.get(WikiNodeImpl.class, - wikiNode.getPrimaryKeyObj()); - } - - if (wikiNode != null) { - session.delete(wikiNode); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (wikiNode != null) { - clearCache(wikiNode); - } - - return wikiNode; - } - - @Override - public WikiNode updateImpl(com.liferay.portlet.wiki.model.WikiNode wikiNode) - throws SystemException { - wikiNode = toUnwrappedModel(wikiNode); - - boolean isNew = wikiNode.isNew(); - - WikiNodeModelImpl wikiNodeModelImpl = (WikiNodeModelImpl)wikiNode; - - if (Validator.isNull(wikiNode.getUuid())) { - String uuid = PortalUUIDUtil.generate(); - - wikiNode.setUuid(uuid); - } - - Session session = null; - - try { - session = openSession(); - - if (wikiNode.isNew()) { - session.save(wikiNode); - - wikiNode.setNew(false); - } - else { - session.merge(wikiNode); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !WikiNodeModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { wikiNodeModelImpl.getOriginalUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - - args = new Object[] { wikiNodeModelImpl.getUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - } - - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - wikiNodeModelImpl.getOriginalUuid(), - wikiNodeModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - - args = new Object[] { - wikiNodeModelImpl.getUuid(), - wikiNodeModelImpl.getCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - } - - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - wikiNodeModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - - args = new Object[] { wikiNodeModelImpl.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - } - - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - wikiNodeModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - - args = new Object[] { wikiNodeModelImpl.getCompanyId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - } - - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - wikiNodeModelImpl.getOriginalGroupId(), - wikiNodeModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - - args = new Object[] { - wikiNodeModelImpl.getGroupId(), - wikiNodeModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - } - - if ((wikiNodeModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - wikiNodeModelImpl.getOriginalCompanyId(), - wikiNodeModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_S, - args); - - args = new Object[] { - wikiNodeModelImpl.getCompanyId(), - wikiNodeModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_S, - args); - } - } - - EntityCacheUtil.putResult(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeImpl.class, wikiNode.getPrimaryKey(), wikiNode); - - clearUniqueFindersCache(wikiNode); - cacheUniqueFindersCache(wikiNode); - - return wikiNode; - } - - protected WikiNode toUnwrappedModel(WikiNode wikiNode) { - if (wikiNode instanceof WikiNodeImpl) { - return wikiNode; - } - - WikiNodeImpl wikiNodeImpl = new WikiNodeImpl(); - - wikiNodeImpl.setNew(wikiNode.isNew()); - wikiNodeImpl.setPrimaryKey(wikiNode.getPrimaryKey()); - - wikiNodeImpl.setUuid(wikiNode.getUuid()); - wikiNodeImpl.setNodeId(wikiNode.getNodeId()); - wikiNodeImpl.setGroupId(wikiNode.getGroupId()); - wikiNodeImpl.setCompanyId(wikiNode.getCompanyId()); - wikiNodeImpl.setUserId(wikiNode.getUserId()); - wikiNodeImpl.setUserName(wikiNode.getUserName()); - wikiNodeImpl.setCreateDate(wikiNode.getCreateDate()); - wikiNodeImpl.setModifiedDate(wikiNode.getModifiedDate()); - wikiNodeImpl.setName(wikiNode.getName()); - wikiNodeImpl.setDescription(wikiNode.getDescription()); - wikiNodeImpl.setLastPostDate(wikiNode.getLastPostDate()); - wikiNodeImpl.setStatus(wikiNode.getStatus()); - wikiNodeImpl.setStatusByUserId(wikiNode.getStatusByUserId()); - wikiNodeImpl.setStatusByUserName(wikiNode.getStatusByUserName()); - wikiNodeImpl.setStatusDate(wikiNode.getStatusDate()); - - return wikiNodeImpl; - } - - /** - * Returns the wiki node 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 wiki node - * @return the wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByPrimaryKey(Serializable primaryKey) - throws NoSuchNodeException, SystemException { - WikiNode wikiNode = fetchByPrimaryKey(primaryKey); - - if (wikiNode == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchNodeException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return wikiNode; - } - - /** - * Returns the wiki node with the primary key or throws a {@link com.liferay.portlet.wiki.NoSuchNodeException} if it could not be found. - * - * @param nodeId the primary key of the wiki node - * @return the wiki node - * @throws com.liferay.portlet.wiki.NoSuchNodeException if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode findByPrimaryKey(long nodeId) - throws NoSuchNodeException, SystemException { - return findByPrimaryKey((Serializable)nodeId); - } - - /** - * Returns the wiki node with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the wiki node - * @return the wiki node, or null if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - WikiNode wikiNode = (WikiNode)EntityCacheUtil.getResult(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeImpl.class, primaryKey); - - if (wikiNode == _nullWikiNode) { - return null; - } - - if (wikiNode == null) { - Session session = null; - - try { - session = openSession(); - - wikiNode = (WikiNode)session.get(WikiNodeImpl.class, primaryKey); - - if (wikiNode != null) { - cacheResult(wikiNode); - } - else { - EntityCacheUtil.putResult(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeImpl.class, primaryKey, _nullWikiNode); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(WikiNodeModelImpl.ENTITY_CACHE_ENABLED, - WikiNodeImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return wikiNode; - } - - /** - * Returns the wiki node with the primary key or returns null if it could not be found. - * - * @param nodeId the primary key of the wiki node - * @return the wiki node, or null if a wiki node with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public WikiNode fetchByPrimaryKey(long nodeId) throws SystemException { - return fetchByPrimaryKey((Serializable)nodeId); - } - - /** - * Returns all the wiki nodes. - * - * @return the wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the wiki nodes. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @return the range of wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the wiki nodes. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.wiki.model.impl.WikiNodeModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of wiki nodes - * @param end the upper bound of the range of wiki nodes (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of wiki nodes - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_WIKINODE); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_WIKINODE; - - if (pagination) { - sql = sql.concat(WikiNodeModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 wiki nodes from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (WikiNode wikiNode : findAll()) { - remove(wikiNode); - } - } - - /** - * Returns the number of wiki nodes. - * - * @return the number of wiki nodes - * @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_WIKINODE); - - 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(); - } - - @Override - protected Set getBadColumnNames() { - return _badColumnNames; - } - - /** - * Initializes the wiki node persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.portal.util.PropsUtil.get( - "value.object.listener.com.liferay.portlet.wiki.model.WikiNode"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(WikiNodeImpl.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_WIKINODE = "SELECT wikiNode FROM WikiNode wikiNode"; - private static final String _SQL_SELECT_WIKINODE_WHERE = "SELECT wikiNode FROM WikiNode wikiNode WHERE "; - private static final String _SQL_COUNT_WIKINODE = "SELECT COUNT(wikiNode) FROM WikiNode wikiNode"; - private static final String _SQL_COUNT_WIKINODE_WHERE = "SELECT COUNT(wikiNode) FROM WikiNode wikiNode WHERE "; - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN = "wikiNode.nodeId"; - private static final String _FILTER_SQL_SELECT_WIKINODE_WHERE = "SELECT DISTINCT {wikiNode.*} FROM WikiNode wikiNode WHERE "; - private static final String _FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_1 = - "SELECT {WikiNode.*} FROM (SELECT DISTINCT wikiNode.nodeId FROM WikiNode wikiNode WHERE "; - private static final String _FILTER_SQL_SELECT_WIKINODE_NO_INLINE_DISTINCT_WHERE_2 = - ") TEMP_TABLE INNER JOIN WikiNode ON TEMP_TABLE.nodeId = WikiNode.nodeId"; - private static final String _FILTER_SQL_COUNT_WIKINODE_WHERE = "SELECT COUNT(DISTINCT wikiNode.nodeId) AS COUNT_VALUE FROM WikiNode wikiNode WHERE "; - private static final String _FILTER_ENTITY_ALIAS = "wikiNode"; - private static final String _FILTER_ENTITY_TABLE = "WikiNode"; - private static final String _ORDER_BY_ENTITY_ALIAS = "wikiNode."; - private static final String _ORDER_BY_ENTITY_TABLE = "WikiNode."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No WikiNode exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No WikiNode exists with the key {"; - private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = com.liferay.portal.util.PropsValues.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE; - private static Log _log = LogFactoryUtil.getLog(WikiNodePersistenceImpl.class); - private static Set _badColumnNames = SetUtil.fromArray(new String[] { - "uuid" - }); - private static WikiNode _nullWikiNode = new WikiNodeImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullWikiNodeCacheModel; - } - }; - - private static CacheModel _nullWikiNodeCacheModel = new CacheModel() { - @Override - public WikiNode toEntityModel() { - return _nullWikiNode; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemoveAssetTagsSelectorTagUnitTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemoveAssetTagsSelectorTagUnitTest.java deleted file mode 100644 index dd77f0c6d2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemoveAssetTagsSelectorTagUnitTest.java +++ /dev/null @@ -1,7 +0,0 @@ -import com.liferay.asset.taglib.servlet.taglib.soy.AssetTagsSelectorTag; - -public class RemoveAssetTagsSelectorTagUnitTest extends AssetTagsSelectorTag { - public static void main(String args[]) { - - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemoveJournalArticleTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemoveJournalArticleTest.java deleted file mode 100644 index 9b2232cf74..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemoveJournalArticleTest.java +++ /dev/null @@ -1,89 +0,0 @@ - -public class RemoveJournalArticleTest { - - @Test - public void testInvocationMethod() throws Exception { - - _journalArticleModel.getContent(); - _journalArticleModel.setContent("test"); - - _journalArticleSoap.getContent(); - _journalArticleSoap.setContent("test"); - - _journalArticleWrapper.setContent("test"); - - _journalArticleLocalService.checkNewLine(); - _journalArticleLocalService.setContent("test"); - - JournalArticleLocalServiceUtil.checkNewLine(); - JournalArticleLocalServiceUtil.updateContent("test"); - - _journalArticleLocalServiceWrapper.checkNewLine(); - _journalArticleLocalServiceWrapper.updateContent("test"); - - _journalArticleService.updateContent("test"); - - JournalArticleServiceUtil.updateContent("test"); - - _journalArticleServiceWrapper.updateContent("test"); - - _journalArticleImpl.setContent("test"); - - _journalArticleModelImpl.getContent(); - - _journalArticleModelImpl.setContent("test"); - - JournalArticleServiceHttp.updateContent("test"); - - JournalArticleServiceSoap.updateContent("test"); - - _journalArticleLocalServiceImpl.checkNewLine(); - - _journalArticleLocalServiceImpl.updateContent(); - - _journalArticleServiceImpl.updateContent("test"); - - } - - @Reference - private JournalArticleModel _journalArticleModel; - - @Reference - private JournalArticleSoap _journalArticleSoap; - - @Reference - private JournalArticleWrapper _journalArticleWrapper; - - @Reference - private JournalArticleLocalService _journalArticleLocalService; - - @Reference - private JournalArticleLocalServiceWrapper _journalArticleLocalServiceWrapper; - - @Reference - private JournalArticleService _journalArticleService; - - @Reference - private JournalArticleServiceWrapper _journalArticleServiceWrapper; - - @Reference - private JournalArticleLocalServiceWrapper _journalArticleLocalServiceWrapper; - - @Reference - private JournalArticleImpl _journalArticleImpl; - - @Reference - private JournalArticleModelImpl _journalArticleModelImpl; - - @Reference - private JournalArticleServiceHttp _journalArticleServiceHttp; - - @Reference - private JournalArticleServiceSoap _journalArticleServiceSoap; - - @Reference - private JournalArticleLocalServiceImpl _journalArticleLocalServiceImpl; - - @Reference - private JournalArticleServiceImpl _journalArticleServiceImpl; -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemoveSanitizedServletResponseStaticMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemoveSanitizedServletResponseStaticMethodsTest.java deleted file mode 100644 index 4df0e83e02..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemoveSanitizedServletResponseStaticMethodsTest.java +++ /dev/null @@ -1,28 +0,0 @@ - -public class RemoveSanitizedServletResponseStaticMethodsTest { - - @Test - public void testInvocationMethod() throws Exception { - - SanitizedServletResponse.disableXSSAuditor(_httpServletResponse); - - SanitizedServletResponse.disableXSSAuditor(_portletResponse) - - SanitizedServletResponse.disableXSSAuditorOnNextRequest(_httpServletRequest) - - SanitizedServletResponse.disableXSSAuditorOnNextRequest(_portletRequest) - } - - @Reference - private HttpServletResponse _httpServletResponse; - - @Reference - private PortletResponse _portletResponse; - - @Reference - private HttpServletRequest _httpServletRequest; - - @Reference - private PortletRequest _portletRequest; - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemovedAbilitySpecifyClassLoadersInScriptingTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemovedAbilitySpecifyClassLoadersInScriptingTest.java deleted file mode 100644 index 055c96d166..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemovedAbilitySpecifyClassLoadersInScriptingTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * 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 com.liferay.portal.kernel.scripting; - -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.scripting.Scripting; -import java.io.File; -import java.io.IOException; - -import java.util.Map; -import java.util.Set; - -/** - * @author Alberto Montero - * @author Brian Wing Shun Chan - */ -public abstract class RemovedAbilitySpecifyClassLoadersInScriptingExecutorTest implements ScriptingExecutor { - - public void clearCache() { - } - - public Map eval( - Set allowedClasses, Map inputObjects, - Set outputNames, File scriptFile, - ClassLoader... classloaders) - throws ScriptingException { - - try { - String script = FileUtil.read(scriptFile); - - return eval( - allowedClasses, inputObjects, outputNames, script, - classloaders); - } - catch (IOException ioe) { - throw new ScriptingException(ioe); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemovedTheWAPFunctionalityUnitTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemovedTheWAPFunctionalityUnitTest.java deleted file mode 100644 index 8759140384..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RemovedTheWAPFunctionalityUnitTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package blade.migrate.liferay70; -public class RemovedTheWAPFunctionalityUnitTest { - public static void main(String[] args) - { - try - { - LayoutLocalServiceUtil.updateLookAndFeel(); - LayoutRevisionLocalServiceUtil.addLayoutRevision(); - LayoutRevisionLocalServiceUtil.updateLayoutRevision(); - LayoutRevisionServiceUtil.addLayoutRevision(); - LayoutServiceUtil.updateLookAndFeel(); - LayoutSetLocalServiceUtil.updateLookAndFeel(); - LayoutSetServiceUtil.updateLookAndFeel(); - ThemeLocalServiceUtil.getColorScheme(); - ThemeLocalServiceUtil.getControlPanelThemes(); - ThemeLocalServiceUtil.getPageThemes(); - ThemeLocalServiceUtil.getTheme(); - } - catch (Exception e) - { - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RenamePortalKernelImports.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RenamePortalKernelImports.java deleted file mode 100644 index 19cde20f4f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RenamePortalKernelImports.java +++ /dev/null @@ -1,183 +0,0 @@ -package com.test; - -import com.liferay.portal.model.Role; -import com.liferay.portal.service.ResourcePermissionLocalServiceUtil; -import com.liferay.portlet.PortletURLFactoryUtil; -import com.liferay.portlet.asset.model.AssetRendererFactory; -import com.liferay.portlet.asset.model.BaseAssetRenderer; - -import java.nio.file.Files; - -public class Test extends MVCPortlet { - - String titleURL; - - public void doView (RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException - { - - include("/view.jsp",renderRequest,renderResponse); - - } - - public void sendImage(ActionRequest request, ActionResponse response) { - - ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY); - SessionMessages.add(request, PortalUtil.getPortletId(request) + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE); - long userId = themeDisplay.getUserId(); - long groupId = themeDisplay.getScopeGroupId(); - - UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(request); - - long folderId = 0; - - java.io.File submissionFile = null; - String submissionFileName = ""; - try { - try { - ServiceContext serviceContext = ServiceContextFactory.getInstance(DLFileEntry.class.getName(), request); - } catch (SystemException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } catch (PortalException e3) { - e3.printStackTrace(); - } - - String contentType = ""; - String changeLog = ""; - Map fieldsMap = new HashMap(); - - if (uploadRequest != null) { - - submissionFileName = uploadRequest.getFileName("uploadFileForMessage"); - submissionFile = uploadRequest.getFile("uploadFileForMessage"); - contentType = uploadRequest.getContentType("uploadFileForMessage"); - changeLog = ParamUtil.getString(request, "changeLog"); - - } - - if(!submissionFileName.equals("")){ - - ServiceContext serviceContext = null; - try { - try { - serviceContext = ServiceContextFactory.getInstance(DLFileEntry.class.getName(), request); - } catch (SystemException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } catch (PortalException e3) { - e3.printStackTrace(); - } - - String title = submissionFileName; - String description = "Message Media"; - DLFileEntry dlf = null; - long realUserId = themeDisplay.getRealUserId(); - - FileInputStream fis = null; - - try { - fis = Files.newInputStream(submissionFile.toPath()); - } catch (FileNotFoundException e1) { - e1.printStackTrace(); - } - - try { - - dlf = DLFileEntryLocalServiceUtil.addFileEntry(realUserId, groupId, groupId, 0, submissionFileName, contentType, title, description, changeLog, 0, fieldsMap, submissionFile, fis, groupId, serviceContext); - long feID = dlf.getFileEntryId(); - DLFileEntryLocalServiceUtil.updateFileEntry(realUserId, feID, submissionFileName, contentType, title, description, changeLog, false, 0, fieldsMap, submissionFile, fis, groupId, serviceContext); - - String primKeyDLFE = dlf.getPrimaryKey() + ""; - String[] actionIds = new String[1]; - - actionIds[0] = "VIEW"; - - Role user = RoleLocalServiceUtil.getRole(dlf.getCompanyId(), RoleConstants.USER); - ResourcePermissionLocalServiceUtil.setResourcePermissions(dlf.getCompanyId(), "com.liferay.portlet.documentlibrary.model.DLFileEntry", 4, primKeyDLFE, user.getRoleId(), actionIds); - - } catch (DuplicateFileException e) { - - int randomNumber = randInt(1000, 9999); - - title = title + "_" + randomNumber; - - try { - try { - dlf = DLFileEntryLocalServiceUtil.addFileEntry(realUserId, groupId, groupId, 0, submissionFileName, contentType, title, description, changeLog, 0, fieldsMap, submissionFile, fis, groupId, serviceContext); - } catch (SystemException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } catch (PortalException e1) { - e1.printStackTrace(); - } - - long feID = dlf.getFileEntryId(); - - try { - try { - DLFileEntryLocalServiceUtil.updateFileEntry(realUserId, feID, submissionFileName, contentType, title, description, changeLog, false, 0, fieldsMap, submissionFile, fis, groupId, serviceContext); - } catch (SystemException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } catch (PortalException e1) { - e1.printStackTrace(); - } - - String[] actionIds = new String[1]; - - actionIds[0] = "VIEW"; - String primKeyDLFE = dlf.getPrimaryKey() + ""; - - Role user = null; - - try { - try { - user = RoleLocalServiceUtil.getRole(dlf.getCompanyId(), RoleConstants.USER); - } catch (SystemException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } catch (PortalException e1) { - e1.printStackTrace(); - } - - try { - try { - ResourcePermissionLocalServiceUtil.setResourcePermissions(dlf.getCompanyId(), "com.liferay.portlet.documentlibrary.model.DLFileEntry", 4, primKeyDLFE, user.getRoleId(), actionIds); - } catch (SystemException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - } catch (PortalException e1) { - e1.printStackTrace(); - } - - } catch (PortalException e) { - e.printStackTrace(); - } catch (SystemException e) { - e.printStackTrace(); - } - - titleURL = "/documents/" + groupId + "/" + dlf.getFolderId() + "/" + dlf.getTitle(); - - } - - System.out.println("OPEN IMAGE FROM THIS PATH: " + titleURL); - - } - - public static int randInt(int min, int max) { - - Random rand = new Random(); - - int randomNum = rand.nextInt((max - min) + 1) + min; - - return randomNum; - - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RenderTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RenderTest.java deleted file mode 100644 index 01edbcdc0d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RenderTest.java +++ /dev/null @@ -1,68 +0,0 @@ -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import com.liferay.portlet.asset.model.AssetRenderer; - - -public class RenderMethodTest{ - - public void testMethod( long classPK, RenderRequest renderRequest, - RenderResponse renderResponse, String template)){ - - AssetRenderer assetRenderer = getAssetRenderer(classPK); - - if (assetRenderer != null) { - assetRenderer.render(renderRequest, renderResponse, template); - } - - WorkflowHandler workFlowHandler = getAssetRenderer(classPK); - - if (assetRenderer != null) { - workFlowHandler.render(classPK,renderRequest, renderResponse, template); - } - } - - @Override - public String render( - long classPK, RenderRequest renderRequest, - RenderResponse renderResponse, String template) { - - try { - AssetRenderer assetRenderer = getAssetRenderer(classPK); - - if (assetRenderer != null) { - return assetRenderer.render( - renderRequest, renderResponse, template); - } - } - catch (Exception e) { - if (_log.isWarnEnabled()) { - _log.warn(e, e); - } - } - - return null; - } - - @Override - public String render( - RenderRequest renderRequest, - RenderResponse renderResponse, String template) { - - try { - AssetRenderer assetRenderer = getAssetRenderer(classPK); - - if (assetRenderer != null) { - return assetRenderer.render( - renderRequest, renderResponse, template); - } - } - catch (Exception e) { - if (_log.isWarnEnabled()) { - _log.warn(e, e); - } - } - - return null; - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ReplacedReservedUserEmailAddressException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ReplacedReservedUserEmailAddressException.java deleted file mode 100644 index 33265c7a41..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ReplacedReservedUserEmailAddressException.java +++ /dev/null @@ -1,16 +0,0 @@ -package blade.migrate.liferay70; - -public class ChangesUserServicesThrownExceptionsTest { - - public static void main(String[] args) { - - try - { - System.out.println("aaa"); - } - catch(ReservedUserEmailAddressException e) - { - } - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ReplacedReservedUserScreenNameExceptionTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ReplacedReservedUserScreenNameExceptionTest.java deleted file mode 100644 index 5583a3a2c5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ReplacedReservedUserScreenNameExceptionTest.java +++ /dev/null @@ -1,16 +0,0 @@ -package blade.migrate.liferay70; - -public class ChangesUserServicesThrownExceptionsTest { - - public static void main(String[] args) { - - try - { - System.out.println("exception"); - } - catch(ReservedUserScreenNameException e) - { - } - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RepositoryServiceUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RepositoryServiceUtilTest.java deleted file mode 100644 index 1d897330c1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RepositoryServiceUtilTest.java +++ /dev/null @@ -1,10 +0,0 @@ -package blade.migrate.liferay70; - -public class RepositoryServiceUtilTest { - - public static void main(String[] args) { - - RepositoryLocalServiceUtil.getRepositoryImpl(0, fileEntryId, 0); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RequiredParamGroupId.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RequiredParamGroupId.java deleted file mode 100644 index 1a94e3f955..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/RequiredParamGroupId.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * 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 com.liferay.portlet.asset.search; - -import com.liferay.asset.kernel.model.AssetCategory; -import com.liferay.asset.kernel.model.AssetCategoryConstants; -import com.liferay.asset.kernel.model.AssetVocabulary; -import com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil; -import com.liferay.asset.kernel.service.AssetCategoryServiceUtil; -import com.liferay.asset.kernel.service.AssetVocabularyServiceUtil; -import com.liferay.portal.kernel.model.BaseModel; -import com.liferay.portal.kernel.model.Group; -import com.liferay.portal.kernel.service.ServiceContext; -import com.liferay.portal.kernel.test.rule.AggregateTestRule; -import com.liferay.portal.kernel.test.rule.Sync; -import com.liferay.portal.kernel.test.rule.SynchronousDestinationTestRule; -import com.liferay.portal.kernel.test.util.RandomTestUtil; -import com.liferay.portal.search.test.BaseSearchTestCase; -import com.liferay.portal.test.rule.LiferayIntegrationTestRule; - -import java.util.Locale; -import java.util.Map; - -import org.junit.ClassRule; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; - -/** - * @author Istvan Andras Dezsi - * @author Tibor Lipusz - */ -@Sync -public class RequiredParamGroupId extends BaseSearchTestCase { - - @ClassRule - @Rule - public static final AggregateTestRule aggregateTestRule = - new AggregateTestRule( - new LiferayIntegrationTestRule(), - SynchronousDestinationTestRule.INSTANCE); - - @Ignore - @Override - @Test - public void testSearchAttachments() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchBaseModelWithTrash() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchByDDMStructureField() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchByKeywordsInsideParentBaseModel() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchComments() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchExpireAllVersions() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchExpireLatestVersion() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchMyEntries() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchRecentEntries() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchStatus() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchVersions() throws Exception { - } - - @Ignore - @Override - @Test - public void testSearchWithinDDMStructure() throws Exception { - } - - @Override - protected BaseModel addBaseModelWithWorkflow( - BaseModel parentBaseModel, boolean approved, - Map keywordsMap, ServiceContext serviceContext) - throws Exception { - - AssetVocabulary vocabulary = (AssetVocabulary)parentBaseModel; - - return AssetCategoryServiceUtil.addCategory( - AssetCategoryConstants.DEFAULT_PARENT_CATEGORY_ID, keywordsMap, - null, vocabulary.getVocabularyId(), null, serviceContext); - } - - @Override - protected BaseModel addBaseModelWithWorkflow( - BaseModel parentBaseModel, boolean approved, String keywords, - ServiceContext serviceContext) - throws Exception { - - AssetVocabulary vocabulary = (AssetVocabulary)parentBaseModel; - - return AssetCategoryServiceUtil.addCategory( - keywords, vocabulary.getVocabularyId(), serviceContext); - } - - @Override - protected void deleteBaseModel(long primaryKey) throws Exception { - AssetCategoryServiceUtil.deleteCategory(primaryKey); - } - - @Override - protected Class getBaseModelClass() { - return AssetCategory.class; - } - - @Override - protected BaseModel getParentBaseModel( - Group group, ServiceContext serviceContext) - throws Exception { - - return AssetVocabularyServiceUtil.addVocabulary( - RandomTestUtil.randomString(), serviceContext); - } - - @Override - protected String getSearchKeywords() { - return "Title"; - } - - @Override - protected BaseModel updateBaseModel( - BaseModel baseModel, String keywords, - ServiceContext serviceContext) - throws Exception { - - AssetCategory category = (AssetCategory)baseModel; - - category.setTitle(keywords); - - return AssetCategoryLocalServiceUtil.updateAssetCategory(category); - } - - public -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ReservedUserIdException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ReservedUserIdException.java deleted file mode 100644 index 5bd40955b9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/ReservedUserIdException.java +++ /dev/null @@ -1,12 +0,0 @@ -import com.liferay.portal.ReservedUserIdException; - -public class ReservedUserIdExceptionCatch{ - public void catchTheException(){ - try{ - reserveUserId(); - }catch (ReservedUserIdException nsre) { - - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/SearchPermissionCheckerImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/SearchPermissionCheckerImpl.java deleted file mode 100644 index b949fccfdc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/SearchPermissionCheckerImpl.java +++ /dev/null @@ -1,488 +0,0 @@ -/** - * 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 com.liferay.portal.search; - -import com.liferay.portal.NoSuchResourceException; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.search.BooleanClauseOccur; -import com.liferay.portal.kernel.search.BooleanQuery; -import com.liferay.portal.kernel.search.BooleanQueryFactoryUtil; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.Indexer; -import com.liferay.portal.kernel.search.IndexerRegistryUtil; -import com.liferay.portal.kernel.search.Query; -import com.liferay.portal.kernel.search.SearchContext; -import com.liferay.portal.kernel.search.SearchPermissionChecker; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ListUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.UniqueList; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.GroupConstants; -import com.liferay.portal.model.ResourceConstants; -import com.liferay.portal.model.Role; -import com.liferay.portal.model.RoleConstants; -import com.liferay.portal.model.UserGroupRole; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.security.permission.AdvancedPermissionChecker; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.security.permission.PermissionCheckerBag; -import com.liferay.portal.security.permission.PermissionThreadLocal; -import com.liferay.portal.security.permission.ResourceActionsUtil; -import com.liferay.portal.security.permission.ResourceBlockIdsBag; -import com.liferay.portal.service.GroupLocalServiceUtil; -import com.liferay.portal.service.ResourceBlockLocalServiceUtil; -import com.liferay.portal.service.ResourceBlockPermissionLocalServiceUtil; -import com.liferay.portal.service.ResourcePermissionLocalServiceUtil; -import com.liferay.portal.service.RoleLocalServiceUtil; -import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; -import com.liferay.portal.util.PortalUtil; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author Allen Chiang - * @author Bruno Farache - * @author Raymond Augé - * @author Amos Fong - */ -public class SearchPermissionCheckerImpl implements SearchPermissionChecker { - - @Override - public void addPermissionFields(long companyId, Document document) { - try { - long groupId = GetterUtil.getLong(document.get(Field.GROUP_ID)); - - String className = document.get(Field.ENTRY_CLASS_NAME); - - boolean relatedEntry = GetterUtil.getBoolean( - document.get(Field.RELATED_ENTRY)); - - if (relatedEntry) { - long classNameId = GetterUtil.getLong( - document.get(Field.CLASS_NAME_ID)); - - className = PortalUtil.getClassName(classNameId); - } - - if (Validator.isNull(className)) { - return; - } - - String classPK = document.get(Field.ROOT_ENTRY_CLASS_PK); - - if (Validator.isNull(classPK)) { - classPK = document.get(Field.ENTRY_CLASS_PK); - } - - if (relatedEntry) { - classPK = document.get(Field.CLASS_PK); - } - - if (Validator.isNull(classPK)) { - return; - } - - Indexer indexer = IndexerRegistryUtil.getIndexer(className); - - if (!indexer.isPermissionAware()) { - return; - } - - doAddPermissionFields_6( - companyId, groupId, className, classPK, document); - } - catch (NoSuchResourceException nsre) { - } - catch (Exception e) { - _log.error(e, e); - } - } - - @Override - public Query getPermissionQuery( - long companyId, long[] groupIds, long userId, String className, - Query query, SearchContext searchContext) { - - try { - query = doGetPermissionQuery( - companyId, groupIds, userId, className, query, searchContext); - } - catch (Exception e) { - _log.error(e, e); - } - - return query; - } - - @Override - public void updatePermissionFields( - String resourceName, String resourceClassPK) { - - try { - doUpdatePermissionFields(resourceName, resourceClassPK); - } - catch (Exception e) { - _log.error(e, e); - } - } - - protected void addRequiredMemberRole( - Group group, BooleanQuery permissionQuery) - throws Exception { - - if (group.isOrganization()) { - Role organizationUserRole = RoleLocalServiceUtil.getRole( - group.getCompanyId(), RoleConstants.ORGANIZATION_USER); - - permissionQuery.addTerm( - Field.GROUP_ROLE_ID, - group.getGroupId() + StringPool.DASH + - organizationUserRole.getRoleId()); - } - - if (group.isSite()) { - Role siteMemberRole = RoleLocalServiceUtil.getRole( - group.getCompanyId(), RoleConstants.SITE_MEMBER); - - permissionQuery.addTerm( - Field.GROUP_ROLE_ID, - group.getGroupId() + StringPool.DASH + - siteMemberRole.getRoleId()); - } - } - - protected void doAddPermissionFields_6( - long companyId, long groupId, String className, String classPK, - Document doc) - throws Exception { - - Group group = null; - - if (groupId > 0) { - group = GroupLocalServiceUtil.getGroup(groupId); - } - - List roles = ListUtil.copy( - ResourceActionsUtil.getRoles(companyId, group, className, null)); - - if (groupId > 0) { - List teamRoles = RoleLocalServiceUtil.getTeamRoles(groupId); - - roles.addAll(teamRoles); - } - - long[] roleIdsArray = new long[roles.size()]; - - for (int i = 0; i < roleIdsArray.length; i++) { - Role role = roles.get(i); - - roleIdsArray[i] = role.getRoleId(); - } - - boolean[] hasResourcePermissions = null; - - if (ResourceBlockLocalServiceUtil.isSupported(className)) { - ResourceBlockIdsBag resourceBlockIdsBag = - ResourceBlockLocalServiceUtil.getResourceBlockIdsBag( - companyId, groupId, className, roleIdsArray); - - long actionId = ResourceBlockLocalServiceUtil.getActionId( - className, ActionKeys.VIEW); - - List resourceBlockIds = - resourceBlockIdsBag.getResourceBlockIds(actionId); - - hasResourcePermissions = new boolean[roleIdsArray.length]; - - for (long resourceBlockId : resourceBlockIds) { - for (int i = 0; i < roleIdsArray.length; i++) { - int count = - ResourceBlockPermissionLocalServiceUtil. - getResourceBlockPermissionsCount( - resourceBlockId, roleIdsArray[i]); - - hasResourcePermissions[i] = (count > 0); - } - } - } - else { - hasResourcePermissions = - ResourcePermissionLocalServiceUtil.hasResourcePermissions( - companyId, className, ResourceConstants.SCOPE_INDIVIDUAL, - classPK, roleIdsArray, ActionKeys.VIEW); - } - - List roleIds = new ArrayList(); - List groupRoleIds = new ArrayList(); - - for (int i = 0; i < hasResourcePermissions.length; i++) { - if (!hasResourcePermissions[i]) { - continue; - } - - Role role = roles.get(i); - - if ((role.getType() == RoleConstants.TYPE_ORGANIZATION) || - (role.getType() == RoleConstants.TYPE_SITE)) { - - groupRoleIds.add(groupId + StringPool.DASH + role.getRoleId()); - } - else { - roleIds.add(role.getRoleId()); - } - } - - doc.addKeyword( - Field.ROLE_ID, roleIds.toArray(new Long[roleIds.size()])); - doc.addKeyword( - Field.GROUP_ROLE_ID, - groupRoleIds.toArray(new String[groupRoleIds.size()])); - } - - protected Query doGetPermissionQuery( - long companyId, long[] groupIds, long userId, String className, - Query query, SearchContext searchContext) - throws Exception { - - Indexer indexer = IndexerRegistryUtil.getIndexer(className); - - if (!indexer.isPermissionAware()) { - return query; - } - - PermissionChecker permissionChecker = - PermissionThreadLocal.getPermissionChecker(); - - AdvancedPermissionChecker advancedPermissionChecker = null; - - if ((permissionChecker != null) && - (permissionChecker instanceof AdvancedPermissionChecker)) { - - advancedPermissionChecker = - (AdvancedPermissionChecker)permissionChecker; - } - - if (advancedPermissionChecker == null) { - return query; - } - - PermissionCheckerBag permissionCheckerBag = getPermissionCheckerBag( - advancedPermissionChecker, userId); - - if (permissionCheckerBag == null) { - return query; - } - - List groups = new UniqueList(); - List roles = new UniqueList(); - List userGroupRoles = new UniqueList(); - Map> groupIdsToRoles = new HashMap>(); - - roles.addAll(permissionCheckerBag.getRoles()); - - if (ArrayUtil.isEmpty(groupIds)) { - groups.addAll(GroupLocalServiceUtil.getUserGroups(userId, true)); - groups.addAll(permissionCheckerBag.getGroups()); - - userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRoles( - userId); - } - else { - groups.addAll(permissionCheckerBag.getGroups()); - - for (long groupId : groupIds) { - if (GroupLocalServiceUtil.hasUserGroup(userId, groupId)) { - Group group = GroupLocalServiceUtil.getGroup(groupId); - - groups.add(group); - } - - userGroupRoles.addAll( - UserGroupRoleLocalServiceUtil.getUserGroupRoles( - userId, groupId)); - userGroupRoles.addAll( - UserGroupRoleLocalServiceUtil. - getUserGroupRolesByUserUserGroupAndGroup( - userId, groupId)); - } - } - - if (advancedPermissionChecker.isSignedIn()) { - roles.add( - RoleLocalServiceUtil.getRole(companyId, RoleConstants.GUEST)); - } - - for (Group group : groups) { - PermissionCheckerBag userBag = advancedPermissionChecker.getUserBag( - userId, group.getGroupId()); - - List groupRoles = userBag.getRoles(); - - groupIdsToRoles.put(group.getGroupId(), groupRoles); - - roles.addAll(groupRoles); - } - - return doGetPermissionQuery_6( - companyId, groupIds, userId, className, query, searchContext, - advancedPermissionChecker, groups, roles, userGroupRoles, - groupIdsToRoles); - } - - protected Query doGetPermissionQuery_6( - long companyId, long[] groupIds, long userId, String className, - Query query, SearchContext searchContext, - AdvancedPermissionChecker advancedPermissionChecker, - List groups, List roles, - List userGroupRoles, - Map> groupIdsToRoles) - throws Exception { - - BooleanQuery permissionQuery = BooleanQueryFactoryUtil.create( - searchContext); - - if (userId > 0) { - permissionQuery.addTerm(Field.USER_ID, userId); - } - - BooleanQuery groupsQuery = BooleanQueryFactoryUtil.create( - searchContext); - BooleanQuery rolesQuery = BooleanQueryFactoryUtil.create(searchContext); - - for (Role role : roles) { - String roleName = role.getName(); - - if (roleName.equals(RoleConstants.ADMINISTRATOR)) { - return query; - } - - if (ResourcePermissionLocalServiceUtil.hasResourcePermission( - companyId, className, ResourceConstants.SCOPE_COMPANY, - String.valueOf(companyId), role.getRoleId(), - ActionKeys.VIEW)) { - - return query; - } - - if ((role.getType() == RoleConstants.TYPE_REGULAR) && - ResourcePermissionLocalServiceUtil.hasResourcePermission( - companyId, className, - ResourceConstants.SCOPE_GROUP_TEMPLATE, - String.valueOf(GroupConstants.DEFAULT_PARENT_GROUP_ID), - role.getRoleId(), ActionKeys.VIEW)) { - - return query; - } - - for (Group group : groups) { - if (ResourcePermissionLocalServiceUtil.hasResourcePermission( - companyId, className, ResourceConstants.SCOPE_GROUP, - String.valueOf(group.getGroupId()), role.getRoleId(), - ActionKeys.VIEW)) { - - groupsQuery.addTerm(Field.GROUP_ID, group.getGroupId()); - } - - if ((role.getType() != RoleConstants.TYPE_REGULAR) && - ResourcePermissionLocalServiceUtil.hasResourcePermission( - companyId, className, - ResourceConstants.SCOPE_GROUP_TEMPLATE, - String.valueOf(GroupConstants.DEFAULT_PARENT_GROUP_ID), - role.getRoleId(), ActionKeys.VIEW)) { - - List groupRoles = groupIdsToRoles.get( - group.getGroupId()); - - if (groupRoles.contains(role)) { - groupsQuery.addTerm(Field.GROUP_ID, group.getGroupId()); - } - } - - if (group.isSite() && - !roleName.equals(RoleConstants.SITE_MEMBER) && - (role.getType() == RoleConstants.TYPE_SITE)) { - - rolesQuery.addTerm( - Field.GROUP_ROLE_ID, - group.getGroupId() + StringPool.DASH + - role.getRoleId()); - } - } - - rolesQuery.addTerm(Field.ROLE_ID, role.getRoleId()); - } - - for (Group group : groups) { - addRequiredMemberRole(group, rolesQuery); - } - - for (UserGroupRole userGroupRole : userGroupRoles) { - rolesQuery.addTerm( - Field.GROUP_ROLE_ID, - userGroupRole.getGroupId() + StringPool.DASH + - userGroupRole.getRoleId()); - } - - if (groupsQuery.hasClauses()) { - permissionQuery.add(groupsQuery, BooleanClauseOccur.SHOULD); - } - - if (rolesQuery.hasClauses()) { - permissionQuery.add(rolesQuery, BooleanClauseOccur.SHOULD); - } - - BooleanQuery fullQuery = BooleanQueryFactoryUtil.create(searchContext); - - fullQuery.add(query, BooleanClauseOccur.MUST); - fullQuery.add(permissionQuery, BooleanClauseOccur.MUST); - - return fullQuery; - } - - protected void doUpdatePermissionFields( - String resourceName, String resourceClassPK) - throws Exception { - - Indexer indexer = IndexerRegistryUtil.getIndexer(resourceName); - - if (indexer != null) { - indexer.reindex(resourceName, GetterUtil.getLong(resourceClassPK)); - } - } - - protected PermissionCheckerBag getPermissionCheckerBag( - AdvancedPermissionChecker advancedPermissionChecker, long userId) - throws Exception { - - if (!advancedPermissionChecker.isSignedIn()) { - return advancedPermissionChecker.getGuestUserBag(); - } - else { - return advancedPermissionChecker.getUserBag(userId, 0); - } - } - - private static Log _log = LogFactoryUtil.getLog( - SearchPermissionCheckerImpl.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/SearchResultTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/SearchResultTest.java deleted file mode 100644 index eed37567d3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/SearchResultTest.java +++ /dev/null @@ -1,130 +0,0 @@ -package blade.migrate.liferay70; - -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -import javax.portlet.PortletURL; - -import org.eclipse.jdt.core.search.SearchEngine; - -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.Hits; -import com.liferay.portal.kernel.search.SearchResult; -import com.liferay.portal.kernel.search.Summary; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.model.DLFileEntry; -import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; -import com.liferay.portlet.journal.model.JournalArticle; -import com.liferay.portlet.messageboards.model.MBMessage; -import com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil; - -public class SearchResultTest { - public static List getSearchResults( - Hits hits, Locale locale, PortletURL portletURL) { - - List searchResults = new ArrayList(); - for (Document document : hits.getDocs()) { - String entryClassName = GetterUtil.getString( - document.get(Field.ENTRY_CLASS_NAME)); - long entryClassPK = GetterUtil.getLong( - document.get(Field.ENTRY_CLASS_PK)); - - try { - String className = entryClassName; - long classPK = entryClassPK; - - FileEntry fileEntry = null; - MBMessage mbMessage = null; - - if (entryClassName.equals(DLFileEntry.class.getName()) || - entryClassName.equals(MBMessage.class.getName())) { - - classPK = GetterUtil.getLong(document.get(Field.CLASS_PK)); - long classNameId = GetterUtil.getLong( - document.get(Field.CLASS_NAME_ID)); - - if ((classPK > 0) && (classNameId > 0)) { - className = PortalUtil.getClassName(classNameId); - - if (entryClassName.equals( - DLFileEntry.class.getName())) { - - fileEntry = DLAppLocalServiceUtil.getFileEntry( - entryClassPK); - } - else if (entryClassName.equals( - MBMessage.class.getName())) { - - mbMessage = MBMessageLocalServiceUtil.getMessage( - entryClassPK); - } - } - else { - className = entryClassName; - classPK = entryClassPK; - } - } - - SearchResult searchResult = new SearchResult( - className, classPK); - - int index = searchResults.indexOf(searchResult); - - if (index < 0) { - searchResults.add(searchResult); - } - else { - searchResult = searchResults.get(index); - } - - if (fileEntry != null) { - Summary summary = getSummary( - document, DLFileEntry.class.getName(), - fileEntry.getFileEntryId(), locale, portletURL); - - searchResult.addFileEntry(fileEntry, summary); - } - - if (mbMessage != null) { - searchResult.addMBMessage(mbMessage); - searchResult.getMBMessages(); - searchResult.getFileEntryTuples(); - } - - if (entryClassName.equals(JournalArticle.class.getName())) { - String version = document.get(Field.VERSION); - - searchResult.addVersion(version); - } - - if ((mbMessage == null) && (fileEntry == null)) { - Summary summary = getSummary( - document, className, classPK, locale, portletURL); - - searchResult.setSummary(summary); - } - else { - if (searchResult.getSummary() == null) { - Summary summary = getSummary( - className, classPK, locale, portletURL); - - searchResult.setSummary(summary); - } - } - } - catch (Exception e) { - if (_log.isWarnEnabled()) { - _log.warn( - "Search index is stale and contains entry {" + - entryClassPK + "}"); - } - } - } - - return searchResults; - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/StorageAdapterCreateUpdateMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/StorageAdapterCreateUpdateMethodsTest.java deleted file mode 100644 index 9c02c96eb3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/StorageAdapterCreateUpdateMethodsTest.java +++ /dev/null @@ -1,97 +0,0 @@ -package blade.migrate.liferay70; - -import java.util.Map; - -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata; -import com.liferay.portlet.dynamicdatamapping.StorageException; -import com.liferay.portlet.dynamicdatamapping.model.DDMStructure; -import com.liferay.portlet.dynamicdatamapping.storage.Field; -import com.liferay.portlet.dynamicdatamapping.storage.Fields; -import com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil; - -public class StorageAdapterCreateUpdateMethodsTest { - - protected void updateFieldValues(long storageId, - Map fieldValues) throws Exception { - - Fields fields = new Fields(); - - for (Map.Entry entry : fieldValues.entrySet()) { - Field field = new Field(storageId, entry.getKey(), entry.getValue()); - - fields.put(field); - } - - ServiceContext serviceContext = new ServiceContext(); - - StorageEngineUtil.update(storageId, fields, true, serviceContext); - } - - protected void updateFieldValues(long storageId, - Map fieldValues) throws Exception { - - Fields fields = new Fields(); - - for (Map.Entry entry : fieldValues.entrySet()) { - Field field = new Field(storageId, entry.getKey(), entry.getValue()); - - fields.put(field); - } - - ServiceContext serviceContext = new ServiceContext(); - - StorageEngineUtil.update(storageId, fields, serviceContext); - } - - protected void updateFileEntryMetadata( - long companyId, DDMStructure ddmStructure, long fileEntryTypeId, - long fileEntryId, long fileVersionId, Fields fields, - ServiceContext serviceContext) - throws StorageException, SystemException { - - DLFileEntryMetadata fileEntryMetadata = - dlFileEntryMetadataPersistence.fetchByD_F( - ddmStructure.getStructureId(), fileVersionId); - - if (fileEntryMetadata != null) { - StorageEngineUtil.update( - fileEntryMetadata.getDDMStorageId(), fields, true, - serviceContext); - } - else { - - // File entry metadata - - long fileEntryMetadataId = counterLocalService.increment(); - - fileEntryMetadata = dlFileEntryMetadataPersistence.create( - fileEntryMetadataId); - - long ddmStorageId = StorageEngineUtil.create( - companyId, ddmStructure.getStructureId(), fields, - serviceContext); - - fileEntryMetadata.setDDMStorageId(ddmStorageId); - - fileEntryMetadata.setDDMStructureId(ddmStructure.getStructureId()); - fileEntryMetadata.setFileEntryTypeId(fileEntryTypeId); - fileEntryMetadata.setFileEntryId(fileEntryId); - fileEntryMetadata.setFileVersionId(fileVersionId); - - dlFileEntryMetadataPersistence.update(fileEntryMetadata); - - // Dynamic data mapping structure link - - long classNameId = PortalUtil.getClassNameId( - DLFileEntryMetadata.class); - - ddmStructureLinkLocalService.addStructureLink( - classNameId, fileEntryMetadata.getFileEntryMetadataId(), - ddmStructure.getStructureId(), serviceContext); - } - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/TestPHPPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/TestPHPPortlet.java deleted file mode 100644 index 54f92cd2a6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/TestPHPPortlet.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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 com.liferay.portal.convert; - -/** - * @author Alexander Chow - */ -public class TestPHPPortlet extends PHPPortlet { - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/UnicodeLanguageImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/UnicodeLanguageImpl.java deleted file mode 100644 index 972fd686ef..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/UnicodeLanguageImpl.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * 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 com.liferay.portal.language; - -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.language.LanguageWrapper; -import com.liferay.portal.kernel.language.UnicodeLanguage; -import com.liferay.portal.kernel.security.pacl.DoPrivileged; -import com.liferay.portal.kernel.util.UnicodeFormatter; - -import java.util.Locale; - -import javax.portlet.PortletConfig; - -import javax.servlet.jsp.PageContext; - -/** - * @author Brian Wing Shun Chan - */ -@DoPrivileged -public class UnicodeLanguageImpl implements UnicodeLanguage { - - @Override - public String format(Locale locale, String pattern, Object argument) { - return UnicodeFormatter.toString( - LanguageUtil.format(locale, pattern, argument)); - } - - @Override - public String format( - Locale locale, String pattern, Object argument, - boolean translateArguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format(locale, pattern, argument, translateArguments)); - } - - @Override - public String format(Locale locale, String pattern, Object[] arguments) { - return UnicodeFormatter.toString( - LanguageUtil.format(locale, pattern, arguments)); - } - - @Override - public String format( - Locale locale, String pattern, Object[] arguments, - boolean translateArguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format( - locale, pattern, arguments, translateArguments)); - } - - @Override - public String format( - PageContext pageContext, String pattern, LanguageWrapper argument) { - - return UnicodeFormatter.toString( - LanguageUtil.format(pageContext, pattern, argument)); - } - - @Override - public String format( - PageContext pageContext, String pattern, LanguageWrapper argument, - boolean translateArguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format( - pageContext, pattern, argument, translateArguments)); - } - - @Override - public String format( - PageContext pageContext, String pattern, LanguageWrapper[] arguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format(pageContext, pattern, arguments)); - } - - @Override - public String format( - PageContext pageContext, String pattern, LanguageWrapper[] arguments, - boolean translateArguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format( - pageContext, pattern, arguments, translateArguments)); - } - - @Override - public String format( - PageContext pageContext, String pattern, Object argument) { - - return UnicodeFormatter.toString( - LanguageUtil.format(pageContext, pattern, argument)); - } - - @Override - public String format( - PageContext pageContext, String pattern, Object argument, - boolean translateArguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format( - pageContext, pattern, argument, translateArguments)); - } - - @Override - public String format( - PageContext pageContext, String pattern, Object[] arguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format(pageContext, pattern, arguments)); - } - - @Override - public String format( - PageContext pageContext, String pattern, Object[] arguments, - boolean translateArguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format( - pageContext, pattern, arguments, translateArguments)); - } - - @Override - public String format( - PortletConfig portletConfig, Locale locale, String pattern, - Object argument) { - - return UnicodeFormatter.toString( - LanguageUtil.format(portletConfig, locale, pattern, argument)); - } - - @Override - public String format( - PortletConfig portletConfig, Locale locale, String pattern, - Object argument, boolean translateArguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format( - portletConfig, locale, pattern, argument, translateArguments)); - } - - @Override - public String format( - PortletConfig portletConfig, Locale locale, String pattern, - Object[] arguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format(portletConfig, locale, pattern, arguments)); - } - - @Override - public String format( - PortletConfig portletConfig, Locale locale, String pattern, - Object[] arguments, boolean translateArguments) { - - return UnicodeFormatter.toString( - LanguageUtil.format( - portletConfig, locale, pattern, arguments, translateArguments)); - } - - @Override - public String get(Locale locale, String key) { - return UnicodeFormatter.toString(LanguageUtil.get(locale, key)); - } - - @Override - public String get(Locale locale, String key, String defaultValue) { - return UnicodeFormatter.toString( - LanguageUtil.get(locale, key, defaultValue)); - } - - @Override - public String get(PageContext pageContext, String key) { - return UnicodeFormatter.toString(LanguageUtil.get(pageContext, key)); - } - - @Override - public String get( - PageContext pageContext, String key, String defaultValue) { - - return UnicodeFormatter.toString( - LanguageUtil.get(pageContext, key, defaultValue)); - } - - @Override - public String get(PortletConfig portletConfig, Locale locale, String key) { - return UnicodeFormatter.toString( - LanguageUtil.get(portletConfig, locale, key)); - } - - @Override - public String get( - PortletConfig portletConfig, Locale locale, String key, - String defaultValue) { - - return UnicodeFormatter.toString( - LanguageUtil.get(portletConfig, locale, key, defaultValue)); - } - - @Override - public String getTimeDescription( - PageContext pageContext, long milliseconds) { - - return UnicodeFormatter.toString( - LanguageUtil.getTimeDescription(pageContext, milliseconds)); - } - - @Override - public String getTimeDescription( - PageContext pageContext, Long milliseconds) { - - return UnicodeFormatter.toString( - LanguageUtil.getTimeDescription(pageContext, milliseconds)); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/UserImporterExporterTestFile.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/UserImporterExporterTestFile.java deleted file mode 100644 index 87dfc17753..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/UserImporterExporterTestFile.java +++ /dev/null @@ -1,19 +0,0 @@ -import com.liferay.portal.kernel.security.exportimport.UserImporter; -import com.liferay.portal.kernel.security.exportimport.UserExporter; -import com.liferay.portal.kernel.security.exportimport.UserOperation; -import com.liferay.portal.kernel.security.exportimport.UserImporterUtil; -import com.liferay.portal.kernel.security.exportimport.UserExporterUtil; - -import com.liferay.dynamic.data.mapping.util.DDMXMLUtil; - -public class UserImporterExporterTestFile implements UserImporter { - - public static void main(String[] args) { - UserExporterUtil.foo("11"); - DDMXMLUtil.formatXML(new Document()); - - FlagsEntryService flagsEntryService = new FlagsEntryServiceImpl(); - flagsEntryService.addEntry("foo"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/UserServicesThrownExceptionsChangesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/UserServicesThrownExceptionsChangesTest.java deleted file mode 100644 index 53b46f18d5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/UserServicesThrownExceptionsChangesTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package blade.migrate.liferay70; - -public class ChangesUserServicesThrownExceptionsTest { - - public static void main(String[] args) { - - try - { - System.out.println("aaa"); - } - catch(DuplicateUserScreenNameException e) - { - } - catch(DuplicateUserEmailAddressException e) - { - } - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/WebContentArticlesStrucAndTemplTestFile.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/WebContentArticlesStrucAndTemplTestFile.java deleted file mode 100644 index 9ed31a1593..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/WebContentArticlesStrucAndTemplTestFile.java +++ /dev/null @@ -1,31 +0,0 @@ -import java.util.HashMap; -import java.util.Locale; - -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.util.TestPropsValues; -import com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil; -import com.liferay.portlet.journal.service.JournalArticleServiceUtil; - -public class WebContentArticlesStrucAndTempl { - public static void main(String[] args){ - - JournalArticleLocalServiceUtil.addArticle( - TestPropsValues.getUserId(), group.getGroupId(), 0, 0, 0, - StringPool.BLANK, true, 1, titleMap, new HashMap(), - sb.toString(), "general", var, var, layout.getUuid(), 1, 1, 1965, - 0, 0, 0, 0, 0, 0, 0, true, 0, 0, 0, 0, 0, true, false, false, var, - var, var, StringPool.BLANK, serviceContext); - - JournalArticleServiceUtil.addArticle( - groupId, folderId, classNameId, classPK, articleId, - autoArticleId, titleMap, descriptionMap, content, type, - structureId, templateId, layoutUuid, displayDateMonth, - displayDateDay, displayDateYear, displayDateHour, - displayDateMinute, expirationDateMonth, expirationDateDay, - expirationDateYear, expirationDateHour, expirationDateMinute, - neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear, - reviewDateHour, reviewDateMinute, neverReview, indexable, - smallImage, smallImageURL, smallFile, images, articleURL, - serviceContext); - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/WebContentTypeRemovedTestFile.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/WebContentTypeRemovedTestFile.java deleted file mode 100644 index 2658d0cd4a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/filetests/WebContentTypeRemovedTestFile.java +++ /dev/null @@ -1,61 +0,0 @@ -import com.liferay.portal.kernel.util.ListUtil; -import com.liferay.portal.kernel.util.LocaleUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.service.ServiceTestUtil; -import com.liferay.portal.util.TestPropsValues; -import com.liferay.portlet.journal.ArticleTypeException; -import com.liferay.portlet.journal.model.JournalArticleConstants; -import com.liferay.portlet.journal.model.JournalFolderConstants; -import com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil; -import com.liferay.portlet.journal.service.JournalArticleServiceUtil; -import com.liferay.portlet.journal.service.JournalFeedLocalServiceUtil; -import com.liferay.portlet.journal.service.JournalFeedServiceUtil; -import com.liferay.portlet.journal.util.JournalTestUtil; - -import java.util.Calendar; -public class WebContentTypeRemovedTestFile { - - public static void main(String[] args) { - JournalArticle journalArticle = null; - journalArticle.getType(); - - try { - JournalFeed journalFeed = null; - journalFeed.getType(); - }catch (ArticleTypeException e) { - } - - JournalArticleLocalServiceUtil.addArticle( - TestPropsValues.getUserId(), groupId, - JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID, - JournalArticleConstants.CLASSNAME_ID_DEFAULT, id, StringPool.BLANK, - true, JournalArticleConstants.VERSION_DEFAULT, titleMap, - descriptionMap, - JournalTestUtil.createLocalizedContent( - ServiceTestUtil.randomString(), LocaleUtil.getDefault()), - "general", var, var, var, displayDateCalendar.get(Calendar.MONTH), - displayDateCalendar.get(Calendar.DAY_OF_MONTH), - displayDateCalendar.get(Calendar.YEAR), - displayDateCalendar.get(Calendar.HOUR_OF_DAY), - displayDateCalendar.get(Calendar.MINUTE), 0, 0, 0, 0, 0, true, 0, 0, - 0, 0, 0, true, true, false, var, var, var, var, serviceContext); - - JournalArticleServiceUtil.search(companyId, groupId, - ListUtil.toList(folderIds), classNameId, keywords, version, type, - ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT, - status, reviewDate, start, end, obc); - - JournalFeedLocalServiceUtil.addFeed( - userId, groupId, feedId, autoFeedId, name, description, type, - ddmStructureKey, ddmTemplateKey, rendererTemplateKey, delta, - orderByCol, orderByType, friendlyURL, targetPortletId, - contentField, feedFormat, feedVersion, serviceContext); - - JournalFeedServiceUtil.addFeed(groupId, - feedId, autoFeedId, name, description, type, structureId, - templateId, rendererTemplateId, delta, orderByCol, orderByType, - targetLayoutFriendlyUrl, targetPortletId, contentField, - feedType, feedVersion, serviceContext); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/.classpath b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/.classpath deleted file mode 100644 index 7bd777b5b8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/.classpath +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/.project b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/.project deleted file mode 100644 index 4b8b0ed006..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/.project +++ /dev/null @@ -1,16 +0,0 @@ - - - - knowledge-base-portlet-6.2.x - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.jdt.core.javanature - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/.gitignore b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/.gitignore deleted file mode 100644 index 0bf710b7a5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/tld \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/client/knowledge-base-portlet-client.jar b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/client/knowledge-base-portlet-client.jar deleted file mode 100644 index 95c5a80c49..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/client/knowledge-base-portlet-client.jar and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/client/namespace-mapping.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/client/namespace-mapping.properties deleted file mode 100644 index 2816e8f2cf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/client/namespace-mapping.properties +++ /dev/null @@ -1,5 +0,0 @@ -com.liferay.client.soap.portal.kernel.util=http://util.kernel.portal.liferay.com -com.liferay.client.soap.portal.model=http://model.portal.liferay.com -com.liferay.client.soap.portal.service=http://service.portal.liferay.com -com.liferay.client.soap.knowledgebase.model=http://model.knowledgebase.liferay.com -com.liferay.client.soap.knowledgebase.service.http=urn:http.service.knowledgebase.liferay.com diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-display.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index 252b8d6734..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-hook.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-hook.xml deleted file mode 100644 index 15e8e8db42..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-hook.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - portal.properties - content/Language*.properties - - /portal/knowledge_base/find_kb_article - com.liferay.knowledgebase.hook.action.FindKBArticleAction - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-plugin-package.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index a5a90d5c7c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,22 +0,0 @@ -name=Knowledge Base -module-group-id=liferay -module-incremental-version=3 -tags=faq, knowledge, knowledge base -short-description= -long-description=Liferay's Knowledge Base app provides a means for creating and organizing articles within a site. The knowledge base is perfect for creating and organizing information more formally than in a wiki. For example, it can be used to organize and display professional product documentation. It's easy to set up the knowledge base with a workflow that requires articles to be approved before they are published. Additionally, it allows administrators to create article templates. Templates can be used to insure that certain kinds of articles possess a common structure and include certain kinds of information. Knowledge base articles can be categorized to make them easy to find. They can also be organized hierarchically to form complete books or guides. There are multiple portlets included in this app. For details about how to use the Knowledge Base, Consult the "Knowledge Base" section of the Liferay User Guide. The Liferay User Guide can be found at http://liferay.com/documentation.

    This app will appear in your Application menu and Control Panel once installed. -change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=LGPL -liferay-versions=6.2.0+ - -portal-dependency-jars=\ - commons-math.jar,\ - jdom.jar,\ - jericho-html.jar,\ - jstl-api.jar,\ - jstl-impl.jar,\ - rome.jar - -portal-dependency-tlds=\ - c.tld \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index d3a1e8b613..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - 1 - /icons/admin.png - com.liferay.knowledgebase.admin.action.ConfigurationActionImpl - com.liferay.knowledgebase.admin.util.AdminIndexer - com.liferay.knowledgebase.admin.util.AdminOpenSearchImpl - com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper - knowledge_base_admin - com/liferay/knowledgebase/admin/portlet/admin-friendly-url-routes.xml - com.liferay.knowledgebase.admin.lar.AdminPortletDataHandler - com.liferay.knowledgebase.admin.lar.KBArticleStagedModelDataHandler - com.liferay.knowledgebase.admin.lar.KBCommentStagedModelDataHandler - com.liferay.knowledgebase.admin.lar.KBFolderStagedModelDataHandler - com.liferay.knowledgebase.admin.lar.KBTemplateStagedModelDataHandler - com.liferay.knowledgebase.admin.social.AdminActivityInterpreter - site_administration.content - 17.5 - com.liferay.knowledgebase.admin.asset.KBArticleAssetRendererFactory - com.liferay.knowledgebase.admin.workflow.KBArticleWorkflowHandler - false - false - true - /admin/css/common.css - /admin/css/main.css - knowledge-base-portlet knowledge-base-portlet-admin - true - - - 2 - /icons/display.png - com.liferay.portal.kernel.portlet.DefaultConfigurationAction - com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper - knowledge_base - com/liferay/knowledgebase/display/portlet/display-friendly-url-routes.xml - true - /admin/css/common.css - /display/css/main.css - knowledge-base-portlet knowledge-base-portlet-display - - - 3 - /icons/article.png - com.liferay.portal.kernel.portlet.DefaultConfigurationAction - com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper - knowledge_base_article - com/liferay/knowledgebase/article/portlet/article-friendly-url-routes.xml - true - true - /admin/css/common.css - /article/css/main.css - knowledge-base-portlet knowledge-base-portlet-article - true - - - 4 - /icons/section.png - com.liferay.knowledgebase.section.action.ConfigurationActionImpl - com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper - knowledge_base_section - com/liferay/knowledgebase/section/portlet/section-friendly-url-routes.xml - true - true - /admin/css/common.css - /section/css/main.css - knowledge-base-portlet knowledge-base-portlet-section - - - 5 - /icons/search.png - com.liferay.portal.kernel.portlet.DefaultConfigurationAction - com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper - knowledge_base_search - com/liferay/knowledgebase/search/portlet/search-friendly-url-routes.xml - true - /admin/css/common.css - knowledge-base-portlet knowledge-base-portlet-search - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog deleted file mode 100644 index fdf9a4a792..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog +++ /dev/null @@ -1,14 +0,0 @@ -# -# Module Incremental Version 1 -# -c963f942b6ec873cc7ed9ca15d9c2ad000368ca8^..98f9ca2060df0a3ad6732e8b102a51eac5928be9=LPS-10988 LPS-19223 LPS-24827 LPS-25621 LPS-25730 LPS-27530 LPS-29797 LPS-30588 LPS-30661 LPS-30787 LPS-30799 LPS-30860 LPS-30885 LPS-30936 LPS-31004 LPS-31033 LPS-31064 LPS-31119 LPS-31133 LPS-31298 LPS-31353 LPS-31362 LPS-31418 LPS-31519 LPS-31599 LPS-31997 LPS-32066 LPS-32141 LPS-32185 LPS-32218 LPS-32493 LPS-32565 LPS-32634 LPS-32713 LPS-32805 LPS-32861 LPS-32909 LPS-32932 LPS-33093 LPS-33320 LPS-33393 LPS-33412 LPS-33594 LPS-33626 LPS-33632 LPS-33825 LPS-33847 LPS-33895 LPS-34174 LPS-34183 LPS-34210 LPS-34219 LPS-34355 LPS-34758 LPS-34937 LPS-35004 LPS-35118 LPS-35131 LPS-35182 LPS-35256 LPS-35257 LPS-35335 LPS-35598 LPS-35647 LPS-35786 LPS-36310 LPS-36377 LPS-36603 LPS-37369 LPS-37495 LPS-37517 LPS-37545 LPS-37767 LPS-37928 LPS-38351 LPS-38540 LPS-38632 LPS-38648 LPS-38649 LPS-39087 LPS-39182 LPS-39247 LPS-39576 LPS-39703 LPS-40334 LPS-40431 LPS-40752 LPS-41348 - -# -# Module Incremental Version 2 -# -98f9ca2060df0a3ad6732e8b102a51eac5928be9^..44fb20d6f004b99e3fb0652af667283113bff2e3=LPS-35716 LPS-41368 LPS-42790 LPS-42924 LPS-43258 - -# -# Module Incremental Version 3 -# -44fb20d6f004b99e3fb0652af667283113bff2e3^..a2a4d325e51f0c122bca4a743c60ddbc74999b4b=LPS-41368 LPS-42733 LPS-43599 LPS-43701 \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog.md5 b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog.md5 deleted file mode 100644 index 4112f42bb9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog.md5 +++ /dev/null @@ -1 +0,0 @@ -641f78f84decbb1b53ccd53a3316d160 \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-releng.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-releng.properties deleted file mode 100644 index b468a1c94f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/liferay-releng.properties +++ /dev/null @@ -1,9 +0,0 @@ -bundle=false -category=Productivity -demo-url= -dependent-apps= -labs=false -marketplace=true -public=true -support-url= -supported=false \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 8a2a293345..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,497 +0,0 @@ - - - - - 1 - Knowledge Base - com.liferay.knowledgebase.admin.portlet.AdminPortlet - - always-send-redirect - true - - - config-template - /admin/configuration.jsp - - - copy-request-parameters - true - - - template-path - /admin/ - - - view-template - /admin/view.jsp - - 0 - - text/html - - content.Language - - Knowledge Base - Knowledge Base - Knowledge Base Admin - - - - enableKBArticleDescription - false - - - enableKBArticleKBComments - true - - - enableKBArticleRatings - true - - - enableKBArticleViewCountIncrement - true - - - enableKBTemplateKBComments - true - - - kbArticlesOrderByCol - priority - - - kbArticlesOrderByType - desc - - - showKBArticleAssetEntries - true - - - showKBArticleKBComments - true - - - showKBTemplateKBComments - true - - - - administrator - - - guest - - - power-user - - - user - - - - 2 - Knowledge Base Display - com.liferay.knowledgebase.display.portlet.DisplayPortlet - - always-send-redirect - true - - - config-template - /display/configuration.jsp - - - copy-request-parameters - true - - - template-path - /display/ - - - view-template - /display/view.jsp - - 0 - - text/html - - content.Language - - Knowledge Base Display - Knowledge Base Display - Knowledge Base Display - - - - enableKBArticleDescription - false - - - enableKBArticleKBComments - true - - - enableKBArticleRatings - true - - - enableKBArticleViewCountIncrement - true - - - resourcePrimKey - 0 - - - rssDelta - 20 - - - rssDisplayStyle - full-content - - - rssFormat - atom10 - - - showKBArticleAssetEntries - true - - - showKBArticleKBComments - false - - - - administrator - - - guest - - - power-user - - - user - - - - 3 - Knowledge Base Article - com.liferay.knowledgebase.article.portlet.ArticlePortlet - - always-send-redirect - true - - - config-template - /article/configuration.jsp - - - copy-request-parameters - true - - - template-path - /article/ - - - view-template - /article/view.jsp - - 0 - - text/html - - content.Language - - Knowledge Base Article - Knowledge Base Article - Knowledge Base Article - - - - enableKBArticleDescription - false - - - enableKBArticleKBComments - true - - - enableKBArticleRatings - true - - - enableKBArticleViewCountIncrement - true - - - resourcePrimKey - 0 - - - rssDelta - 20 - - - rssDisplayStyle - full-content - - - rssFormat - atom10 - - - showKBArticleAssetEntries - true - - - showKBArticleKBComments - false - - - - administrator - - - guest - - - power-user - - - user - - - - 4 - Knowledge Base Section - com.liferay.knowledgebase.section.portlet.SectionPortlet - - always-send-redirect - true - - - config-template - /section/configuration.jsp - - - copy-request-parameters - true - - - template-path - /section/ - - - view-template - /section/view.jsp - - 0 - - text/html - - content.Language - - Knowledge Base Section - Knowledge Base Section - Knowledge Base Section - - - - enableKBArticleDescription - false - - - enableKBArticleKBComments - true - - - enableKBArticleRatings - true - - - enableKBArticleViewCountIncrement - true - - - kbArticleDisplayStyle - title - - - kbArticleWindowState - maximized - - - kbArticlesDelta - 10 - - - kbArticlesOrderByCol - modified-date - - - kbArticlesOrderByType - desc - - - kbArticlesSections - general - - - rssDelta - 20 - - - rssDisplayStyle - full-content - - - rssFormat - atom10 - - - showKBArticleAssetEntries - true - - - showKBArticleKBComments - false - - - showKBArticlesPagination - true - - - showKBArticlesSectionsTitle - true - - - - administrator - - - guest - - - power-user - - - user - - - - 5 - Knowledge Base Search - com.liferay.knowledgebase.search.portlet.SearchPortlet - - always-send-redirect - true - - - config-template - /search/configuration.jsp - - - copy-request-parameters - true - - - template-path - /search/ - - - view-template - /search/view.jsp - - 0 - - text/html - - content.Language - - Knowledge Base Search - Knowledge Base Search - Knowledge Base Search - - - - enableKBArticleDescription - false - - - enableKBArticleKBComments - true - - - enableKBArticleRatings - true - - - enableKBArticleViewCountIncrement - true - - - rssDelta - 20 - - - rssDisplayStyle - full-content - - - rssFormat - atom10 - - - showKBArticleAssetEntries - true - - - showKBArticleAuthorColumn - true - - - showKBArticleCreateDateColumn - true - - - showKBArticleKBComments - false - - - showKBArticleModifiedDateColumn - true - - - showKBArticleViewsColumn - true - - - - administrator - - - guest - - - power-user - - - user - - - - categoryId - x:categoryId - - - tag - x:tag - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/server-config.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/server-config.wsdd deleted file mode 100644 index c2d2843d6d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/server-config.wsdd +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service.xml deleted file mode 100644 index bece30da40..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service.xml +++ /dev/null @@ -1,366 +0,0 @@ - - - - - KB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DuplicateKBArticleUrlTitle - DuplicateKBFolderName - InvalidKBArticleUrlTitle - InvalidKBFolderName - KBArticleContent - KBArticleImport - KBArticleParent - KBArticlePriority - KBArticleSourceURL - KBArticleTitle - KBCommentContent - KBTemplateContent - KBTemplateTitle - NoSuchKBArticleSelector - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/DuplicateKBArticleUrlTitleException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/DuplicateKBArticleUrlTitleException.java deleted file mode 100644 index 005f35cd64..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/DuplicateKBArticleUrlTitleException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class DuplicateKBArticleUrlTitleException extends PortalException { - - public DuplicateKBArticleUrlTitleException() { - super(); - } - - public DuplicateKBArticleUrlTitleException(String msg) { - super(msg); - } - - public DuplicateKBArticleUrlTitleException(String msg, Throwable cause) { - super(msg, cause); - } - - public DuplicateKBArticleUrlTitleException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/DuplicateKBFolderNameException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/DuplicateKBFolderNameException.java deleted file mode 100644 index fd62b534b1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/DuplicateKBFolderNameException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class DuplicateKBFolderNameException extends PortalException { - - public DuplicateKBFolderNameException() { - super(); - } - - public DuplicateKBFolderNameException(String msg) { - super(msg); - } - - public DuplicateKBFolderNameException(String msg, Throwable cause) { - super(msg, cause); - } - - public DuplicateKBFolderNameException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/InvalidKBArticleUrlTitleException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/InvalidKBArticleUrlTitleException.java deleted file mode 100644 index 3330082fa2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/InvalidKBArticleUrlTitleException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class InvalidKBArticleUrlTitleException extends PortalException { - - public InvalidKBArticleUrlTitleException() { - super(); - } - - public InvalidKBArticleUrlTitleException(String msg) { - super(msg); - } - - public InvalidKBArticleUrlTitleException(String msg, Throwable cause) { - super(msg, cause); - } - - public InvalidKBArticleUrlTitleException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/InvalidKBFolderNameException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/InvalidKBFolderNameException.java deleted file mode 100644 index a892bcd061..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/InvalidKBFolderNameException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class InvalidKBFolderNameException extends PortalException { - - public InvalidKBFolderNameException() { - super(); - } - - public InvalidKBFolderNameException(String msg) { - super(msg); - } - - public InvalidKBFolderNameException(String msg, Throwable cause) { - super(msg, cause); - } - - public InvalidKBFolderNameException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleContentException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleContentException.java deleted file mode 100644 index 9e4762ecac..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleContentException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class KBArticleContentException extends PortalException { - - public KBArticleContentException() { - super(); - } - - public KBArticleContentException(String msg) { - super(msg); - } - - public KBArticleContentException(String msg, Throwable cause) { - super(msg, cause); - } - - public KBArticleContentException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleImportException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleImportException.java deleted file mode 100644 index 78d35c4e7f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleImportException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author James Hinkey - */ -public class KBArticleImportException extends PortalException { - - public KBArticleImportException() { - super(); - } - - public KBArticleImportException(String msg) { - super(msg); - } - - public KBArticleImportException(String msg, Throwable cause) { - super(msg, cause); - } - - public KBArticleImportException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleParentException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleParentException.java deleted file mode 100644 index 0dd9167184..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleParentException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class KBArticleParentException extends PortalException { - - public KBArticleParentException() { - super(); - } - - public KBArticleParentException(String msg) { - super(msg); - } - - public KBArticleParentException(String msg, Throwable cause) { - super(msg, cause); - } - - public KBArticleParentException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticlePriorityException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticlePriorityException.java deleted file mode 100644 index 735be05548..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticlePriorityException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class KBArticlePriorityException extends PortalException { - - public KBArticlePriorityException() { - super(); - } - - public KBArticlePriorityException(String msg) { - super(msg); - } - - public KBArticlePriorityException(String msg, Throwable cause) { - super(msg, cause); - } - - public KBArticlePriorityException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleSourceURLException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleSourceURLException.java deleted file mode 100644 index 5d3f11387b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleSourceURLException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class KBArticleSourceURLException extends PortalException { - - public KBArticleSourceURLException() { - super(); - } - - public KBArticleSourceURLException(String msg) { - super(msg); - } - - public KBArticleSourceURLException(String msg, Throwable cause) { - super(msg, cause); - } - - public KBArticleSourceURLException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleTitleException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleTitleException.java deleted file mode 100644 index 3372440d0d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBArticleTitleException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class KBArticleTitleException extends PortalException { - - public KBArticleTitleException() { - super(); - } - - public KBArticleTitleException(String msg) { - super(msg); - } - - public KBArticleTitleException(String msg, Throwable cause) { - super(msg, cause); - } - - public KBArticleTitleException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBCommentContentException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBCommentContentException.java deleted file mode 100644 index 8f0afa8925..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBCommentContentException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class KBCommentContentException extends PortalException { - - public KBCommentContentException() { - super(); - } - - public KBCommentContentException(String msg) { - super(msg); - } - - public KBCommentContentException(String msg, Throwable cause) { - super(msg, cause); - } - - public KBCommentContentException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBTemplateContentException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBTemplateContentException.java deleted file mode 100644 index 092b7df1e2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBTemplateContentException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class KBTemplateContentException extends PortalException { - - public KBTemplateContentException() { - super(); - } - - public KBTemplateContentException(String msg) { - super(msg); - } - - public KBTemplateContentException(String msg, Throwable cause) { - super(msg, cause); - } - - public KBTemplateContentException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBTemplateTitleException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBTemplateTitleException.java deleted file mode 100644 index e1a2e0d07e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/KBTemplateTitleException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class KBTemplateTitleException extends PortalException { - - public KBTemplateTitleException() { - super(); - } - - public KBTemplateTitleException(String msg) { - super(msg); - } - - public KBTemplateTitleException(String msg, Throwable cause) { - super(msg, cause); - } - - public KBTemplateTitleException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchArticleException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchArticleException.java deleted file mode 100644 index 527bbbd2e7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchArticleException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Brian Wing Shun Chan - */ -public class NoSuchArticleException extends NoSuchModelException { - - public NoSuchArticleException() { - super(); - } - - public NoSuchArticleException(String msg) { - super(msg); - } - - public NoSuchArticleException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchArticleException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchCommentException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchCommentException.java deleted file mode 100644 index 805b98aeab..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchCommentException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Brian Wing Shun Chan - */ -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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchFolderException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchFolderException.java deleted file mode 100644 index 4ce7e9204b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchFolderException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Brian Wing Shun Chan - */ -public class NoSuchFolderException extends NoSuchModelException { - - public NoSuchFolderException() { - super(); - } - - public NoSuchFolderException(String msg) { - super(msg); - } - - public NoSuchFolderException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchFolderException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchKBArticleSelectorException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchKBArticleSelectorException.java deleted file mode 100644 index 012343167c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchKBArticleSelectorException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Brian Wing Shun Chan - */ -public class NoSuchKBArticleSelectorException extends NoSuchModelException { - - public NoSuchKBArticleSelectorException() { - super(); - } - - public NoSuchKBArticleSelectorException(String msg) { - super(msg); - } - - public NoSuchKBArticleSelectorException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchKBArticleSelectorException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchTemplateException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchTemplateException.java deleted file mode 100644 index 6ebc2be669..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/NoSuchTemplateException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.knowledgebase; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Brian Wing Shun Chan - */ -public class NoSuchTemplateException extends NoSuchModelException { - - public NoSuchTemplateException() { - super(); - } - - public NoSuchTemplateException(String msg) { - super(msg); - } - - public NoSuchTemplateException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchTemplateException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticle.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticle.java deleted file mode 100644 index 930a99adb7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticle.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the KBArticle service. Represents a row in the "KBArticle" database table, with each column mapped to a property of this class. - * - * @author Brian Wing Shun Chan - * @see KBArticleModel - * @see com.liferay.knowledgebase.model.impl.KBArticleImpl - * @see com.liferay.knowledgebase.model.impl.KBArticleModelImpl - * @generated - */ -public interface KBArticle extends KBArticleModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link com.liferay.knowledgebase.model.impl.KBArticleImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - public java.util.List getAncestorResourcePrimaryKeys() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public java.util.List getAttachmentsFileEntries() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public long getAttachmentsFolderId() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public long getClassNameId(); - - public long getClassPK(); - - public com.liferay.knowledgebase.model.KBArticle getParentKBArticle() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public java.lang.String getParentTitle(java.util.Locale locale, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public boolean isFirstVersion(); - - public boolean isRoot(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleClp.java deleted file mode 100644 index 67de1a9379..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleClp.java +++ /dev/null @@ -1,1614 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.knowledgebase.service.ClpSerializer; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.ProxyUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.impl.BaseModelImpl; -import com.liferay.portal.util.PortalUtil; - -import java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Brian Wing Shun Chan - */ -public class KBArticleClp extends BaseModelImpl implements KBArticle { - public KBArticleClp() { - } - - @Override - public Class getModelClass() { - return KBArticle.class; - } - - @Override - public String getModelClassName() { - return KBArticle.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _kbArticleId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setKbArticleId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _kbArticleId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbArticleId", getKbArticleId()); - attributes.put("resourcePrimKey", getResourcePrimKey()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("rootResourcePrimKey", getRootResourcePrimKey()); - attributes.put("parentResourceClassNameId", - getParentResourceClassNameId()); - attributes.put("parentResourcePrimKey", getParentResourcePrimKey()); - attributes.put("kbFolderId", getKbFolderId()); - attributes.put("version", getVersion()); - attributes.put("title", getTitle()); - attributes.put("urlTitle", getUrlTitle()); - attributes.put("content", getContent()); - attributes.put("description", getDescription()); - attributes.put("priority", getPriority()); - attributes.put("sections", getSections()); - attributes.put("viewCount", getViewCount()); - attributes.put("latest", getLatest()); - attributes.put("main", getMain()); - attributes.put("sourceURL", getSourceURL()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbArticleId = (Long)attributes.get("kbArticleId"); - - if (kbArticleId != null) { - setKbArticleId(kbArticleId); - } - - Long resourcePrimKey = (Long)attributes.get("resourcePrimKey"); - - if (resourcePrimKey != null) { - setResourcePrimKey(resourcePrimKey); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long rootResourcePrimKey = (Long)attributes.get("rootResourcePrimKey"); - - if (rootResourcePrimKey != null) { - setRootResourcePrimKey(rootResourcePrimKey); - } - - Long parentResourceClassNameId = (Long)attributes.get( - "parentResourceClassNameId"); - - if (parentResourceClassNameId != null) { - setParentResourceClassNameId(parentResourceClassNameId); - } - - Long parentResourcePrimKey = (Long)attributes.get( - "parentResourcePrimKey"); - - if (parentResourcePrimKey != null) { - setParentResourcePrimKey(parentResourcePrimKey); - } - - Long kbFolderId = (Long)attributes.get("kbFolderId"); - - if (kbFolderId != null) { - setKbFolderId(kbFolderId); - } - - Integer version = (Integer)attributes.get("version"); - - if (version != null) { - setVersion(version); - } - - String title = (String)attributes.get("title"); - - if (title != null) { - setTitle(title); - } - - String urlTitle = (String)attributes.get("urlTitle"); - - if (urlTitle != null) { - setUrlTitle(urlTitle); - } - - String content = (String)attributes.get("content"); - - if (content != null) { - setContent(content); - } - - String description = (String)attributes.get("description"); - - if (description != null) { - setDescription(description); - } - - Double priority = (Double)attributes.get("priority"); - - if (priority != null) { - setPriority(priority); - } - - String sections = (String)attributes.get("sections"); - - if (sections != null) { - setSections(sections); - } - - Integer viewCount = (Integer)attributes.get("viewCount"); - - if (viewCount != null) { - setViewCount(viewCount); - } - - Boolean latest = (Boolean)attributes.get("latest"); - - if (latest != null) { - setLatest(latest); - } - - Boolean main = (Boolean)attributes.get("main"); - - if (main != null) { - setMain(main); - } - - String sourceURL = (String)attributes.get("sourceURL"); - - if (sourceURL != null) { - setSourceURL(sourceURL); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - } - - @Override - public String getUuid() { - return _uuid; - } - - @Override - public void setUuid(String uuid) { - _uuid = uuid; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setUuid", String.class); - - method.invoke(_kbArticleRemoteModel, uuid); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getKbArticleId() { - return _kbArticleId; - } - - @Override - public void setKbArticleId(long kbArticleId) { - _kbArticleId = kbArticleId; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setKbArticleId", long.class); - - method.invoke(_kbArticleRemoteModel, kbArticleId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getResourcePrimKey() { - return _resourcePrimKey; - } - - @Override - public void setResourcePrimKey(long resourcePrimKey) { - _resourcePrimKey = resourcePrimKey; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setResourcePrimKey", long.class); - - method.invoke(_kbArticleRemoteModel, resourcePrimKey); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public boolean isResourceMain() { - return _resourceMain; - } - - public void setResourceMain(boolean resourceMain) { - _resourceMain = resourceMain; - } - - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _groupId = groupId; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setGroupId", long.class); - - method.invoke(_kbArticleRemoteModel, groupId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_kbArticleRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _userId = userId; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserId", long.class); - - method.invoke(_kbArticleRemoteModel, 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 (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserName", String.class); - - method.invoke(_kbArticleRemoteModel, userName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_kbArticleRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_kbArticleRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getRootResourcePrimKey() { - return _rootResourcePrimKey; - } - - @Override - public void setRootResourcePrimKey(long rootResourcePrimKey) { - _rootResourcePrimKey = rootResourcePrimKey; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setRootResourcePrimKey", - long.class); - - method.invoke(_kbArticleRemoteModel, rootResourcePrimKey); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getParentResourceClassNameId() { - return _parentResourceClassNameId; - } - - @Override - public void setParentResourceClassNameId(long parentResourceClassNameId) { - _parentResourceClassNameId = parentResourceClassNameId; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setParentResourceClassNameId", - long.class); - - method.invoke(_kbArticleRemoteModel, parentResourceClassNameId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getParentResourcePrimKey() { - return _parentResourcePrimKey; - } - - @Override - public void setParentResourcePrimKey(long parentResourcePrimKey) { - _parentResourcePrimKey = parentResourcePrimKey; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setParentResourcePrimKey", - long.class); - - method.invoke(_kbArticleRemoteModel, parentResourcePrimKey); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getKbFolderId() { - return _kbFolderId; - } - - @Override - public void setKbFolderId(long kbFolderId) { - _kbFolderId = kbFolderId; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setKbFolderId", long.class); - - method.invoke(_kbArticleRemoteModel, kbFolderId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public int getVersion() { - return _version; - } - - @Override - public void setVersion(int version) { - _version = version; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setVersion", int.class); - - method.invoke(_kbArticleRemoteModel, version); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getTitle() { - return _title; - } - - @Override - public void setTitle(String title) { - _title = title; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setTitle", String.class); - - method.invoke(_kbArticleRemoteModel, title); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getUrlTitle() { - return _urlTitle; - } - - @Override - public void setUrlTitle(String urlTitle) { - _urlTitle = urlTitle; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setUrlTitle", String.class); - - method.invoke(_kbArticleRemoteModel, urlTitle); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getContent() { - return _content; - } - - @Override - public void setContent(String content) { - _content = content; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setContent", String.class); - - method.invoke(_kbArticleRemoteModel, content); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getDescription() { - return _description; - } - - @Override - public void setDescription(String description) { - _description = description; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setDescription", String.class); - - method.invoke(_kbArticleRemoteModel, description); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public double getPriority() { - return _priority; - } - - @Override - public void setPriority(double priority) { - _priority = priority; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setPriority", double.class); - - method.invoke(_kbArticleRemoteModel, priority); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getSections() { - return _sections; - } - - @Override - public void setSections(String sections) { - _sections = sections; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setSections", String.class); - - method.invoke(_kbArticleRemoteModel, sections); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public int getViewCount() { - return _viewCount; - } - - @Override - public void setViewCount(int viewCount) { - _viewCount = viewCount; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setViewCount", int.class); - - method.invoke(_kbArticleRemoteModel, viewCount); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public boolean getLatest() { - return _latest; - } - - @Override - public boolean isLatest() { - return _latest; - } - - @Override - public void setLatest(boolean latest) { - _latest = latest; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setLatest", boolean.class); - - method.invoke(_kbArticleRemoteModel, latest); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public boolean getMain() { - return _main; - } - - @Override - public boolean isMain() { - return _main; - } - - @Override - public void setMain(boolean main) { - _main = main; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setMain", boolean.class); - - method.invoke(_kbArticleRemoteModel, main); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getSourceURL() { - return _sourceURL; - } - - @Override - public void setSourceURL(String sourceURL) { - _sourceURL = sourceURL; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setSourceURL", String.class); - - method.invoke(_kbArticleRemoteModel, sourceURL); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _status = status; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatus", int.class); - - method.invoke(_kbArticleRemoteModel, status); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getStatusByUserId() { - return _statusByUserId; - } - - @Override - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusByUserId", long.class); - - method.invoke(_kbArticleRemoteModel, statusByUserId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getStatusByUserUuid() throws SystemException { - return PortalUtil.getUserValue(getStatusByUserId(), "uuid", - _statusByUserUuid); - } - - @Override - public void setStatusByUserUuid(String statusByUserUuid) { - _statusByUserUuid = statusByUserUuid; - } - - @Override - public String getStatusByUserName() { - return _statusByUserName; - } - - @Override - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusByUserName", - String.class); - - method.invoke(_kbArticleRemoteModel, statusByUserName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getStatusDate() { - return _statusDate; - } - - @Override - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - - if (_kbArticleRemoteModel != null) { - try { - Class clazz = _kbArticleRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatusDate", Date.class); - - method.invoke(_kbArticleRemoteModel, statusDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getAttachmentsFolderId() { - try { - String methodName = "getAttachmentsFolderId"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - Long returnObj = (Long)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public java.util.List getAncestorResourcePrimaryKeys() { - try { - String methodName = "getAncestorResourcePrimaryKeys"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - java.util.List returnObj = (java.util.List)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public java.lang.String getParentTitle(java.util.Locale locale, int status) { - try { - String methodName = "getParentTitle"; - - Class[] parameterTypes = new Class[] { - java.util.Locale.class, int.class - }; - - Object[] parameterValues = new Object[] { locale, status }; - - java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public java.util.List getAttachmentsFileEntries() { - try { - String methodName = "getAttachmentsFileEntries"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - java.util.List returnObj = - (java.util.List)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public boolean isFirstVersion() { - try { - String methodName = "isFirstVersion"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - Boolean returnObj = (Boolean)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getParentKBArticle() { - try { - String methodName = "getParentKBArticle"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - com.liferay.knowledgebase.model.KBArticle returnObj = (com.liferay.knowledgebase.model.KBArticle)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public long getClassNameId() { - try { - String methodName = "getClassNameId"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - Long returnObj = (Long)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public long getClassPK() { - try { - String methodName = "getClassPK"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - Long returnObj = (Long)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public boolean isRoot() { - try { - String methodName = "isRoot"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - Boolean returnObj = (Boolean)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBArticle.class.getName())); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved} - */ - @Override - public boolean getApproved() { - return isApproved(); - } - - @Override - public boolean isApproved() { - if (getStatus() == WorkflowConstants.STATUS_APPROVED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDenied() { - if (getStatus() == WorkflowConstants.STATUS_DENIED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDraft() { - if (getStatus() == WorkflowConstants.STATUS_DRAFT) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isExpired() { - if (getStatus() == WorkflowConstants.STATUS_EXPIRED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInactive() { - if (getStatus() == WorkflowConstants.STATUS_INACTIVE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isIncomplete() { - if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isPending() { - if (getStatus() == WorkflowConstants.STATUS_PENDING) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isScheduled() { - if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) { - return true; - } - else { - return false; - } - } - - public BaseModel getKBArticleRemoteModel() { - return _kbArticleRemoteModel; - } - - public void setKBArticleRemoteModel(BaseModel kbArticleRemoteModel) { - _kbArticleRemoteModel = kbArticleRemoteModel; - } - - 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 = _kbArticleRemoteModel.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(_kbArticleRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - KBArticleLocalServiceUtil.addKBArticle(this); - } - else { - KBArticleLocalServiceUtil.updateKBArticle(this); - } - } - - @Override - public KBArticle toEscapedModel() { - return (KBArticle)ProxyUtil.newProxyInstance(KBArticle.class.getClassLoader(), - new Class[] { KBArticle.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - KBArticleClp clone = new KBArticleClp(); - - clone.setUuid(getUuid()); - clone.setKbArticleId(getKbArticleId()); - clone.setResourcePrimKey(getResourcePrimKey()); - clone.setGroupId(getGroupId()); - clone.setCompanyId(getCompanyId()); - clone.setUserId(getUserId()); - clone.setUserName(getUserName()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setRootResourcePrimKey(getRootResourcePrimKey()); - clone.setParentResourceClassNameId(getParentResourceClassNameId()); - clone.setParentResourcePrimKey(getParentResourcePrimKey()); - clone.setKbFolderId(getKbFolderId()); - clone.setVersion(getVersion()); - clone.setTitle(getTitle()); - clone.setUrlTitle(getUrlTitle()); - clone.setContent(getContent()); - clone.setDescription(getDescription()); - clone.setPriority(getPriority()); - clone.setSections(getSections()); - clone.setViewCount(getViewCount()); - clone.setLatest(getLatest()); - clone.setMain(getMain()); - clone.setSourceURL(getSourceURL()); - clone.setStatus(getStatus()); - clone.setStatusByUserId(getStatusByUserId()); - clone.setStatusByUserName(getStatusByUserName()); - clone.setStatusDate(getStatusDate()); - - return clone; - } - - @Override - public int compareTo(KBArticle kbArticle) { - int value = 0; - - value = DateUtil.compareTo(getModifiedDate(), - kbArticle.getModifiedDate()); - - value = value * -1; - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBArticleClp)) { - return false; - } - - KBArticleClp kbArticle = (KBArticleClp)obj; - - long primaryKey = kbArticle.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(57); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", kbArticleId="); - sb.append(getKbArticleId()); - sb.append(", resourcePrimKey="); - sb.append(getResourcePrimKey()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", rootResourcePrimKey="); - sb.append(getRootResourcePrimKey()); - sb.append(", parentResourceClassNameId="); - sb.append(getParentResourceClassNameId()); - sb.append(", parentResourcePrimKey="); - sb.append(getParentResourcePrimKey()); - sb.append(", kbFolderId="); - sb.append(getKbFolderId()); - sb.append(", version="); - sb.append(getVersion()); - sb.append(", title="); - sb.append(getTitle()); - sb.append(", urlTitle="); - sb.append(getUrlTitle()); - sb.append(", content="); - sb.append(getContent()); - sb.append(", description="); - sb.append(getDescription()); - sb.append(", priority="); - sb.append(getPriority()); - sb.append(", sections="); - sb.append(getSections()); - sb.append(", viewCount="); - sb.append(getViewCount()); - sb.append(", latest="); - sb.append(getLatest()); - sb.append(", main="); - sb.append(getMain()); - sb.append(", sourceURL="); - sb.append(getSourceURL()); - sb.append(", status="); - sb.append(getStatus()); - sb.append(", statusByUserId="); - sb.append(getStatusByUserId()); - sb.append(", statusByUserName="); - sb.append(getStatusByUserName()); - sb.append(", statusDate="); - sb.append(getStatusDate()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(88); - - sb.append(""); - sb.append("com.liferay.knowledgebase.model.KBArticle"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "kbArticleId"); - sb.append( - "resourcePrimKey"); - sb.append( - "groupId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "rootResourcePrimKey"); - sb.append( - "parentResourceClassNameId"); - sb.append( - "parentResourcePrimKey"); - sb.append( - "kbFolderId"); - sb.append( - "version"); - sb.append( - "title"); - sb.append( - "urlTitle"); - sb.append( - "content"); - sb.append( - "description"); - sb.append( - "priority"); - sb.append( - "sections"); - sb.append( - "viewCount"); - sb.append( - "latest"); - sb.append( - "main"); - sb.append( - "sourceURL"); - sb.append( - "status"); - sb.append( - "statusByUserId"); - sb.append( - "statusByUserName"); - sb.append( - "statusDate"); - - sb.append(""); - - return sb.toString(); - } - - private String _uuid; - private long _kbArticleId; - private long _resourcePrimKey; - private boolean _resourceMain; - private long _groupId; - private long _companyId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _rootResourcePrimKey; - private long _parentResourceClassNameId; - private long _parentResourcePrimKey; - private long _kbFolderId; - private int _version; - private String _title; - private String _urlTitle; - private String _content; - private String _description; - private double _priority; - private String _sections; - private int _viewCount; - private boolean _latest; - private boolean _main; - private String _sourceURL; - private int _status; - private long _statusByUserId; - private String _statusByUserUuid; - private String _statusByUserName; - private Date _statusDate; - private BaseModel _kbArticleRemoteModel; - private Class _clpSerializerClass = com.liferay.knowledgebase.service.ClpSerializer.class; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleConstants.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleConstants.java deleted file mode 100644 index 5e813870a4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleConstants.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleConstants { - - public static final long DEFAULT_PARENT_RESOURCE_PRIM_KEY = 0; - - public static final double DEFAULT_PRIORITY = 1.0; - - public static final int DEFAULT_VERSION = 1; - - public static final String DIR_NAME_PREFIX = "knowledgebase/kbarticles/"; - - public static String getClassName() { - return KBArticle.class.getName(); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleModel.java deleted file mode 100644 index f880862ebb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleModel.java +++ /dev/null @@ -1,669 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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.model.ResourcedModel; -import com.liferay.portal.model.StagedGroupedModel; -import com.liferay.portal.model.WorkflowedModel; -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 KBArticle service. Represents a row in the "KBArticle" database table, with each column mapped to a property of this class. - * - *

    - * This interface and its corresponding implementation {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.knowledgebase.model.impl.KBArticleImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBArticle - * @see com.liferay.knowledgebase.model.impl.KBArticleImpl - * @see com.liferay.knowledgebase.model.impl.KBArticleModelImpl - * @generated - */ -public interface KBArticleModel extends BaseModel, ResourcedModel, - StagedGroupedModel, WorkflowedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a k b article model instance should use the {@link KBArticle} interface instead. - */ - - /** - * Returns the primary key of this k b article. - * - * @return the primary key of this k b article - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this k b article. - * - * @param primaryKey the primary key of this k b article - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the uuid of this k b article. - * - * @return the uuid of this k b article - */ - @AutoEscape - @Override - public String getUuid(); - - /** - * Sets the uuid of this k b article. - * - * @param uuid the uuid of this k b article - */ - @Override - public void setUuid(String uuid); - - /** - * Returns the kb article ID of this k b article. - * - * @return the kb article ID of this k b article - */ - public long getKbArticleId(); - - /** - * Sets the kb article ID of this k b article. - * - * @param kbArticleId the kb article ID of this k b article - */ - public void setKbArticleId(long kbArticleId); - - /** - * Returns the resource prim key of this k b article. - * - * @return the resource prim key of this k b article - */ - @Override - public long getResourcePrimKey(); - - /** - * Sets the resource prim key of this k b article. - * - * @param resourcePrimKey the resource prim key of this k b article - */ - @Override - public void setResourcePrimKey(long resourcePrimKey); - - @Override - public boolean isResourceMain(); - - /** - * Returns the group ID of this k b article. - * - * @return the group ID of this k b article - */ - @Override - public long getGroupId(); - - /** - * Sets the group ID of this k b article. - * - * @param groupId the group ID of this k b article - */ - @Override - public void setGroupId(long groupId); - - /** - * Returns the company ID of this k b article. - * - * @return the company ID of this k b article - */ - @Override - public long getCompanyId(); - - /** - * Sets the company ID of this k b article. - * - * @param companyId the company ID of this k b article - */ - @Override - public void setCompanyId(long companyId); - - /** - * Returns the user ID of this k b article. - * - * @return the user ID of this k b article - */ - @Override - public long getUserId(); - - /** - * Sets the user ID of this k b article. - * - * @param userId the user ID of this k b article - */ - @Override - public void setUserId(long userId); - - /** - * Returns the user uuid of this k b article. - * - * @return the user uuid of this k b article - * @throws SystemException if a system exception occurred - */ - @Override - public String getUserUuid() throws SystemException; - - /** - * Sets the user uuid of this k b article. - * - * @param userUuid the user uuid of this k b article - */ - @Override - public void setUserUuid(String userUuid); - - /** - * Returns the user name of this k b article. - * - * @return the user name of this k b article - */ - @AutoEscape - @Override - public String getUserName(); - - /** - * Sets the user name of this k b article. - * - * @param userName the user name of this k b article - */ - @Override - public void setUserName(String userName); - - /** - * Returns the create date of this k b article. - * - * @return the create date of this k b article - */ - @Override - public Date getCreateDate(); - - /** - * Sets the create date of this k b article. - * - * @param createDate the create date of this k b article - */ - @Override - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this k b article. - * - * @return the modified date of this k b article - */ - @Override - public Date getModifiedDate(); - - /** - * Sets the modified date of this k b article. - * - * @param modifiedDate the modified date of this k b article - */ - @Override - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the root resource prim key of this k b article. - * - * @return the root resource prim key of this k b article - */ - public long getRootResourcePrimKey(); - - /** - * Sets the root resource prim key of this k b article. - * - * @param rootResourcePrimKey the root resource prim key of this k b article - */ - public void setRootResourcePrimKey(long rootResourcePrimKey); - - /** - * Returns the parent resource class name ID of this k b article. - * - * @return the parent resource class name ID of this k b article - */ - public long getParentResourceClassNameId(); - - /** - * Sets the parent resource class name ID of this k b article. - * - * @param parentResourceClassNameId the parent resource class name ID of this k b article - */ - public void setParentResourceClassNameId(long parentResourceClassNameId); - - /** - * Returns the parent resource prim key of this k b article. - * - * @return the parent resource prim key of this k b article - */ - public long getParentResourcePrimKey(); - - /** - * Sets the parent resource prim key of this k b article. - * - * @param parentResourcePrimKey the parent resource prim key of this k b article - */ - public void setParentResourcePrimKey(long parentResourcePrimKey); - - /** - * Returns the kb folder ID of this k b article. - * - * @return the kb folder ID of this k b article - */ - public long getKbFolderId(); - - /** - * Sets the kb folder ID of this k b article. - * - * @param kbFolderId the kb folder ID of this k b article - */ - public void setKbFolderId(long kbFolderId); - - /** - * Returns the version of this k b article. - * - * @return the version of this k b article - */ - public int getVersion(); - - /** - * Sets the version of this k b article. - * - * @param version the version of this k b article - */ - public void setVersion(int version); - - /** - * Returns the title of this k b article. - * - * @return the title of this k b article - */ - @AutoEscape - public String getTitle(); - - /** - * Sets the title of this k b article. - * - * @param title the title of this k b article - */ - public void setTitle(String title); - - /** - * Returns the url title of this k b article. - * - * @return the url title of this k b article - */ - @AutoEscape - public String getUrlTitle(); - - /** - * Sets the url title of this k b article. - * - * @param urlTitle the url title of this k b article - */ - public void setUrlTitle(String urlTitle); - - /** - * Returns the content of this k b article. - * - * @return the content of this k b article - */ - @AutoEscape - public String getContent(); - - /** - * Sets the content of this k b article. - * - * @param content the content of this k b article - */ - public void setContent(String content); - - /** - * Returns the description of this k b article. - * - * @return the description of this k b article - */ - @AutoEscape - public String getDescription(); - - /** - * Sets the description of this k b article. - * - * @param description the description of this k b article - */ - public void setDescription(String description); - - /** - * Returns the priority of this k b article. - * - * @return the priority of this k b article - */ - public double getPriority(); - - /** - * Sets the priority of this k b article. - * - * @param priority the priority of this k b article - */ - public void setPriority(double priority); - - /** - * Returns the sections of this k b article. - * - * @return the sections of this k b article - */ - @AutoEscape - public String getSections(); - - /** - * Sets the sections of this k b article. - * - * @param sections the sections of this k b article - */ - public void setSections(String sections); - - /** - * Returns the view count of this k b article. - * - * @return the view count of this k b article - */ - public int getViewCount(); - - /** - * Sets the view count of this k b article. - * - * @param viewCount the view count of this k b article - */ - public void setViewCount(int viewCount); - - /** - * Returns the latest of this k b article. - * - * @return the latest of this k b article - */ - public boolean getLatest(); - - /** - * Returns true if this k b article is latest. - * - * @return true if this k b article is latest; false otherwise - */ - public boolean isLatest(); - - /** - * Sets whether this k b article is latest. - * - * @param latest the latest of this k b article - */ - public void setLatest(boolean latest); - - /** - * Returns the main of this k b article. - * - * @return the main of this k b article - */ - public boolean getMain(); - - /** - * Returns true if this k b article is main. - * - * @return true if this k b article is main; false otherwise - */ - public boolean isMain(); - - /** - * Sets whether this k b article is main. - * - * @param main the main of this k b article - */ - public void setMain(boolean main); - - /** - * Returns the source u r l of this k b article. - * - * @return the source u r l of this k b article - */ - @AutoEscape - public String getSourceURL(); - - /** - * Sets the source u r l of this k b article. - * - * @param sourceURL the source u r l of this k b article - */ - public void setSourceURL(String sourceURL); - - /** - * Returns the status of this k b article. - * - * @return the status of this k b article - */ - @Override - public int getStatus(); - - /** - * Sets the status of this k b article. - * - * @param status the status of this k b article - */ - @Override - public void setStatus(int status); - - /** - * Returns the status by user ID of this k b article. - * - * @return the status by user ID of this k b article - */ - @Override - public long getStatusByUserId(); - - /** - * Sets the status by user ID of this k b article. - * - * @param statusByUserId the status by user ID of this k b article - */ - @Override - public void setStatusByUserId(long statusByUserId); - - /** - * Returns the status by user uuid of this k b article. - * - * @return the status by user uuid of this k b article - * @throws SystemException if a system exception occurred - */ - @Override - public String getStatusByUserUuid() throws SystemException; - - /** - * Sets the status by user uuid of this k b article. - * - * @param statusByUserUuid the status by user uuid of this k b article - */ - @Override - public void setStatusByUserUuid(String statusByUserUuid); - - /** - * Returns the status by user name of this k b article. - * - * @return the status by user name of this k b article - */ - @AutoEscape - @Override - public String getStatusByUserName(); - - /** - * Sets the status by user name of this k b article. - * - * @param statusByUserName the status by user name of this k b article - */ - @Override - public void setStatusByUserName(String statusByUserName); - - /** - * Returns the status date of this k b article. - * - * @return the status date of this k b article - */ - @Override - public Date getStatusDate(); - - /** - * Sets the status date of this k b article. - * - * @param statusDate the status date of this k b article - */ - @Override - public void setStatusDate(Date statusDate); - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved()} - */ - @Override - public boolean getApproved(); - - /** - * Returns true if this k b article is approved. - * - * @return true if this k b article is approved; false otherwise - */ - @Override - public boolean isApproved(); - - /** - * Returns true if this k b article is denied. - * - * @return true if this k b article is denied; false otherwise - */ - @Override - public boolean isDenied(); - - /** - * Returns true if this k b article is a draft. - * - * @return true if this k b article is a draft; false otherwise - */ - @Override - public boolean isDraft(); - - /** - * Returns true if this k b article is expired. - * - * @return true if this k b article is expired; false otherwise - */ - @Override - public boolean isExpired(); - - /** - * Returns true if this k b article is inactive. - * - * @return true if this k b article is inactive; false otherwise - */ - @Override - public boolean isInactive(); - - /** - * Returns true if this k b article is incomplete. - * - * @return true if this k b article is incomplete; false otherwise - */ - @Override - public boolean isIncomplete(); - - /** - * Returns true if this k b article is pending. - * - * @return true if this k b article is pending; false otherwise - */ - @Override - public boolean isPending(); - - /** - * Returns true if this k b article is scheduled. - * - * @return true if this k b article is scheduled; false otherwise - */ - @Override - public boolean isScheduled(); - - @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(KBArticle kbArticle); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public KBArticle toEscapedModel(); - - @Override - public KBArticle toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleSearchDisplay.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleSearchDisplay.java deleted file mode 100644 index 8fbbe5a87f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleSearchDisplay.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import java.io.Serializable; - -import java.util.List; - -/** - * @author Peter Shin - */ -public interface KBArticleSearchDisplay extends Serializable { - - public int[] getCurStartValues(); - - public List getResults(); - - public int getTotal(); - - public void setCurStartValues(int[] curStartValues); - - public void setResults(List results); - - public void setTotal(int total); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleSoap.java deleted file mode 100644 index da966c740e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleSoap.java +++ /dev/null @@ -1,374 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 com.liferay.knowledgebase.service.http.KBArticleServiceSoap}. - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.http.KBArticleServiceSoap - * @generated - */ -public class KBArticleSoap implements Serializable { - public static KBArticleSoap toSoapModel(KBArticle model) { - KBArticleSoap soapModel = new KBArticleSoap(); - - soapModel.setUuid(model.getUuid()); - soapModel.setKbArticleId(model.getKbArticleId()); - soapModel.setResourcePrimKey(model.getResourcePrimKey()); - soapModel.setGroupId(model.getGroupId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setUserId(model.getUserId()); - soapModel.setUserName(model.getUserName()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setRootResourcePrimKey(model.getRootResourcePrimKey()); - soapModel.setParentResourceClassNameId(model.getParentResourceClassNameId()); - soapModel.setParentResourcePrimKey(model.getParentResourcePrimKey()); - soapModel.setKbFolderId(model.getKbFolderId()); - soapModel.setVersion(model.getVersion()); - soapModel.setTitle(model.getTitle()); - soapModel.setUrlTitle(model.getUrlTitle()); - soapModel.setContent(model.getContent()); - soapModel.setDescription(model.getDescription()); - soapModel.setPriority(model.getPriority()); - soapModel.setSections(model.getSections()); - soapModel.setViewCount(model.getViewCount()); - soapModel.setLatest(model.getLatest()); - soapModel.setMain(model.getMain()); - soapModel.setSourceURL(model.getSourceURL()); - soapModel.setStatus(model.getStatus()); - soapModel.setStatusByUserId(model.getStatusByUserId()); - soapModel.setStatusByUserName(model.getStatusByUserName()); - soapModel.setStatusDate(model.getStatusDate()); - - return soapModel; - } - - public static KBArticleSoap[] toSoapModels(KBArticle[] models) { - KBArticleSoap[] soapModels = new KBArticleSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static KBArticleSoap[][] toSoapModels(KBArticle[][] models) { - KBArticleSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new KBArticleSoap[models.length][models[0].length]; - } - else { - soapModels = new KBArticleSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static KBArticleSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (KBArticle model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new KBArticleSoap[soapModels.size()]); - } - - public KBArticleSoap() { - } - - public long getPrimaryKey() { - return _kbArticleId; - } - - public void setPrimaryKey(long pk) { - setKbArticleId(pk); - } - - public String getUuid() { - return _uuid; - } - - public void setUuid(String uuid) { - _uuid = uuid; - } - - public long getKbArticleId() { - return _kbArticleId; - } - - public void setKbArticleId(long kbArticleId) { - _kbArticleId = kbArticleId; - } - - public long getResourcePrimKey() { - return _resourcePrimKey; - } - - public void setResourcePrimKey(long resourcePrimKey) { - _resourcePrimKey = resourcePrimKey; - } - - 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 Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public long getRootResourcePrimKey() { - return _rootResourcePrimKey; - } - - public void setRootResourcePrimKey(long rootResourcePrimKey) { - _rootResourcePrimKey = rootResourcePrimKey; - } - - public long getParentResourceClassNameId() { - return _parentResourceClassNameId; - } - - public void setParentResourceClassNameId(long parentResourceClassNameId) { - _parentResourceClassNameId = parentResourceClassNameId; - } - - public long getParentResourcePrimKey() { - return _parentResourcePrimKey; - } - - public void setParentResourcePrimKey(long parentResourcePrimKey) { - _parentResourcePrimKey = parentResourcePrimKey; - } - - public long getKbFolderId() { - return _kbFolderId; - } - - public void setKbFolderId(long kbFolderId) { - _kbFolderId = kbFolderId; - } - - public int getVersion() { - return _version; - } - - public void setVersion(int version) { - _version = version; - } - - public String getTitle() { - return _title; - } - - public void setTitle(String title) { - _title = title; - } - - public String getUrlTitle() { - return _urlTitle; - } - - public void setUrlTitle(String urlTitle) { - _urlTitle = urlTitle; - } - - public String getContent() { - return _content; - } - - public void setContent(String content) { - _content = content; - } - - public String getDescription() { - return _description; - } - - public void setDescription(String description) { - _description = description; - } - - public double getPriority() { - return _priority; - } - - public void setPriority(double priority) { - _priority = priority; - } - - public String getSections() { - return _sections; - } - - public void setSections(String sections) { - _sections = sections; - } - - public int getViewCount() { - return _viewCount; - } - - public void setViewCount(int viewCount) { - _viewCount = viewCount; - } - - public boolean getLatest() { - return _latest; - } - - public boolean isLatest() { - return _latest; - } - - public void setLatest(boolean latest) { - _latest = latest; - } - - public boolean getMain() { - return _main; - } - - public boolean isMain() { - return _main; - } - - public void setMain(boolean main) { - _main = main; - } - - public String getSourceURL() { - return _sourceURL; - } - - public void setSourceURL(String sourceURL) { - _sourceURL = sourceURL; - } - - public int getStatus() { - return _status; - } - - public void setStatus(int status) { - _status = status; - } - - public long getStatusByUserId() { - return _statusByUserId; - } - - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - } - - public String getStatusByUserName() { - return _statusByUserName; - } - - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - } - - public Date getStatusDate() { - return _statusDate; - } - - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - } - - private String _uuid; - private long _kbArticleId; - private long _resourcePrimKey; - private long _groupId; - private long _companyId; - private long _userId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _rootResourcePrimKey; - private long _parentResourceClassNameId; - private long _parentResourcePrimKey; - private long _kbFolderId; - private int _version; - private String _title; - private String _urlTitle; - private String _content; - private String _description; - private double _priority; - private String _sections; - private int _viewCount; - private boolean _latest; - private boolean _main; - private String _sourceURL; - private int _status; - private long _statusByUserId; - private String _statusByUserName; - private Date _statusDate; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleWrapper.java deleted file mode 100644 index 34cc785009..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBArticleWrapper.java +++ /dev/null @@ -1,1197 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.portal.kernel.lar.StagedModelType; -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 KBArticle}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBArticle - * @generated - */ -public class KBArticleWrapper implements KBArticle, ModelWrapper { - public KBArticleWrapper(KBArticle kbArticle) { - _kbArticle = kbArticle; - } - - @Override - public Class getModelClass() { - return KBArticle.class; - } - - @Override - public String getModelClassName() { - return KBArticle.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbArticleId", getKbArticleId()); - attributes.put("resourcePrimKey", getResourcePrimKey()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("rootResourcePrimKey", getRootResourcePrimKey()); - attributes.put("parentResourceClassNameId", - getParentResourceClassNameId()); - attributes.put("parentResourcePrimKey", getParentResourcePrimKey()); - attributes.put("kbFolderId", getKbFolderId()); - attributes.put("version", getVersion()); - attributes.put("title", getTitle()); - attributes.put("urlTitle", getUrlTitle()); - attributes.put("content", getContent()); - attributes.put("description", getDescription()); - attributes.put("priority", getPriority()); - attributes.put("sections", getSections()); - attributes.put("viewCount", getViewCount()); - attributes.put("latest", getLatest()); - attributes.put("main", getMain()); - attributes.put("sourceURL", getSourceURL()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbArticleId = (Long)attributes.get("kbArticleId"); - - if (kbArticleId != null) { - setKbArticleId(kbArticleId); - } - - Long resourcePrimKey = (Long)attributes.get("resourcePrimKey"); - - if (resourcePrimKey != null) { - setResourcePrimKey(resourcePrimKey); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long rootResourcePrimKey = (Long)attributes.get("rootResourcePrimKey"); - - if (rootResourcePrimKey != null) { - setRootResourcePrimKey(rootResourcePrimKey); - } - - Long parentResourceClassNameId = (Long)attributes.get( - "parentResourceClassNameId"); - - if (parentResourceClassNameId != null) { - setParentResourceClassNameId(parentResourceClassNameId); - } - - Long parentResourcePrimKey = (Long)attributes.get( - "parentResourcePrimKey"); - - if (parentResourcePrimKey != null) { - setParentResourcePrimKey(parentResourcePrimKey); - } - - Long kbFolderId = (Long)attributes.get("kbFolderId"); - - if (kbFolderId != null) { - setKbFolderId(kbFolderId); - } - - Integer version = (Integer)attributes.get("version"); - - if (version != null) { - setVersion(version); - } - - String title = (String)attributes.get("title"); - - if (title != null) { - setTitle(title); - } - - String urlTitle = (String)attributes.get("urlTitle"); - - if (urlTitle != null) { - setUrlTitle(urlTitle); - } - - String content = (String)attributes.get("content"); - - if (content != null) { - setContent(content); - } - - String description = (String)attributes.get("description"); - - if (description != null) { - setDescription(description); - } - - Double priority = (Double)attributes.get("priority"); - - if (priority != null) { - setPriority(priority); - } - - String sections = (String)attributes.get("sections"); - - if (sections != null) { - setSections(sections); - } - - Integer viewCount = (Integer)attributes.get("viewCount"); - - if (viewCount != null) { - setViewCount(viewCount); - } - - Boolean latest = (Boolean)attributes.get("latest"); - - if (latest != null) { - setLatest(latest); - } - - Boolean main = (Boolean)attributes.get("main"); - - if (main != null) { - setMain(main); - } - - String sourceURL = (String)attributes.get("sourceURL"); - - if (sourceURL != null) { - setSourceURL(sourceURL); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - } - - /** - * Returns the primary key of this k b article. - * - * @return the primary key of this k b article - */ - @Override - public long getPrimaryKey() { - return _kbArticle.getPrimaryKey(); - } - - /** - * Sets the primary key of this k b article. - * - * @param primaryKey the primary key of this k b article - */ - @Override - public void setPrimaryKey(long primaryKey) { - _kbArticle.setPrimaryKey(primaryKey); - } - - /** - * Returns the uuid of this k b article. - * - * @return the uuid of this k b article - */ - @Override - public java.lang.String getUuid() { - return _kbArticle.getUuid(); - } - - /** - * Sets the uuid of this k b article. - * - * @param uuid the uuid of this k b article - */ - @Override - public void setUuid(java.lang.String uuid) { - _kbArticle.setUuid(uuid); - } - - /** - * Returns the kb article ID of this k b article. - * - * @return the kb article ID of this k b article - */ - @Override - public long getKbArticleId() { - return _kbArticle.getKbArticleId(); - } - - /** - * Sets the kb article ID of this k b article. - * - * @param kbArticleId the kb article ID of this k b article - */ - @Override - public void setKbArticleId(long kbArticleId) { - _kbArticle.setKbArticleId(kbArticleId); - } - - /** - * Returns the resource prim key of this k b article. - * - * @return the resource prim key of this k b article - */ - @Override - public long getResourcePrimKey() { - return _kbArticle.getResourcePrimKey(); - } - - /** - * Sets the resource prim key of this k b article. - * - * @param resourcePrimKey the resource prim key of this k b article - */ - @Override - public void setResourcePrimKey(long resourcePrimKey) { - _kbArticle.setResourcePrimKey(resourcePrimKey); - } - - @Override - public boolean isResourceMain() { - return _kbArticle.isResourceMain(); - } - - /** - * Returns the group ID of this k b article. - * - * @return the group ID of this k b article - */ - @Override - public long getGroupId() { - return _kbArticle.getGroupId(); - } - - /** - * Sets the group ID of this k b article. - * - * @param groupId the group ID of this k b article - */ - @Override - public void setGroupId(long groupId) { - _kbArticle.setGroupId(groupId); - } - - /** - * Returns the company ID of this k b article. - * - * @return the company ID of this k b article - */ - @Override - public long getCompanyId() { - return _kbArticle.getCompanyId(); - } - - /** - * Sets the company ID of this k b article. - * - * @param companyId the company ID of this k b article - */ - @Override - public void setCompanyId(long companyId) { - _kbArticle.setCompanyId(companyId); - } - - /** - * Returns the user ID of this k b article. - * - * @return the user ID of this k b article - */ - @Override - public long getUserId() { - return _kbArticle.getUserId(); - } - - /** - * Sets the user ID of this k b article. - * - * @param userId the user ID of this k b article - */ - @Override - public void setUserId(long userId) { - _kbArticle.setUserId(userId); - } - - /** - * Returns the user uuid of this k b article. - * - * @return the user uuid of this k b article - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticle.getUserUuid(); - } - - /** - * Sets the user uuid of this k b article. - * - * @param userUuid the user uuid of this k b article - */ - @Override - public void setUserUuid(java.lang.String userUuid) { - _kbArticle.setUserUuid(userUuid); - } - - /** - * Returns the user name of this k b article. - * - * @return the user name of this k b article - */ - @Override - public java.lang.String getUserName() { - return _kbArticle.getUserName(); - } - - /** - * Sets the user name of this k b article. - * - * @param userName the user name of this k b article - */ - @Override - public void setUserName(java.lang.String userName) { - _kbArticle.setUserName(userName); - } - - /** - * Returns the create date of this k b article. - * - * @return the create date of this k b article - */ - @Override - public java.util.Date getCreateDate() { - return _kbArticle.getCreateDate(); - } - - /** - * Sets the create date of this k b article. - * - * @param createDate the create date of this k b article - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _kbArticle.setCreateDate(createDate); - } - - /** - * Returns the modified date of this k b article. - * - * @return the modified date of this k b article - */ - @Override - public java.util.Date getModifiedDate() { - return _kbArticle.getModifiedDate(); - } - - /** - * Sets the modified date of this k b article. - * - * @param modifiedDate the modified date of this k b article - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _kbArticle.setModifiedDate(modifiedDate); - } - - /** - * Returns the root resource prim key of this k b article. - * - * @return the root resource prim key of this k b article - */ - @Override - public long getRootResourcePrimKey() { - return _kbArticle.getRootResourcePrimKey(); - } - - /** - * Sets the root resource prim key of this k b article. - * - * @param rootResourcePrimKey the root resource prim key of this k b article - */ - @Override - public void setRootResourcePrimKey(long rootResourcePrimKey) { - _kbArticle.setRootResourcePrimKey(rootResourcePrimKey); - } - - /** - * Returns the parent resource class name ID of this k b article. - * - * @return the parent resource class name ID of this k b article - */ - @Override - public long getParentResourceClassNameId() { - return _kbArticle.getParentResourceClassNameId(); - } - - /** - * Sets the parent resource class name ID of this k b article. - * - * @param parentResourceClassNameId the parent resource class name ID of this k b article - */ - @Override - public void setParentResourceClassNameId(long parentResourceClassNameId) { - _kbArticle.setParentResourceClassNameId(parentResourceClassNameId); - } - - /** - * Returns the parent resource prim key of this k b article. - * - * @return the parent resource prim key of this k b article - */ - @Override - public long getParentResourcePrimKey() { - return _kbArticle.getParentResourcePrimKey(); - } - - /** - * Sets the parent resource prim key of this k b article. - * - * @param parentResourcePrimKey the parent resource prim key of this k b article - */ - @Override - public void setParentResourcePrimKey(long parentResourcePrimKey) { - _kbArticle.setParentResourcePrimKey(parentResourcePrimKey); - } - - /** - * Returns the kb folder ID of this k b article. - * - * @return the kb folder ID of this k b article - */ - @Override - public long getKbFolderId() { - return _kbArticle.getKbFolderId(); - } - - /** - * Sets the kb folder ID of this k b article. - * - * @param kbFolderId the kb folder ID of this k b article - */ - @Override - public void setKbFolderId(long kbFolderId) { - _kbArticle.setKbFolderId(kbFolderId); - } - - /** - * Returns the version of this k b article. - * - * @return the version of this k b article - */ - @Override - public int getVersion() { - return _kbArticle.getVersion(); - } - - /** - * Sets the version of this k b article. - * - * @param version the version of this k b article - */ - @Override - public void setVersion(int version) { - _kbArticle.setVersion(version); - } - - /** - * Returns the title of this k b article. - * - * @return the title of this k b article - */ - @Override - public java.lang.String getTitle() { - return _kbArticle.getTitle(); - } - - /** - * Sets the title of this k b article. - * - * @param title the title of this k b article - */ - @Override - public void setTitle(java.lang.String title) { - _kbArticle.setTitle(title); - } - - /** - * Returns the url title of this k b article. - * - * @return the url title of this k b article - */ - @Override - public java.lang.String getUrlTitle() { - return _kbArticle.getUrlTitle(); - } - - /** - * Sets the url title of this k b article. - * - * @param urlTitle the url title of this k b article - */ - @Override - public void setUrlTitle(java.lang.String urlTitle) { - _kbArticle.setUrlTitle(urlTitle); - } - - /** - * Returns the content of this k b article. - * - * @return the content of this k b article - */ - @Override - public java.lang.String getContent() { - return _kbArticle.getContent(); - } - - /** - * Sets the content of this k b article. - * - * @param content the content of this k b article - */ - @Override - public void setContent(java.lang.String content) { - _kbArticle.setContent(content); - } - - /** - * Returns the description of this k b article. - * - * @return the description of this k b article - */ - @Override - public java.lang.String getDescription() { - return _kbArticle.getDescription(); - } - - /** - * Sets the description of this k b article. - * - * @param description the description of this k b article - */ - @Override - public void setDescription(java.lang.String description) { - _kbArticle.setDescription(description); - } - - /** - * Returns the priority of this k b article. - * - * @return the priority of this k b article - */ - @Override - public double getPriority() { - return _kbArticle.getPriority(); - } - - /** - * Sets the priority of this k b article. - * - * @param priority the priority of this k b article - */ - @Override - public void setPriority(double priority) { - _kbArticle.setPriority(priority); - } - - /** - * Returns the sections of this k b article. - * - * @return the sections of this k b article - */ - @Override - public java.lang.String getSections() { - return _kbArticle.getSections(); - } - - /** - * Sets the sections of this k b article. - * - * @param sections the sections of this k b article - */ - @Override - public void setSections(java.lang.String sections) { - _kbArticle.setSections(sections); - } - - /** - * Returns the view count of this k b article. - * - * @return the view count of this k b article - */ - @Override - public int getViewCount() { - return _kbArticle.getViewCount(); - } - - /** - * Sets the view count of this k b article. - * - * @param viewCount the view count of this k b article - */ - @Override - public void setViewCount(int viewCount) { - _kbArticle.setViewCount(viewCount); - } - - /** - * Returns the latest of this k b article. - * - * @return the latest of this k b article - */ - @Override - public boolean getLatest() { - return _kbArticle.getLatest(); - } - - /** - * Returns true if this k b article is latest. - * - * @return true if this k b article is latest; false otherwise - */ - @Override - public boolean isLatest() { - return _kbArticle.isLatest(); - } - - /** - * Sets whether this k b article is latest. - * - * @param latest the latest of this k b article - */ - @Override - public void setLatest(boolean latest) { - _kbArticle.setLatest(latest); - } - - /** - * Returns the main of this k b article. - * - * @return the main of this k b article - */ - @Override - public boolean getMain() { - return _kbArticle.getMain(); - } - - /** - * Returns true if this k b article is main. - * - * @return true if this k b article is main; false otherwise - */ - @Override - public boolean isMain() { - return _kbArticle.isMain(); - } - - /** - * Sets whether this k b article is main. - * - * @param main the main of this k b article - */ - @Override - public void setMain(boolean main) { - _kbArticle.setMain(main); - } - - /** - * Returns the source u r l of this k b article. - * - * @return the source u r l of this k b article - */ - @Override - public java.lang.String getSourceURL() { - return _kbArticle.getSourceURL(); - } - - /** - * Sets the source u r l of this k b article. - * - * @param sourceURL the source u r l of this k b article - */ - @Override - public void setSourceURL(java.lang.String sourceURL) { - _kbArticle.setSourceURL(sourceURL); - } - - /** - * Returns the status of this k b article. - * - * @return the status of this k b article - */ - @Override - public int getStatus() { - return _kbArticle.getStatus(); - } - - /** - * Sets the status of this k b article. - * - * @param status the status of this k b article - */ - @Override - public void setStatus(int status) { - _kbArticle.setStatus(status); - } - - /** - * Returns the status by user ID of this k b article. - * - * @return the status by user ID of this k b article - */ - @Override - public long getStatusByUserId() { - return _kbArticle.getStatusByUserId(); - } - - /** - * Sets the status by user ID of this k b article. - * - * @param statusByUserId the status by user ID of this k b article - */ - @Override - public void setStatusByUserId(long statusByUserId) { - _kbArticle.setStatusByUserId(statusByUserId); - } - - /** - * Returns the status by user uuid of this k b article. - * - * @return the status by user uuid of this k b article - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getStatusByUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticle.getStatusByUserUuid(); - } - - /** - * Sets the status by user uuid of this k b article. - * - * @param statusByUserUuid the status by user uuid of this k b article - */ - @Override - public void setStatusByUserUuid(java.lang.String statusByUserUuid) { - _kbArticle.setStatusByUserUuid(statusByUserUuid); - } - - /** - * Returns the status by user name of this k b article. - * - * @return the status by user name of this k b article - */ - @Override - public java.lang.String getStatusByUserName() { - return _kbArticle.getStatusByUserName(); - } - - /** - * Sets the status by user name of this k b article. - * - * @param statusByUserName the status by user name of this k b article - */ - @Override - public void setStatusByUserName(java.lang.String statusByUserName) { - _kbArticle.setStatusByUserName(statusByUserName); - } - - /** - * Returns the status date of this k b article. - * - * @return the status date of this k b article - */ - @Override - public java.util.Date getStatusDate() { - return _kbArticle.getStatusDate(); - } - - /** - * Sets the status date of this k b article. - * - * @param statusDate the status date of this k b article - */ - @Override - public void setStatusDate(java.util.Date statusDate) { - _kbArticle.setStatusDate(statusDate); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved()} - */ - @Override - public boolean getApproved() { - return _kbArticle.getApproved(); - } - - /** - * Returns true if this k b article is approved. - * - * @return true if this k b article is approved; false otherwise - */ - @Override - public boolean isApproved() { - return _kbArticle.isApproved(); - } - - /** - * Returns true if this k b article is denied. - * - * @return true if this k b article is denied; false otherwise - */ - @Override - public boolean isDenied() { - return _kbArticle.isDenied(); - } - - /** - * Returns true if this k b article is a draft. - * - * @return true if this k b article is a draft; false otherwise - */ - @Override - public boolean isDraft() { - return _kbArticle.isDraft(); - } - - /** - * Returns true if this k b article is expired. - * - * @return true if this k b article is expired; false otherwise - */ - @Override - public boolean isExpired() { - return _kbArticle.isExpired(); - } - - /** - * Returns true if this k b article is inactive. - * - * @return true if this k b article is inactive; false otherwise - */ - @Override - public boolean isInactive() { - return _kbArticle.isInactive(); - } - - /** - * Returns true if this k b article is incomplete. - * - * @return true if this k b article is incomplete; false otherwise - */ - @Override - public boolean isIncomplete() { - return _kbArticle.isIncomplete(); - } - - /** - * Returns true if this k b article is pending. - * - * @return true if this k b article is pending; false otherwise - */ - @Override - public boolean isPending() { - return _kbArticle.isPending(); - } - - /** - * Returns true if this k b article is scheduled. - * - * @return true if this k b article is scheduled; false otherwise - */ - @Override - public boolean isScheduled() { - return _kbArticle.isScheduled(); - } - - @Override - public boolean isNew() { - return _kbArticle.isNew(); - } - - @Override - public void setNew(boolean n) { - _kbArticle.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _kbArticle.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _kbArticle.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _kbArticle.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _kbArticle.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _kbArticle.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _kbArticle.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _kbArticle.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _kbArticle.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _kbArticle.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new KBArticleWrapper((KBArticle)_kbArticle.clone()); - } - - @Override - public int compareTo(com.liferay.knowledgebase.model.KBArticle kbArticle) { - return _kbArticle.compareTo(kbArticle); - } - - @Override - public int hashCode() { - return _kbArticle.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _kbArticle.toCacheModel(); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle toEscapedModel() { - return new KBArticleWrapper(_kbArticle.toEscapedModel()); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle toUnescapedModel() { - return new KBArticleWrapper(_kbArticle.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _kbArticle.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _kbArticle.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _kbArticle.persist(); - } - - @Override - public java.util.List getAncestorResourcePrimaryKeys() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticle.getAncestorResourcePrimaryKeys(); - } - - @Override - public java.util.List getAttachmentsFileEntries() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticle.getAttachmentsFileEntries(); - } - - @Override - public long getAttachmentsFolderId() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticle.getAttachmentsFolderId(); - } - - @Override - public long getClassNameId() { - return _kbArticle.getClassNameId(); - } - - @Override - public long getClassPK() { - return _kbArticle.getClassPK(); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getParentKBArticle() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticle.getParentKBArticle(); - } - - @Override - public java.lang.String getParentTitle(java.util.Locale locale, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticle.getParentTitle(locale, status); - } - - @Override - public boolean isFirstVersion() { - return _kbArticle.isFirstVersion(); - } - - @Override - public boolean isRoot() { - return _kbArticle.isRoot(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBArticleWrapper)) { - return false; - } - - KBArticleWrapper kbArticleWrapper = (KBArticleWrapper)obj; - - if (Validator.equals(_kbArticle, kbArticleWrapper._kbArticle)) { - return true; - } - - return false; - } - - @Override - public StagedModelType getStagedModelType() { - return _kbArticle.getStagedModelType(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public KBArticle getWrappedKBArticle() { - return _kbArticle; - } - - @Override - public KBArticle getWrappedModel() { - return _kbArticle; - } - - @Override - public void resetOriginalValues() { - _kbArticle.resetOriginalValues(); - } - - private KBArticle _kbArticle; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBComment.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBComment.java deleted file mode 100644 index f3b91278f1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBComment.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the KBComment service. Represents a row in the "KBComment" database table, with each column mapped to a property of this class. - * - * @author Brian Wing Shun Chan - * @see KBCommentModel - * @see com.liferay.knowledgebase.model.impl.KBCommentImpl - * @see com.liferay.knowledgebase.model.impl.KBCommentModelImpl - * @generated - */ -public interface KBComment extends KBCommentModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link com.liferay.knowledgebase.model.impl.KBCommentImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentClp.java deleted file mode 100644 index 2115a60bc6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentClp.java +++ /dev/null @@ -1,764 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.knowledgebase.service.ClpSerializer; -import com.liferay.knowledgebase.service.KBCommentLocalServiceUtil; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.util.DateUtil; -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.kernel.util.Validator; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.impl.BaseModelImpl; -import com.liferay.portal.util.PortalUtil; - -import java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Brian Wing Shun Chan - */ -public class KBCommentClp extends BaseModelImpl implements KBComment { - public KBCommentClp() { - } - - @Override - public Class getModelClass() { - return KBComment.class; - } - - @Override - public String getModelClassName() { - return KBComment.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _kbCommentId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setKbCommentId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _kbCommentId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbCommentId", getKbCommentId()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("classNameId", getClassNameId()); - attributes.put("classPK", getClassPK()); - attributes.put("content", getContent()); - attributes.put("userRating", getUserRating()); - attributes.put("status", getStatus()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbCommentId = (Long)attributes.get("kbCommentId"); - - if (kbCommentId != null) { - setKbCommentId(kbCommentId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long classNameId = (Long)attributes.get("classNameId"); - - if (classNameId != null) { - setClassNameId(classNameId); - } - - Long classPK = (Long)attributes.get("classPK"); - - if (classPK != null) { - setClassPK(classPK); - } - - String content = (String)attributes.get("content"); - - if (content != null) { - setContent(content); - } - - Integer userRating = (Integer)attributes.get("userRating"); - - if (userRating != null) { - setUserRating(userRating); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - } - - @Override - public String getUuid() { - return _uuid; - } - - @Override - public void setUuid(String uuid) { - _uuid = uuid; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setUuid", String.class); - - method.invoke(_kbCommentRemoteModel, uuid); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getKbCommentId() { - return _kbCommentId; - } - - @Override - public void setKbCommentId(long kbCommentId) { - _kbCommentId = kbCommentId; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setKbCommentId", long.class); - - method.invoke(_kbCommentRemoteModel, kbCommentId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _groupId = groupId; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setGroupId", long.class); - - method.invoke(_kbCommentRemoteModel, groupId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_kbCommentRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _userId = userId; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserId", long.class); - - method.invoke(_kbCommentRemoteModel, 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 (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserName", String.class); - - method.invoke(_kbCommentRemoteModel, userName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_kbCommentRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_kbCommentRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getClassName() { - if (getClassNameId() <= 0) { - return StringPool.BLANK; - } - - return PortalUtil.getClassName(getClassNameId()); - } - - @Override - public void setClassName(String className) { - long classNameId = 0; - - if (Validator.isNotNull(className)) { - classNameId = PortalUtil.getClassNameId(className); - } - - setClassNameId(classNameId); - } - - @Override - public long getClassNameId() { - return _classNameId; - } - - @Override - public void setClassNameId(long classNameId) { - _classNameId = classNameId; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setClassNameId", long.class); - - method.invoke(_kbCommentRemoteModel, classNameId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getClassPK() { - return _classPK; - } - - @Override - public void setClassPK(long classPK) { - _classPK = classPK; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setClassPK", long.class); - - method.invoke(_kbCommentRemoteModel, classPK); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getContent() { - return _content; - } - - @Override - public void setContent(String content) { - _content = content; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setContent", String.class); - - method.invoke(_kbCommentRemoteModel, content); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public int getUserRating() { - return _userRating; - } - - @Override - public void setUserRating(int userRating) { - _userRating = userRating; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserRating", int.class); - - method.invoke(_kbCommentRemoteModel, userRating); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _status = status; - - if (_kbCommentRemoteModel != null) { - try { - Class clazz = _kbCommentRemoteModel.getClass(); - - Method method = clazz.getMethod("setStatus", int.class); - - method.invoke(_kbCommentRemoteModel, status); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBComment.class.getName()), getClassNameId()); - } - - public BaseModel getKBCommentRemoteModel() { - return _kbCommentRemoteModel; - } - - public void setKBCommentRemoteModel(BaseModel kbCommentRemoteModel) { - _kbCommentRemoteModel = kbCommentRemoteModel; - } - - 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 = _kbCommentRemoteModel.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(_kbCommentRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - KBCommentLocalServiceUtil.addKBComment(this); - } - else { - KBCommentLocalServiceUtil.updateKBComment(this); - } - } - - @Override - public KBComment toEscapedModel() { - return (KBComment)ProxyUtil.newProxyInstance(KBComment.class.getClassLoader(), - new Class[] { KBComment.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - KBCommentClp clone = new KBCommentClp(); - - clone.setUuid(getUuid()); - clone.setKbCommentId(getKbCommentId()); - clone.setGroupId(getGroupId()); - clone.setCompanyId(getCompanyId()); - clone.setUserId(getUserId()); - clone.setUserName(getUserName()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setClassNameId(getClassNameId()); - clone.setClassPK(getClassPK()); - clone.setContent(getContent()); - clone.setUserRating(getUserRating()); - clone.setStatus(getStatus()); - - return clone; - } - - @Override - public int compareTo(KBComment kbComment) { - int value = 0; - - value = DateUtil.compareTo(getModifiedDate(), - kbComment.getModifiedDate()); - - value = value * -1; - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBCommentClp)) { - return false; - } - - KBCommentClp kbComment = (KBCommentClp)obj; - - long primaryKey = kbComment.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(27); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", kbCommentId="); - sb.append(getKbCommentId()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", classNameId="); - sb.append(getClassNameId()); - sb.append(", classPK="); - sb.append(getClassPK()); - sb.append(", content="); - sb.append(getContent()); - sb.append(", userRating="); - sb.append(getUserRating()); - sb.append(", status="); - sb.append(getStatus()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(43); - - sb.append(""); - sb.append("com.liferay.knowledgebase.model.KBComment"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "kbCommentId"); - sb.append( - "groupId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "classNameId"); - sb.append( - "classPK"); - sb.append( - "content"); - sb.append( - "userRating"); - sb.append( - "status"); - - sb.append(""); - - return sb.toString(); - } - - private String _uuid; - private long _kbCommentId; - private long _groupId; - private long _companyId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _classNameId; - private long _classPK; - private String _content; - private int _userRating; - private int _status; - private BaseModel _kbCommentRemoteModel; - private Class _clpSerializerClass = com.liferay.knowledgebase.service.ClpSerializer.class; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentConstants.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentConstants.java deleted file mode 100644 index 80cc81445d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentConstants.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -/** - * @author Adolfo Pérez - */ -public class KBCommentConstants { - - public static final int STATUS_ANY = -1; - - public static final int STATUS_COMPLETED = 0; - - public static final int STATUS_IN_PROGRESS = 2; - - public static final int STATUS_NEW = 1; - - public static final int STATUS_NONE = -2; - - public static final int USER_RATING_DISLIKE = 0; - - public static final int USER_RATING_LIKE = 1; - - public static final int USER_RATING_NONE = 2; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentModel.java deleted file mode 100644 index 1ad237861e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentModel.java +++ /dev/null @@ -1,352 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.portal.kernel.bean.AutoEscape; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.model.AttachedModel; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.StagedGroupedModel; -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 KBComment service. Represents a row in the "KBComment" database table, with each column mapped to a property of this class. - * - *

    - * This interface and its corresponding implementation {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.knowledgebase.model.impl.KBCommentImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBComment - * @see com.liferay.knowledgebase.model.impl.KBCommentImpl - * @see com.liferay.knowledgebase.model.impl.KBCommentModelImpl - * @generated - */ -public interface KBCommentModel extends AttachedModel, BaseModel, - StagedGroupedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a k b comment model instance should use the {@link KBComment} interface instead. - */ - - /** - * Returns the primary key of this k b comment. - * - * @return the primary key of this k b comment - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this k b comment. - * - * @param primaryKey the primary key of this k b comment - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the uuid of this k b comment. - * - * @return the uuid of this k b comment - */ - @AutoEscape - @Override - public String getUuid(); - - /** - * Sets the uuid of this k b comment. - * - * @param uuid the uuid of this k b comment - */ - @Override - public void setUuid(String uuid); - - /** - * Returns the kb comment ID of this k b comment. - * - * @return the kb comment ID of this k b comment - */ - public long getKbCommentId(); - - /** - * Sets the kb comment ID of this k b comment. - * - * @param kbCommentId the kb comment ID of this k b comment - */ - public void setKbCommentId(long kbCommentId); - - /** - * Returns the group ID of this k b comment. - * - * @return the group ID of this k b comment - */ - @Override - public long getGroupId(); - - /** - * Sets the group ID of this k b comment. - * - * @param groupId the group ID of this k b comment - */ - @Override - public void setGroupId(long groupId); - - /** - * Returns the company ID of this k b comment. - * - * @return the company ID of this k b comment - */ - @Override - public long getCompanyId(); - - /** - * Sets the company ID of this k b comment. - * - * @param companyId the company ID of this k b comment - */ - @Override - public void setCompanyId(long companyId); - - /** - * Returns the user ID of this k b comment. - * - * @return the user ID of this k b comment - */ - @Override - public long getUserId(); - - /** - * Sets the user ID of this k b comment. - * - * @param userId the user ID of this k b comment - */ - @Override - public void setUserId(long userId); - - /** - * Returns the user uuid of this k b comment. - * - * @return the user uuid of this k b comment - * @throws SystemException if a system exception occurred - */ - @Override - public String getUserUuid() throws SystemException; - - /** - * Sets the user uuid of this k b comment. - * - * @param userUuid the user uuid of this k b comment - */ - @Override - public void setUserUuid(String userUuid); - - /** - * Returns the user name of this k b comment. - * - * @return the user name of this k b comment - */ - @AutoEscape - @Override - public String getUserName(); - - /** - * Sets the user name of this k b comment. - * - * @param userName the user name of this k b comment - */ - @Override - public void setUserName(String userName); - - /** - * Returns the create date of this k b comment. - * - * @return the create date of this k b comment - */ - @Override - public Date getCreateDate(); - - /** - * Sets the create date of this k b comment. - * - * @param createDate the create date of this k b comment - */ - @Override - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this k b comment. - * - * @return the modified date of this k b comment - */ - @Override - public Date getModifiedDate(); - - /** - * Sets the modified date of this k b comment. - * - * @param modifiedDate the modified date of this k b comment - */ - @Override - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the fully qualified class name of this k b comment. - * - * @return the fully qualified class name of this k b comment - */ - @Override - public String getClassName(); - - public void setClassName(String className); - - /** - * Returns the class name ID of this k b comment. - * - * @return the class name ID of this k b comment - */ - @Override - public long getClassNameId(); - - /** - * Sets the class name ID of this k b comment. - * - * @param classNameId the class name ID of this k b comment - */ - @Override - public void setClassNameId(long classNameId); - - /** - * Returns the class p k of this k b comment. - * - * @return the class p k of this k b comment - */ - @Override - public long getClassPK(); - - /** - * Sets the class p k of this k b comment. - * - * @param classPK the class p k of this k b comment - */ - @Override - public void setClassPK(long classPK); - - /** - * Returns the content of this k b comment. - * - * @return the content of this k b comment - */ - @AutoEscape - public String getContent(); - - /** - * Sets the content of this k b comment. - * - * @param content the content of this k b comment - */ - public void setContent(String content); - - /** - * Returns the user rating of this k b comment. - * - * @return the user rating of this k b comment - */ - public int getUserRating(); - - /** - * Sets the user rating of this k b comment. - * - * @param userRating the user rating of this k b comment - */ - public void setUserRating(int userRating); - - /** - * Returns the status of this k b comment. - * - * @return the status of this k b comment - */ - public int getStatus(); - - /** - * Sets the status of this k b comment. - * - * @param status the status of this k b comment - */ - public void setStatus(int status); - - @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(KBComment kbComment); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public KBComment toEscapedModel(); - - @Override - public KBComment toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentSoap.java deleted file mode 100644 index 2e1dda8d7a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentSoap.java +++ /dev/null @@ -1,216 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 com.liferay.knowledgebase.service.http.KBCommentServiceSoap}. - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.http.KBCommentServiceSoap - * @generated - */ -public class KBCommentSoap implements Serializable { - public static KBCommentSoap toSoapModel(KBComment model) { - KBCommentSoap soapModel = new KBCommentSoap(); - - soapModel.setUuid(model.getUuid()); - soapModel.setKbCommentId(model.getKbCommentId()); - soapModel.setGroupId(model.getGroupId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setUserId(model.getUserId()); - soapModel.setUserName(model.getUserName()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setClassNameId(model.getClassNameId()); - soapModel.setClassPK(model.getClassPK()); - soapModel.setContent(model.getContent()); - soapModel.setUserRating(model.getUserRating()); - soapModel.setStatus(model.getStatus()); - - return soapModel; - } - - public static KBCommentSoap[] toSoapModels(KBComment[] models) { - KBCommentSoap[] soapModels = new KBCommentSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static KBCommentSoap[][] toSoapModels(KBComment[][] models) { - KBCommentSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new KBCommentSoap[models.length][models[0].length]; - } - else { - soapModels = new KBCommentSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static KBCommentSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (KBComment model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new KBCommentSoap[soapModels.size()]); - } - - public KBCommentSoap() { - } - - public long getPrimaryKey() { - return _kbCommentId; - } - - public void setPrimaryKey(long pk) { - setKbCommentId(pk); - } - - public String getUuid() { - return _uuid; - } - - public void setUuid(String uuid) { - _uuid = uuid; - } - - public long getKbCommentId() { - return _kbCommentId; - } - - public void setKbCommentId(long kbCommentId) { - _kbCommentId = kbCommentId; - } - - 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 Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public long getClassNameId() { - return _classNameId; - } - - public void setClassNameId(long classNameId) { - _classNameId = classNameId; - } - - public long getClassPK() { - return _classPK; - } - - public void setClassPK(long classPK) { - _classPK = classPK; - } - - public String getContent() { - return _content; - } - - public void setContent(String content) { - _content = content; - } - - public int getUserRating() { - return _userRating; - } - - public void setUserRating(int userRating) { - _userRating = userRating; - } - - public int getStatus() { - return _status; - } - - public void setStatus(int status) { - _status = status; - } - - private String _uuid; - private long _kbCommentId; - private long _groupId; - private long _companyId; - private long _userId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _classNameId; - private long _classPK; - private String _content; - private int _userRating; - private int _status; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentWrapper.java deleted file mode 100644 index bc064970a5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBCommentWrapper.java +++ /dev/null @@ -1,614 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.portal.kernel.lar.StagedModelType; -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 KBComment}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBComment - * @generated - */ -public class KBCommentWrapper implements KBComment, ModelWrapper { - public KBCommentWrapper(KBComment kbComment) { - _kbComment = kbComment; - } - - @Override - public Class getModelClass() { - return KBComment.class; - } - - @Override - public String getModelClassName() { - return KBComment.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbCommentId", getKbCommentId()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("classNameId", getClassNameId()); - attributes.put("classPK", getClassPK()); - attributes.put("content", getContent()); - attributes.put("userRating", getUserRating()); - attributes.put("status", getStatus()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbCommentId = (Long)attributes.get("kbCommentId"); - - if (kbCommentId != null) { - setKbCommentId(kbCommentId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long classNameId = (Long)attributes.get("classNameId"); - - if (classNameId != null) { - setClassNameId(classNameId); - } - - Long classPK = (Long)attributes.get("classPK"); - - if (classPK != null) { - setClassPK(classPK); - } - - String content = (String)attributes.get("content"); - - if (content != null) { - setContent(content); - } - - Integer userRating = (Integer)attributes.get("userRating"); - - if (userRating != null) { - setUserRating(userRating); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - } - - /** - * Returns the primary key of this k b comment. - * - * @return the primary key of this k b comment - */ - @Override - public long getPrimaryKey() { - return _kbComment.getPrimaryKey(); - } - - /** - * Sets the primary key of this k b comment. - * - * @param primaryKey the primary key of this k b comment - */ - @Override - public void setPrimaryKey(long primaryKey) { - _kbComment.setPrimaryKey(primaryKey); - } - - /** - * Returns the uuid of this k b comment. - * - * @return the uuid of this k b comment - */ - @Override - public java.lang.String getUuid() { - return _kbComment.getUuid(); - } - - /** - * Sets the uuid of this k b comment. - * - * @param uuid the uuid of this k b comment - */ - @Override - public void setUuid(java.lang.String uuid) { - _kbComment.setUuid(uuid); - } - - /** - * Returns the kb comment ID of this k b comment. - * - * @return the kb comment ID of this k b comment - */ - @Override - public long getKbCommentId() { - return _kbComment.getKbCommentId(); - } - - /** - * Sets the kb comment ID of this k b comment. - * - * @param kbCommentId the kb comment ID of this k b comment - */ - @Override - public void setKbCommentId(long kbCommentId) { - _kbComment.setKbCommentId(kbCommentId); - } - - /** - * Returns the group ID of this k b comment. - * - * @return the group ID of this k b comment - */ - @Override - public long getGroupId() { - return _kbComment.getGroupId(); - } - - /** - * Sets the group ID of this k b comment. - * - * @param groupId the group ID of this k b comment - */ - @Override - public void setGroupId(long groupId) { - _kbComment.setGroupId(groupId); - } - - /** - * Returns the company ID of this k b comment. - * - * @return the company ID of this k b comment - */ - @Override - public long getCompanyId() { - return _kbComment.getCompanyId(); - } - - /** - * Sets the company ID of this k b comment. - * - * @param companyId the company ID of this k b comment - */ - @Override - public void setCompanyId(long companyId) { - _kbComment.setCompanyId(companyId); - } - - /** - * Returns the user ID of this k b comment. - * - * @return the user ID of this k b comment - */ - @Override - public long getUserId() { - return _kbComment.getUserId(); - } - - /** - * Sets the user ID of this k b comment. - * - * @param userId the user ID of this k b comment - */ - @Override - public void setUserId(long userId) { - _kbComment.setUserId(userId); - } - - /** - * Returns the user uuid of this k b comment. - * - * @return the user uuid of this k b comment - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _kbComment.getUserUuid(); - } - - /** - * Sets the user uuid of this k b comment. - * - * @param userUuid the user uuid of this k b comment - */ - @Override - public void setUserUuid(java.lang.String userUuid) { - _kbComment.setUserUuid(userUuid); - } - - /** - * Returns the user name of this k b comment. - * - * @return the user name of this k b comment - */ - @Override - public java.lang.String getUserName() { - return _kbComment.getUserName(); - } - - /** - * Sets the user name of this k b comment. - * - * @param userName the user name of this k b comment - */ - @Override - public void setUserName(java.lang.String userName) { - _kbComment.setUserName(userName); - } - - /** - * Returns the create date of this k b comment. - * - * @return the create date of this k b comment - */ - @Override - public java.util.Date getCreateDate() { - return _kbComment.getCreateDate(); - } - - /** - * Sets the create date of this k b comment. - * - * @param createDate the create date of this k b comment - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _kbComment.setCreateDate(createDate); - } - - /** - * Returns the modified date of this k b comment. - * - * @return the modified date of this k b comment - */ - @Override - public java.util.Date getModifiedDate() { - return _kbComment.getModifiedDate(); - } - - /** - * Sets the modified date of this k b comment. - * - * @param modifiedDate the modified date of this k b comment - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _kbComment.setModifiedDate(modifiedDate); - } - - /** - * Returns the fully qualified class name of this k b comment. - * - * @return the fully qualified class name of this k b comment - */ - @Override - public java.lang.String getClassName() { - return _kbComment.getClassName(); - } - - @Override - public void setClassName(java.lang.String className) { - _kbComment.setClassName(className); - } - - /** - * Returns the class name ID of this k b comment. - * - * @return the class name ID of this k b comment - */ - @Override - public long getClassNameId() { - return _kbComment.getClassNameId(); - } - - /** - * Sets the class name ID of this k b comment. - * - * @param classNameId the class name ID of this k b comment - */ - @Override - public void setClassNameId(long classNameId) { - _kbComment.setClassNameId(classNameId); - } - - /** - * Returns the class p k of this k b comment. - * - * @return the class p k of this k b comment - */ - @Override - public long getClassPK() { - return _kbComment.getClassPK(); - } - - /** - * Sets the class p k of this k b comment. - * - * @param classPK the class p k of this k b comment - */ - @Override - public void setClassPK(long classPK) { - _kbComment.setClassPK(classPK); - } - - /** - * Returns the content of this k b comment. - * - * @return the content of this k b comment - */ - @Override - public java.lang.String getContent() { - return _kbComment.getContent(); - } - - /** - * Sets the content of this k b comment. - * - * @param content the content of this k b comment - */ - @Override - public void setContent(java.lang.String content) { - _kbComment.setContent(content); - } - - /** - * Returns the user rating of this k b comment. - * - * @return the user rating of this k b comment - */ - @Override - public int getUserRating() { - return _kbComment.getUserRating(); - } - - /** - * Sets the user rating of this k b comment. - * - * @param userRating the user rating of this k b comment - */ - @Override - public void setUserRating(int userRating) { - _kbComment.setUserRating(userRating); - } - - /** - * Returns the status of this k b comment. - * - * @return the status of this k b comment - */ - @Override - public int getStatus() { - return _kbComment.getStatus(); - } - - /** - * Sets the status of this k b comment. - * - * @param status the status of this k b comment - */ - @Override - public void setStatus(int status) { - _kbComment.setStatus(status); - } - - @Override - public boolean isNew() { - return _kbComment.isNew(); - } - - @Override - public void setNew(boolean n) { - _kbComment.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _kbComment.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _kbComment.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _kbComment.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _kbComment.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _kbComment.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _kbComment.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _kbComment.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _kbComment.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _kbComment.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new KBCommentWrapper((KBComment)_kbComment.clone()); - } - - @Override - public int compareTo(com.liferay.knowledgebase.model.KBComment kbComment) { - return _kbComment.compareTo(kbComment); - } - - @Override - public int hashCode() { - return _kbComment.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _kbComment.toCacheModel(); - } - - @Override - public com.liferay.knowledgebase.model.KBComment toEscapedModel() { - return new KBCommentWrapper(_kbComment.toEscapedModel()); - } - - @Override - public com.liferay.knowledgebase.model.KBComment toUnescapedModel() { - return new KBCommentWrapper(_kbComment.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _kbComment.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _kbComment.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _kbComment.persist(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBCommentWrapper)) { - return false; - } - - KBCommentWrapper kbCommentWrapper = (KBCommentWrapper)obj; - - if (Validator.equals(_kbComment, kbCommentWrapper._kbComment)) { - return true; - } - - return false; - } - - @Override - public StagedModelType getStagedModelType() { - return _kbComment.getStagedModelType(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public KBComment getWrappedKBComment() { - return _kbComment; - } - - @Override - public KBComment getWrappedModel() { - return _kbComment; - } - - @Override - public void resetOriginalValues() { - _kbComment.resetOriginalValues(); - } - - private KBComment _kbComment; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolder.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolder.java deleted file mode 100644 index a645b740cb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolder.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the KBFolder service. Represents a row in the "KBFolder" database table, with each column mapped to a property of this class. - * - * @author Brian Wing Shun Chan - * @see KBFolderModel - * @see com.liferay.knowledgebase.model.impl.KBFolderImpl - * @see com.liferay.knowledgebase.model.impl.KBFolderModelImpl - * @generated - */ -public interface KBFolder extends KBFolderModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link com.liferay.knowledgebase.model.impl.KBFolderImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - public long getClassNameId(); - - public java.lang.String getParentTitle(java.util.Locale locale) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public boolean isEmpty() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderClp.java deleted file mode 100644 index e091a89534..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderClp.java +++ /dev/null @@ -1,760 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.knowledgebase.service.ClpSerializer; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.StagedModelType; -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 java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Brian Wing Shun Chan - */ -public class KBFolderClp extends BaseModelImpl implements KBFolder { - public KBFolderClp() { - } - - @Override - public Class getModelClass() { - return KBFolder.class; - } - - @Override - public String getModelClassName() { - return KBFolder.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _kbFolderId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setKbFolderId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _kbFolderId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbFolderId", getKbFolderId()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("parentKBFolderId", getParentKBFolderId()); - attributes.put("name", getName()); - attributes.put("urlTitle", getUrlTitle()); - attributes.put("description", getDescription()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbFolderId = (Long)attributes.get("kbFolderId"); - - if (kbFolderId != null) { - setKbFolderId(kbFolderId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long parentKBFolderId = (Long)attributes.get("parentKBFolderId"); - - if (parentKBFolderId != null) { - setParentKBFolderId(parentKBFolderId); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - String urlTitle = (String)attributes.get("urlTitle"); - - if (urlTitle != null) { - setUrlTitle(urlTitle); - } - - String description = (String)attributes.get("description"); - - if (description != null) { - setDescription(description); - } - } - - @Override - public String getUuid() { - return _uuid; - } - - @Override - public void setUuid(String uuid) { - _uuid = uuid; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setUuid", String.class); - - method.invoke(_kbFolderRemoteModel, uuid); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getKbFolderId() { - return _kbFolderId; - } - - @Override - public void setKbFolderId(long kbFolderId) { - _kbFolderId = kbFolderId; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setKbFolderId", long.class); - - method.invoke(_kbFolderRemoteModel, kbFolderId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _groupId = groupId; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setGroupId", long.class); - - method.invoke(_kbFolderRemoteModel, groupId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_kbFolderRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _userId = userId; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserId", long.class); - - method.invoke(_kbFolderRemoteModel, 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 (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserName", String.class); - - method.invoke(_kbFolderRemoteModel, userName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_kbFolderRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_kbFolderRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getParentKBFolderId() { - return _parentKBFolderId; - } - - @Override - public void setParentKBFolderId(long parentKBFolderId) { - _parentKBFolderId = parentKBFolderId; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setParentKBFolderId", - long.class); - - method.invoke(_kbFolderRemoteModel, parentKBFolderId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getName() { - return _name; - } - - @Override - public void setName(String name) { - _name = name; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setName", String.class); - - method.invoke(_kbFolderRemoteModel, name); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getUrlTitle() { - return _urlTitle; - } - - @Override - public void setUrlTitle(String urlTitle) { - _urlTitle = urlTitle; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setUrlTitle", String.class); - - method.invoke(_kbFolderRemoteModel, urlTitle); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getDescription() { - return _description; - } - - @Override - public void setDescription(String description) { - _description = description; - - if (_kbFolderRemoteModel != null) { - try { - Class clazz = _kbFolderRemoteModel.getClass(); - - Method method = clazz.getMethod("setDescription", String.class); - - method.invoke(_kbFolderRemoteModel, description); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getClassNameId() { - try { - String methodName = "getClassNameId"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - Long returnObj = (Long)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public boolean isEmpty() { - try { - String methodName = "isEmpty"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - Boolean returnObj = (Boolean)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public java.lang.String getParentTitle(java.util.Locale locale) { - try { - String methodName = "getParentTitle"; - - Class[] parameterTypes = new Class[] { java.util.Locale.class }; - - Object[] parameterValues = new Object[] { locale }; - - java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBFolder.class.getName())); - } - - public BaseModel getKBFolderRemoteModel() { - return _kbFolderRemoteModel; - } - - public void setKBFolderRemoteModel(BaseModel kbFolderRemoteModel) { - _kbFolderRemoteModel = kbFolderRemoteModel; - } - - 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 = _kbFolderRemoteModel.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(_kbFolderRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - KBFolderLocalServiceUtil.addKBFolder(this); - } - else { - KBFolderLocalServiceUtil.updateKBFolder(this); - } - } - - @Override - public KBFolder toEscapedModel() { - return (KBFolder)ProxyUtil.newProxyInstance(KBFolder.class.getClassLoader(), - new Class[] { KBFolder.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - KBFolderClp clone = new KBFolderClp(); - - clone.setUuid(getUuid()); - clone.setKbFolderId(getKbFolderId()); - clone.setGroupId(getGroupId()); - clone.setCompanyId(getCompanyId()); - clone.setUserId(getUserId()); - clone.setUserName(getUserName()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setParentKBFolderId(getParentKBFolderId()); - clone.setName(getName()); - clone.setUrlTitle(getUrlTitle()); - clone.setDescription(getDescription()); - - return clone; - } - - @Override - public int compareTo(KBFolder kbFolder) { - long primaryKey = kbFolder.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBFolderClp)) { - return false; - } - - KBFolderClp kbFolder = (KBFolderClp)obj; - - long primaryKey = kbFolder.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(25); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", kbFolderId="); - sb.append(getKbFolderId()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", parentKBFolderId="); - sb.append(getParentKBFolderId()); - sb.append(", name="); - sb.append(getName()); - sb.append(", urlTitle="); - sb.append(getUrlTitle()); - sb.append(", description="); - sb.append(getDescription()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(40); - - sb.append(""); - sb.append("com.liferay.knowledgebase.model.KBFolder"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "kbFolderId"); - sb.append( - "groupId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "parentKBFolderId"); - sb.append( - "name"); - sb.append( - "urlTitle"); - sb.append( - "description"); - - sb.append(""); - - return sb.toString(); - } - - private String _uuid; - private long _kbFolderId; - private long _groupId; - private long _companyId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _parentKBFolderId; - private String _name; - private String _urlTitle; - private String _description; - private BaseModel _kbFolderRemoteModel; - private Class _clpSerializerClass = com.liferay.knowledgebase.service.ClpSerializer.class; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderConstants.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderConstants.java deleted file mode 100644 index 2e2485051c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderConstants.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -/** - * @author Adolfo Pérez - */ -public class KBFolderConstants { - - public static final long DEFAULT_PARENT_FOLDER_ID = 0; - - public static String getClassName() { - return KBFolder.class.getName(); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderModel.java deleted file mode 100644 index 9332df2c1f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderModel.java +++ /dev/null @@ -1,324 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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.model.StagedGroupedModel; -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 KBFolder service. Represents a row in the "KBFolder" database table, with each column mapped to a property of this class. - * - *

    - * This interface and its corresponding implementation {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.knowledgebase.model.impl.KBFolderImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBFolder - * @see com.liferay.knowledgebase.model.impl.KBFolderImpl - * @see com.liferay.knowledgebase.model.impl.KBFolderModelImpl - * @generated - */ -public interface KBFolderModel extends BaseModel, StagedGroupedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a k b folder model instance should use the {@link KBFolder} interface instead. - */ - - /** - * Returns the primary key of this k b folder. - * - * @return the primary key of this k b folder - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this k b folder. - * - * @param primaryKey the primary key of this k b folder - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the uuid of this k b folder. - * - * @return the uuid of this k b folder - */ - @AutoEscape - @Override - public String getUuid(); - - /** - * Sets the uuid of this k b folder. - * - * @param uuid the uuid of this k b folder - */ - @Override - public void setUuid(String uuid); - - /** - * Returns the kb folder ID of this k b folder. - * - * @return the kb folder ID of this k b folder - */ - public long getKbFolderId(); - - /** - * Sets the kb folder ID of this k b folder. - * - * @param kbFolderId the kb folder ID of this k b folder - */ - public void setKbFolderId(long kbFolderId); - - /** - * Returns the group ID of this k b folder. - * - * @return the group ID of this k b folder - */ - @Override - public long getGroupId(); - - /** - * Sets the group ID of this k b folder. - * - * @param groupId the group ID of this k b folder - */ - @Override - public void setGroupId(long groupId); - - /** - * Returns the company ID of this k b folder. - * - * @return the company ID of this k b folder - */ - @Override - public long getCompanyId(); - - /** - * Sets the company ID of this k b folder. - * - * @param companyId the company ID of this k b folder - */ - @Override - public void setCompanyId(long companyId); - - /** - * Returns the user ID of this k b folder. - * - * @return the user ID of this k b folder - */ - @Override - public long getUserId(); - - /** - * Sets the user ID of this k b folder. - * - * @param userId the user ID of this k b folder - */ - @Override - public void setUserId(long userId); - - /** - * Returns the user uuid of this k b folder. - * - * @return the user uuid of this k b folder - * @throws SystemException if a system exception occurred - */ - @Override - public String getUserUuid() throws SystemException; - - /** - * Sets the user uuid of this k b folder. - * - * @param userUuid the user uuid of this k b folder - */ - @Override - public void setUserUuid(String userUuid); - - /** - * Returns the user name of this k b folder. - * - * @return the user name of this k b folder - */ - @AutoEscape - @Override - public String getUserName(); - - /** - * Sets the user name of this k b folder. - * - * @param userName the user name of this k b folder - */ - @Override - public void setUserName(String userName); - - /** - * Returns the create date of this k b folder. - * - * @return the create date of this k b folder - */ - @Override - public Date getCreateDate(); - - /** - * Sets the create date of this k b folder. - * - * @param createDate the create date of this k b folder - */ - @Override - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this k b folder. - * - * @return the modified date of this k b folder - */ - @Override - public Date getModifiedDate(); - - /** - * Sets the modified date of this k b folder. - * - * @param modifiedDate the modified date of this k b folder - */ - @Override - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the parent k b folder ID of this k b folder. - * - * @return the parent k b folder ID of this k b folder - */ - public long getParentKBFolderId(); - - /** - * Sets the parent k b folder ID of this k b folder. - * - * @param parentKBFolderId the parent k b folder ID of this k b folder - */ - public void setParentKBFolderId(long parentKBFolderId); - - /** - * Returns the name of this k b folder. - * - * @return the name of this k b folder - */ - @AutoEscape - public String getName(); - - /** - * Sets the name of this k b folder. - * - * @param name the name of this k b folder - */ - public void setName(String name); - - /** - * Returns the url title of this k b folder. - * - * @return the url title of this k b folder - */ - @AutoEscape - public String getUrlTitle(); - - /** - * Sets the url title of this k b folder. - * - * @param urlTitle the url title of this k b folder - */ - public void setUrlTitle(String urlTitle); - - /** - * Returns the description of this k b folder. - * - * @return the description of this k b folder - */ - @AutoEscape - public String getDescription(); - - /** - * Sets the description of this k b folder. - * - * @param description the description of this k b folder - */ - public void setDescription(String description); - - @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(KBFolder kbFolder); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public KBFolder toEscapedModel(); - - @Override - public KBFolder toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderSoap.java deleted file mode 100644 index 5dd5bc5265..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderSoap.java +++ /dev/null @@ -1,206 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 com.liferay.knowledgebase.service.http.KBFolderServiceSoap}. - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.http.KBFolderServiceSoap - * @generated - */ -public class KBFolderSoap implements Serializable { - public static KBFolderSoap toSoapModel(KBFolder model) { - KBFolderSoap soapModel = new KBFolderSoap(); - - soapModel.setUuid(model.getUuid()); - soapModel.setKbFolderId(model.getKbFolderId()); - soapModel.setGroupId(model.getGroupId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setUserId(model.getUserId()); - soapModel.setUserName(model.getUserName()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setParentKBFolderId(model.getParentKBFolderId()); - soapModel.setName(model.getName()); - soapModel.setUrlTitle(model.getUrlTitle()); - soapModel.setDescription(model.getDescription()); - - return soapModel; - } - - public static KBFolderSoap[] toSoapModels(KBFolder[] models) { - KBFolderSoap[] soapModels = new KBFolderSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static KBFolderSoap[][] toSoapModels(KBFolder[][] models) { - KBFolderSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new KBFolderSoap[models.length][models[0].length]; - } - else { - soapModels = new KBFolderSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static KBFolderSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (KBFolder model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new KBFolderSoap[soapModels.size()]); - } - - public KBFolderSoap() { - } - - public long getPrimaryKey() { - return _kbFolderId; - } - - public void setPrimaryKey(long pk) { - setKbFolderId(pk); - } - - public String getUuid() { - return _uuid; - } - - public void setUuid(String uuid) { - _uuid = uuid; - } - - public long getKbFolderId() { - return _kbFolderId; - } - - public void setKbFolderId(long kbFolderId) { - _kbFolderId = kbFolderId; - } - - 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 Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public long getParentKBFolderId() { - return _parentKBFolderId; - } - - public void setParentKBFolderId(long parentKBFolderId) { - _parentKBFolderId = parentKBFolderId; - } - - public String getName() { - return _name; - } - - public void setName(String name) { - _name = name; - } - - public String getUrlTitle() { - return _urlTitle; - } - - public void setUrlTitle(String urlTitle) { - _urlTitle = urlTitle; - } - - public String getDescription() { - return _description; - } - - public void setDescription(String description) { - _description = description; - } - - private String _uuid; - private long _kbFolderId; - private long _groupId; - private long _companyId; - private long _userId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _parentKBFolderId; - private String _name; - private String _urlTitle; - private String _description; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderWrapper.java deleted file mode 100644 index b03896324c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBFolderWrapper.java +++ /dev/null @@ -1,591 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.portal.kernel.lar.StagedModelType; -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 KBFolder}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBFolder - * @generated - */ -public class KBFolderWrapper implements KBFolder, ModelWrapper { - public KBFolderWrapper(KBFolder kbFolder) { - _kbFolder = kbFolder; - } - - @Override - public Class getModelClass() { - return KBFolder.class; - } - - @Override - public String getModelClassName() { - return KBFolder.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbFolderId", getKbFolderId()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("parentKBFolderId", getParentKBFolderId()); - attributes.put("name", getName()); - attributes.put("urlTitle", getUrlTitle()); - attributes.put("description", getDescription()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbFolderId = (Long)attributes.get("kbFolderId"); - - if (kbFolderId != null) { - setKbFolderId(kbFolderId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long parentKBFolderId = (Long)attributes.get("parentKBFolderId"); - - if (parentKBFolderId != null) { - setParentKBFolderId(parentKBFolderId); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - String urlTitle = (String)attributes.get("urlTitle"); - - if (urlTitle != null) { - setUrlTitle(urlTitle); - } - - String description = (String)attributes.get("description"); - - if (description != null) { - setDescription(description); - } - } - - /** - * Returns the primary key of this k b folder. - * - * @return the primary key of this k b folder - */ - @Override - public long getPrimaryKey() { - return _kbFolder.getPrimaryKey(); - } - - /** - * Sets the primary key of this k b folder. - * - * @param primaryKey the primary key of this k b folder - */ - @Override - public void setPrimaryKey(long primaryKey) { - _kbFolder.setPrimaryKey(primaryKey); - } - - /** - * Returns the uuid of this k b folder. - * - * @return the uuid of this k b folder - */ - @Override - public java.lang.String getUuid() { - return _kbFolder.getUuid(); - } - - /** - * Sets the uuid of this k b folder. - * - * @param uuid the uuid of this k b folder - */ - @Override - public void setUuid(java.lang.String uuid) { - _kbFolder.setUuid(uuid); - } - - /** - * Returns the kb folder ID of this k b folder. - * - * @return the kb folder ID of this k b folder - */ - @Override - public long getKbFolderId() { - return _kbFolder.getKbFolderId(); - } - - /** - * Sets the kb folder ID of this k b folder. - * - * @param kbFolderId the kb folder ID of this k b folder - */ - @Override - public void setKbFolderId(long kbFolderId) { - _kbFolder.setKbFolderId(kbFolderId); - } - - /** - * Returns the group ID of this k b folder. - * - * @return the group ID of this k b folder - */ - @Override - public long getGroupId() { - return _kbFolder.getGroupId(); - } - - /** - * Sets the group ID of this k b folder. - * - * @param groupId the group ID of this k b folder - */ - @Override - public void setGroupId(long groupId) { - _kbFolder.setGroupId(groupId); - } - - /** - * Returns the company ID of this k b folder. - * - * @return the company ID of this k b folder - */ - @Override - public long getCompanyId() { - return _kbFolder.getCompanyId(); - } - - /** - * Sets the company ID of this k b folder. - * - * @param companyId the company ID of this k b folder - */ - @Override - public void setCompanyId(long companyId) { - _kbFolder.setCompanyId(companyId); - } - - /** - * Returns the user ID of this k b folder. - * - * @return the user ID of this k b folder - */ - @Override - public long getUserId() { - return _kbFolder.getUserId(); - } - - /** - * Sets the user ID of this k b folder. - * - * @param userId the user ID of this k b folder - */ - @Override - public void setUserId(long userId) { - _kbFolder.setUserId(userId); - } - - /** - * Returns the user uuid of this k b folder. - * - * @return the user uuid of this k b folder - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _kbFolder.getUserUuid(); - } - - /** - * Sets the user uuid of this k b folder. - * - * @param userUuid the user uuid of this k b folder - */ - @Override - public void setUserUuid(java.lang.String userUuid) { - _kbFolder.setUserUuid(userUuid); - } - - /** - * Returns the user name of this k b folder. - * - * @return the user name of this k b folder - */ - @Override - public java.lang.String getUserName() { - return _kbFolder.getUserName(); - } - - /** - * Sets the user name of this k b folder. - * - * @param userName the user name of this k b folder - */ - @Override - public void setUserName(java.lang.String userName) { - _kbFolder.setUserName(userName); - } - - /** - * Returns the create date of this k b folder. - * - * @return the create date of this k b folder - */ - @Override - public java.util.Date getCreateDate() { - return _kbFolder.getCreateDate(); - } - - /** - * Sets the create date of this k b folder. - * - * @param createDate the create date of this k b folder - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _kbFolder.setCreateDate(createDate); - } - - /** - * Returns the modified date of this k b folder. - * - * @return the modified date of this k b folder - */ - @Override - public java.util.Date getModifiedDate() { - return _kbFolder.getModifiedDate(); - } - - /** - * Sets the modified date of this k b folder. - * - * @param modifiedDate the modified date of this k b folder - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _kbFolder.setModifiedDate(modifiedDate); - } - - /** - * Returns the parent k b folder ID of this k b folder. - * - * @return the parent k b folder ID of this k b folder - */ - @Override - public long getParentKBFolderId() { - return _kbFolder.getParentKBFolderId(); - } - - /** - * Sets the parent k b folder ID of this k b folder. - * - * @param parentKBFolderId the parent k b folder ID of this k b folder - */ - @Override - public void setParentKBFolderId(long parentKBFolderId) { - _kbFolder.setParentKBFolderId(parentKBFolderId); - } - - /** - * Returns the name of this k b folder. - * - * @return the name of this k b folder - */ - @Override - public java.lang.String getName() { - return _kbFolder.getName(); - } - - /** - * Sets the name of this k b folder. - * - * @param name the name of this k b folder - */ - @Override - public void setName(java.lang.String name) { - _kbFolder.setName(name); - } - - /** - * Returns the url title of this k b folder. - * - * @return the url title of this k b folder - */ - @Override - public java.lang.String getUrlTitle() { - return _kbFolder.getUrlTitle(); - } - - /** - * Sets the url title of this k b folder. - * - * @param urlTitle the url title of this k b folder - */ - @Override - public void setUrlTitle(java.lang.String urlTitle) { - _kbFolder.setUrlTitle(urlTitle); - } - - /** - * Returns the description of this k b folder. - * - * @return the description of this k b folder - */ - @Override - public java.lang.String getDescription() { - return _kbFolder.getDescription(); - } - - /** - * Sets the description of this k b folder. - * - * @param description the description of this k b folder - */ - @Override - public void setDescription(java.lang.String description) { - _kbFolder.setDescription(description); - } - - @Override - public boolean isNew() { - return _kbFolder.isNew(); - } - - @Override - public void setNew(boolean n) { - _kbFolder.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _kbFolder.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _kbFolder.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _kbFolder.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _kbFolder.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _kbFolder.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _kbFolder.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _kbFolder.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _kbFolder.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _kbFolder.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new KBFolderWrapper((KBFolder)_kbFolder.clone()); - } - - @Override - public int compareTo(com.liferay.knowledgebase.model.KBFolder kbFolder) { - return _kbFolder.compareTo(kbFolder); - } - - @Override - public int hashCode() { - return _kbFolder.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _kbFolder.toCacheModel(); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder toEscapedModel() { - return new KBFolderWrapper(_kbFolder.toEscapedModel()); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder toUnescapedModel() { - return new KBFolderWrapper(_kbFolder.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _kbFolder.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _kbFolder.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _kbFolder.persist(); - } - - @Override - public long getClassNameId() { - return _kbFolder.getClassNameId(); - } - - @Override - public java.lang.String getParentTitle(java.util.Locale locale) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolder.getParentTitle(locale); - } - - @Override - public boolean isEmpty() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolder.isEmpty(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBFolderWrapper)) { - return false; - } - - KBFolderWrapper kbFolderWrapper = (KBFolderWrapper)obj; - - if (Validator.equals(_kbFolder, kbFolderWrapper._kbFolder)) { - return true; - } - - return false; - } - - @Override - public StagedModelType getStagedModelType() { - return _kbFolder.getStagedModelType(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public KBFolder getWrappedKBFolder() { - return _kbFolder; - } - - @Override - public KBFolder getWrappedModel() { - return _kbFolder; - } - - @Override - public void resetOriginalValues() { - _kbFolder.resetOriginalValues(); - } - - private KBFolder _kbFolder; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplate.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplate.java deleted file mode 100644 index 80d7689429..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplate.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the KBTemplate service. Represents a row in the "KBTemplate" database table, with each column mapped to a property of this class. - * - * @author Brian Wing Shun Chan - * @see KBTemplateModel - * @see com.liferay.knowledgebase.model.impl.KBTemplateImpl - * @see com.liferay.knowledgebase.model.impl.KBTemplateModelImpl - * @generated - */ -public interface KBTemplate extends KBTemplateModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link com.liferay.knowledgebase.model.impl.KBTemplateImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateClp.java deleted file mode 100644 index 116a2fefcd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateClp.java +++ /dev/null @@ -1,629 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.knowledgebase.service.ClpSerializer; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.util.DateUtil; -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 java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Brian Wing Shun Chan - */ -public class KBTemplateClp extends BaseModelImpl - implements KBTemplate { - public KBTemplateClp() { - } - - @Override - public Class getModelClass() { - return KBTemplate.class; - } - - @Override - public String getModelClassName() { - return KBTemplate.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _kbTemplateId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setKbTemplateId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _kbTemplateId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbTemplateId", getKbTemplateId()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("title", getTitle()); - attributes.put("content", getContent()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbTemplateId = (Long)attributes.get("kbTemplateId"); - - if (kbTemplateId != null) { - setKbTemplateId(kbTemplateId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String title = (String)attributes.get("title"); - - if (title != null) { - setTitle(title); - } - - String content = (String)attributes.get("content"); - - if (content != null) { - setContent(content); - } - } - - @Override - public String getUuid() { - return _uuid; - } - - @Override - public void setUuid(String uuid) { - _uuid = uuid; - - if (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setUuid", String.class); - - method.invoke(_kbTemplateRemoteModel, uuid); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getKbTemplateId() { - return _kbTemplateId; - } - - @Override - public void setKbTemplateId(long kbTemplateId) { - _kbTemplateId = kbTemplateId; - - if (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setKbTemplateId", long.class); - - method.invoke(_kbTemplateRemoteModel, kbTemplateId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _groupId = groupId; - - if (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setGroupId", long.class); - - method.invoke(_kbTemplateRemoteModel, groupId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_kbTemplateRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _userId = userId; - - if (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserId", long.class); - - method.invoke(_kbTemplateRemoteModel, 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 (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserName", String.class); - - method.invoke(_kbTemplateRemoteModel, userName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_kbTemplateRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_kbTemplateRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getTitle() { - return _title; - } - - @Override - public void setTitle(String title) { - _title = title; - - if (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setTitle", String.class); - - method.invoke(_kbTemplateRemoteModel, title); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getContent() { - return _content; - } - - @Override - public void setContent(String content) { - _content = content; - - if (_kbTemplateRemoteModel != null) { - try { - Class clazz = _kbTemplateRemoteModel.getClass(); - - Method method = clazz.getMethod("setContent", String.class); - - method.invoke(_kbTemplateRemoteModel, content); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBTemplate.class.getName())); - } - - public BaseModel getKBTemplateRemoteModel() { - return _kbTemplateRemoteModel; - } - - public void setKBTemplateRemoteModel(BaseModel kbTemplateRemoteModel) { - _kbTemplateRemoteModel = kbTemplateRemoteModel; - } - - 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 = _kbTemplateRemoteModel.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(_kbTemplateRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - KBTemplateLocalServiceUtil.addKBTemplate(this); - } - else { - KBTemplateLocalServiceUtil.updateKBTemplate(this); - } - } - - @Override - public KBTemplate toEscapedModel() { - return (KBTemplate)ProxyUtil.newProxyInstance(KBTemplate.class.getClassLoader(), - new Class[] { KBTemplate.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - KBTemplateClp clone = new KBTemplateClp(); - - clone.setUuid(getUuid()); - clone.setKbTemplateId(getKbTemplateId()); - clone.setGroupId(getGroupId()); - clone.setCompanyId(getCompanyId()); - clone.setUserId(getUserId()); - clone.setUserName(getUserName()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setTitle(getTitle()); - clone.setContent(getContent()); - - return clone; - } - - @Override - public int compareTo(KBTemplate kbTemplate) { - int value = 0; - - value = DateUtil.compareTo(getModifiedDate(), - kbTemplate.getModifiedDate()); - - value = value * -1; - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBTemplateClp)) { - return false; - } - - KBTemplateClp kbTemplate = (KBTemplateClp)obj; - - long primaryKey = kbTemplate.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(21); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", kbTemplateId="); - sb.append(getKbTemplateId()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", title="); - sb.append(getTitle()); - sb.append(", content="); - sb.append(getContent()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(34); - - sb.append(""); - sb.append("com.liferay.knowledgebase.model.KBTemplate"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "kbTemplateId"); - sb.append( - "groupId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "title"); - sb.append( - "content"); - - sb.append(""); - - return sb.toString(); - } - - private String _uuid; - private long _kbTemplateId; - private long _groupId; - private long _companyId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private String _title; - private String _content; - private BaseModel _kbTemplateRemoteModel; - private Class _clpSerializerClass = com.liferay.knowledgebase.service.ClpSerializer.class; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateModel.java deleted file mode 100644 index 971eac2215..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateModel.java +++ /dev/null @@ -1,296 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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.model.StagedGroupedModel; -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 KBTemplate service. Represents a row in the "KBTemplate" database table, with each column mapped to a property of this class. - * - *

    - * This interface and its corresponding implementation {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.knowledgebase.model.impl.KBTemplateImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBTemplate - * @see com.liferay.knowledgebase.model.impl.KBTemplateImpl - * @see com.liferay.knowledgebase.model.impl.KBTemplateModelImpl - * @generated - */ -public interface KBTemplateModel extends BaseModel, - StagedGroupedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a k b template model instance should use the {@link KBTemplate} interface instead. - */ - - /** - * Returns the primary key of this k b template. - * - * @return the primary key of this k b template - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this k b template. - * - * @param primaryKey the primary key of this k b template - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the uuid of this k b template. - * - * @return the uuid of this k b template - */ - @AutoEscape - @Override - public String getUuid(); - - /** - * Sets the uuid of this k b template. - * - * @param uuid the uuid of this k b template - */ - @Override - public void setUuid(String uuid); - - /** - * Returns the kb template ID of this k b template. - * - * @return the kb template ID of this k b template - */ - public long getKbTemplateId(); - - /** - * Sets the kb template ID of this k b template. - * - * @param kbTemplateId the kb template ID of this k b template - */ - public void setKbTemplateId(long kbTemplateId); - - /** - * Returns the group ID of this k b template. - * - * @return the group ID of this k b template - */ - @Override - public long getGroupId(); - - /** - * Sets the group ID of this k b template. - * - * @param groupId the group ID of this k b template - */ - @Override - public void setGroupId(long groupId); - - /** - * Returns the company ID of this k b template. - * - * @return the company ID of this k b template - */ - @Override - public long getCompanyId(); - - /** - * Sets the company ID of this k b template. - * - * @param companyId the company ID of this k b template - */ - @Override - public void setCompanyId(long companyId); - - /** - * Returns the user ID of this k b template. - * - * @return the user ID of this k b template - */ - @Override - public long getUserId(); - - /** - * Sets the user ID of this k b template. - * - * @param userId the user ID of this k b template - */ - @Override - public void setUserId(long userId); - - /** - * Returns the user uuid of this k b template. - * - * @return the user uuid of this k b template - * @throws SystemException if a system exception occurred - */ - @Override - public String getUserUuid() throws SystemException; - - /** - * Sets the user uuid of this k b template. - * - * @param userUuid the user uuid of this k b template - */ - @Override - public void setUserUuid(String userUuid); - - /** - * Returns the user name of this k b template. - * - * @return the user name of this k b template - */ - @AutoEscape - @Override - public String getUserName(); - - /** - * Sets the user name of this k b template. - * - * @param userName the user name of this k b template - */ - @Override - public void setUserName(String userName); - - /** - * Returns the create date of this k b template. - * - * @return the create date of this k b template - */ - @Override - public Date getCreateDate(); - - /** - * Sets the create date of this k b template. - * - * @param createDate the create date of this k b template - */ - @Override - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this k b template. - * - * @return the modified date of this k b template - */ - @Override - public Date getModifiedDate(); - - /** - * Sets the modified date of this k b template. - * - * @param modifiedDate the modified date of this k b template - */ - @Override - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the title of this k b template. - * - * @return the title of this k b template - */ - @AutoEscape - public String getTitle(); - - /** - * Sets the title of this k b template. - * - * @param title the title of this k b template - */ - public void setTitle(String title); - - /** - * Returns the content of this k b template. - * - * @return the content of this k b template - */ - @AutoEscape - public String getContent(); - - /** - * Sets the content of this k b template. - * - * @param content the content of this k b template - */ - public void setContent(String content); - - @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(KBTemplate kbTemplate); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public KBTemplate toEscapedModel(); - - @Override - public KBTemplate toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateSearchDisplay.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateSearchDisplay.java deleted file mode 100644 index b35c4cf4fa..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateSearchDisplay.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import java.io.Serializable; - -import java.util.List; - -/** - * @author Peter Shin - */ -public interface KBTemplateSearchDisplay extends Serializable { - - public int[] getCurStartValues(); - - public List getResults(); - - public int getTotal(); - - public void setCurStartValues(int[] curStartValues); - - public void setResults(List results); - - public void setTotal(int total); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateSoap.java deleted file mode 100644 index 63464e42a5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateSoap.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 com.liferay.knowledgebase.service.http.KBTemplateServiceSoap}. - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.http.KBTemplateServiceSoap - * @generated - */ -public class KBTemplateSoap implements Serializable { - public static KBTemplateSoap toSoapModel(KBTemplate model) { - KBTemplateSoap soapModel = new KBTemplateSoap(); - - soapModel.setUuid(model.getUuid()); - soapModel.setKbTemplateId(model.getKbTemplateId()); - soapModel.setGroupId(model.getGroupId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setUserId(model.getUserId()); - soapModel.setUserName(model.getUserName()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setTitle(model.getTitle()); - soapModel.setContent(model.getContent()); - - return soapModel; - } - - public static KBTemplateSoap[] toSoapModels(KBTemplate[] models) { - KBTemplateSoap[] soapModels = new KBTemplateSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static KBTemplateSoap[][] toSoapModels(KBTemplate[][] models) { - KBTemplateSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new KBTemplateSoap[models.length][models[0].length]; - } - else { - soapModels = new KBTemplateSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static KBTemplateSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (KBTemplate model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new KBTemplateSoap[soapModels.size()]); - } - - public KBTemplateSoap() { - } - - public long getPrimaryKey() { - return _kbTemplateId; - } - - public void setPrimaryKey(long pk) { - setKbTemplateId(pk); - } - - public String getUuid() { - return _uuid; - } - - public void setUuid(String uuid) { - _uuid = uuid; - } - - public long getKbTemplateId() { - return _kbTemplateId; - } - - public void setKbTemplateId(long kbTemplateId) { - _kbTemplateId = kbTemplateId; - } - - 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 Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public String getTitle() { - return _title; - } - - public void setTitle(String title) { - _title = title; - } - - public String getContent() { - return _content; - } - - public void setContent(String content) { - _content = content; - } - - private String _uuid; - private long _kbTemplateId; - private long _groupId; - private long _companyId; - private long _userId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private String _title; - private String _content; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateWrapper.java deleted file mode 100644 index 65524f262a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/model/KBTemplateWrapper.java +++ /dev/null @@ -1,518 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model; - -import com.liferay.portal.kernel.lar.StagedModelType; -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 KBTemplate}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBTemplate - * @generated - */ -public class KBTemplateWrapper implements KBTemplate, ModelWrapper { - public KBTemplateWrapper(KBTemplate kbTemplate) { - _kbTemplate = kbTemplate; - } - - @Override - public Class getModelClass() { - return KBTemplate.class; - } - - @Override - public String getModelClassName() { - return KBTemplate.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbTemplateId", getKbTemplateId()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("title", getTitle()); - attributes.put("content", getContent()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbTemplateId = (Long)attributes.get("kbTemplateId"); - - if (kbTemplateId != null) { - setKbTemplateId(kbTemplateId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String title = (String)attributes.get("title"); - - if (title != null) { - setTitle(title); - } - - String content = (String)attributes.get("content"); - - if (content != null) { - setContent(content); - } - } - - /** - * Returns the primary key of this k b template. - * - * @return the primary key of this k b template - */ - @Override - public long getPrimaryKey() { - return _kbTemplate.getPrimaryKey(); - } - - /** - * Sets the primary key of this k b template. - * - * @param primaryKey the primary key of this k b template - */ - @Override - public void setPrimaryKey(long primaryKey) { - _kbTemplate.setPrimaryKey(primaryKey); - } - - /** - * Returns the uuid of this k b template. - * - * @return the uuid of this k b template - */ - @Override - public java.lang.String getUuid() { - return _kbTemplate.getUuid(); - } - - /** - * Sets the uuid of this k b template. - * - * @param uuid the uuid of this k b template - */ - @Override - public void setUuid(java.lang.String uuid) { - _kbTemplate.setUuid(uuid); - } - - /** - * Returns the kb template ID of this k b template. - * - * @return the kb template ID of this k b template - */ - @Override - public long getKbTemplateId() { - return _kbTemplate.getKbTemplateId(); - } - - /** - * Sets the kb template ID of this k b template. - * - * @param kbTemplateId the kb template ID of this k b template - */ - @Override - public void setKbTemplateId(long kbTemplateId) { - _kbTemplate.setKbTemplateId(kbTemplateId); - } - - /** - * Returns the group ID of this k b template. - * - * @return the group ID of this k b template - */ - @Override - public long getGroupId() { - return _kbTemplate.getGroupId(); - } - - /** - * Sets the group ID of this k b template. - * - * @param groupId the group ID of this k b template - */ - @Override - public void setGroupId(long groupId) { - _kbTemplate.setGroupId(groupId); - } - - /** - * Returns the company ID of this k b template. - * - * @return the company ID of this k b template - */ - @Override - public long getCompanyId() { - return _kbTemplate.getCompanyId(); - } - - /** - * Sets the company ID of this k b template. - * - * @param companyId the company ID of this k b template - */ - @Override - public void setCompanyId(long companyId) { - _kbTemplate.setCompanyId(companyId); - } - - /** - * Returns the user ID of this k b template. - * - * @return the user ID of this k b template - */ - @Override - public long getUserId() { - return _kbTemplate.getUserId(); - } - - /** - * Sets the user ID of this k b template. - * - * @param userId the user ID of this k b template - */ - @Override - public void setUserId(long userId) { - _kbTemplate.setUserId(userId); - } - - /** - * Returns the user uuid of this k b template. - * - * @return the user uuid of this k b template - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplate.getUserUuid(); - } - - /** - * Sets the user uuid of this k b template. - * - * @param userUuid the user uuid of this k b template - */ - @Override - public void setUserUuid(java.lang.String userUuid) { - _kbTemplate.setUserUuid(userUuid); - } - - /** - * Returns the user name of this k b template. - * - * @return the user name of this k b template - */ - @Override - public java.lang.String getUserName() { - return _kbTemplate.getUserName(); - } - - /** - * Sets the user name of this k b template. - * - * @param userName the user name of this k b template - */ - @Override - public void setUserName(java.lang.String userName) { - _kbTemplate.setUserName(userName); - } - - /** - * Returns the create date of this k b template. - * - * @return the create date of this k b template - */ - @Override - public java.util.Date getCreateDate() { - return _kbTemplate.getCreateDate(); - } - - /** - * Sets the create date of this k b template. - * - * @param createDate the create date of this k b template - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _kbTemplate.setCreateDate(createDate); - } - - /** - * Returns the modified date of this k b template. - * - * @return the modified date of this k b template - */ - @Override - public java.util.Date getModifiedDate() { - return _kbTemplate.getModifiedDate(); - } - - /** - * Sets the modified date of this k b template. - * - * @param modifiedDate the modified date of this k b template - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _kbTemplate.setModifiedDate(modifiedDate); - } - - /** - * Returns the title of this k b template. - * - * @return the title of this k b template - */ - @Override - public java.lang.String getTitle() { - return _kbTemplate.getTitle(); - } - - /** - * Sets the title of this k b template. - * - * @param title the title of this k b template - */ - @Override - public void setTitle(java.lang.String title) { - _kbTemplate.setTitle(title); - } - - /** - * Returns the content of this k b template. - * - * @return the content of this k b template - */ - @Override - public java.lang.String getContent() { - return _kbTemplate.getContent(); - } - - /** - * Sets the content of this k b template. - * - * @param content the content of this k b template - */ - @Override - public void setContent(java.lang.String content) { - _kbTemplate.setContent(content); - } - - @Override - public boolean isNew() { - return _kbTemplate.isNew(); - } - - @Override - public void setNew(boolean n) { - _kbTemplate.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _kbTemplate.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _kbTemplate.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _kbTemplate.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _kbTemplate.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _kbTemplate.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _kbTemplate.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _kbTemplate.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _kbTemplate.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _kbTemplate.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new KBTemplateWrapper((KBTemplate)_kbTemplate.clone()); - } - - @Override - public int compareTo(com.liferay.knowledgebase.model.KBTemplate kbTemplate) { - return _kbTemplate.compareTo(kbTemplate); - } - - @Override - public int hashCode() { - return _kbTemplate.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _kbTemplate.toCacheModel(); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate toEscapedModel() { - return new KBTemplateWrapper(_kbTemplate.toEscapedModel()); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate toUnescapedModel() { - return new KBTemplateWrapper(_kbTemplate.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _kbTemplate.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _kbTemplate.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _kbTemplate.persist(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBTemplateWrapper)) { - return false; - } - - KBTemplateWrapper kbTemplateWrapper = (KBTemplateWrapper)obj; - - if (Validator.equals(_kbTemplate, kbTemplateWrapper._kbTemplate)) { - return true; - } - - return false; - } - - @Override - public StagedModelType getStagedModelType() { - return _kbTemplate.getStagedModelType(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public KBTemplate getWrappedKBTemplate() { - return _kbTemplate; - } - - @Override - public KBTemplate getWrappedModel() { - return _kbTemplate; - } - - @Override - public void resetOriginalValues() { - _kbTemplate.resetOriginalValues(); - } - - private KBTemplate _kbTemplate; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/ClpSerializer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/ClpSerializer.java deleted file mode 100644 index 168061366f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/ClpSerializer.java +++ /dev/null @@ -1,557 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.knowledgebase.model.KBArticleClp; -import com.liferay.knowledgebase.model.KBCommentClp; -import com.liferay.knowledgebase.model.KBFolderClp; -import com.liferay.knowledgebase.model.KBTemplateClp; - -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 java.io.ObjectInputStream; -import java.io.ObjectOutputStream; - -import java.lang.reflect.Method; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Brian Wing Shun Chan - */ -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, - "knowledge-base-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( - "knowledge-base-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 = "knowledge-base-portlet"; - } - - return _servletContextName; - } - } - - public static Object translateInput(BaseModel oldModel) { - Class oldModelClass = oldModel.getClass(); - - String oldModelClassName = oldModelClass.getName(); - - if (oldModelClassName.equals(KBArticleClp.class.getName())) { - return translateInputKBArticle(oldModel); - } - - if (oldModelClassName.equals(KBCommentClp.class.getName())) { - return translateInputKBComment(oldModel); - } - - if (oldModelClassName.equals(KBFolderClp.class.getName())) { - return translateInputKBFolder(oldModel); - } - - if (oldModelClassName.equals(KBTemplateClp.class.getName())) { - return translateInputKBTemplate(oldModel); - } - - return oldModel; - } - - public static Object translateInput(List oldList) { - List newList = new ArrayList(oldList.size()); - - for (int i = 0; i < oldList.size(); i++) { - Object curObj = oldList.get(i); - - newList.add(translateInput(curObj)); - } - - return newList; - } - - public static Object translateInputKBArticle(BaseModel oldModel) { - KBArticleClp oldClpModel = (KBArticleClp)oldModel; - - BaseModel newModel = oldClpModel.getKBArticleRemoteModel(); - - newModel.setModelAttributes(oldClpModel.getModelAttributes()); - - return newModel; - } - - public static Object translateInputKBComment(BaseModel oldModel) { - KBCommentClp oldClpModel = (KBCommentClp)oldModel; - - BaseModel newModel = oldClpModel.getKBCommentRemoteModel(); - - newModel.setModelAttributes(oldClpModel.getModelAttributes()); - - return newModel; - } - - public static Object translateInputKBFolder(BaseModel oldModel) { - KBFolderClp oldClpModel = (KBFolderClp)oldModel; - - BaseModel newModel = oldClpModel.getKBFolderRemoteModel(); - - newModel.setModelAttributes(oldClpModel.getModelAttributes()); - - return newModel; - } - - public static Object translateInputKBTemplate(BaseModel oldModel) { - KBTemplateClp oldClpModel = (KBTemplateClp)oldModel; - - BaseModel newModel = oldClpModel.getKBTemplateRemoteModel(); - - 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)obj); - } - else { - return obj; - } - } - - public static Object translateOutput(BaseModel oldModel) { - Class oldModelClass = oldModel.getClass(); - - String oldModelClassName = oldModelClass.getName(); - - if (oldModelClassName.equals( - "com.liferay.knowledgebase.model.impl.KBArticleImpl")) { - return translateOutputKBArticle(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( - "com.liferay.knowledgebase.model.impl.KBCommentImpl")) { - return translateOutputKBComment(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( - "com.liferay.knowledgebase.model.impl.KBFolderImpl")) { - return translateOutputKBFolder(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( - "com.liferay.knowledgebase.model.impl.KBTemplateImpl")) { - return translateOutputKBTemplate(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 oldList) { - List newList = new ArrayList(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)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( - "com.liferay.knowledgebase.DuplicateKBArticleUrlTitleException")) { - return new com.liferay.knowledgebase.DuplicateKBArticleUrlTitleException(); - } - - if (className.equals( - "com.liferay.knowledgebase.DuplicateKBFolderNameException")) { - return new com.liferay.knowledgebase.DuplicateKBFolderNameException(); - } - - if (className.equals( - "com.liferay.knowledgebase.InvalidKBArticleUrlTitleException")) { - return new com.liferay.knowledgebase.InvalidKBArticleUrlTitleException(); - } - - if (className.equals( - "com.liferay.knowledgebase.InvalidKBFolderNameException")) { - return new com.liferay.knowledgebase.InvalidKBFolderNameException(); - } - - if (className.equals( - "com.liferay.knowledgebase.KBArticleContentException")) { - return new com.liferay.knowledgebase.KBArticleContentException(); - } - - if (className.equals( - "com.liferay.knowledgebase.KBArticleImportException")) { - return new com.liferay.knowledgebase.KBArticleImportException(); - } - - if (className.equals( - "com.liferay.knowledgebase.KBArticleParentException")) { - return new com.liferay.knowledgebase.KBArticleParentException(); - } - - if (className.equals( - "com.liferay.knowledgebase.KBArticlePriorityException")) { - return new com.liferay.knowledgebase.KBArticlePriorityException(); - } - - if (className.equals( - "com.liferay.knowledgebase.KBArticleSourceURLException")) { - return new com.liferay.knowledgebase.KBArticleSourceURLException(); - } - - if (className.equals( - "com.liferay.knowledgebase.KBArticleTitleException")) { - return new com.liferay.knowledgebase.KBArticleTitleException(); - } - - if (className.equals( - "com.liferay.knowledgebase.KBCommentContentException")) { - return new com.liferay.knowledgebase.KBCommentContentException(); - } - - if (className.equals( - "com.liferay.knowledgebase.KBTemplateContentException")) { - return new com.liferay.knowledgebase.KBTemplateContentException(); - } - - if (className.equals( - "com.liferay.knowledgebase.KBTemplateTitleException")) { - return new com.liferay.knowledgebase.KBTemplateTitleException(); - } - - if (className.equals( - "com.liferay.knowledgebase.NoSuchKBArticleSelectorException")) { - return new com.liferay.knowledgebase.NoSuchKBArticleSelectorException(); - } - - if (className.equals("com.liferay.knowledgebase.NoSuchArticleException")) { - return new com.liferay.knowledgebase.NoSuchArticleException(); - } - - if (className.equals("com.liferay.knowledgebase.NoSuchCommentException")) { - return new com.liferay.knowledgebase.NoSuchCommentException(); - } - - if (className.equals("com.liferay.knowledgebase.NoSuchFolderException")) { - return new com.liferay.knowledgebase.NoSuchFolderException(); - } - - if (className.equals( - "com.liferay.knowledgebase.NoSuchTemplateException")) { - return new com.liferay.knowledgebase.NoSuchTemplateException(); - } - - return throwable; - } - - public static Object translateOutputKBArticle(BaseModel oldModel) { - KBArticleClp newModel = new KBArticleClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setKBArticleRemoteModel(oldModel); - - return newModel; - } - - public static Object translateOutputKBComment(BaseModel oldModel) { - KBCommentClp newModel = new KBCommentClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setKBCommentRemoteModel(oldModel); - - return newModel; - } - - public static Object translateOutputKBFolder(BaseModel oldModel) { - KBFolderClp newModel = new KBFolderClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setKBFolderRemoteModel(oldModel); - - return newModel; - } - - public static Object translateOutputKBTemplate(BaseModel oldModel) { - KBTemplateClp newModel = new KBTemplateClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setKBTemplateRemoteModel(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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalService.java deleted file mode 100644 index bbd1bd106d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalService.java +++ /dev/null @@ -1,622 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBArticle. 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 Brian Wing Shun Chan - * @see KBArticleLocalServiceUtil - * @see com.liferay.knowledgebase.service.base.KBArticleLocalServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface KBArticleLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBArticleLocalServiceUtil} to access the k b article local service. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the k b article to the database. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was added - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public com.liferay.knowledgebase.model.KBArticle addKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new k b article with the primary key. Does not add the k b article to the database. - * - * @param kbArticleId the primary key for the new k b article - * @return the new k b article - */ - public com.liferay.knowledgebase.model.KBArticle createKBArticle( - long kbArticleId); - - /** - * Deletes the k b article with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article that was removed - * @throws PortalException if a k b article 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 com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the k b article from the database. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) - public com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.PortalException, - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.knowledgebase.model.KBArticle fetchKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article with the matching UUID and company. - * - * @param uuid the k b article's UUID - * @param companyId the primary key of the company - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article matching the UUID and group. - * - * @param uuid the k b article's UUID - * @param groupId the primary key of the group - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article with the primary key. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article - * @throws PortalException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getKBArticle( - long kbArticleId) - 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 the k b article with the matching UUID and company. - * - * @param uuid the k b article's UUID - * @param companyId the primary key of the company - * @return the matching k b article - * @throws PortalException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article matching the UUID and group. - * - * @param uuid the k b article's UUID - * @param groupId the primary key of the group - * @return the matching k b article - * @throws PortalException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of k b articles - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticles( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles. - * - * @return the number of k b articles - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBArticlesCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the k b article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was updated - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public com.liferay.knowledgebase.model.KBArticle updateKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - 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 com.liferay.knowledgebase.model.KBArticle addKBArticle(long userId, - long parentResourceClassNameId, long parentResourcePrimKey, - java.lang.String title, java.lang.String urlTitle, - java.lang.String content, java.lang.String description, - java.lang.String sourceURL, java.lang.String[] sections, - java.lang.String[] selectedFileNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addKBArticleResources(long kbArticleId, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addKBArticleResources(long kbArticleId, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public int addKBArticlesMarkdown(long userId, long groupId, - long parentKbFolderId, java.lang.String fileName, - boolean prioritizeByNumericalPrefix, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addTempAttachment(long groupId, long userId, - java.lang.String fileName, java.lang.String tempFolderName, - java.io.InputStream inputStream, java.lang.String mimeType) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteGroupKBArticles(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteKBArticles(long groupId, long parentResourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteKBArticles(long[] resourcePrimKeys) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteTempAttachment(long groupId, long userId, - java.lang.String fileName, java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle fetchFirstChildKBArticle( - long groupId, long parentResourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getAllDescendantKBArticles( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getCompanyKBArticles( - long companyId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getCompanyKBArticlesCount(long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getGroupKBArticles( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getGroupKBArticlesCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getKBArticle( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticleAndAllDescendantKBArticles( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * @deprecated As of 7.0.0, replaced by - {@link #getKBArticleAndAllDescendantKBArticles(long, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticleAndAllDescendants( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticles( - long[] resourcePrimKeys, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBArticlesCount(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticleVersions( - long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBArticleVersionsCount(long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBFolderKBArticlesCount(long groupId, long kbFolderId, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle[] getPreviousAndNextKBArticles( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSectionsKBArticles( - long groupId, java.lang.String[] sections, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSectionsKBArticlesCount(long groupId, - java.lang.String[] sections, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, - int, int, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, - long, int)} - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSiblingKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.lang.String[] getTempAttachmentNames(long groupId, long userId, - java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void moveKBArticle(long userId, long resourcePrimKey, - long parentResourceClassNameId, long parentResourcePrimKey, - double priority) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List search( - long groupId, java.lang.String title, java.lang.String content, - int status, java.util.Date startDate, java.util.Date endDate, - boolean andOperator, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - public void subscribeGroupKBArticles(long userId, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void subscribeKBArticle(long userId, long groupId, - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void unsubscribeGroupKBArticles(long userId, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void unsubscribeKBArticle(long userId, long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBArticle updateKBArticle( - long userId, long resourcePrimKey, java.lang.String title, - java.lang.String content, java.lang.String description, - java.lang.String sourceURL, java.lang.String[] sections, - java.lang.String[] selectedFileNames, long[] removeFileEntryIds, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateKBArticleAsset(long userId, - com.liferay.knowledgebase.model.KBArticle kbArticle, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateKBArticlesPriorities( - java.util.Map resourcePrimKeyToPriorityMap) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updatePriority(long resourcePrimKey, double priority) - throws com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBArticle updateStatus(long userId, - long resourcePrimKey, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateViewCount(long userId, long resourcePrimKey, int viewCount) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalServiceClp.java deleted file mode 100644 index 550dc9c776..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalServiceClp.java +++ /dev/null @@ -1,3240 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBArticleLocalServiceClp implements KBArticleLocalService { - public KBArticleLocalServiceClp(InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addKBArticle"; - - _methodParameterTypes0 = new String[] { - "com.liferay.knowledgebase.model.KBArticle" - }; - - _methodName1 = "createKBArticle"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteKBArticle"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteKBArticle"; - - _methodParameterTypes3 = new String[] { - "com.liferay.knowledgebase.model.KBArticle" - }; - - _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 = "fetchKBArticle"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchKBArticleByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchKBArticleByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getKBArticle"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getKBArticleByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getKBArticleByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getKBArticles"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getKBArticlesCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateKBArticle"; - - _methodParameterTypes19 = new String[] { - "com.liferay.knowledgebase.model.KBArticle" - }; - - _methodName20 = "getBeanIdentifier"; - - _methodParameterTypes20 = new String[] { }; - - _methodName21 = "setBeanIdentifier"; - - _methodParameterTypes21 = new String[] { "java.lang.String" }; - - _methodName23 = "addKBArticle"; - - _methodParameterTypes23 = new String[] { - "long", "long", "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String", - "java.lang.String[][]", "java.lang.String[][]", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName24 = "addKBArticleResources"; - - _methodParameterTypes24 = new String[] { - "com.liferay.knowledgebase.model.KBArticle", "boolean", - "boolean" - }; - - _methodName25 = "addKBArticleResources"; - - _methodParameterTypes25 = new String[] { - "com.liferay.knowledgebase.model.KBArticle", - "java.lang.String[][]", "java.lang.String[][]" - }; - - _methodName26 = "addKBArticleResources"; - - _methodParameterTypes26 = new String[] { "long", "boolean", "boolean" }; - - _methodName27 = "addKBArticleResources"; - - _methodParameterTypes27 = new String[] { - "long", "java.lang.String[][]", "java.lang.String[][]" - }; - - _methodName28 = "addKBArticlesMarkdown"; - - _methodParameterTypes28 = new String[] { - "long", "long", "long", "java.lang.String", "boolean", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName29 = "addTempAttachment"; - - _methodParameterTypes29 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String" - }; - - _methodName30 = "deleteGroupKBArticles"; - - _methodParameterTypes30 = new String[] { "long" }; - - _methodName31 = "deleteKBArticles"; - - _methodParameterTypes31 = new String[] { "long", "long" }; - - _methodName32 = "deleteKBArticles"; - - _methodParameterTypes32 = new String[] { "long[][]" }; - - _methodName33 = "deleteTempAttachment"; - - _methodParameterTypes33 = new String[] { - "long", "long", "java.lang.String", "java.lang.String" - }; - - _methodName34 = "fetchFirstChildKBArticle"; - - _methodParameterTypes34 = new String[] { "long", "long" }; - - _methodName35 = "fetchKBArticleByUrlTitle"; - - _methodParameterTypes35 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName36 = "fetchKBArticleByUrlTitle"; - - _methodParameterTypes36 = new String[] { - "long", "java.lang.String", "java.lang.String" - }; - - _methodName37 = "fetchLatestKBArticle"; - - _methodParameterTypes37 = new String[] { "long", "int" }; - - _methodName38 = "fetchLatestKBArticleByUrlTitle"; - - _methodParameterTypes38 = new String[] { - "long", "long", "java.lang.String", "int" - }; - - _methodName39 = "getAllDescendantKBArticles"; - - _methodParameterTypes39 = new String[] { - "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName40 = "getCompanyKBArticles"; - - _methodParameterTypes40 = new String[] { - "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName41 = "getCompanyKBArticlesCount"; - - _methodParameterTypes41 = new String[] { "long", "int" }; - - _methodName42 = "getGroupKBArticles"; - - _methodParameterTypes42 = new String[] { - "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName43 = "getGroupKBArticlesCount"; - - _methodParameterTypes43 = new String[] { "long", "int" }; - - _methodName44 = "getKBArticle"; - - _methodParameterTypes44 = new String[] { "long", "int" }; - - _methodName45 = "getKBArticleAndAllDescendantKBArticles"; - - _methodParameterTypes45 = new String[] { - "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName46 = "getKBArticleAndAllDescendants"; - - _methodParameterTypes46 = new String[] { - "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName47 = "getKBArticleByUrlTitle"; - - _methodParameterTypes47 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName48 = "getKBArticleByUrlTitle"; - - _methodParameterTypes48 = new String[] { - "long", "java.lang.String", "java.lang.String" - }; - - _methodName49 = "getKBArticles"; - - _methodParameterTypes49 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName50 = "getKBArticles"; - - _methodParameterTypes50 = new String[] { - "long[][]", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName51 = "getKBArticlesCount"; - - _methodParameterTypes51 = new String[] { "long", "long", "int" }; - - _methodName52 = "getKBArticleVersions"; - - _methodParameterTypes52 = new String[] { - "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName53 = "getKBArticleVersionsCount"; - - _methodParameterTypes53 = new String[] { "long", "int" }; - - _methodName54 = "getKBFolderKBArticlesCount"; - - _methodParameterTypes54 = new String[] { "long", "long", "int" }; - - _methodName55 = "getLatestKBArticle"; - - _methodParameterTypes55 = new String[] { "long", "int" }; - - _methodName56 = "getLatestKBArticleByUrlTitle"; - - _methodParameterTypes56 = new String[] { - "long", "long", "java.lang.String", "int" - }; - - _methodName57 = "getPreviousAndNextKBArticles"; - - _methodParameterTypes57 = new String[] { "long" }; - - _methodName58 = "getSectionsKBArticles"; - - _methodParameterTypes58 = new String[] { - "long", "java.lang.String[][]", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName59 = "getSectionsKBArticlesCount"; - - _methodParameterTypes59 = new String[] { - "long", "java.lang.String[][]", "int" - }; - - _methodName60 = "getSiblingKBArticles"; - - _methodParameterTypes60 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName61 = "getSiblingKBArticlesCount"; - - _methodParameterTypes61 = new String[] { "long", "long", "int" }; - - _methodName62 = "getTempAttachmentNames"; - - _methodParameterTypes62 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName63 = "moveKBArticle"; - - _methodParameterTypes63 = new String[] { - "long", "long", "long", "long", "double" - }; - - _methodName64 = "search"; - - _methodParameterTypes64 = new String[] { - "long", "java.lang.String", "java.lang.String", "int", - "java.util.Date", "java.util.Date", "boolean", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName65 = "subscribeGroupKBArticles"; - - _methodParameterTypes65 = new String[] { "long", "long" }; - - _methodName66 = "subscribeKBArticle"; - - _methodParameterTypes66 = new String[] { "long", "long", "long" }; - - _methodName67 = "unsubscribeGroupKBArticles"; - - _methodParameterTypes67 = new String[] { "long", "long" }; - - _methodName68 = "unsubscribeKBArticle"; - - _methodParameterTypes68 = new String[] { "long", "long" }; - - _methodName69 = "updateKBArticle"; - - _methodParameterTypes69 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String[][]", - "java.lang.String[][]", "long[][]", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName70 = "updateKBArticleAsset"; - - _methodParameterTypes70 = new String[] { - "long", "com.liferay.knowledgebase.model.KBArticle", "long[][]", - "java.lang.String[][]", "long[][]" - }; - - _methodName71 = "updateKBArticleResources"; - - _methodParameterTypes71 = new String[] { - "com.liferay.knowledgebase.model.KBArticle", - "java.lang.String[][]", "java.lang.String[][]" - }; - - _methodName72 = "updateKBArticlesPriorities"; - - _methodParameterTypes72 = new String[] { "java.util.Map" }; - - _methodName73 = "updatePriority"; - - _methodParameterTypes73 = new String[] { "long", "double" }; - - _methodName74 = "updateStatus"; - - _methodParameterTypes74 = new String[] { - "long", "long", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName75 = "updateViewCount"; - - _methodParameterTypes75 = new String[] { "long", "long", "int" }; - } - - @Override - public com.liferay.knowledgebase.model.KBArticle addKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(kbArticle) }); - } - 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 (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle createKBArticle( - long kbArticleId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { kbArticleId }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { kbArticleId }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(kbArticle) }); - } - 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.knowledgebase.model.KBArticle)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 com.liferay.knowledgebase.model.KBArticle fetchKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { kbArticleId }); - } - 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 (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { ClpSerializer.translateInput(uuid), 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 (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName13, - _methodParameterTypes13, new Object[] { kbArticleId }); - } - 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.knowledgebase.model.KBArticle)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(_methodName14, - _methodParameterTypes14, - 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 com.liferay.knowledgebase.model.KBArticle getKBArticleByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { ClpSerializer.translateInput(uuid), companyId }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName16, - _methodParameterTypes16, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBArticles( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName17, - _methodParameterTypes17, 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getKBArticlesCount() - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName18, - _methodParameterTypes18, 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 com.liferay.knowledgebase.model.KBArticle updateKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { ClpSerializer.translateInput(kbArticle) }); - } - 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 (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.lang.String getBeanIdentifier() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName20, - _methodParameterTypes20, 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(_methodName21, - _methodParameterTypes21, - 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 com.liferay.knowledgebase.model.KBArticle addKBArticle(long userId, - long parentResourceClassNameId, long parentResourcePrimKey, - java.lang.String title, java.lang.String urlTitle, - java.lang.String content, java.lang.String description, - java.lang.String sourceURL, java.lang.String[] sections, - java.lang.String[] selectedFileNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { - userId, - - parentResourceClassNameId, - - parentResourcePrimKey, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(urlTitle), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(description), - - ClpSerializer.translateInput(sourceURL), - - ClpSerializer.translateInput(sections), - - ClpSerializer.translateInput(selectedFileNames), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void addKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, - new Object[] { - ClpSerializer.translateInput(kbArticle), - - addGroupPermissions, - - addGuestPermissions - }); - } - 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"); - } - } - } - - @Override - public void addKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { - ClpSerializer.translateInput(kbArticle), - - ClpSerializer.translateInput(groupPermissions), - - ClpSerializer.translateInput(guestPermissions) - }); - } - 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"); - } - } - } - - @Override - public void addKBArticleResources(long kbArticleId, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName26, - _methodParameterTypes26, - new Object[] { - kbArticleId, - - addGroupPermissions, - - addGuestPermissions - }); - } - 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"); - } - } - } - - @Override - public void addKBArticleResources(long kbArticleId, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName27, - _methodParameterTypes27, - new Object[] { - kbArticleId, - - ClpSerializer.translateInput(groupPermissions), - - ClpSerializer.translateInput(guestPermissions) - }); - } - 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"); - } - } - } - - @Override - public int addKBArticlesMarkdown(long userId, long groupId, - long parentKbFolderId, java.lang.String fileName, - boolean prioritizeByNumericalPrefix, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName28, - _methodParameterTypes28, - new Object[] { - userId, - - groupId, - - parentKbFolderId, - - ClpSerializer.translateInput(fileName), - - prioritizeByNumericalPrefix, - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 ((Integer)returnObj).intValue(); - } - - @Override - public void addTempAttachment(long groupId, long userId, - java.lang.String fileName, java.lang.String tempFolderName, - java.io.InputStream inputStream, java.lang.String mimeType) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName29, - _methodParameterTypes29, - new Object[] { - groupId, - - userId, - - ClpSerializer.translateInput(fileName), - - ClpSerializer.translateInput(tempFolderName), - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(mimeType) - }); - } - 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"); - } - } - } - - @Override - public void deleteGroupKBArticles(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName30, - _methodParameterTypes30, new Object[] { groupId }); - } - 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"); - } - } - } - - @Override - public void deleteKBArticles(long groupId, long parentResourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName31, - _methodParameterTypes31, - new Object[] { groupId, parentResourcePrimKey }); - } - 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"); - } - } - } - - @Override - public void deleteKBArticles(long[] resourcePrimKeys) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName32, - _methodParameterTypes32, - new Object[] { ClpSerializer.translateInput(resourcePrimKeys) }); - } - 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"); - } - } - } - - @Override - public void deleteTempAttachment(long groupId, long userId, - java.lang.String fileName, java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName33, - _methodParameterTypes33, - new Object[] { - groupId, - - userId, - - ClpSerializer.translateInput(fileName), - - ClpSerializer.translateInput(tempFolderName) - }); - } - 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"); - } - } - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchFirstChildKBArticle( - long groupId, long parentResourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName34, - _methodParameterTypes34, - new Object[] { groupId, parentResourcePrimKey }); - } - 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 (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName35, - _methodParameterTypes35, - new Object[] { - groupId, - - kbFolderId, - - ClpSerializer.translateInput(urlTitle) - }); - } - 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 (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName36, - _methodParameterTypes36, - new Object[] { - groupId, - - ClpSerializer.translateInput(kbFolderUrlTitle), - - ClpSerializer.translateInput(urlTitle) - }); - } - 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 RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName37, - _methodParameterTypes37, - new Object[] { resourcePrimKey, status }); - } - 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 (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName38, - _methodParameterTypes38, - new Object[] { - groupId, - - kbFolderId, - - ClpSerializer.translateInput(urlTitle), - - status - }); - } - 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 (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getAllDescendantKBArticles( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName39, - _methodParameterTypes39, - new Object[] { - resourcePrimKey, - - status, - - 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 java.util.List getCompanyKBArticles( - long companyId, int status, 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(_methodName40, - _methodParameterTypes40, - new Object[] { - companyId, - - status, - - 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 int getCompanyKBArticlesCount(long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName41, - _methodParameterTypes41, new Object[] { companyId, status }); - } - 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 java.util.List getGroupKBArticles( - long groupId, int status, 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(_methodName42, - _methodParameterTypes42, - new Object[] { - groupId, - - status, - - 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 int getGroupKBArticlesCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName43, - _methodParameterTypes43, new Object[] { groupId, status }); - } - 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 com.liferay.knowledgebase.model.KBArticle getKBArticle( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName44, - _methodParameterTypes44, - new Object[] { resourcePrimKey, version }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBArticleAndAllDescendantKBArticles( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName45, - _methodParameterTypes45, - new Object[] { - resourcePrimKey, - - status, - - 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 java.util.List getKBArticleAndAllDescendants( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName46, - _methodParameterTypes46, - new Object[] { - resourcePrimKey, - - status, - - 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 com.liferay.knowledgebase.model.KBArticle getKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName47, - _methodParameterTypes47, - new Object[] { - groupId, - - kbFolderId, - - ClpSerializer.translateInput(urlTitle) - }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName48, - _methodParameterTypes48, - new Object[] { - groupId, - - ClpSerializer.translateInput(kbFolderUrlTitle), - - ClpSerializer.translateInput(urlTitle) - }); - } - 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 RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (com.liferay.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBArticles( - long groupId, long parentResourcePrimKey, int status, 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(_methodName49, - _methodParameterTypes49, - new Object[] { - groupId, - - parentResourcePrimKey, - - status, - - 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 java.util.List getKBArticles( - long[] resourcePrimKeys, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName50, - _methodParameterTypes50, - new Object[] { - ClpSerializer.translateInput(resourcePrimKeys), - - status, - - 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 int getKBArticlesCount(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName51, - _methodParameterTypes51, - new Object[] { groupId, parentResourcePrimKey, status }); - } - 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 java.util.List getKBArticleVersions( - long resourcePrimKey, int status, 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(_methodName52, - _methodParameterTypes52, - new Object[] { - resourcePrimKey, - - status, - - 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 int getKBArticleVersionsCount(long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName53, - _methodParameterTypes53, - new Object[] { resourcePrimKey, status }); - } - 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 int getKBFolderKBArticlesCount(long groupId, long kbFolderId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName54, - _methodParameterTypes54, - new Object[] { groupId, kbFolderId, status }); - } - 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 com.liferay.knowledgebase.model.KBArticle getLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName55, - _methodParameterTypes55, - new Object[] { resourcePrimKey, status }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName56, - _methodParameterTypes56, - new Object[] { - groupId, - - kbFolderId, - - ClpSerializer.translateInput(urlTitle), - - status - }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle[] getPreviousAndNextKBArticles( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName57, - _methodParameterTypes57, new Object[] { kbArticleId }); - } - 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.knowledgebase.model.KBArticle[])ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getSectionsKBArticles( - long groupId, java.lang.String[] sections, int status, 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(_methodName58, - _methodParameterTypes58, - new Object[] { - groupId, - - ClpSerializer.translateInput(sections), - - status, - - 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 int getSectionsKBArticlesCount(long groupId, - java.lang.String[] sections, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName59, - _methodParameterTypes59, - new Object[] { - groupId, - - ClpSerializer.translateInput(sections), - - status - }); - } - 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 java.util.List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, 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(_methodName60, - _methodParameterTypes60, - new Object[] { - groupId, - - parentResourcePrimKey, - - status, - - 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 int getSiblingKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName61, - _methodParameterTypes61, - new Object[] { groupId, parentResourcePrimKey, status }); - } - 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 java.lang.String[] getTempAttachmentNames(long groupId, long userId, - java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName62, - _methodParameterTypes62, - new Object[] { - groupId, - - userId, - - ClpSerializer.translateInput(tempFolderName) - }); - } - 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 (java.lang.String[])ClpSerializer.translateOutput(returnObj); - } - - @Override - public void moveKBArticle(long userId, long resourcePrimKey, - long parentResourceClassNameId, long parentResourcePrimKey, - double priority) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName63, - _methodParameterTypes63, - new Object[] { - userId, - - resourcePrimKey, - - parentResourceClassNameId, - - parentResourcePrimKey, - - priority - }); - } - 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"); - } - } - } - - @Override - public java.util.List search( - long groupId, java.lang.String title, java.lang.String content, - int status, java.util.Date startDate, java.util.Date endDate, - boolean andOperator, 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(_methodName64, - _methodParameterTypes64, - new Object[] { - groupId, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - status, - - ClpSerializer.translateInput(startDate), - - ClpSerializer.translateInput(endDate), - - andOperator, - - 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 void subscribeGroupKBArticles(long userId, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName65, - _methodParameterTypes65, new Object[] { userId, groupId }); - } - 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"); - } - } - } - - @Override - public void subscribeKBArticle(long userId, long groupId, - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName66, - _methodParameterTypes66, - new Object[] { userId, groupId, resourcePrimKey }); - } - 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"); - } - } - } - - @Override - public void unsubscribeGroupKBArticles(long userId, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName67, - _methodParameterTypes67, new Object[] { userId, groupId }); - } - 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"); - } - } - } - - @Override - public void unsubscribeKBArticle(long userId, long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName68, - _methodParameterTypes68, - new Object[] { userId, resourcePrimKey }); - } - 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"); - } - } - } - - @Override - public com.liferay.knowledgebase.model.KBArticle updateKBArticle( - long userId, long resourcePrimKey, java.lang.String title, - java.lang.String content, java.lang.String description, - java.lang.String sourceURL, java.lang.String[] sections, - java.lang.String[] selectedFileNames, long[] removeFileEntryIds, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName69, - _methodParameterTypes69, - new Object[] { - userId, - - resourcePrimKey, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(description), - - ClpSerializer.translateInput(sourceURL), - - ClpSerializer.translateInput(sections), - - ClpSerializer.translateInput(selectedFileNames), - - ClpSerializer.translateInput(removeFileEntryIds), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void updateKBArticleAsset(long userId, - com.liferay.knowledgebase.model.KBArticle kbArticle, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName70, - _methodParameterTypes70, - new Object[] { - userId, - - ClpSerializer.translateInput(kbArticle), - - ClpSerializer.translateInput(assetCategoryIds), - - ClpSerializer.translateInput(assetTagNames), - - ClpSerializer.translateInput(assetLinkEntryIds) - }); - } - 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"); - } - } - } - - @Override - public void updateKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName71, - _methodParameterTypes71, - new Object[] { - ClpSerializer.translateInput(kbArticle), - - ClpSerializer.translateInput(groupPermissions), - - ClpSerializer.translateInput(guestPermissions) - }); - } - 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"); - } - } - } - - @Override - public void updateKBArticlesPriorities( - java.util.Map resourcePrimKeyToPriorityMap) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName72, - _methodParameterTypes72, - new Object[] { - ClpSerializer.translateInput(resourcePrimKeyToPriorityMap) - }); - } - 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"); - } - } - } - - @Override - public void updatePriority(long resourcePrimKey, double priority) - throws com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName73, - _methodParameterTypes73, - new Object[] { resourcePrimKey, priority }); - } - 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"); - } - } - } - - @Override - public com.liferay.knowledgebase.model.KBArticle updateStatus(long userId, - long resourcePrimKey, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName74, - _methodParameterTypes74, - new Object[] { - userId, - - resourcePrimKey, - - status, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void updateViewCount(long userId, long resourcePrimKey, int viewCount) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName75, - _methodParameterTypes75, - new Object[] { userId, resourcePrimKey, viewCount }); - } - 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"); - } - } - } - - 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 _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName20; - private String[] _methodParameterTypes20; - private String _methodName21; - private String[] _methodParameterTypes21; - private String _methodName23; - private String[] _methodParameterTypes23; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; - private String _methodName27; - private String[] _methodParameterTypes27; - private String _methodName28; - private String[] _methodParameterTypes28; - private String _methodName29; - private String[] _methodParameterTypes29; - private String _methodName30; - private String[] _methodParameterTypes30; - private String _methodName31; - private String[] _methodParameterTypes31; - private String _methodName32; - private String[] _methodParameterTypes32; - private String _methodName33; - private String[] _methodParameterTypes33; - private String _methodName34; - private String[] _methodParameterTypes34; - private String _methodName35; - private String[] _methodParameterTypes35; - private String _methodName36; - private String[] _methodParameterTypes36; - private String _methodName37; - private String[] _methodParameterTypes37; - private String _methodName38; - private String[] _methodParameterTypes38; - private String _methodName39; - private String[] _methodParameterTypes39; - private String _methodName40; - private String[] _methodParameterTypes40; - private String _methodName41; - private String[] _methodParameterTypes41; - private String _methodName42; - private String[] _methodParameterTypes42; - private String _methodName43; - private String[] _methodParameterTypes43; - private String _methodName44; - private String[] _methodParameterTypes44; - private String _methodName45; - private String[] _methodParameterTypes45; - private String _methodName46; - private String[] _methodParameterTypes46; - private String _methodName47; - private String[] _methodParameterTypes47; - private String _methodName48; - private String[] _methodParameterTypes48; - private String _methodName49; - private String[] _methodParameterTypes49; - private String _methodName50; - private String[] _methodParameterTypes50; - private String _methodName51; - private String[] _methodParameterTypes51; - 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; - private String _methodName57; - private String[] _methodParameterTypes57; - private String _methodName58; - private String[] _methodParameterTypes58; - private String _methodName59; - private String[] _methodParameterTypes59; - private String _methodName60; - private String[] _methodParameterTypes60; - private String _methodName61; - private String[] _methodParameterTypes61; - private String _methodName62; - private String[] _methodParameterTypes62; - private String _methodName63; - private String[] _methodParameterTypes63; - private String _methodName64; - private String[] _methodParameterTypes64; - private String _methodName65; - private String[] _methodParameterTypes65; - private String _methodName66; - private String[] _methodParameterTypes66; - private String _methodName67; - private String[] _methodParameterTypes67; - private String _methodName68; - private String[] _methodParameterTypes68; - private String _methodName69; - private String[] _methodParameterTypes69; - private String _methodName70; - private String[] _methodParameterTypes70; - private String _methodName71; - private String[] _methodParameterTypes71; - private String _methodName72; - private String[] _methodParameterTypes72; - private String _methodName73; - private String[] _methodParameterTypes73; - private String _methodName74; - private String[] _methodParameterTypes74; - private String _methodName75; - private String[] _methodParameterTypes75; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalServiceUtil.java deleted file mode 100644 index 7ad40d945b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalServiceUtil.java +++ /dev/null @@ -1,815 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBArticle. This utility wraps - * {@link com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl} 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 Brian Wing Shun Chan - * @see KBArticleLocalService - * @see com.liferay.knowledgebase.service.base.KBArticleLocalServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl - * @generated - */ -public class KBArticleLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the k b article to the database. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was added - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle addKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addKBArticle(kbArticle); - } - - /** - * Creates a new k b article with the primary key. Does not add the k b article to the database. - * - * @param kbArticleId the primary key for the new k b article - * @return the new k b article - */ - public static com.liferay.knowledgebase.model.KBArticle createKBArticle( - long kbArticleId) { - return getService().createKBArticle(kbArticleId); - } - - /** - * Deletes the k b article with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article that was removed - * @throws PortalException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBArticle(kbArticleId); - } - - /** - * Deletes the k b article from the database. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBArticle(kbArticle); - } - - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.knowledgebase.model.KBArticle fetchKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBArticle(kbArticleId); - } - - /** - * Returns the k b article with the matching UUID and company. - * - * @param uuid the k b article's UUID - * @param companyId the primary key of the company - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBArticleByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the k b article matching the UUID and group. - * - * @param uuid the k b article's UUID - * @param groupId the primary key of the group - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBArticleByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the k b article with the primary key. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article - * @throws PortalException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle getKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticle(kbArticleId); - } - - 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 the k b article with the matching UUID and company. - * - * @param uuid the k b article's UUID - * @param companyId the primary key of the company - * @return the matching k b article - * @throws PortalException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle getKBArticleByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticleByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the k b article matching the UUID and group. - * - * @param uuid the k b article's UUID - * @param groupId the primary key of the group - * @return the matching k b article - * @throws PortalException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle getKBArticleByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticleByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List getKBArticles( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticles(start, end); - } - - /** - * Returns the number of k b articles. - * - * @return the number of k b articles - * @throws SystemException if a system exception occurred - */ - public static int getKBArticlesCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticlesCount(); - } - - /** - * Updates the k b article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was updated - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle updateKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateKBArticle(kbArticle); - } - - /** - * 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 com.liferay.knowledgebase.model.KBArticle addKBArticle( - long userId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String title, - java.lang.String urlTitle, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addKBArticle(userId, parentResourceClassNameId, - parentResourcePrimKey, title, urlTitle, content, description, - sourceURL, sections, selectedFileNames, serviceContext); - } - - public static void addKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addKBArticleResources(kbArticle, addGroupPermissions, - addGuestPermissions); - } - - public static void addKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addKBArticleResources(kbArticle, groupPermissions, guestPermissions); - } - - public static void addKBArticleResources(long kbArticleId, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addKBArticleResources(kbArticleId, addGroupPermissions, - addGuestPermissions); - } - - public static void addKBArticleResources(long kbArticleId, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addKBArticleResources(kbArticleId, groupPermissions, - guestPermissions); - } - - public static int addKBArticlesMarkdown(long userId, long groupId, - long parentKbFolderId, java.lang.String fileName, - boolean prioritizeByNumericalPrefix, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addKBArticlesMarkdown(userId, groupId, parentKbFolderId, - fileName, prioritizeByNumericalPrefix, inputStream, serviceContext); - } - - public static void addTempAttachment(long groupId, long userId, - java.lang.String fileName, java.lang.String tempFolderName, - java.io.InputStream inputStream, java.lang.String mimeType) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addTempAttachment(groupId, userId, fileName, tempFolderName, - inputStream, mimeType); - } - - public static void deleteGroupKBArticles(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteGroupKBArticles(groupId); - } - - public static void deleteKBArticles(long groupId, long parentResourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteKBArticles(groupId, parentResourcePrimKey); - } - - public static void deleteKBArticles(long[] resourcePrimKeys) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteKBArticles(resourcePrimKeys); - } - - public static void deleteTempAttachment(long groupId, long userId, - java.lang.String fileName, java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .deleteTempAttachment(groupId, userId, fileName, tempFolderName); - } - - public static com.liferay.knowledgebase.model.KBArticle fetchFirstChildKBArticle( - long groupId, long parentResourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .fetchFirstChildKBArticle(groupId, parentResourcePrimKey); - } - - public static com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .fetchKBArticleByUrlTitle(groupId, kbFolderId, urlTitle); - } - - public static com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - return getService() - .fetchKBArticleByUrlTitle(groupId, kbFolderUrlTitle, urlTitle); - } - - public static com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchLatestKBArticle(resourcePrimKey, status); - } - - public static com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .fetchLatestKBArticleByUrlTitle(groupId, kbFolderId, - urlTitle, status); - } - - public static java.util.List getAllDescendantKBArticles( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getAllDescendantKBArticles(resourcePrimKey, status, - orderByComparator); - } - - public static java.util.List getCompanyKBArticles( - long companyId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getCompanyKBArticles(companyId, status, start, end, - orderByComparator); - } - - public static int getCompanyKBArticlesCount(long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getCompanyKBArticlesCount(companyId, status); - } - - public static java.util.List getGroupKBArticles( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getGroupKBArticles(groupId, status, start, end, - orderByComparator); - } - - public static int getGroupKBArticlesCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getGroupKBArticlesCount(groupId, status); - } - - public static com.liferay.knowledgebase.model.KBArticle getKBArticle( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticle(resourcePrimKey, version); - } - - public static java.util.List getKBArticleAndAllDescendantKBArticles( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticleAndAllDescendantKBArticles(resourcePrimKey, - status, orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by - {@link #getKBArticleAndAllDescendantKBArticles(long, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - public static java.util.List getKBArticleAndAllDescendants( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticleAndAllDescendants(resourcePrimKey, status, - orderByComparator); - } - - public static com.liferay.knowledgebase.model.KBArticle getKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticleByUrlTitle(groupId, kbFolderId, urlTitle); - } - - public static com.liferay.knowledgebase.model.KBArticle getKBArticleByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - return getService() - .getKBArticleByUrlTitle(groupId, kbFolderUrlTitle, urlTitle); - } - - public static java.util.List getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticles(groupId, parentResourcePrimKey, status, - start, end, orderByComparator); - } - - public static java.util.List getKBArticles( - long[] resourcePrimKeys, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticles(resourcePrimKeys, status, orderByComparator); - } - - public static int getKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticlesCount(groupId, parentResourcePrimKey, status); - } - - public static java.util.List getKBArticleVersions( - long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticleVersions(resourcePrimKey, status, start, end, - orderByComparator); - } - - public static int getKBArticleVersionsCount(long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticleVersionsCount(resourcePrimKey, status); - } - - public static int getKBFolderKBArticlesCount(long groupId, long kbFolderId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBFolderKBArticlesCount(groupId, kbFolderId, status); - } - - public static com.liferay.knowledgebase.model.KBArticle getLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getLatestKBArticle(resourcePrimKey, status); - } - - public static com.liferay.knowledgebase.model.KBArticle getLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getLatestKBArticleByUrlTitle(groupId, kbFolderId, urlTitle, - status); - } - - public static com.liferay.knowledgebase.model.KBArticle[] getPreviousAndNextKBArticles( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getPreviousAndNextKBArticles(kbArticleId); - } - - public static java.util.List getSectionsKBArticles( - long groupId, java.lang.String[] sections, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getSectionsKBArticles(groupId, sections, status, start, - end, orderByComparator); - } - - public static int getSectionsKBArticlesCount(long groupId, - java.lang.String[] sections, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSectionsKBArticlesCount(groupId, sections, status); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, - int, int, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - public static java.util.List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getSiblingKBArticles(groupId, parentResourcePrimKey, - status, start, end, orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, - long, int)} - */ - public static int getSiblingKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getSiblingKBArticlesCount(groupId, parentResourcePrimKey, - status); - } - - public static java.lang.String[] getTempAttachmentNames(long groupId, - long userId, java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getTempAttachmentNames(groupId, userId, tempFolderName); - } - - public static void moveKBArticle(long userId, long resourcePrimKey, - long parentResourceClassNameId, long parentResourcePrimKey, - double priority) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .moveKBArticle(userId, resourcePrimKey, parentResourceClassNameId, - parentResourcePrimKey, priority); - } - - public static java.util.List search( - long groupId, java.lang.String title, java.lang.String content, - int status, java.util.Date startDate, java.util.Date endDate, - boolean andOperator, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .search(groupId, title, content, status, startDate, endDate, - andOperator, start, end, orderByComparator); - } - - public static void subscribeGroupKBArticles(long userId, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().subscribeGroupKBArticles(userId, groupId); - } - - public static void subscribeKBArticle(long userId, long groupId, - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().subscribeKBArticle(userId, groupId, resourcePrimKey); - } - - public static void unsubscribeGroupKBArticles(long userId, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().unsubscribeGroupKBArticles(userId, groupId); - } - - public static void unsubscribeKBArticle(long userId, long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().unsubscribeKBArticle(userId, resourcePrimKey); - } - - public static com.liferay.knowledgebase.model.KBArticle updateKBArticle( - long userId, long resourcePrimKey, java.lang.String title, - java.lang.String content, java.lang.String description, - java.lang.String sourceURL, java.lang.String[] sections, - java.lang.String[] selectedFileNames, long[] removeFileEntryIds, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBArticle(userId, resourcePrimKey, title, content, - description, sourceURL, sections, selectedFileNames, - removeFileEntryIds, serviceContext); - } - - public static void updateKBArticleAsset(long userId, - com.liferay.knowledgebase.model.KBArticle kbArticle, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .updateKBArticleAsset(userId, kbArticle, assetCategoryIds, - assetTagNames, assetLinkEntryIds); - } - - public static void updateKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .updateKBArticleResources(kbArticle, groupPermissions, - guestPermissions); - } - - public static void updateKBArticlesPriorities( - java.util.Map resourcePrimKeyToPriorityMap) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().updateKBArticlesPriorities(resourcePrimKeyToPriorityMap); - } - - public static void updatePriority(long resourcePrimKey, double priority) - throws com.liferay.portal.kernel.exception.SystemException { - getService().updatePriority(resourcePrimKey, priority); - } - - public static com.liferay.knowledgebase.model.KBArticle updateStatus( - long userId, long resourcePrimKey, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateStatus(userId, resourcePrimKey, status, serviceContext); - } - - public static void updateViewCount(long userId, long resourcePrimKey, - int viewCount) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().updateViewCount(userId, resourcePrimKey, viewCount); - } - - public static void clearService() { - _service = null; - } - - public static KBArticleLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - KBArticleLocalService.class.getName()); - - if (invokableLocalService instanceof KBArticleLocalService) { - _service = (KBArticleLocalService)invokableLocalService; - } - else { - _service = new KBArticleLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(KBArticleLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(KBArticleLocalService service) { - } - - private static KBArticleLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalServiceWrapper.java deleted file mode 100644 index a82250a5d4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleLocalServiceWrapper.java +++ /dev/null @@ -1,866 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link KBArticleLocalService}. - * - * @author Brian Wing Shun Chan - * @see KBArticleLocalService - * @generated - */ -public class KBArticleLocalServiceWrapper implements KBArticleLocalService, - ServiceWrapper { - public KBArticleLocalServiceWrapper( - KBArticleLocalService kbArticleLocalService) { - _kbArticleLocalService = kbArticleLocalService; - } - - /** - * Adds the k b article to the database. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was added - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBArticle addKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.addKBArticle(kbArticle); - } - - /** - * Creates a new k b article with the primary key. Does not add the k b article to the database. - * - * @param kbArticleId the primary key for the new k b article - * @return the new k b article - */ - @Override - public com.liferay.knowledgebase.model.KBArticle createKBArticle( - long kbArticleId) { - return _kbArticleLocalService.createKBArticle(kbArticleId); - } - - /** - * Deletes the k b article with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article that was removed - * @throws PortalException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.deleteKBArticle(kbArticleId); - } - - /** - * Deletes the k b article from the database. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.deleteKBArticle(kbArticle); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _kbArticleLocalService.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 _kbArticleLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @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 _kbArticleLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 _kbArticleLocalService.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 _kbArticleLocalService.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 _kbArticleLocalService.dynamicQueryCount(dynamicQuery, projection); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.fetchKBArticle(kbArticleId); - } - - /** - * Returns the k b article with the matching UUID and company. - * - * @param uuid the k b article's UUID - * @param companyId the primary key of the company - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.fetchKBArticleByUuidAndCompanyId(uuid, - companyId); - } - - /** - * Returns the k b article matching the UUID and group. - * - * @param uuid the k b article's UUID - * @param groupId the primary key of the group - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.fetchKBArticleByUuidAndGroupId(uuid, - groupId); - } - - /** - * Returns the k b article with the primary key. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article - * @throws PortalException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticle( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticle(kbArticleId); - } - - @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 _kbArticleLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns the k b article with the matching UUID and company. - * - * @param uuid the k b article's UUID - * @param companyId the primary key of the company - * @return the matching k b article - * @throws PortalException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticleByUuidAndCompanyId(uuid, - companyId); - } - - /** - * Returns the k b article matching the UUID and group. - * - * @param uuid the k b article's UUID - * @param groupId the primary key of the group - * @return the matching k b article - * @throws PortalException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticleByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getKBArticles( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticles(start, end); - } - - /** - * Returns the number of k b articles. - * - * @return the number of k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int getKBArticlesCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticlesCount(); - } - - /** - * Updates the k b article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBArticle updateKBArticle( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.updateKBArticle(kbArticle); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _kbArticleLocalService.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) { - _kbArticleLocalService.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 _kbArticleLocalService.invokeMethod(name, parameterTypes, - arguments); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle addKBArticle(long userId, - long parentResourceClassNameId, long parentResourcePrimKey, - java.lang.String title, java.lang.String urlTitle, - java.lang.String content, java.lang.String description, - java.lang.String sourceURL, java.lang.String[] sections, - java.lang.String[] selectedFileNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.addKBArticle(userId, - parentResourceClassNameId, parentResourcePrimKey, title, urlTitle, - content, description, sourceURL, sections, selectedFileNames, - serviceContext); - } - - @Override - public void addKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.addKBArticleResources(kbArticle, - addGroupPermissions, addGuestPermissions); - } - - @Override - public void addKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.addKBArticleResources(kbArticle, - groupPermissions, guestPermissions); - } - - @Override - public void addKBArticleResources(long kbArticleId, - boolean addGroupPermissions, boolean addGuestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.addKBArticleResources(kbArticleId, - addGroupPermissions, addGuestPermissions); - } - - @Override - public void addKBArticleResources(long kbArticleId, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.addKBArticleResources(kbArticleId, - groupPermissions, guestPermissions); - } - - @Override - public int addKBArticlesMarkdown(long userId, long groupId, - long parentKbFolderId, java.lang.String fileName, - boolean prioritizeByNumericalPrefix, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.addKBArticlesMarkdown(userId, groupId, - parentKbFolderId, fileName, prioritizeByNumericalPrefix, - inputStream, serviceContext); - } - - @Override - public void addTempAttachment(long groupId, long userId, - java.lang.String fileName, java.lang.String tempFolderName, - java.io.InputStream inputStream, java.lang.String mimeType) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.addTempAttachment(groupId, userId, fileName, - tempFolderName, inputStream, mimeType); - } - - @Override - public void deleteGroupKBArticles(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.deleteGroupKBArticles(groupId); - } - - @Override - public void deleteKBArticles(long groupId, long parentResourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.deleteKBArticles(groupId, parentResourcePrimKey); - } - - @Override - public void deleteKBArticles(long[] resourcePrimKeys) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.deleteKBArticles(resourcePrimKeys); - } - - @Override - public void deleteTempAttachment(long groupId, long userId, - java.lang.String fileName, java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.deleteTempAttachment(groupId, userId, fileName, - tempFolderName); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchFirstChildKBArticle( - long groupId, long parentResourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.fetchFirstChildKBArticle(groupId, - parentResourcePrimKey); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.fetchKBArticleByUrlTitle(groupId, - kbFolderId, urlTitle); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchKBArticleByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - return _kbArticleLocalService.fetchKBArticleByUrlTitle(groupId, - kbFolderUrlTitle, urlTitle); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.fetchLatestKBArticle(resourcePrimKey, - status); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.fetchLatestKBArticleByUrlTitle(groupId, - kbFolderId, urlTitle, status); - } - - @Override - public java.util.List getAllDescendantKBArticles( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getAllDescendantKBArticles(resourcePrimKey, - status, orderByComparator); - } - - @Override - public java.util.List getCompanyKBArticles( - long companyId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getCompanyKBArticles(companyId, status, - start, end, orderByComparator); - } - - @Override - public int getCompanyKBArticlesCount(long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getCompanyKBArticlesCount(companyId, - status); - } - - @Override - public java.util.List getGroupKBArticles( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getGroupKBArticles(groupId, status, - start, end, orderByComparator); - } - - @Override - public int getGroupKBArticlesCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getGroupKBArticlesCount(groupId, status); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticle( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticle(resourcePrimKey, version); - } - - @Override - public java.util.List getKBArticleAndAllDescendantKBArticles( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticleAndAllDescendantKBArticles(resourcePrimKey, - status, orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by - {@link #getKBArticleAndAllDescendantKBArticles(long, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Override - public java.util.List getKBArticleAndAllDescendants( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticleAndAllDescendants(resourcePrimKey, - status, orderByComparator); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticleByUrlTitle(groupId, - kbFolderId, urlTitle); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticleByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException { - return _kbArticleLocalService.getKBArticleByUrlTitle(groupId, - kbFolderUrlTitle, urlTitle); - } - - @Override - public java.util.List getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticles(groupId, - parentResourcePrimKey, status, start, end, orderByComparator); - } - - @Override - public java.util.List getKBArticles( - long[] resourcePrimKeys, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticles(resourcePrimKeys, status, - orderByComparator); - } - - @Override - public int getKBArticlesCount(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticlesCount(groupId, - parentResourcePrimKey, status); - } - - @Override - public java.util.List getKBArticleVersions( - long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticleVersions(resourcePrimKey, - status, start, end, orderByComparator); - } - - @Override - public int getKBArticleVersionsCount(long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBArticleVersionsCount(resourcePrimKey, - status); - } - - @Override - public int getKBFolderKBArticlesCount(long groupId, long kbFolderId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getKBFolderKBArticlesCount(groupId, - kbFolderId, status); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getLatestKBArticle(resourcePrimKey, status); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getLatestKBArticleByUrlTitle(groupId, - kbFolderId, urlTitle, status); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle[] getPreviousAndNextKBArticles( - long kbArticleId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getPreviousAndNextKBArticles(kbArticleId); - } - - @Override - public java.util.List getSectionsKBArticles( - long groupId, java.lang.String[] sections, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getSectionsKBArticles(groupId, sections, - status, start, end, orderByComparator); - } - - @Override - public int getSectionsKBArticlesCount(long groupId, - java.lang.String[] sections, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getSectionsKBArticlesCount(groupId, - sections, status); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, - int, int, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Override - public java.util.List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getSiblingKBArticles(groupId, - parentResourcePrimKey, status, start, end, orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, - long, int)} - */ - @Override - public int getSiblingKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getSiblingKBArticlesCount(groupId, - parentResourcePrimKey, status); - } - - @Override - public java.lang.String[] getTempAttachmentNames(long groupId, long userId, - java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.getTempAttachmentNames(groupId, userId, - tempFolderName); - } - - @Override - public void moveKBArticle(long userId, long resourcePrimKey, - long parentResourceClassNameId, long parentResourcePrimKey, - double priority) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.moveKBArticle(userId, resourcePrimKey, - parentResourceClassNameId, parentResourcePrimKey, priority); - } - - @Override - public java.util.List search( - long groupId, java.lang.String title, java.lang.String content, - int status, java.util.Date startDate, java.util.Date endDate, - boolean andOperator, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.search(groupId, title, content, status, - startDate, endDate, andOperator, start, end, orderByComparator); - } - - @Override - public void subscribeGroupKBArticles(long userId, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.subscribeGroupKBArticles(userId, groupId); - } - - @Override - public void subscribeKBArticle(long userId, long groupId, - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.subscribeKBArticle(userId, groupId, - resourcePrimKey); - } - - @Override - public void unsubscribeGroupKBArticles(long userId, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.unsubscribeGroupKBArticles(userId, groupId); - } - - @Override - public void unsubscribeKBArticle(long userId, long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.unsubscribeKBArticle(userId, resourcePrimKey); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle updateKBArticle( - long userId, long resourcePrimKey, java.lang.String title, - java.lang.String content, java.lang.String description, - java.lang.String sourceURL, java.lang.String[] sections, - java.lang.String[] selectedFileNames, long[] removeFileEntryIds, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.updateKBArticle(userId, resourcePrimKey, - title, content, description, sourceURL, sections, - selectedFileNames, removeFileEntryIds, serviceContext); - } - - @Override - public void updateKBArticleAsset(long userId, - com.liferay.knowledgebase.model.KBArticle kbArticle, - long[] assetCategoryIds, java.lang.String[] assetTagNames, - long[] assetLinkEntryIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.updateKBArticleAsset(userId, kbArticle, - assetCategoryIds, assetTagNames, assetLinkEntryIds); - } - - @Override - public void updateKBArticleResources( - com.liferay.knowledgebase.model.KBArticle kbArticle, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.updateKBArticleResources(kbArticle, - groupPermissions, guestPermissions); - } - - @Override - public void updateKBArticlesPriorities( - java.util.Map resourcePrimKeyToPriorityMap) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.updateKBArticlesPriorities(resourcePrimKeyToPriorityMap); - } - - @Override - public void updatePriority(long resourcePrimKey, double priority) - throws com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.updatePriority(resourcePrimKey, priority); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle updateStatus(long userId, - long resourcePrimKey, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleLocalService.updateStatus(userId, resourcePrimKey, - status, serviceContext); - } - - @Override - public void updateViewCount(long userId, long resourcePrimKey, int viewCount) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleLocalService.updateViewCount(userId, resourcePrimKey, - viewCount); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public KBArticleLocalService getWrappedKBArticleLocalService() { - return _kbArticleLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedKBArticleLocalService( - KBArticleLocalService kbArticleLocalService) { - _kbArticleLocalService = kbArticleLocalService; - } - - @Override - public KBArticleLocalService getWrappedService() { - return _kbArticleLocalService; - } - - @Override - public void setWrappedService(KBArticleLocalService kbArticleLocalService) { - _kbArticleLocalService = kbArticleLocalService; - } - - private KBArticleLocalService _kbArticleLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleService.java deleted file mode 100644 index dfb3262322..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleService.java +++ /dev/null @@ -1,287 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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.Propagation; -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 KBArticle. Methods of this - * service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. - * - * @author Brian Wing Shun Chan - * @see KBArticleServiceUtil - * @see com.liferay.knowledgebase.service.base.KBArticleServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBArticleServiceImpl - * @generated - */ -@AccessControlled -@JSONWebService -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface KBArticleService extends BaseService, InvokableService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBArticleServiceUtil} to access the k b article remote service. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBArticleServiceImpl} 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; - - public com.liferay.knowledgebase.model.KBArticle addKBArticle( - java.lang.String portletId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String title, - java.lang.String urlTitle, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public int addKBArticlesMarkdown(long groupId, long parentKBFolderId, - java.lang.String fileName, boolean prioritizeByNumericalPrefix, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void addTempAttachment(long groupId, long resourcePrimKey, - java.lang.String fileName, java.lang.String tempFolderName, - java.io.InputStream inputStream, java.lang.String mimeType) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteKBArticles(long groupId, long[] resourcePrimKeys) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteTempAttachment(long groupId, long resourcePrimKey, - java.lang.String fileName, java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getGroupKBArticles( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getGroupKBArticlesCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.lang.String getGroupKBArticlesRSS(int status, int rssDelta, - java.lang.String rssDisplayStyle, java.lang.String rssFormat, - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getKBArticle( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticleAndAllDescendantKBArticles( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * @deprecated As of 7.0.0, replaced by - {@link #getKBArticleAndAllDescendantKBArticles(long, long, - int, com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticleAndAllDescendants( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.lang.String getKBArticleRSS(long resourcePrimKey, int status, - int rssDelta, java.lang.String rssDisplayStyle, - java.lang.String rssFormat, - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBArticlesCount(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBArticlesCount(long groupId, long[] resourcePrimKeys, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticleSearchDisplay getKBArticleSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - int status, java.util.Date startDate, java.util.Date endDate, - boolean andOperator, int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBArticleVersions( - long groupId, long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBArticleVersionsCount(long groupId, long resourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBArticle getLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSectionsKBArticles( - long groupId, java.lang.String[] sections, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSectionsKBArticlesCount(long groupId, - java.lang.String[] sections, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, - int, int, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, - long, int)} - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getSiblingKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.lang.String[] getTempAttachmentNames(long groupId, - java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void moveKBArticle(long resourcePrimKey, - long parentResourceClassNameId, long parentResourcePrimKey, - double priority) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void subscribeGroupKBArticles(long groupId, - java.lang.String portletId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void subscribeKBArticle(long groupId, long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void unsubscribeGroupKBArticles(long groupId, - java.lang.String portletId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void unsubscribeKBArticle(long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBArticle updateKBArticle( - long resourcePrimKey, java.lang.String title, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - long[] removeFileEntryIds, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateKBArticlesPriorities(long groupId, - java.util.Map resourcePrimKeyToPriorityMap) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleServiceClp.java deleted file mode 100644 index 3bd11acfee..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleServiceClp.java +++ /dev/null @@ -1,1737 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.InvokableService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBArticleServiceClp implements KBArticleService { - public KBArticleServiceClp(InvokableService invokableService) { - _invokableService = invokableService; - - _methodName0 = "getBeanIdentifier"; - - _methodParameterTypes0 = new String[] { }; - - _methodName1 = "setBeanIdentifier"; - - _methodParameterTypes1 = new String[] { "java.lang.String" }; - - _methodName3 = "addKBArticle"; - - _methodParameterTypes3 = new String[] { - "java.lang.String", "long", "long", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String[][]", - "java.lang.String[][]", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName4 = "addKBArticlesMarkdown"; - - _methodParameterTypes4 = new String[] { - "long", "long", "java.lang.String", "boolean", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName5 = "addTempAttachment"; - - _methodParameterTypes5 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String" - }; - - _methodName6 = "deleteKBArticle"; - - _methodParameterTypes6 = new String[] { "long" }; - - _methodName7 = "deleteKBArticles"; - - _methodParameterTypes7 = new String[] { "long", "long[][]" }; - - _methodName8 = "deleteTempAttachment"; - - _methodParameterTypes8 = new String[] { - "long", "long", "java.lang.String", "java.lang.String" - }; - - _methodName9 = "fetchLatestKBArticle"; - - _methodParameterTypes9 = new String[] { "long", "int" }; - - _methodName10 = "getGroupKBArticles"; - - _methodParameterTypes10 = new String[] { - "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName11 = "getGroupKBArticlesCount"; - - _methodParameterTypes11 = new String[] { "long", "int" }; - - _methodName12 = "getGroupKBArticlesRSS"; - - _methodParameterTypes12 = new String[] { - "int", "int", "java.lang.String", "java.lang.String", - "com.liferay.portal.theme.ThemeDisplay" - }; - - _methodName13 = "getKBArticle"; - - _methodParameterTypes13 = new String[] { "long", "int" }; - - _methodName14 = "getKBArticleAndAllDescendantKBArticles"; - - _methodParameterTypes14 = new String[] { - "long", "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName15 = "getKBArticleAndAllDescendants"; - - _methodParameterTypes15 = new String[] { - "long", "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName16 = "getKBArticleRSS"; - - _methodParameterTypes16 = new String[] { - "long", "int", "int", "java.lang.String", "java.lang.String", - "com.liferay.portal.theme.ThemeDisplay" - }; - - _methodName17 = "getKBArticles"; - - _methodParameterTypes17 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName18 = "getKBArticles"; - - _methodParameterTypes18 = new String[] { - "long", "long[][]", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName19 = "getKBArticles"; - - _methodParameterTypes19 = new String[] { - "long", "long[][]", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName20 = "getKBArticlesCount"; - - _methodParameterTypes20 = new String[] { "long", "long", "int" }; - - _methodName21 = "getKBArticlesCount"; - - _methodParameterTypes21 = new String[] { "long", "long[][]", "int" }; - - _methodName22 = "getKBArticleSearchDisplay"; - - _methodParameterTypes22 = new String[] { - "long", "java.lang.String", "java.lang.String", "int", - "java.util.Date", "java.util.Date", "boolean", "int[][]", "int", - "int", "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName23 = "getKBArticleVersions"; - - _methodParameterTypes23 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName24 = "getKBArticleVersionsCount"; - - _methodParameterTypes24 = new String[] { "long", "long", "int" }; - - _methodName25 = "getLatestKBArticle"; - - _methodParameterTypes25 = new String[] { "long", "int" }; - - _methodName26 = "getSectionsKBArticles"; - - _methodParameterTypes26 = new String[] { - "long", "java.lang.String[][]", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName27 = "getSectionsKBArticlesCount"; - - _methodParameterTypes27 = new String[] { - "long", "java.lang.String[][]", "int" - }; - - _methodName28 = "getSiblingKBArticles"; - - _methodParameterTypes28 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName29 = "getSiblingKBArticlesCount"; - - _methodParameterTypes29 = new String[] { "long", "long", "int" }; - - _methodName30 = "getTempAttachmentNames"; - - _methodParameterTypes30 = new String[] { "long", "java.lang.String" }; - - _methodName31 = "moveKBArticle"; - - _methodParameterTypes31 = new String[] { "long", "long", "long", "double" }; - - _methodName32 = "subscribeGroupKBArticles"; - - _methodParameterTypes32 = new String[] { "long", "java.lang.String" }; - - _methodName33 = "subscribeKBArticle"; - - _methodParameterTypes33 = new String[] { "long", "long" }; - - _methodName34 = "unsubscribeGroupKBArticles"; - - _methodParameterTypes34 = new String[] { "long", "java.lang.String" }; - - _methodName35 = "unsubscribeKBArticle"; - - _methodParameterTypes35 = new String[] { "long" }; - - _methodName36 = "updateKBArticle"; - - _methodParameterTypes36 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String[][]", - "java.lang.String[][]", "long[][]", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName37 = "updateKBArticlesPriorities"; - - _methodParameterTypes37 = new String[] { "long", "java.util.Map" }; - } - - @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(); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle addKBArticle( - java.lang.String portletId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String title, - java.lang.String urlTitle, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { - ClpSerializer.translateInput(portletId), - - parentResourceClassNameId, - - parentResourcePrimKey, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(urlTitle), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(description), - - ClpSerializer.translateInput(sourceURL), - - ClpSerializer.translateInput(sections), - - ClpSerializer.translateInput(selectedFileNames), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int addKBArticlesMarkdown(long groupId, long parentKBFolderId, - java.lang.String fileName, boolean prioritizeByNumericalPrefix, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName4, - _methodParameterTypes4, - new Object[] { - groupId, - - parentKBFolderId, - - ClpSerializer.translateInput(fileName), - - prioritizeByNumericalPrefix, - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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 ((Integer)returnObj).intValue(); - } - - @Override - public void addTempAttachment(long groupId, long resourcePrimKey, - java.lang.String fileName, java.lang.String tempFolderName, - java.io.InputStream inputStream, java.lang.String mimeType) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName5, - _methodParameterTypes5, - new Object[] { - groupId, - - resourcePrimKey, - - ClpSerializer.translateInput(fileName), - - ClpSerializer.translateInput(tempFolderName), - - ClpSerializer.translateInput(inputStream), - - ClpSerializer.translateInput(mimeType) - }); - } - 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"); - } - } - } - - @Override - public com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName6, - _methodParameterTypes6, new Object[] { resourcePrimKey }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void deleteKBArticles(long groupId, long[] resourcePrimKeys) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName7, - _methodParameterTypes7, - new Object[] { - groupId, - - ClpSerializer.translateInput(resourcePrimKeys) - }); - } - 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"); - } - } - } - - @Override - public void deleteTempAttachment(long groupId, long resourcePrimKey, - java.lang.String fileName, java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName8, - _methodParameterTypes8, - new Object[] { - groupId, - - resourcePrimKey, - - ClpSerializer.translateInput(fileName), - - ClpSerializer.translateInput(tempFolderName) - }); - } - 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"); - } - } - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName9, - _methodParameterTypes9, - new Object[] { resourcePrimKey, status }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getGroupKBArticles( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName10, - _methodParameterTypes10, - new Object[] { - groupId, - - status, - - 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 int getGroupKBArticlesCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName11, - _methodParameterTypes11, new Object[] { groupId, status }); - } - 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 java.lang.String getGroupKBArticlesRSS(int status, int rssDelta, - java.lang.String rssDisplayStyle, java.lang.String rssFormat, - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { - status, - - rssDelta, - - ClpSerializer.translateInput(rssDisplayStyle), - - ClpSerializer.translateInput(rssFormat), - - ClpSerializer.translateInput(themeDisplay) - }); - } - 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 (java.lang.String)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticle( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName13, - _methodParameterTypes13, - new Object[] { resourcePrimKey, version }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBArticleAndAllDescendantKBArticles( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName14, - _methodParameterTypes14, - new Object[] { - groupId, - - resourcePrimKey, - - status, - - 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 java.util.List getKBArticleAndAllDescendants( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { - groupId, - - resourcePrimKey, - - status, - - 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 java.lang.String getKBArticleRSS(long resourcePrimKey, int status, - int rssDelta, java.lang.String rssDisplayStyle, - java.lang.String rssFormat, - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName16, - _methodParameterTypes16, - new Object[] { - resourcePrimKey, - - status, - - rssDelta, - - ClpSerializer.translateInput(rssDisplayStyle), - - ClpSerializer.translateInput(rssFormat), - - ClpSerializer.translateInput(themeDisplay) - }); - } - 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 (java.lang.String)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName17, - _methodParameterTypes17, - new Object[] { - groupId, - - parentResourcePrimKey, - - status, - - 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 java.util.List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName18, - _methodParameterTypes18, - new Object[] { - groupId, - - ClpSerializer.translateInput(resourcePrimKeys), - - status, - - 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 java.util.List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { - groupId, - - ClpSerializer.translateInput(resourcePrimKeys), - - status, - - 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 int getKBArticlesCount(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName20, - _methodParameterTypes20, - new Object[] { groupId, parentResourcePrimKey, status }); - } - 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 int getKBArticlesCount(long groupId, long[] resourcePrimKeys, - int status) throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName21, - _methodParameterTypes21, - new Object[] { - groupId, - - ClpSerializer.translateInput(resourcePrimKeys), - - status - }); - } - 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 com.liferay.knowledgebase.model.KBArticleSearchDisplay getKBArticleSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - int status, java.util.Date startDate, java.util.Date endDate, - boolean andOperator, int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName22, - _methodParameterTypes22, - new Object[] { - groupId, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - status, - - ClpSerializer.translateInput(startDate), - - ClpSerializer.translateInput(endDate), - - andOperator, - - ClpSerializer.translateInput(curStartValues), - - cur, - - delta, - - ClpSerializer.translateInput(orderByComparator) - }); - } - 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.knowledgebase.model.KBArticleSearchDisplay)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBArticleVersions( - long groupId, long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { - groupId, - - resourcePrimKey, - - status, - - 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 int getKBArticleVersionsCount(long groupId, long resourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName24, - _methodParameterTypes24, - new Object[] { groupId, resourcePrimKey, status }); - } - 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 com.liferay.knowledgebase.model.KBArticle getLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { resourcePrimKey, status }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getSectionsKBArticles( - long groupId, java.lang.String[] sections, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName26, - _methodParameterTypes26, - new Object[] { - groupId, - - ClpSerializer.translateInput(sections), - - status, - - 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 int getSectionsKBArticlesCount(long groupId, - java.lang.String[] sections, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName27, - _methodParameterTypes27, - new Object[] { - groupId, - - ClpSerializer.translateInput(sections), - - status - }); - } - 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 java.util.List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName28, - _methodParameterTypes28, - new Object[] { - groupId, - - parentResourcePrimKey, - - status, - - 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 int getSiblingKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName29, - _methodParameterTypes29, - new Object[] { groupId, parentResourcePrimKey, status }); - } - 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 java.lang.String[] getTempAttachmentNames(long groupId, - java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName30, - _methodParameterTypes30, - new Object[] { - groupId, - - ClpSerializer.translateInput(tempFolderName) - }); - } - 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 (java.lang.String[])ClpSerializer.translateOutput(returnObj); - } - - @Override - public void moveKBArticle(long resourcePrimKey, - long parentResourceClassNameId, long parentResourcePrimKey, - double priority) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName31, - _methodParameterTypes31, - new Object[] { - resourcePrimKey, - - parentResourceClassNameId, - - parentResourcePrimKey, - - priority - }); - } - 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"); - } - } - } - - @Override - public void subscribeGroupKBArticles(long groupId, - java.lang.String portletId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName32, - _methodParameterTypes32, - new Object[] { groupId, 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"); - } - } - } - - @Override - public void subscribeKBArticle(long groupId, long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName33, - _methodParameterTypes33, - new Object[] { groupId, resourcePrimKey }); - } - 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"); - } - } - } - - @Override - public void unsubscribeGroupKBArticles(long groupId, - java.lang.String portletId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName34, - _methodParameterTypes34, - new Object[] { groupId, 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"); - } - } - } - - @Override - public void unsubscribeKBArticle(long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName35, - _methodParameterTypes35, new Object[] { resourcePrimKey }); - } - 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"); - } - } - } - - @Override - public com.liferay.knowledgebase.model.KBArticle updateKBArticle( - long resourcePrimKey, java.lang.String title, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - long[] removeFileEntryIds, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName36, - _methodParameterTypes36, - new Object[] { - resourcePrimKey, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(description), - - ClpSerializer.translateInput(sourceURL), - - ClpSerializer.translateInput(sections), - - ClpSerializer.translateInput(selectedFileNames), - - ClpSerializer.translateInput(removeFileEntryIds), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBArticle)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void updateKBArticlesPriorities(long groupId, - java.util.Map resourcePrimKeyToPriorityMap) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName37, - _methodParameterTypes37, - new Object[] { - groupId, - - ClpSerializer.translateInput(resourcePrimKeyToPriorityMap) - }); - } - 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"); - } - } - } - - private InvokableService _invokableService; - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - 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 _methodName18; - private String[] _methodParameterTypes18; - 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; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; - private String _methodName27; - private String[] _methodParameterTypes27; - private String _methodName28; - private String[] _methodParameterTypes28; - private String _methodName29; - private String[] _methodParameterTypes29; - private String _methodName30; - private String[] _methodParameterTypes30; - private String _methodName31; - private String[] _methodParameterTypes31; - private String _methodName32; - private String[] _methodParameterTypes32; - private String _methodName33; - private String[] _methodParameterTypes33; - private String _methodName34; - private String[] _methodParameterTypes34; - private String _methodName35; - private String[] _methodParameterTypes35; - private String _methodName36; - private String[] _methodParameterTypes36; - private String _methodName37; - private String[] _methodParameterTypes37; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleServiceUtil.java deleted file mode 100644 index 255d1f7142..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleServiceUtil.java +++ /dev/null @@ -1,411 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBArticle. This utility wraps - * {@link com.liferay.knowledgebase.service.impl.KBArticleServiceImpl} 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 Brian Wing Shun Chan - * @see KBArticleService - * @see com.liferay.knowledgebase.service.base.KBArticleServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBArticleServiceImpl - * @generated - */ -public class KBArticleServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBArticleServiceImpl} 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 com.liferay.knowledgebase.model.KBArticle addKBArticle( - java.lang.String portletId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String title, - java.lang.String urlTitle, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addKBArticle(portletId, parentResourceClassNameId, - parentResourcePrimKey, title, urlTitle, content, description, - sourceURL, sections, selectedFileNames, serviceContext); - } - - public static int addKBArticlesMarkdown(long groupId, - long parentKBFolderId, java.lang.String fileName, - boolean prioritizeByNumericalPrefix, java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addKBArticlesMarkdown(groupId, parentKBFolderId, fileName, - prioritizeByNumericalPrefix, inputStream, serviceContext); - } - - public static void addTempAttachment(long groupId, long resourcePrimKey, - java.lang.String fileName, java.lang.String tempFolderName, - java.io.InputStream inputStream, java.lang.String mimeType) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .addTempAttachment(groupId, resourcePrimKey, fileName, - tempFolderName, inputStream, mimeType); - } - - public static com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBArticle(resourcePrimKey); - } - - public static void deleteKBArticles(long groupId, long[] resourcePrimKeys) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteKBArticles(groupId, resourcePrimKeys); - } - - public static void deleteTempAttachment(long groupId, long resourcePrimKey, - java.lang.String fileName, java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .deleteTempAttachment(groupId, resourcePrimKey, fileName, - tempFolderName); - } - - public static com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().fetchLatestKBArticle(resourcePrimKey, status); - } - - public static java.util.List getGroupKBArticles( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getGroupKBArticles(groupId, status, start, end, - orderByComparator); - } - - public static int getGroupKBArticlesCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getGroupKBArticlesCount(groupId, status); - } - - public static java.lang.String getGroupKBArticlesRSS(int status, - int rssDelta, java.lang.String rssDisplayStyle, - java.lang.String rssFormat, - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getGroupKBArticlesRSS(status, rssDelta, rssDisplayStyle, - rssFormat, themeDisplay); - } - - public static com.liferay.knowledgebase.model.KBArticle getKBArticle( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticle(resourcePrimKey, version); - } - - public static java.util.List getKBArticleAndAllDescendantKBArticles( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticleAndAllDescendantKBArticles(groupId, - resourcePrimKey, status, orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by - {@link #getKBArticleAndAllDescendantKBArticles(long, long, - int, com.liferay.portal.kernel.util.OrderByComparator)} - */ - public static java.util.List getKBArticleAndAllDescendants( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticleAndAllDescendants(groupId, resourcePrimKey, - status, orderByComparator); - } - - public static java.lang.String getKBArticleRSS(long resourcePrimKey, - int status, int rssDelta, java.lang.String rssDisplayStyle, - java.lang.String rssFormat, - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticleRSS(resourcePrimKey, status, rssDelta, - rssDisplayStyle, rssFormat, themeDisplay); - } - - public static java.util.List getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticles(groupId, parentResourcePrimKey, status, - start, end, orderByComparator); - } - - public static java.util.List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticles(groupId, resourcePrimKeys, status, start, - end, orderByComparator); - } - - public static java.util.List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticles(groupId, resourcePrimKeys, status, - orderByComparator); - } - - public static int getKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticlesCount(groupId, parentResourcePrimKey, status); - } - - public static int getKBArticlesCount(long groupId, long[] resourcePrimKeys, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBArticlesCount(groupId, resourcePrimKeys, status); - } - - public static com.liferay.knowledgebase.model.KBArticleSearchDisplay getKBArticleSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - int status, java.util.Date startDate, java.util.Date endDate, - boolean andOperator, int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticleSearchDisplay(groupId, title, content, status, - startDate, endDate, andOperator, curStartValues, cur, delta, - orderByComparator); - } - - public static java.util.List getKBArticleVersions( - long groupId, long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticleVersions(groupId, resourcePrimKey, status, - start, end, orderByComparator); - } - - public static int getKBArticleVersionsCount(long groupId, - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBArticleVersionsCount(groupId, resourcePrimKey, status); - } - - public static com.liferay.knowledgebase.model.KBArticle getLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getLatestKBArticle(resourcePrimKey, status); - } - - public static java.util.List getSectionsKBArticles( - long groupId, java.lang.String[] sections, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getSectionsKBArticles(groupId, sections, status, start, - end, orderByComparator); - } - - public static int getSectionsKBArticlesCount(long groupId, - java.lang.String[] sections, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getSectionsKBArticlesCount(groupId, sections, status); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, - int, int, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - public static java.util.List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getSiblingKBArticles(groupId, parentResourcePrimKey, - status, start, end, orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, - long, int)} - */ - public static int getSiblingKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getSiblingKBArticlesCount(groupId, parentResourcePrimKey, - status); - } - - public static java.lang.String[] getTempAttachmentNames(long groupId, - java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getTempAttachmentNames(groupId, tempFolderName); - } - - public static void moveKBArticle(long resourcePrimKey, - long parentResourceClassNameId, long parentResourcePrimKey, - double priority) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .moveKBArticle(resourcePrimKey, parentResourceClassNameId, - parentResourcePrimKey, priority); - } - - public static void subscribeGroupKBArticles(long groupId, - java.lang.String portletId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().subscribeGroupKBArticles(groupId, portletId); - } - - public static void subscribeKBArticle(long groupId, long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().subscribeKBArticle(groupId, resourcePrimKey); - } - - public static void unsubscribeGroupKBArticles(long groupId, - java.lang.String portletId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().unsubscribeGroupKBArticles(groupId, portletId); - } - - public static void unsubscribeKBArticle(long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().unsubscribeKBArticle(resourcePrimKey); - } - - public static com.liferay.knowledgebase.model.KBArticle updateKBArticle( - long resourcePrimKey, java.lang.String title, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - long[] removeFileEntryIds, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBArticle(resourcePrimKey, title, content, - description, sourceURL, sections, selectedFileNames, - removeFileEntryIds, serviceContext); - } - - public static void updateKBArticlesPriorities(long groupId, - java.util.Map resourcePrimKeyToPriorityMap) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .updateKBArticlesPriorities(groupId, resourcePrimKeyToPriorityMap); - } - - public static void clearService() { - _service = null; - } - - public static KBArticleService getService() { - if (_service == null) { - InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - KBArticleService.class.getName()); - - if (invokableService instanceof KBArticleService) { - _service = (KBArticleService)invokableService; - } - else { - _service = new KBArticleServiceClp(invokableService); - } - - ReferenceRegistry.registerReference(KBArticleServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(KBArticleService service) { - } - - private static KBArticleService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleServiceWrapper.java deleted file mode 100644 index acd2a30b7e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBArticleServiceWrapper.java +++ /dev/null @@ -1,416 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link KBArticleService}. - * - * @author Brian Wing Shun Chan - * @see KBArticleService - * @generated - */ -public class KBArticleServiceWrapper implements KBArticleService, - ServiceWrapper { - public KBArticleServiceWrapper(KBArticleService kbArticleService) { - _kbArticleService = kbArticleService; - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _kbArticleService.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) { - _kbArticleService.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 _kbArticleService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle addKBArticle( - java.lang.String portletId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String title, - java.lang.String urlTitle, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.addKBArticle(portletId, - parentResourceClassNameId, parentResourcePrimKey, title, urlTitle, - content, description, sourceURL, sections, selectedFileNames, - serviceContext); - } - - @Override - public int addKBArticlesMarkdown(long groupId, long parentKBFolderId, - java.lang.String fileName, boolean prioritizeByNumericalPrefix, - java.io.InputStream inputStream, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.addKBArticlesMarkdown(groupId, - parentKBFolderId, fileName, prioritizeByNumericalPrefix, - inputStream, serviceContext); - } - - @Override - public void addTempAttachment(long groupId, long resourcePrimKey, - java.lang.String fileName, java.lang.String tempFolderName, - java.io.InputStream inputStream, java.lang.String mimeType) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleService.addTempAttachment(groupId, resourcePrimKey, fileName, - tempFolderName, inputStream, mimeType); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle deleteKBArticle( - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.deleteKBArticle(resourcePrimKey); - } - - @Override - public void deleteKBArticles(long groupId, long[] resourcePrimKeys) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleService.deleteKBArticles(groupId, resourcePrimKeys); - } - - @Override - public void deleteTempAttachment(long groupId, long resourcePrimKey, - java.lang.String fileName, java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleService.deleteTempAttachment(groupId, resourcePrimKey, - fileName, tempFolderName); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle fetchLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.fetchLatestKBArticle(resourcePrimKey, status); - } - - @Override - public java.util.List getGroupKBArticles( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getGroupKBArticles(groupId, status, start, - end, orderByComparator); - } - - @Override - public int getGroupKBArticlesCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getGroupKBArticlesCount(groupId, status); - } - - @Override - public java.lang.String getGroupKBArticlesRSS(int status, int rssDelta, - java.lang.String rssDisplayStyle, java.lang.String rssFormat, - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getGroupKBArticlesRSS(status, rssDelta, - rssDisplayStyle, rssFormat, themeDisplay); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getKBArticle( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticle(resourcePrimKey, version); - } - - @Override - public java.util.List getKBArticleAndAllDescendantKBArticles( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticleAndAllDescendantKBArticles(groupId, - resourcePrimKey, status, orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by - {@link #getKBArticleAndAllDescendantKBArticles(long, long, - int, com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Override - public java.util.List getKBArticleAndAllDescendants( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticleAndAllDescendants(groupId, - resourcePrimKey, status, orderByComparator); - } - - @Override - public java.lang.String getKBArticleRSS(long resourcePrimKey, int status, - int rssDelta, java.lang.String rssDisplayStyle, - java.lang.String rssFormat, - com.liferay.portal.theme.ThemeDisplay themeDisplay) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticleRSS(resourcePrimKey, status, - rssDelta, rssDisplayStyle, rssFormat, themeDisplay); - } - - @Override - public java.util.List getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticles(groupId, parentResourcePrimKey, - status, start, end, orderByComparator); - } - - @Override - public java.util.List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticles(groupId, resourcePrimKeys, - status, start, end, orderByComparator); - } - - @Override - public java.util.List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticles(groupId, resourcePrimKeys, - status, orderByComparator); - } - - @Override - public int getKBArticlesCount(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticlesCount(groupId, - parentResourcePrimKey, status); - } - - @Override - public int getKBArticlesCount(long groupId, long[] resourcePrimKeys, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticlesCount(groupId, resourcePrimKeys, - status); - } - - @Override - public com.liferay.knowledgebase.model.KBArticleSearchDisplay getKBArticleSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - int status, java.util.Date startDate, java.util.Date endDate, - boolean andOperator, int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticleSearchDisplay(groupId, title, - content, status, startDate, endDate, andOperator, curStartValues, - cur, delta, orderByComparator); - } - - @Override - public java.util.List getKBArticleVersions( - long groupId, long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticleVersions(groupId, resourcePrimKey, - status, start, end, orderByComparator); - } - - @Override - public int getKBArticleVersionsCount(long groupId, long resourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getKBArticleVersionsCount(groupId, - resourcePrimKey, status); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle getLatestKBArticle( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getLatestKBArticle(resourcePrimKey, status); - } - - @Override - public java.util.List getSectionsKBArticles( - long groupId, java.lang.String[] sections, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getSectionsKBArticles(groupId, sections, - status, start, end, orderByComparator); - } - - @Override - public int getSectionsKBArticlesCount(long groupId, - java.lang.String[] sections, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getSectionsKBArticlesCount(groupId, sections, - status); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, - int, int, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Override - public java.util.List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getSiblingKBArticles(groupId, - parentResourcePrimKey, status, start, end, orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, - long, int)} - */ - @Override - public int getSiblingKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getSiblingKBArticlesCount(groupId, - parentResourcePrimKey, status); - } - - @Override - public java.lang.String[] getTempAttachmentNames(long groupId, - java.lang.String tempFolderName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.getTempAttachmentNames(groupId, tempFolderName); - } - - @Override - public void moveKBArticle(long resourcePrimKey, - long parentResourceClassNameId, long parentResourcePrimKey, - double priority) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleService.moveKBArticle(resourcePrimKey, - parentResourceClassNameId, parentResourcePrimKey, priority); - } - - @Override - public void subscribeGroupKBArticles(long groupId, - java.lang.String portletId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleService.subscribeGroupKBArticles(groupId, portletId); - } - - @Override - public void subscribeKBArticle(long groupId, long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleService.subscribeKBArticle(groupId, resourcePrimKey); - } - - @Override - public void unsubscribeGroupKBArticles(long groupId, - java.lang.String portletId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleService.unsubscribeGroupKBArticles(groupId, portletId); - } - - @Override - public void unsubscribeKBArticle(long resourcePrimKey) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleService.unsubscribeKBArticle(resourcePrimKey); - } - - @Override - public com.liferay.knowledgebase.model.KBArticle updateKBArticle( - long resourcePrimKey, java.lang.String title, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - long[] removeFileEntryIds, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbArticleService.updateKBArticle(resourcePrimKey, title, - content, description, sourceURL, sections, selectedFileNames, - removeFileEntryIds, serviceContext); - } - - @Override - public void updateKBArticlesPriorities(long groupId, - java.util.Map resourcePrimKeyToPriorityMap) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbArticleService.updateKBArticlesPriorities(groupId, - resourcePrimKeyToPriorityMap); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public KBArticleService getWrappedKBArticleService() { - return _kbArticleService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedKBArticleService(KBArticleService kbArticleService) { - _kbArticleService = kbArticleService; - } - - @Override - public KBArticleService getWrappedService() { - return _kbArticleService; - } - - @Override - public void setWrappedService(KBArticleService kbArticleService) { - _kbArticleService = kbArticleService; - } - - private KBArticleService _kbArticleService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalService.java deleted file mode 100644 index 88030c7577..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalService.java +++ /dev/null @@ -1,406 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBComment. 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 Brian Wing Shun Chan - * @see KBCommentLocalServiceUtil - * @see com.liferay.knowledgebase.service.base.KBCommentLocalServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBCommentLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface KBCommentLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBCommentLocalServiceUtil} to access the k b comment local service. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBCommentLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the k b comment to the database. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was added - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public com.liferay.knowledgebase.model.KBComment addKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new k b comment with the primary key. Does not add the k b comment to the database. - * - * @param kbCommentId the primary key for the new k b comment - * @return the new k b comment - */ - public com.liferay.knowledgebase.model.KBComment createKBComment( - long kbCommentId); - - /** - * Deletes the k b comment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment that was removed - * @throws PortalException if a k b 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 com.liferay.knowledgebase.model.KBComment deleteKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the k b comment from the database. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.PortalException, - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.knowledgebase.model.KBComment fetchKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comment with the matching UUID and company. - * - * @param uuid the k b comment's UUID - * @param companyId the primary key of the company - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBComment fetchKBCommentByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comment matching the UUID and group. - * - * @param uuid the k b comment's UUID - * @param groupId the primary key of the group - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBComment fetchKBCommentByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comment with the primary key. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment - * @throws PortalException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBComment getKBComment( - long kbCommentId) - 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 the k b comment with the matching UUID and company. - * - * @param uuid the k b comment's UUID - * @param companyId the primary key of the company - * @return the matching k b comment - * @throws PortalException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBComment getKBCommentByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comment matching the UUID and group. - * - * @param uuid the k b comment's UUID - * @param groupId the primary key of the group - * @return the matching k b comment - * @throws PortalException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBComment getKBCommentByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of k b comments - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBComments( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments. - * - * @return the number of k b comments - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBCommentsCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the k b comment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was updated - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public com.liferay.knowledgebase.model.KBComment updateKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - 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 com.liferay.knowledgebase.model.KBComment addKBComment(long userId, - long classNameId, long classPK, java.lang.String content, - int userRating, com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBComment addKBComment(long userId, - long classNameId, long classPK, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteKBComments(java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBComment getKBComment(long userId, - java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBComments( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBComments( - long userId, java.lang.String className, long classPK, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBComments( - java.lang.String className, long classPK, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBComments( - java.lang.String className, long classPK, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBComments( - java.lang.String className, long classPK, int[] status, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBCommentsCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBCommentsCount(long userId, java.lang.String className, - long classPK) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBCommentsCount(java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBCommentsCount(java.lang.String className, long classPK, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBCommentsCount(java.lang.String className, long classPK, - int[] status) - throws com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int userRating, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBComment updateStatus( - long kbCommentId, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalServiceClp.java deleted file mode 100644 index 024768458f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalServiceClp.java +++ /dev/null @@ -1,1666 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBCommentLocalServiceClp implements KBCommentLocalService { - public KBCommentLocalServiceClp(InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addKBComment"; - - _methodParameterTypes0 = new String[] { - "com.liferay.knowledgebase.model.KBComment" - }; - - _methodName1 = "createKBComment"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteKBComment"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteKBComment"; - - _methodParameterTypes3 = new String[] { - "com.liferay.knowledgebase.model.KBComment" - }; - - _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 = "fetchKBComment"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchKBCommentByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchKBCommentByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getKBComment"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getKBCommentByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getKBCommentByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getKBComments"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getKBCommentsCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateKBComment"; - - _methodParameterTypes19 = new String[] { - "com.liferay.knowledgebase.model.KBComment" - }; - - _methodName20 = "getBeanIdentifier"; - - _methodParameterTypes20 = new String[] { }; - - _methodName21 = "setBeanIdentifier"; - - _methodParameterTypes21 = new String[] { "java.lang.String" }; - - _methodName23 = "addKBComment"; - - _methodParameterTypes23 = new String[] { - "long", "long", "long", "java.lang.String", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName24 = "addKBComment"; - - _methodParameterTypes24 = new String[] { - "long", "long", "long", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName25 = "deleteKBComments"; - - _methodParameterTypes25 = new String[] { "java.lang.String", "long" }; - - _methodName26 = "getKBComment"; - - _methodParameterTypes26 = new String[] { - "long", "java.lang.String", "long" - }; - - _methodName27 = "getKBComments"; - - _methodParameterTypes27 = new String[] { "long", "int", "int", "int" }; - - _methodName28 = "getKBComments"; - - _methodParameterTypes28 = new String[] { - "long", "java.lang.String", "long", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName29 = "getKBComments"; - - _methodParameterTypes29 = new String[] { - "java.lang.String", "long", "int", "int", "int" - }; - - _methodName30 = "getKBComments"; - - _methodParameterTypes30 = new String[] { - "java.lang.String", "long", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName31 = "getKBComments"; - - _methodParameterTypes31 = new String[] { - "java.lang.String", "long", "int[][]", "int", "int" - }; - - _methodName32 = "getKBCommentsCount"; - - _methodParameterTypes32 = new String[] { "long", "int" }; - - _methodName33 = "getKBCommentsCount"; - - _methodParameterTypes33 = new String[] { - "long", "java.lang.String", "long" - }; - - _methodName34 = "getKBCommentsCount"; - - _methodParameterTypes34 = new String[] { "java.lang.String", "long" }; - - _methodName35 = "getKBCommentsCount"; - - _methodParameterTypes35 = new String[] { "java.lang.String", "long", "int" }; - - _methodName36 = "getKBCommentsCount"; - - _methodParameterTypes36 = new String[] { - "java.lang.String", "long", "int[][]" - }; - - _methodName37 = "updateKBComment"; - - _methodParameterTypes37 = new String[] { - "long", "long", "long", "java.lang.String", "int", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName38 = "updateKBComment"; - - _methodParameterTypes38 = new String[] { - "long", "long", "long", "java.lang.String", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName39 = "updateStatus"; - - _methodParameterTypes39 = new String[] { - "long", "int", "com.liferay.portal.service.ServiceContext" - }; - } - - @Override - public com.liferay.knowledgebase.model.KBComment addKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(kbComment) }); - } - 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 (com.liferay.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment createKBComment( - long kbCommentId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { kbCommentId }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { kbCommentId }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(kbComment) }); - } - 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.knowledgebase.model.KBComment)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 com.liferay.knowledgebase.model.KBComment fetchKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { kbCommentId }); - } - 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 (com.liferay.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment fetchKBCommentByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { ClpSerializer.translateInput(uuid), 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 (com.liferay.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment fetchKBCommentByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (com.liferay.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment getKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName13, - _methodParameterTypes13, new Object[] { kbCommentId }); - } - 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.knowledgebase.model.KBComment)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(_methodName14, - _methodParameterTypes14, - 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 com.liferay.knowledgebase.model.KBComment getKBCommentByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { ClpSerializer.translateInput(uuid), companyId }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment getKBCommentByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName16, - _methodParameterTypes16, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBComments( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName17, - _methodParameterTypes17, 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getKBCommentsCount() - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName18, - _methodParameterTypes18, 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 com.liferay.knowledgebase.model.KBComment updateKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { ClpSerializer.translateInput(kbComment) }); - } - 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 (com.liferay.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.lang.String getBeanIdentifier() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName20, - _methodParameterTypes20, 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(_methodName21, - _methodParameterTypes21, - 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 com.liferay.knowledgebase.model.KBComment addKBComment(long userId, - long classNameId, long classPK, java.lang.String content, - int userRating, com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { - userId, - - classNameId, - - classPK, - - ClpSerializer.translateInput(content), - - userRating, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment addKBComment(long userId, - long classNameId, long classPK, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, - new Object[] { - userId, - - classNameId, - - classPK, - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void deleteKBComments(java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { ClpSerializer.translateInput(className), classPK }); - } - 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"); - } - } - } - - @Override - public com.liferay.knowledgebase.model.KBComment getKBComment(long userId, - java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName26, - _methodParameterTypes26, - new Object[] { - userId, - - ClpSerializer.translateInput(className), - - classPK - }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBComments( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName27, - _methodParameterTypes27, - new Object[] { groupId, status, 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 - public java.util.List getKBComments( - long userId, java.lang.String className, long classPK, 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(_methodName28, - _methodParameterTypes28, - new Object[] { - userId, - - ClpSerializer.translateInput(className), - - classPK, - - 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 java.util.List getKBComments( - java.lang.String className, long classPK, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName29, - _methodParameterTypes29, - new Object[] { - ClpSerializer.translateInput(className), - - classPK, - - status, - - 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 - public java.util.List getKBComments( - java.lang.String className, long classPK, 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(_methodName30, - _methodParameterTypes30, - new Object[] { - ClpSerializer.translateInput(className), - - classPK, - - 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 java.util.List getKBComments( - java.lang.String className, long classPK, int[] status, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName31, - _methodParameterTypes31, - new Object[] { - ClpSerializer.translateInput(className), - - classPK, - - ClpSerializer.translateInput(status), - - 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 - public int getKBCommentsCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName32, - _methodParameterTypes32, new Object[] { groupId, status }); - } - 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 int getKBCommentsCount(long userId, java.lang.String className, - long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName33, - _methodParameterTypes33, - new Object[] { - userId, - - ClpSerializer.translateInput(className), - - classPK - }); - } - 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 int getKBCommentsCount(java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName34, - _methodParameterTypes34, - new Object[] { - ClpSerializer.translateInput(className), - - classPK - }); - } - 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 int getKBCommentsCount(java.lang.String className, long classPK, - int status) throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName35, - _methodParameterTypes35, - new Object[] { - ClpSerializer.translateInput(className), - - classPK, - - status - }); - } - 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 int getKBCommentsCount(java.lang.String className, long classPK, - int[] status) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName36, - _methodParameterTypes36, - new Object[] { - ClpSerializer.translateInput(className), - - classPK, - - ClpSerializer.translateInput(status) - }); - } - 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 com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int userRating, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName37, - _methodParameterTypes37, - new Object[] { - kbCommentId, - - classNameId, - - classPK, - - ClpSerializer.translateInput(content), - - userRating, - - status, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName38, - _methodParameterTypes38, - new Object[] { - kbCommentId, - - classNameId, - - classPK, - - ClpSerializer.translateInput(content), - - status, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateStatus( - long kbCommentId, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName39, - _methodParameterTypes39, - new Object[] { - kbCommentId, - - status, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBComment)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 _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName20; - private String[] _methodParameterTypes20; - private String _methodName21; - private String[] _methodParameterTypes21; - private String _methodName23; - private String[] _methodParameterTypes23; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; - private String _methodName27; - private String[] _methodParameterTypes27; - private String _methodName28; - private String[] _methodParameterTypes28; - private String _methodName29; - private String[] _methodParameterTypes29; - private String _methodName30; - private String[] _methodParameterTypes30; - private String _methodName31; - private String[] _methodParameterTypes31; - private String _methodName32; - private String[] _methodParameterTypes32; - private String _methodName33; - private String[] _methodParameterTypes33; - private String _methodName34; - private String[] _methodParameterTypes34; - private String _methodName35; - private String[] _methodParameterTypes35; - private String _methodName36; - private String[] _methodParameterTypes36; - private String _methodName37; - private String[] _methodParameterTypes37; - private String _methodName38; - private String[] _methodParameterTypes38; - private String _methodName39; - private String[] _methodParameterTypes39; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalServiceUtil.java deleted file mode 100644 index b1f7466a6c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalServiceUtil.java +++ /dev/null @@ -1,499 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBComment. This utility wraps - * {@link com.liferay.knowledgebase.service.impl.KBCommentLocalServiceImpl} 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 Brian Wing Shun Chan - * @see KBCommentLocalService - * @see com.liferay.knowledgebase.service.base.KBCommentLocalServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBCommentLocalServiceImpl - * @generated - */ -public class KBCommentLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBCommentLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the k b comment to the database. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was added - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment addKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addKBComment(kbComment); - } - - /** - * Creates a new k b comment with the primary key. Does not add the k b comment to the database. - * - * @param kbCommentId the primary key for the new k b comment - * @return the new k b comment - */ - public static com.liferay.knowledgebase.model.KBComment createKBComment( - long kbCommentId) { - return getService().createKBComment(kbCommentId); - } - - /** - * Deletes the k b comment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment that was removed - * @throws PortalException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment deleteKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBComment(kbCommentId); - } - - /** - * Deletes the k b comment from the database. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment deleteKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBComment(kbComment); - } - - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.knowledgebase.model.KBComment fetchKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBComment(kbCommentId); - } - - /** - * Returns the k b comment with the matching UUID and company. - * - * @param uuid the k b comment's UUID - * @param companyId the primary key of the company - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchKBCommentByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBCommentByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the k b comment matching the UUID and group. - * - * @param uuid the k b comment's UUID - * @param groupId the primary key of the group - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchKBCommentByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBCommentByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the k b comment with the primary key. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment - * @throws PortalException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment getKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBComment(kbCommentId); - } - - 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 the k b comment with the matching UUID and company. - * - * @param uuid the k b comment's UUID - * @param companyId the primary key of the company - * @return the matching k b comment - * @throws PortalException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment getKBCommentByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBCommentByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the k b comment matching the UUID and group. - * - * @param uuid the k b comment's UUID - * @param groupId the primary key of the group - * @return the matching k b comment - * @throws PortalException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment getKBCommentByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBCommentByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List getKBComments( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBComments(start, end); - } - - /** - * Returns the number of k b comments. - * - * @return the number of k b comments - * @throws SystemException if a system exception occurred - */ - public static int getKBCommentsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBCommentsCount(); - } - - /** - * Updates the k b comment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was updated - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment updateKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateKBComment(kbComment); - } - - /** - * 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 com.liferay.knowledgebase.model.KBComment addKBComment( - long userId, long classNameId, long classPK, java.lang.String content, - int userRating, com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addKBComment(userId, classNameId, classPK, content, - userRating, serviceContext); - } - - public static com.liferay.knowledgebase.model.KBComment addKBComment( - long userId, long classNameId, long classPK, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addKBComment(userId, classNameId, classPK, content, - serviceContext); - } - - public static void deleteKBComments(java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteKBComments(className, classPK); - } - - public static com.liferay.knowledgebase.model.KBComment getKBComment( - long userId, java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBComment(userId, className, classPK); - } - - public static java.util.List getKBComments( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBComments(groupId, status, start, end); - } - - public static java.util.List getKBComments( - long userId, java.lang.String className, long classPK, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBComments(userId, className, classPK, start, end, - orderByComparator); - } - - public static java.util.List getKBComments( - java.lang.String className, long classPK, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBComments(className, classPK, status, start, end); - } - - public static java.util.List getKBComments( - java.lang.String className, long classPK, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBComments(className, classPK, start, end, - orderByComparator); - } - - public static java.util.List getKBComments( - java.lang.String className, long classPK, int[] status, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBComments(className, classPK, status, start, end); - } - - public static int getKBCommentsCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBCommentsCount(groupId, status); - } - - public static int getKBCommentsCount(long userId, - java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBCommentsCount(userId, className, classPK); - } - - public static int getKBCommentsCount(java.lang.String className, - long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBCommentsCount(className, classPK); - } - - public static int getKBCommentsCount(java.lang.String className, - long classPK, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBCommentsCount(className, classPK, status); - } - - public static int getKBCommentsCount(java.lang.String className, - long classPK, int[] status) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBCommentsCount(className, classPK, status); - } - - public static com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int userRating, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBComment(kbCommentId, classNameId, classPK, content, - userRating, status, serviceContext); - } - - public static com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBComment(kbCommentId, classNameId, classPK, content, - status, serviceContext); - } - - public static com.liferay.knowledgebase.model.KBComment updateStatus( - long kbCommentId, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().updateStatus(kbCommentId, status, serviceContext); - } - - public static void clearService() { - _service = null; - } - - public static KBCommentLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - KBCommentLocalService.class.getName()); - - if (invokableLocalService instanceof KBCommentLocalService) { - _service = (KBCommentLocalService)invokableLocalService; - } - else { - _service = new KBCommentLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(KBCommentLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(KBCommentLocalService service) { - } - - private static KBCommentLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalServiceWrapper.java deleted file mode 100644 index 674da042b5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentLocalServiceWrapper.java +++ /dev/null @@ -1,528 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link KBCommentLocalService}. - * - * @author Brian Wing Shun Chan - * @see KBCommentLocalService - * @generated - */ -public class KBCommentLocalServiceWrapper implements KBCommentLocalService, - ServiceWrapper { - public KBCommentLocalServiceWrapper( - KBCommentLocalService kbCommentLocalService) { - _kbCommentLocalService = kbCommentLocalService; - } - - /** - * Adds the k b comment to the database. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was added - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBComment addKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.addKBComment(kbComment); - } - - /** - * Creates a new k b comment with the primary key. Does not add the k b comment to the database. - * - * @param kbCommentId the primary key for the new k b comment - * @return the new k b comment - */ - @Override - public com.liferay.knowledgebase.model.KBComment createKBComment( - long kbCommentId) { - return _kbCommentLocalService.createKBComment(kbCommentId); - } - - /** - * Deletes the k b comment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment that was removed - * @throws PortalException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.deleteKBComment(kbCommentId); - } - - /** - * Deletes the k b comment from the database. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.deleteKBComment(kbComment); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _kbCommentLocalService.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 _kbCommentLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @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 _kbCommentLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 _kbCommentLocalService.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 _kbCommentLocalService.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 _kbCommentLocalService.dynamicQueryCount(dynamicQuery, projection); - } - - @Override - public com.liferay.knowledgebase.model.KBComment fetchKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.fetchKBComment(kbCommentId); - } - - /** - * Returns the k b comment with the matching UUID and company. - * - * @param uuid the k b comment's UUID - * @param companyId the primary key of the company - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBComment fetchKBCommentByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.fetchKBCommentByUuidAndCompanyId(uuid, - companyId); - } - - /** - * Returns the k b comment matching the UUID and group. - * - * @param uuid the k b comment's UUID - * @param groupId the primary key of the group - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBComment fetchKBCommentByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.fetchKBCommentByUuidAndGroupId(uuid, - groupId); - } - - /** - * Returns the k b comment with the primary key. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment - * @throws PortalException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBComment getKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBComment(kbCommentId); - } - - @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 _kbCommentLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns the k b comment with the matching UUID and company. - * - * @param uuid the k b comment's UUID - * @param companyId the primary key of the company - * @return the matching k b comment - * @throws PortalException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBComment getKBCommentByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBCommentByUuidAndCompanyId(uuid, - companyId); - } - - /** - * Returns the k b comment matching the UUID and group. - * - * @param uuid the k b comment's UUID - * @param groupId the primary key of the group - * @return the matching k b comment - * @throws PortalException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBComment getKBCommentByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBCommentByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getKBComments( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBComments(start, end); - } - - /** - * Returns the number of k b comments. - * - * @return the number of k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int getKBCommentsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBCommentsCount(); - } - - /** - * Updates the k b comment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBComment updateKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.updateKBComment(kbComment); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _kbCommentLocalService.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) { - _kbCommentLocalService.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 _kbCommentLocalService.invokeMethod(name, parameterTypes, - arguments); - } - - @Override - public com.liferay.knowledgebase.model.KBComment addKBComment(long userId, - long classNameId, long classPK, java.lang.String content, - int userRating, com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.addKBComment(userId, classNameId, - classPK, content, userRating, serviceContext); - } - - @Override - public com.liferay.knowledgebase.model.KBComment addKBComment(long userId, - long classNameId, long classPK, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.addKBComment(userId, classNameId, - classPK, content, serviceContext); - } - - @Override - public void deleteKBComments(java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbCommentLocalService.deleteKBComments(className, classPK); - } - - @Override - public com.liferay.knowledgebase.model.KBComment getKBComment(long userId, - java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBComment(userId, className, classPK); - } - - @Override - public java.util.List getKBComments( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBComments(groupId, status, start, end); - } - - @Override - public java.util.List getKBComments( - long userId, java.lang.String className, long classPK, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBComments(userId, className, classPK, - start, end, orderByComparator); - } - - @Override - public java.util.List getKBComments( - java.lang.String className, long classPK, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBComments(className, classPK, status, - start, end); - } - - @Override - public java.util.List getKBComments( - java.lang.String className, long classPK, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBComments(className, classPK, start, - end, orderByComparator); - } - - @Override - public java.util.List getKBComments( - java.lang.String className, long classPK, int[] status, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBComments(className, classPK, status, - start, end); - } - - @Override - public int getKBCommentsCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBCommentsCount(groupId, status); - } - - @Override - public int getKBCommentsCount(long userId, java.lang.String className, - long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBCommentsCount(userId, className, - classPK); - } - - @Override - public int getKBCommentsCount(java.lang.String className, long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBCommentsCount(className, classPK); - } - - @Override - public int getKBCommentsCount(java.lang.String className, long classPK, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBCommentsCount(className, classPK, - status); - } - - @Override - public int getKBCommentsCount(java.lang.String className, long classPK, - int[] status) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.getKBCommentsCount(className, classPK, - status); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int userRating, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.updateKBComment(kbCommentId, classNameId, - classPK, content, userRating, status, serviceContext); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.updateKBComment(kbCommentId, classNameId, - classPK, content, status, serviceContext); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateStatus( - long kbCommentId, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentLocalService.updateStatus(kbCommentId, status, - serviceContext); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public KBCommentLocalService getWrappedKBCommentLocalService() { - return _kbCommentLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedKBCommentLocalService( - KBCommentLocalService kbCommentLocalService) { - _kbCommentLocalService = kbCommentLocalService; - } - - @Override - public KBCommentLocalService getWrappedService() { - return _kbCommentLocalService; - } - - @Override - public void setWrappedService(KBCommentLocalService kbCommentLocalService) { - _kbCommentLocalService = kbCommentLocalService; - } - - private KBCommentLocalService _kbCommentLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentService.java deleted file mode 100644 index b988199afa..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentService.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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.Propagation; -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 KBComment. Methods of this - * service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. - * - * @author Brian Wing Shun Chan - * @see KBCommentServiceUtil - * @see com.liferay.knowledgebase.service.base.KBCommentServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBCommentServiceImpl - * @generated - */ -@AccessControlled -@JSONWebService -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface KBCommentService extends BaseService, InvokableService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBCommentServiceUtil} to access the k b comment remote service. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBCommentServiceImpl} 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; - - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBComment getKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBComments( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBComments( - long groupId, java.lang.String className, long classPK, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBCommentsCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBCommentsCount(long groupId, java.lang.String className, - long classPK, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBComment updateStatus( - long kbCommentId, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentServiceClp.java deleted file mode 100644 index 9a8059919d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentServiceClp.java +++ /dev/null @@ -1,565 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.InvokableService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBCommentServiceClp implements KBCommentService { - public KBCommentServiceClp(InvokableService invokableService) { - _invokableService = invokableService; - - _methodName0 = "getBeanIdentifier"; - - _methodParameterTypes0 = new String[] { }; - - _methodName1 = "setBeanIdentifier"; - - _methodParameterTypes1 = new String[] { "java.lang.String" }; - - _methodName3 = "deleteKBComment"; - - _methodParameterTypes3 = new String[] { - "com.liferay.knowledgebase.model.KBComment" - }; - - _methodName4 = "deleteKBComment"; - - _methodParameterTypes4 = new String[] { "long" }; - - _methodName5 = "getKBComment"; - - _methodParameterTypes5 = new String[] { "long" }; - - _methodName6 = "getKBComments"; - - _methodParameterTypes6 = new String[] { "long", "int", "int", "int" }; - - _methodName7 = "getKBComments"; - - _methodParameterTypes7 = new String[] { - "long", "java.lang.String", "long", "int", "int", "int" - }; - - _methodName8 = "getKBCommentsCount"; - - _methodParameterTypes8 = new String[] { "long", "int" }; - - _methodName9 = "getKBCommentsCount"; - - _methodParameterTypes9 = new String[] { - "long", "java.lang.String", "long", "int" - }; - - _methodName10 = "updateKBComment"; - - _methodParameterTypes10 = new String[] { - "long", "long", "long", "java.lang.String", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName11 = "updateKBComment"; - - _methodParameterTypes11 = new String[] { - "long", "long", "long", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName12 = "updateStatus"; - - _methodParameterTypes12 = new String[] { - "long", "int", "com.liferay.portal.service.ServiceContext" - }; - } - - @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(); - } - - @Override - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(kbComment) }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName4, - _methodParameterTypes4, new Object[] { kbCommentId }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment getKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName5, - _methodParameterTypes5, new Object[] { kbCommentId }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBComments( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName6, - _methodParameterTypes6, - new Object[] { groupId, status, start, end }); - } - 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 (java.util.List)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBComments( - long groupId, java.lang.String className, long classPK, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName7, - _methodParameterTypes7, - new Object[] { - groupId, - - ClpSerializer.translateInput(className), - - classPK, - - status, - - start, - - end - }); - } - 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 (java.util.List)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getKBCommentsCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName8, - _methodParameterTypes8, new Object[] { groupId, status }); - } - 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 ((Integer)returnObj).intValue(); - } - - @Override - public int getKBCommentsCount(long groupId, java.lang.String className, - long classPK, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName9, - _methodParameterTypes9, - new Object[] { - groupId, - - ClpSerializer.translateInput(className), - - classPK, - - status - }); - } - 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 ((Integer)returnObj).intValue(); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName10, - _methodParameterTypes10, - new Object[] { - kbCommentId, - - classNameId, - - classPK, - - ClpSerializer.translateInput(content), - - status, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { - kbCommentId, - - classNameId, - - classPK, - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateStatus( - long kbCommentId, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { - kbCommentId, - - status, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBComment)ClpSerializer.translateOutput(returnObj); - } - - private InvokableService _invokableService; - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - 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; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentServiceUtil.java deleted file mode 100644 index e999b6224d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentServiceUtil.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBComment. This utility wraps - * {@link com.liferay.knowledgebase.service.impl.KBCommentServiceImpl} 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 Brian Wing Shun Chan - * @see KBCommentService - * @see com.liferay.knowledgebase.service.base.KBCommentServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBCommentServiceImpl - * @generated - */ -public class KBCommentServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBCommentServiceImpl} 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 com.liferay.knowledgebase.model.KBComment deleteKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBComment(kbComment); - } - - public static com.liferay.knowledgebase.model.KBComment deleteKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBComment(kbCommentId); - } - - public static com.liferay.knowledgebase.model.KBComment getKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBComment(kbCommentId); - } - - public static java.util.List getKBComments( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBComments(groupId, status, start, end); - } - - public static java.util.List getKBComments( - long groupId, java.lang.String className, long classPK, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBComments(groupId, className, classPK, status, start, - end); - } - - public static int getKBCommentsCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBCommentsCount(groupId, status); - } - - public static int getKBCommentsCount(long groupId, - java.lang.String className, long classPK, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBCommentsCount(groupId, className, classPK, status); - } - - public static com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBComment(kbCommentId, classNameId, classPK, content, - status, serviceContext); - } - - public static com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBComment(kbCommentId, classNameId, classPK, content, - serviceContext); - } - - public static com.liferay.knowledgebase.model.KBComment updateStatus( - long kbCommentId, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().updateStatus(kbCommentId, status, serviceContext); - } - - public static void clearService() { - _service = null; - } - - public static KBCommentService getService() { - if (_service == null) { - InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - KBCommentService.class.getName()); - - if (invokableService instanceof KBCommentService) { - _service = (KBCommentService)invokableService; - } - else { - _service = new KBCommentServiceClp(invokableService); - } - - ReferenceRegistry.registerReference(KBCommentServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(KBCommentService service) { - } - - private static KBCommentService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentServiceWrapper.java deleted file mode 100644 index c463fc231c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBCommentServiceWrapper.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link KBCommentService}. - * - * @author Brian Wing Shun Chan - * @see KBCommentService - * @generated - */ -public class KBCommentServiceWrapper implements KBCommentService, - ServiceWrapper { - public KBCommentServiceWrapper(KBCommentService kbCommentService) { - _kbCommentService = kbCommentService; - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _kbCommentService.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) { - _kbCommentService.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 _kbCommentService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.deleteKBComment(kbComment); - } - - @Override - public com.liferay.knowledgebase.model.KBComment deleteKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.deleteKBComment(kbCommentId); - } - - @Override - public com.liferay.knowledgebase.model.KBComment getKBComment( - long kbCommentId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.getKBComment(kbCommentId); - } - - @Override - public java.util.List getKBComments( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.getKBComments(groupId, status, start, end); - } - - @Override - public java.util.List getKBComments( - long groupId, java.lang.String className, long classPK, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.getKBComments(groupId, className, classPK, - status, start, end); - } - - @Override - public int getKBCommentsCount(long groupId, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.getKBCommentsCount(groupId, status); - } - - @Override - public int getKBCommentsCount(long groupId, java.lang.String className, - long classPK, int status) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.getKBCommentsCount(groupId, className, - classPK, status); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.updateKBComment(kbCommentId, classNameId, - classPK, content, status, serviceContext); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.updateKBComment(kbCommentId, classNameId, - classPK, content, serviceContext); - } - - @Override - public com.liferay.knowledgebase.model.KBComment updateStatus( - long kbCommentId, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbCommentService.updateStatus(kbCommentId, status, - serviceContext); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public KBCommentService getWrappedKBCommentService() { - return _kbCommentService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedKBCommentService(KBCommentService kbCommentService) { - _kbCommentService = kbCommentService; - } - - @Override - public KBCommentService getWrappedService() { - return _kbCommentService; - } - - @Override - public void setWrappedService(KBCommentService kbCommentService) { - _kbCommentService = kbCommentService; - } - - private KBCommentService _kbCommentService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalService.java deleted file mode 100644 index 6840685186..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalService.java +++ /dev/null @@ -1,358 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBFolder. 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 Brian Wing Shun Chan - * @see KBFolderLocalServiceUtil - * @see com.liferay.knowledgebase.service.base.KBFolderLocalServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBFolderLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface KBFolderLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBFolderLocalServiceUtil} to access the k b folder local service. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBFolderLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the k b folder to the database. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was added - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public com.liferay.knowledgebase.model.KBFolder addKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new k b folder with the primary key. Does not add the k b folder to the database. - * - * @param kbFolderId the primary key for the new k b folder - * @return the new k b folder - */ - public com.liferay.knowledgebase.model.KBFolder createKBFolder( - long kbFolderId); - - /** - * Deletes the k b folder with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder that was removed - * @throws PortalException if a k b folder 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 com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the k b folder from the database. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) - public com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.knowledgebase.model.KBFolder fetchKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder with the matching UUID and company. - * - * @param uuid the k b folder's UUID - * @param companyId the primary key of the company - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder matching the UUID and group. - * - * @param uuid the k b folder's UUID - * @param groupId the primary key of the group - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder with the primary key. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder - * @throws PortalException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder getKBFolder(long kbFolderId) - 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 the k b folder with the matching UUID and company. - * - * @param uuid the k b folder's UUID - * @param companyId the primary key of the company - * @return the matching k b folder - * @throws PortalException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder matching the UUID and group. - * - * @param uuid the k b folder's UUID - * @param groupId the primary key of the group - * @return the matching k b folder - * @throws PortalException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of k b folders - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBFolders( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b folders. - * - * @return the number of k b folders - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBFoldersCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the k b folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was updated - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public com.liferay.knowledgebase.model.KBFolder updateKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - 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 com.liferay.knowledgebase.model.KBFolder addKBFolder(long userId, - long groupId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String name, - java.lang.String description, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder fetchFirstChildKBFolder( - long groupId, long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBFoldersCount(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, java.lang.String name, java.lang.String description) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalServiceClp.java deleted file mode 100644 index 0e3e4929e4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalServiceClp.java +++ /dev/null @@ -1,1229 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBFolderLocalServiceClp implements KBFolderLocalService { - public KBFolderLocalServiceClp(InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addKBFolder"; - - _methodParameterTypes0 = new String[] { - "com.liferay.knowledgebase.model.KBFolder" - }; - - _methodName1 = "createKBFolder"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteKBFolder"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteKBFolder"; - - _methodParameterTypes3 = new String[] { - "com.liferay.knowledgebase.model.KBFolder" - }; - - _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 = "fetchKBFolder"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchKBFolderByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchKBFolderByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getKBFolder"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getKBFolderByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getKBFolderByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getKBFolders"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getKBFoldersCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateKBFolder"; - - _methodParameterTypes19 = new String[] { - "com.liferay.knowledgebase.model.KBFolder" - }; - - _methodName20 = "getBeanIdentifier"; - - _methodParameterTypes20 = new String[] { }; - - _methodName21 = "setBeanIdentifier"; - - _methodParameterTypes21 = new String[] { "java.lang.String" }; - - _methodName23 = "addKBFolder"; - - _methodParameterTypes23 = new String[] { - "long", "long", "long", "long", "java.lang.String", - "java.lang.String", "com.liferay.portal.service.ServiceContext" - }; - - _methodName24 = "fetchFirstChildKBFolder"; - - _methodParameterTypes24 = new String[] { "long", "long" }; - - _methodName25 = "fetchKBFolderByUrlTitle"; - - _methodParameterTypes25 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName26 = "getKBFolderByUrlTitle"; - - _methodParameterTypes26 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName27 = "getKBFolders"; - - _methodParameterTypes27 = new String[] { "long", "long", "int", "int" }; - - _methodName28 = "getKBFoldersCount"; - - _methodParameterTypes28 = new String[] { "long", "long" }; - - _methodName29 = "moveKBFolder"; - - _methodParameterTypes29 = new String[] { "long", "long" }; - - _methodName30 = "updateKBFolder"; - - _methodParameterTypes30 = new String[] { - "long", "long", "long", "java.lang.String", "java.lang.String" - }; - } - - @Override - public com.liferay.knowledgebase.model.KBFolder addKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(kbFolder) }); - } - 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 (com.liferay.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder createKBFolder( - long kbFolderId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { kbFolderId }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { kbFolderId }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(kbFolder) }); - } - 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 (com.liferay.knowledgebase.model.KBFolder)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 com.liferay.knowledgebase.model.KBFolder fetchKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { kbFolderId }); - } - 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 (com.liferay.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { ClpSerializer.translateInput(uuid), 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 (com.liferay.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (com.liferay.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolder(long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName13, - _methodParameterTypes13, new Object[] { kbFolderId }); - } - 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.knowledgebase.model.KBFolder)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(_methodName14, - _methodParameterTypes14, - 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 com.liferay.knowledgebase.model.KBFolder getKBFolderByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { ClpSerializer.translateInput(uuid), companyId }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName16, - _methodParameterTypes16, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBFolders( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName17, - _methodParameterTypes17, 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getKBFoldersCount() - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName18, - _methodParameterTypes18, 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 com.liferay.knowledgebase.model.KBFolder updateKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { ClpSerializer.translateInput(kbFolder) }); - } - 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 (com.liferay.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.lang.String getBeanIdentifier() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName20, - _methodParameterTypes20, 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(_methodName21, - _methodParameterTypes21, - 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 com.liferay.knowledgebase.model.KBFolder addKBFolder(long userId, - long groupId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String name, - java.lang.String description, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { - userId, - - groupId, - - parentResourceClassNameId, - - parentResourcePrimKey, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(description), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder fetchFirstChildKBFolder( - long groupId, long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, - new Object[] { groupId, kbFolderId }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { - groupId, - - parentKbFolderId, - - ClpSerializer.translateInput(urlTitle) - }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName26, - _methodParameterTypes26, - new Object[] { - groupId, - - parentKbFolderId, - - ClpSerializer.translateInput(urlTitle) - }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName27, - _methodParameterTypes27, - new Object[] { groupId, parentKBFolderId, start, end }); - } - 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 (java.util.List)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getKBFoldersCount(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName28, - _methodParameterTypes28, - new Object[] { groupId, parentKBFolderId }); - } - 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 ((Integer)returnObj).intValue(); - } - - @Override - public void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName29, - _methodParameterTypes29, - new Object[] { kbFolderId, parentKBFolderId }); - } - 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"); - } - } - } - - @Override - public com.liferay.knowledgebase.model.KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, java.lang.String name, java.lang.String description) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName30, - _methodParameterTypes30, - new Object[] { - parentResourceClassNameId, - - parentResourcePrimKey, - - kbFolderId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(description) - }); - } - 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.knowledgebase.model.KBFolder)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 _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName20; - private String[] _methodParameterTypes20; - private String _methodName21; - private String[] _methodParameterTypes21; - private String _methodName23; - private String[] _methodParameterTypes23; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; - private String _methodName27; - private String[] _methodParameterTypes27; - private String _methodName28; - private String[] _methodParameterTypes28; - private String _methodName29; - private String[] _methodParameterTypes29; - private String _methodName30; - private String[] _methodParameterTypes30; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalServiceUtil.java deleted file mode 100644 index 347c83ed59..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalServiceUtil.java +++ /dev/null @@ -1,432 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBFolder. This utility wraps - * {@link com.liferay.knowledgebase.service.impl.KBFolderLocalServiceImpl} 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 Brian Wing Shun Chan - * @see KBFolderLocalService - * @see com.liferay.knowledgebase.service.base.KBFolderLocalServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBFolderLocalServiceImpl - * @generated - */ -public class KBFolderLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBFolderLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the k b folder to the database. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was added - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder addKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addKBFolder(kbFolder); - } - - /** - * Creates a new k b folder with the primary key. Does not add the k b folder to the database. - * - * @param kbFolderId the primary key for the new k b folder - * @return the new k b folder - */ - public static com.liferay.knowledgebase.model.KBFolder createKBFolder( - long kbFolderId) { - return getService().createKBFolder(kbFolderId); - } - - /** - * Deletes the k b folder with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder that was removed - * @throws PortalException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBFolder(kbFolderId); - } - - /** - * Deletes the k b folder from the database. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBFolder(kbFolder); - } - - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.knowledgebase.model.KBFolder fetchKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBFolder(kbFolderId); - } - - /** - * Returns the k b folder with the matching UUID and company. - * - * @param uuid the k b folder's UUID - * @param companyId the primary key of the company - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBFolderByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the k b folder matching the UUID and group. - * - * @param uuid the k b folder's UUID - * @param groupId the primary key of the group - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBFolderByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the k b folder with the primary key. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder - * @throws PortalException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder getKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFolder(kbFolderId); - } - - 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 the k b folder with the matching UUID and company. - * - * @param uuid the k b folder's UUID - * @param companyId the primary key of the company - * @return the matching k b folder - * @throws PortalException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder getKBFolderByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFolderByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the k b folder matching the UUID and group. - * - * @param uuid the k b folder's UUID - * @param groupId the primary key of the group - * @return the matching k b folder - * @throws PortalException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder getKBFolderByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFolderByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List getKBFolders( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFolders(start, end); - } - - /** - * Returns the number of k b folders. - * - * @return the number of k b folders - * @throws SystemException if a system exception occurred - */ - public static int getKBFoldersCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFoldersCount(); - } - - /** - * Updates the k b folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was updated - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder updateKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateKBFolder(kbFolder); - } - - /** - * 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 com.liferay.knowledgebase.model.KBFolder addKBFolder( - long userId, long groupId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String name, - java.lang.String description, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addKBFolder(userId, groupId, parentResourceClassNameId, - parentResourcePrimKey, name, description, serviceContext); - } - - public static com.liferay.knowledgebase.model.KBFolder fetchFirstChildKBFolder( - long groupId, long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().fetchFirstChildKBFolder(groupId, kbFolderId); - } - - public static com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .fetchKBFolderByUrlTitle(groupId, parentKbFolderId, urlTitle); - } - - public static com.liferay.knowledgebase.model.KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBFolderByUrlTitle(groupId, parentKbFolderId, urlTitle); - } - - public static java.util.List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFolders(groupId, parentKBFolderId, start, end); - } - - public static int getKBFoldersCount(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFoldersCount(groupId, parentKBFolderId); - } - - public static void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().moveKBFolder(kbFolderId, parentKBFolderId); - } - - public static com.liferay.knowledgebase.model.KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, java.lang.String name, java.lang.String description) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBFolder(parentResourceClassNameId, - parentResourcePrimKey, kbFolderId, name, description); - } - - public static void clearService() { - _service = null; - } - - public static KBFolderLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - KBFolderLocalService.class.getName()); - - if (invokableLocalService instanceof KBFolderLocalService) { - _service = (KBFolderLocalService)invokableLocalService; - } - else { - _service = new KBFolderLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(KBFolderLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(KBFolderLocalService service) { - } - - private static KBFolderLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalServiceWrapper.java deleted file mode 100644 index b336b1011f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderLocalServiceWrapper.java +++ /dev/null @@ -1,452 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link KBFolderLocalService}. - * - * @author Brian Wing Shun Chan - * @see KBFolderLocalService - * @generated - */ -public class KBFolderLocalServiceWrapper implements KBFolderLocalService, - ServiceWrapper { - public KBFolderLocalServiceWrapper( - KBFolderLocalService kbFolderLocalService) { - _kbFolderLocalService = kbFolderLocalService; - } - - /** - * Adds the k b folder to the database. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was added - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBFolder addKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.addKBFolder(kbFolder); - } - - /** - * Creates a new k b folder with the primary key. Does not add the k b folder to the database. - * - * @param kbFolderId the primary key for the new k b folder - * @return the new k b folder - */ - @Override - public com.liferay.knowledgebase.model.KBFolder createKBFolder( - long kbFolderId) { - return _kbFolderLocalService.createKBFolder(kbFolderId); - } - - /** - * Deletes the k b folder with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder that was removed - * @throws PortalException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.deleteKBFolder(kbFolderId); - } - - /** - * Deletes the k b folder from the database. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.deleteKBFolder(kbFolder); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _kbFolderLocalService.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 _kbFolderLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @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 _kbFolderLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 _kbFolderLocalService.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 _kbFolderLocalService.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 _kbFolderLocalService.dynamicQueryCount(dynamicQuery, projection); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder fetchKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.fetchKBFolder(kbFolderId); - } - - /** - * Returns the k b folder with the matching UUID and company. - * - * @param uuid the k b folder's UUID - * @param companyId the primary key of the company - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.fetchKBFolderByUuidAndCompanyId(uuid, - companyId); - } - - /** - * Returns the k b folder matching the UUID and group. - * - * @param uuid the k b folder's UUID - * @param groupId the primary key of the group - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.fetchKBFolderByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the k b folder with the primary key. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder - * @throws PortalException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolder(long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.getKBFolder(kbFolderId); - } - - @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 _kbFolderLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns the k b folder with the matching UUID and company. - * - * @param uuid the k b folder's UUID - * @param companyId the primary key of the company - * @return the matching k b folder - * @throws PortalException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.getKBFolderByUuidAndCompanyId(uuid, - companyId); - } - - /** - * Returns the k b folder matching the UUID and group. - * - * @param uuid the k b folder's UUID - * @param groupId the primary key of the group - * @return the matching k b folder - * @throws PortalException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.getKBFolderByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getKBFolders( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.getKBFolders(start, end); - } - - /** - * Returns the number of k b folders. - * - * @return the number of k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public int getKBFoldersCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.getKBFoldersCount(); - } - - /** - * Updates the k b folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBFolder updateKBFolder( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.updateKBFolder(kbFolder); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _kbFolderLocalService.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) { - _kbFolderLocalService.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 _kbFolderLocalService.invokeMethod(name, parameterTypes, - arguments); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder addKBFolder(long userId, - long groupId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String name, - java.lang.String description, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.addKBFolder(userId, groupId, - parentResourceClassNameId, parentResourcePrimKey, name, - description, serviceContext); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder fetchFirstChildKBFolder( - long groupId, long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.fetchFirstChildKBFolder(groupId, kbFolderId); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.fetchKBFolderByUrlTitle(groupId, - parentKbFolderId, urlTitle); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.getKBFolderByUrlTitle(groupId, - parentKbFolderId, urlTitle); - } - - @Override - public java.util.List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.getKBFolders(groupId, parentKBFolderId, - start, end); - } - - @Override - public int getKBFoldersCount(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.getKBFoldersCount(groupId, parentKBFolderId); - } - - @Override - public void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbFolderLocalService.moveKBFolder(kbFolderId, parentKBFolderId); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, java.lang.String name, java.lang.String description) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderLocalService.updateKBFolder(parentResourceClassNameId, - parentResourcePrimKey, kbFolderId, name, description); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public KBFolderLocalService getWrappedKBFolderLocalService() { - return _kbFolderLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedKBFolderLocalService( - KBFolderLocalService kbFolderLocalService) { - _kbFolderLocalService = kbFolderLocalService; - } - - @Override - public KBFolderLocalService getWrappedService() { - return _kbFolderLocalService; - } - - @Override - public void setWrappedService(KBFolderLocalService kbFolderLocalService) { - _kbFolderLocalService = kbFolderLocalService; - } - - private KBFolderLocalService _kbFolderLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderService.java deleted file mode 100644 index be86b6289a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderService.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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.Propagation; -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 KBFolder. Methods of this - * service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. - * - * @author Brian Wing Shun Chan - * @see KBFolderServiceUtil - * @see com.liferay.knowledgebase.service.base.KBFolderServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBFolderServiceImpl - * @generated - */ -@AccessControlled -@JSONWebService -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface KBFolderService extends BaseService, InvokableService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBFolderServiceUtil} to access the k b folder remote service. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBFolderServiceImpl} 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; - - public com.liferay.knowledgebase.model.KBFolder addKBFolder(long groupId, - long parentResourceClassNameId, long parentResourcePrimKey, - java.lang.String name, java.lang.String description, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder getKBFolder(long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBFoldersCount(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, java.lang.String name, java.lang.String description) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderServiceClp.java deleted file mode 100644 index 5f19e95f15..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderServiceClp.java +++ /dev/null @@ -1,493 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.InvokableService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBFolderServiceClp implements KBFolderService { - public KBFolderServiceClp(InvokableService invokableService) { - _invokableService = invokableService; - - _methodName0 = "getBeanIdentifier"; - - _methodParameterTypes0 = new String[] { }; - - _methodName1 = "setBeanIdentifier"; - - _methodParameterTypes1 = new String[] { "java.lang.String" }; - - _methodName3 = "addKBFolder"; - - _methodParameterTypes3 = new String[] { - "long", "long", "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName4 = "deleteKBFolder"; - - _methodParameterTypes4 = new String[] { "long" }; - - _methodName5 = "fetchKBFolderByUrlTitle"; - - _methodParameterTypes5 = new String[] { "long", "long", "java.lang.String" }; - - _methodName6 = "getKBFolder"; - - _methodParameterTypes6 = new String[] { "long" }; - - _methodName7 = "getKBFolderByUrlTitle"; - - _methodParameterTypes7 = new String[] { "long", "long", "java.lang.String" }; - - _methodName8 = "getKBFolders"; - - _methodParameterTypes8 = new String[] { "long", "long", "int", "int" }; - - _methodName9 = "getKBFoldersCount"; - - _methodParameterTypes9 = new String[] { "long", "long" }; - - _methodName10 = "moveKBFolder"; - - _methodParameterTypes10 = new String[] { "long", "long" }; - - _methodName11 = "updateKBFolder"; - - _methodParameterTypes11 = new String[] { - "long", "long", "long", "java.lang.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(); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder addKBFolder(long groupId, - long parentResourceClassNameId, long parentResourcePrimKey, - java.lang.String name, java.lang.String description, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { - groupId, - - parentResourceClassNameId, - - parentResourcePrimKey, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(description), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName4, - _methodParameterTypes4, new Object[] { kbFolderId }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName5, - _methodParameterTypes5, - new Object[] { - groupId, - - parentKbFolderId, - - ClpSerializer.translateInput(urlTitle) - }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolder(long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName6, - _methodParameterTypes6, new Object[] { kbFolderId }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName7, - _methodParameterTypes7, - new Object[] { - groupId, - - parentKbFolderId, - - ClpSerializer.translateInput(urlTitle) - }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName8, - _methodParameterTypes8, - new Object[] { groupId, parentKBFolderId, start, end }); - } - 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 (java.util.List)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getKBFoldersCount(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName9, - _methodParameterTypes9, - new Object[] { groupId, parentKBFolderId }); - } - 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 ((Integer)returnObj).intValue(); - } - - @Override - public void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName10, - _methodParameterTypes10, - new Object[] { kbFolderId, parentKBFolderId }); - } - 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"); - } - } - } - - @Override - public com.liferay.knowledgebase.model.KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, java.lang.String name, java.lang.String description) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { - parentResourceClassNameId, - - parentResourcePrimKey, - - kbFolderId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(description) - }); - } - 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.knowledgebase.model.KBFolder)ClpSerializer.translateOutput(returnObj); - } - - private InvokableService _invokableService; - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - 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; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderServiceUtil.java deleted file mode 100644 index cace167414..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderServiceUtil.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBFolder. This utility wraps - * {@link com.liferay.knowledgebase.service.impl.KBFolderServiceImpl} 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 Brian Wing Shun Chan - * @see KBFolderService - * @see com.liferay.knowledgebase.service.base.KBFolderServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBFolderServiceImpl - * @generated - */ -public class KBFolderServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBFolderServiceImpl} 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 com.liferay.knowledgebase.model.KBFolder addKBFolder( - long groupId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String name, - java.lang.String description, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addKBFolder(groupId, parentResourceClassNameId, - parentResourcePrimKey, name, description, serviceContext); - } - - public static com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBFolder(kbFolderId); - } - - public static com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .fetchKBFolderByUrlTitle(groupId, parentKbFolderId, urlTitle); - } - - public static com.liferay.knowledgebase.model.KBFolder getKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFolder(kbFolderId); - } - - public static com.liferay.knowledgebase.model.KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBFolderByUrlTitle(groupId, parentKbFolderId, urlTitle); - } - - public static java.util.List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFolders(groupId, parentKBFolderId, start, end); - } - - public static int getKBFoldersCount(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBFoldersCount(groupId, parentKBFolderId); - } - - public static void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().moveKBFolder(kbFolderId, parentKBFolderId); - } - - public static com.liferay.knowledgebase.model.KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, java.lang.String name, java.lang.String description) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBFolder(parentResourceClassNameId, - parentResourcePrimKey, kbFolderId, name, description); - } - - public static void clearService() { - _service = null; - } - - public static KBFolderService getService() { - if (_service == null) { - InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - KBFolderService.class.getName()); - - if (invokableService instanceof KBFolderService) { - _service = (KBFolderService)invokableService; - } - else { - _service = new KBFolderServiceClp(invokableService); - } - - ReferenceRegistry.registerReference(KBFolderServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(KBFolderService service) { - } - - private static KBFolderService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderServiceWrapper.java deleted file mode 100644 index 5be82503e4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBFolderServiceWrapper.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link KBFolderService}. - * - * @author Brian Wing Shun Chan - * @see KBFolderService - * @generated - */ -public class KBFolderServiceWrapper implements KBFolderService, - ServiceWrapper { - public KBFolderServiceWrapper(KBFolderService kbFolderService) { - _kbFolderService = kbFolderService; - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _kbFolderService.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) { - _kbFolderService.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 _kbFolderService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder addKBFolder(long groupId, - long parentResourceClassNameId, long parentResourcePrimKey, - java.lang.String name, java.lang.String description, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderService.addKBFolder(groupId, parentResourceClassNameId, - parentResourcePrimKey, name, description, serviceContext); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder deleteKBFolder( - long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderService.deleteKBFolder(kbFolderId); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderService.fetchKBFolderByUrlTitle(groupId, - parentKbFolderId, urlTitle); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolder(long kbFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderService.getKBFolder(kbFolderId); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderService.getKBFolderByUrlTitle(groupId, - parentKbFolderId, urlTitle); - } - - @Override - public java.util.List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderService.getKBFolders(groupId, parentKBFolderId, start, - end); - } - - @Override - public int getKBFoldersCount(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderService.getKBFoldersCount(groupId, parentKBFolderId); - } - - @Override - public void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbFolderService.moveKBFolder(kbFolderId, parentKBFolderId); - } - - @Override - public com.liferay.knowledgebase.model.KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, java.lang.String name, java.lang.String description) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbFolderService.updateKBFolder(parentResourceClassNameId, - parentResourcePrimKey, kbFolderId, name, description); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public KBFolderService getWrappedKBFolderService() { - return _kbFolderService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedKBFolderService(KBFolderService kbFolderService) { - _kbFolderService = kbFolderService; - } - - @Override - public KBFolderService getWrappedService() { - return _kbFolderService; - } - - @Override - public void setWrappedService(KBFolderService kbFolderService) { - _kbFolderService = kbFolderService; - } - - private KBFolderService _kbFolderService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalService.java deleted file mode 100644 index 83a947e72f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalService.java +++ /dev/null @@ -1,358 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBTemplate. 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 Brian Wing Shun Chan - * @see KBTemplateLocalServiceUtil - * @see com.liferay.knowledgebase.service.base.KBTemplateLocalServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBTemplateLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface KBTemplateLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBTemplateLocalServiceUtil} to access the k b template local service. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBTemplateLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the k b template to the database. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was added - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new k b template with the primary key. Does not add the k b template to the database. - * - * @param kbTemplateId the primary key for the new k b template - * @return the new k b template - */ - public com.liferay.knowledgebase.model.KBTemplate createKBTemplate( - long kbTemplateId); - - /** - * Deletes the k b template with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template that was removed - * @throws PortalException if a k b template 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 com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the k b template from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) - public com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.PortalException, - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.knowledgebase.model.KBTemplate fetchKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b template with the matching UUID and company. - * - * @param uuid the k b template's UUID - * @param companyId the primary key of the company - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBTemplate fetchKBTemplateByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b template matching the UUID and group. - * - * @param uuid the k b template's UUID - * @param groupId the primary key of the group - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBTemplate fetchKBTemplateByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b template with the primary key. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template - * @throws PortalException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBTemplate getKBTemplate( - long kbTemplateId) - 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 the k b template with the matching UUID and company. - * - * @param uuid the k b template's UUID - * @param companyId the primary key of the company - * @return the matching k b template - * @throws PortalException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBTemplate getKBTemplateByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b template matching the UUID and group. - * - * @param uuid the k b template's UUID - * @param groupId the primary key of the group - * @return the matching k b template - * @throws PortalException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBTemplate getKBTemplateByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of k b templates - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getKBTemplates( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b templates. - * - * @return the number of k b templates - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getKBTemplatesCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the k b template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was updated - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - 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 com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - long userId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteGroupKBTemplates(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteKBTemplates(long[] kbTemplateIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getGroupKBTemplates( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getGroupKBTemplatesCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List search( - long groupId, java.lang.String title, java.lang.String content, - java.util.Date startDate, java.util.Date endDate, boolean andOperator, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - long kbTemplateId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateKBTemplateResources( - com.liferay.knowledgebase.model.KBTemplate kbTemplate, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalServiceClp.java deleted file mode 100644 index 7bea46e92f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalServiceClp.java +++ /dev/null @@ -1,1232 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBTemplateLocalServiceClp implements KBTemplateLocalService { - public KBTemplateLocalServiceClp( - InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addKBTemplate"; - - _methodParameterTypes0 = new String[] { - "com.liferay.knowledgebase.model.KBTemplate" - }; - - _methodName1 = "createKBTemplate"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteKBTemplate"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteKBTemplate"; - - _methodParameterTypes3 = new String[] { - "com.liferay.knowledgebase.model.KBTemplate" - }; - - _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 = "fetchKBTemplate"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchKBTemplateByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchKBTemplateByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getKBTemplate"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getKBTemplateByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getKBTemplateByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getKBTemplates"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getKBTemplatesCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateKBTemplate"; - - _methodParameterTypes19 = new String[] { - "com.liferay.knowledgebase.model.KBTemplate" - }; - - _methodName20 = "getBeanIdentifier"; - - _methodParameterTypes20 = new String[] { }; - - _methodName21 = "setBeanIdentifier"; - - _methodParameterTypes21 = new String[] { "java.lang.String" }; - - _methodName23 = "addKBTemplate"; - - _methodParameterTypes23 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName24 = "deleteGroupKBTemplates"; - - _methodParameterTypes24 = new String[] { "long" }; - - _methodName25 = "deleteKBTemplates"; - - _methodParameterTypes25 = new String[] { "long[][]" }; - - _methodName26 = "getGroupKBTemplates"; - - _methodParameterTypes26 = new String[] { - "long", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName27 = "getGroupKBTemplatesCount"; - - _methodParameterTypes27 = new String[] { "long" }; - - _methodName28 = "search"; - - _methodParameterTypes28 = new String[] { - "long", "java.lang.String", "java.lang.String", "java.util.Date", - "java.util.Date", "boolean", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName29 = "updateKBTemplate"; - - _methodParameterTypes29 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName30 = "updateKBTemplateResources"; - - _methodParameterTypes30 = new String[] { - "com.liferay.knowledgebase.model.KBTemplate", - "java.lang.String[][]", "java.lang.String[][]" - }; - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(kbTemplate) }); - } - 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 (com.liferay.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate createKBTemplate( - long kbTemplateId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { kbTemplateId }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { kbTemplateId }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(kbTemplate) }); - } - 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.knowledgebase.model.KBTemplate)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 com.liferay.knowledgebase.model.KBTemplate fetchKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { kbTemplateId }); - } - 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 (com.liferay.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate fetchKBTemplateByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { ClpSerializer.translateInput(uuid), 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 (com.liferay.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate fetchKBTemplateByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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 (com.liferay.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate getKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName13, - _methodParameterTypes13, new Object[] { kbTemplateId }); - } - 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.knowledgebase.model.KBTemplate)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(_methodName14, - _methodParameterTypes14, - 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 com.liferay.knowledgebase.model.KBTemplate getKBTemplateByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { ClpSerializer.translateInput(uuid), companyId }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate getKBTemplateByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName16, - _methodParameterTypes16, - new Object[] { ClpSerializer.translateInput(uuid), groupId }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getKBTemplates( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName17, - _methodParameterTypes17, 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getKBTemplatesCount() - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName18, - _methodParameterTypes18, 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 com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { ClpSerializer.translateInput(kbTemplate) }); - } - 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 (com.liferay.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.lang.String getBeanIdentifier() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName20, - _methodParameterTypes20, 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(_methodName21, - _methodParameterTypes21, - 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 com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - long userId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { - userId, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void deleteGroupKBTemplates(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, new Object[] { groupId }); - } - 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"); - } - } - } - - @Override - public void deleteKBTemplates(long[] kbTemplateIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { ClpSerializer.translateInput(kbTemplateIds) }); - } - 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"); - } - } - } - - @Override - public java.util.List getGroupKBTemplates( - long groupId, 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(_methodName26, - _methodParameterTypes26, - new Object[] { - groupId, - - 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 int getGroupKBTemplatesCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName27, - _methodParameterTypes27, new Object[] { groupId }); - } - 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 java.util.List search( - long groupId, java.lang.String title, java.lang.String content, - java.util.Date startDate, java.util.Date endDate, boolean andOperator, - 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(_methodName28, - _methodParameterTypes28, - new Object[] { - groupId, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(startDate), - - ClpSerializer.translateInput(endDate), - - andOperator, - - 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 com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - long kbTemplateId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName29, - _methodParameterTypes29, - new Object[] { - kbTemplateId, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void updateKBTemplateResources( - com.liferay.knowledgebase.model.KBTemplate kbTemplate, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName30, - _methodParameterTypes30, - new Object[] { - ClpSerializer.translateInput(kbTemplate), - - ClpSerializer.translateInput(groupPermissions), - - ClpSerializer.translateInput(guestPermissions) - }); - } - 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"); - } - } - } - - 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 _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName20; - private String[] _methodParameterTypes20; - private String _methodName21; - private String[] _methodParameterTypes21; - private String _methodName23; - private String[] _methodParameterTypes23; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; - private String _methodName27; - private String[] _methodParameterTypes27; - private String _methodName28; - private String[] _methodParameterTypes28; - private String _methodName29; - private String[] _methodParameterTypes29; - private String _methodName30; - private String[] _methodParameterTypes30; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalServiceUtil.java deleted file mode 100644 index 208274fa2e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalServiceUtil.java +++ /dev/null @@ -1,434 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBTemplate. This utility wraps - * {@link com.liferay.knowledgebase.service.impl.KBTemplateLocalServiceImpl} 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 Brian Wing Shun Chan - * @see KBTemplateLocalService - * @see com.liferay.knowledgebase.service.base.KBTemplateLocalServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBTemplateLocalServiceImpl - * @generated - */ -public class KBTemplateLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBTemplateLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the k b template to the database. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was added - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addKBTemplate(kbTemplate); - } - - /** - * Creates a new k b template with the primary key. Does not add the k b template to the database. - * - * @param kbTemplateId the primary key for the new k b template - * @return the new k b template - */ - public static com.liferay.knowledgebase.model.KBTemplate createKBTemplate( - long kbTemplateId) { - return getService().createKBTemplate(kbTemplateId); - } - - /** - * Deletes the k b template with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template that was removed - * @throws PortalException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBTemplate(kbTemplateId); - } - - /** - * Deletes the k b template from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBTemplate(kbTemplate); - } - - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.knowledgebase.model.KBTemplate fetchKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBTemplate(kbTemplateId); - } - - /** - * Returns the k b template with the matching UUID and company. - * - * @param uuid the k b template's UUID - * @param companyId the primary key of the company - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchKBTemplateByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBTemplateByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the k b template matching the UUID and group. - * - * @param uuid the k b template's UUID - * @param groupId the primary key of the group - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchKBTemplateByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchKBTemplateByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns the k b template with the primary key. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template - * @throws PortalException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate getKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBTemplate(kbTemplateId); - } - - 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 the k b template with the matching UUID and company. - * - * @param uuid the k b template's UUID - * @param companyId the primary key of the company - * @return the matching k b template - * @throws PortalException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate getKBTemplateByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBTemplateByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the k b template matching the UUID and group. - * - * @param uuid the k b template's UUID - * @param groupId the primary key of the group - * @return the matching k b template - * @throws PortalException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate getKBTemplateByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBTemplateByUuidAndGroupId(uuid, groupId); - } - - /** - * Returns a range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List getKBTemplates( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBTemplates(start, end); - } - - /** - * Returns the number of k b templates. - * - * @return the number of k b templates - * @throws SystemException if a system exception occurred - */ - public static int getKBTemplatesCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getKBTemplatesCount(); - } - - /** - * Updates the k b template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was updated - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateKBTemplate(kbTemplate); - } - - /** - * 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 com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - long userId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().addKBTemplate(userId, title, content, serviceContext); - } - - public static void deleteGroupKBTemplates(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteGroupKBTemplates(groupId); - } - - public static void deleteKBTemplates(long[] kbTemplateIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteKBTemplates(kbTemplateIds); - } - - public static java.util.List getGroupKBTemplates( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getGroupKBTemplates(groupId, start, end, orderByComparator); - } - - public static int getGroupKBTemplatesCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getGroupKBTemplatesCount(groupId); - } - - public static java.util.List search( - long groupId, java.lang.String title, java.lang.String content, - java.util.Date startDate, java.util.Date endDate, boolean andOperator, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .search(groupId, title, content, startDate, endDate, - andOperator, start, end, orderByComparator); - } - - public static com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - long kbTemplateId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBTemplate(kbTemplateId, title, content, - serviceContext); - } - - public static void updateKBTemplateResources( - com.liferay.knowledgebase.model.KBTemplate kbTemplate, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .updateKBTemplateResources(kbTemplate, groupPermissions, - guestPermissions); - } - - public static void clearService() { - _service = null; - } - - public static KBTemplateLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - KBTemplateLocalService.class.getName()); - - if (invokableLocalService instanceof KBTemplateLocalService) { - _service = (KBTemplateLocalService)invokableLocalService; - } - else { - _service = new KBTemplateLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(KBTemplateLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(KBTemplateLocalService service) { - } - - private static KBTemplateLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalServiceWrapper.java deleted file mode 100644 index 7fbd90fc39..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateLocalServiceWrapper.java +++ /dev/null @@ -1,456 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link KBTemplateLocalService}. - * - * @author Brian Wing Shun Chan - * @see KBTemplateLocalService - * @generated - */ -public class KBTemplateLocalServiceWrapper implements KBTemplateLocalService, - ServiceWrapper { - public KBTemplateLocalServiceWrapper( - KBTemplateLocalService kbTemplateLocalService) { - _kbTemplateLocalService = kbTemplateLocalService; - } - - /** - * Adds the k b template to the database. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was added - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.addKBTemplate(kbTemplate); - } - - /** - * Creates a new k b template with the primary key. Does not add the k b template to the database. - * - * @param kbTemplateId the primary key for the new k b template - * @return the new k b template - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate createKBTemplate( - long kbTemplateId) { - return _kbTemplateLocalService.createKBTemplate(kbTemplateId); - } - - /** - * Deletes the k b template with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template that was removed - * @throws PortalException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.deleteKBTemplate(kbTemplateId); - } - - /** - * Deletes the k b template from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.deleteKBTemplate(kbTemplate); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _kbTemplateLocalService.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 _kbTemplateLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @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 _kbTemplateLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 _kbTemplateLocalService.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 _kbTemplateLocalService.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 _kbTemplateLocalService.dynamicQueryCount(dynamicQuery, - projection); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate fetchKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.fetchKBTemplate(kbTemplateId); - } - - /** - * Returns the k b template with the matching UUID and company. - * - * @param uuid the k b template's UUID - * @param companyId the primary key of the company - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate fetchKBTemplateByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.fetchKBTemplateByUuidAndCompanyId(uuid, - companyId); - } - - /** - * Returns the k b template matching the UUID and group. - * - * @param uuid the k b template's UUID - * @param groupId the primary key of the group - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate fetchKBTemplateByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.fetchKBTemplateByUuidAndGroupId(uuid, - groupId); - } - - /** - * Returns the k b template with the primary key. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template - * @throws PortalException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate getKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.getKBTemplate(kbTemplateId); - } - - @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 _kbTemplateLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns the k b template with the matching UUID and company. - * - * @param uuid the k b template's UUID - * @param companyId the primary key of the company - * @return the matching k b template - * @throws PortalException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate getKBTemplateByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.getKBTemplateByUuidAndCompanyId(uuid, - companyId); - } - - /** - * Returns the k b template matching the UUID and group. - * - * @param uuid the k b template's UUID - * @param groupId the primary key of the group - * @return the matching k b template - * @throws PortalException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate getKBTemplateByUuidAndGroupId( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.getKBTemplateByUuidAndGroupId(uuid, - groupId); - } - - /** - * Returns a range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getKBTemplates( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.getKBTemplates(start, end); - } - - /** - * Returns the number of k b templates. - * - * @return the number of k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public int getKBTemplatesCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.getKBTemplatesCount(); - } - - /** - * Updates the k b template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.updateKBTemplate(kbTemplate); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _kbTemplateLocalService.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) { - _kbTemplateLocalService.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 _kbTemplateLocalService.invokeMethod(name, parameterTypes, - arguments); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - long userId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.addKBTemplate(userId, title, content, - serviceContext); - } - - @Override - public void deleteGroupKBTemplates(long groupId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbTemplateLocalService.deleteGroupKBTemplates(groupId); - } - - @Override - public void deleteKBTemplates(long[] kbTemplateIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbTemplateLocalService.deleteKBTemplates(kbTemplateIds); - } - - @Override - public java.util.List getGroupKBTemplates( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.getGroupKBTemplates(groupId, start, end, - orderByComparator); - } - - @Override - public int getGroupKBTemplatesCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.getGroupKBTemplatesCount(groupId); - } - - @Override - public java.util.List search( - long groupId, java.lang.String title, java.lang.String content, - java.util.Date startDate, java.util.Date endDate, boolean andOperator, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.search(groupId, title, content, - startDate, endDate, andOperator, start, end, orderByComparator); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - long kbTemplateId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateLocalService.updateKBTemplate(kbTemplateId, title, - content, serviceContext); - } - - @Override - public void updateKBTemplateResources( - com.liferay.knowledgebase.model.KBTemplate kbTemplate, - java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbTemplateLocalService.updateKBTemplateResources(kbTemplate, - groupPermissions, guestPermissions); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public KBTemplateLocalService getWrappedKBTemplateLocalService() { - return _kbTemplateLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedKBTemplateLocalService( - KBTemplateLocalService kbTemplateLocalService) { - _kbTemplateLocalService = kbTemplateLocalService; - } - - @Override - public KBTemplateLocalService getWrappedService() { - return _kbTemplateLocalService; - } - - @Override - public void setWrappedService(KBTemplateLocalService kbTemplateLocalService) { - _kbTemplateLocalService = kbTemplateLocalService; - } - - private KBTemplateLocalService _kbTemplateLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateService.java deleted file mode 100644 index 8fb5c8d1e4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateService.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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.Propagation; -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 KBTemplate. Methods of this - * service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. - * - * @author Brian Wing Shun Chan - * @see KBTemplateServiceUtil - * @see com.liferay.knowledgebase.service.base.KBTemplateServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBTemplateServiceImpl - * @generated - */ -@AccessControlled -@JSONWebService -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface KBTemplateService extends BaseService, InvokableService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBTemplateServiceUtil} to access the k b template remote service. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBTemplateServiceImpl} 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; - - public com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - java.lang.String portletId, java.lang.String title, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteKBTemplates(long groupId, long[] kbTemplateIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getGroupKBTemplates( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getGroupKBTemplatesCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBTemplate getKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.knowledgebase.model.KBTemplateSearchDisplay getKBTemplateSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - java.util.Date startDate, java.util.Date endDate, boolean andOperator, - int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - long kbTemplateId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateServiceClp.java deleted file mode 100644 index 617fc412cc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateServiceClp.java +++ /dev/null @@ -1,468 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.InvokableService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBTemplateServiceClp implements KBTemplateService { - public KBTemplateServiceClp(InvokableService invokableService) { - _invokableService = invokableService; - - _methodName0 = "getBeanIdentifier"; - - _methodParameterTypes0 = new String[] { }; - - _methodName1 = "setBeanIdentifier"; - - _methodParameterTypes1 = new String[] { "java.lang.String" }; - - _methodName3 = "addKBTemplate"; - - _methodParameterTypes3 = new String[] { - "java.lang.String", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName4 = "deleteKBTemplate"; - - _methodParameterTypes4 = new String[] { "long" }; - - _methodName5 = "deleteKBTemplates"; - - _methodParameterTypes5 = new String[] { "long", "long[][]" }; - - _methodName6 = "getGroupKBTemplates"; - - _methodParameterTypes6 = new String[] { - "long", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName7 = "getGroupKBTemplatesCount"; - - _methodParameterTypes7 = new String[] { "long" }; - - _methodName8 = "getKBTemplate"; - - _methodParameterTypes8 = new String[] { "long" }; - - _methodName9 = "getKBTemplateSearchDisplay"; - - _methodParameterTypes9 = new String[] { - "long", "java.lang.String", "java.lang.String", "java.util.Date", - "java.util.Date", "boolean", "int[][]", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName10 = "updateKBTemplate"; - - _methodParameterTypes10 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - } - - @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(); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - java.lang.String portletId, java.lang.String title, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { - ClpSerializer.translateInput(portletId), - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName4, - _methodParameterTypes4, new Object[] { kbTemplateId }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void deleteKBTemplates(long groupId, long[] kbTemplateIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName5, - _methodParameterTypes5, - new Object[] { - groupId, - - ClpSerializer.translateInput(kbTemplateIds) - }); - } - 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"); - } - } - } - - @Override - public java.util.List getGroupKBTemplates( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName6, - _methodParameterTypes6, - new Object[] { - groupId, - - 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 int getGroupKBTemplatesCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName7, - _methodParameterTypes7, new Object[] { groupId }); - } - 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 com.liferay.knowledgebase.model.KBTemplate getKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName8, - _methodParameterTypes8, new Object[] { kbTemplateId }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplateSearchDisplay getKBTemplateSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - java.util.Date startDate, java.util.Date endDate, boolean andOperator, - int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName9, - _methodParameterTypes9, - new Object[] { - groupId, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(startDate), - - ClpSerializer.translateInput(endDate), - - andOperator, - - ClpSerializer.translateInput(curStartValues), - - cur, - - delta, - - ClpSerializer.translateInput(orderByComparator) - }); - } - 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.knowledgebase.model.KBTemplateSearchDisplay)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - long kbTemplateId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName10, - _methodParameterTypes10, - new Object[] { - kbTemplateId, - - ClpSerializer.translateInput(title), - - ClpSerializer.translateInput(content), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.knowledgebase.model.KBTemplate)ClpSerializer.translateOutput(returnObj); - } - - private InvokableService _invokableService; - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - 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; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateServiceUtil.java deleted file mode 100644 index 87a73bd8d0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateServiceUtil.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.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 KBTemplate. This utility wraps - * {@link com.liferay.knowledgebase.service.impl.KBTemplateServiceImpl} 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 Brian Wing Shun Chan - * @see KBTemplateService - * @see com.liferay.knowledgebase.service.base.KBTemplateServiceBaseImpl - * @see com.liferay.knowledgebase.service.impl.KBTemplateServiceImpl - * @generated - */ -public class KBTemplateServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledgebase.service.impl.KBTemplateServiceImpl} 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 com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - java.lang.String portletId, java.lang.String title, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addKBTemplate(portletId, title, content, serviceContext); - } - - public static com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteKBTemplate(kbTemplateId); - } - - public static void deleteKBTemplates(long groupId, long[] kbTemplateIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteKBTemplates(groupId, kbTemplateIds); - } - - public static java.util.List getGroupKBTemplates( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .getGroupKBTemplates(groupId, start, end, orderByComparator); - } - - public static int getGroupKBTemplatesCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getGroupKBTemplatesCount(groupId); - } - - public static com.liferay.knowledgebase.model.KBTemplate getKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getKBTemplate(kbTemplateId); - } - - public static com.liferay.knowledgebase.model.KBTemplateSearchDisplay getKBTemplateSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - java.util.Date startDate, java.util.Date endDate, boolean andOperator, - int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getKBTemplateSearchDisplay(groupId, title, content, - startDate, endDate, andOperator, curStartValues, cur, delta, - orderByComparator); - } - - public static com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - long kbTemplateId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateKBTemplate(kbTemplateId, title, content, - serviceContext); - } - - public static void clearService() { - _service = null; - } - - public static KBTemplateService getService() { - if (_service == null) { - InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - KBTemplateService.class.getName()); - - if (invokableService instanceof KBTemplateService) { - _service = (KBTemplateService)invokableService; - } - else { - _service = new KBTemplateServiceClp(invokableService); - } - - ReferenceRegistry.registerReference(KBTemplateServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(KBTemplateService service) { - } - - private static KBTemplateService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateServiceWrapper.java deleted file mode 100644 index 0197349a3d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/KBTemplateServiceWrapper.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link KBTemplateService}. - * - * @author Brian Wing Shun Chan - * @see KBTemplateService - * @generated - */ -public class KBTemplateServiceWrapper implements KBTemplateService, - ServiceWrapper { - public KBTemplateServiceWrapper(KBTemplateService kbTemplateService) { - _kbTemplateService = kbTemplateService; - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _kbTemplateService.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) { - _kbTemplateService.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 _kbTemplateService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate addKBTemplate( - java.lang.String portletId, java.lang.String title, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateService.addKBTemplate(portletId, title, content, - serviceContext); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate deleteKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateService.deleteKBTemplate(kbTemplateId); - } - - @Override - public void deleteKBTemplates(long groupId, long[] kbTemplateIds) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _kbTemplateService.deleteKBTemplates(groupId, kbTemplateIds); - } - - @Override - public java.util.List getGroupKBTemplates( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateService.getGroupKBTemplates(groupId, start, end, - orderByComparator); - } - - @Override - public int getGroupKBTemplatesCount(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateService.getGroupKBTemplatesCount(groupId); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate getKBTemplate( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateService.getKBTemplate(kbTemplateId); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplateSearchDisplay getKBTemplateSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - java.util.Date startDate, java.util.Date endDate, boolean andOperator, - int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateService.getKBTemplateSearchDisplay(groupId, title, - content, startDate, endDate, andOperator, curStartValues, cur, - delta, orderByComparator); - } - - @Override - public com.liferay.knowledgebase.model.KBTemplate updateKBTemplate( - long kbTemplateId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _kbTemplateService.updateKBTemplate(kbTemplateId, title, - content, serviceContext); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public KBTemplateService getWrappedKBTemplateService() { - return _kbTemplateService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedKBTemplateService(KBTemplateService kbTemplateService) { - _kbTemplateService = kbTemplateService; - } - - @Override - public KBTemplateService getWrappedService() { - return _kbTemplateService; - } - - @Override - public void setWrappedService(KBTemplateService kbTemplateService) { - _kbTemplateService = kbTemplateService; - } - - private KBTemplateService _kbTemplateService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/messaging/ClpMessageListener.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/messaging/ClpMessageListener.java deleted file mode 100644 index ca574024d1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/messaging/ClpMessageListener.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.messaging; - -import com.liferay.knowledgebase.service.ClpSerializer; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.knowledgebase.service.KBCommentLocalServiceUtil; -import com.liferay.knowledgebase.service.KBCommentServiceUtil; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; -import com.liferay.knowledgebase.service.KBFolderServiceUtil; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; -import com.liferay.knowledgebase.service.KBTemplateServiceUtil; - -import com.liferay.portal.kernel.messaging.BaseMessageListener; -import com.liferay.portal.kernel.messaging.Message; - -/** - * @author Brian Wing Shun Chan - */ -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())) { - KBArticleLocalServiceUtil.clearService(); - - KBArticleServiceUtil.clearService(); - KBCommentLocalServiceUtil.clearService(); - - KBCommentServiceUtil.clearService(); - KBFolderLocalServiceUtil.clearService(); - - KBFolderServiceUtil.clearService(); - KBTemplateLocalServiceUtil.clearService(); - - KBTemplateServiceUtil.clearService(); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/AdminPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/AdminPermission.java deleted file mode 100644 index ee978d7893..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/AdminPermission.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.permission; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class AdminPermission { - - public static final String RESOURCE_NAME = - "com.liferay.knowledgebase.admin"; - - public static void check( - PermissionChecker permissionChecker, long groupId, String actionId) - throws PortalException { - - if (!contains(permissionChecker, groupId, actionId)) { - throw new PrincipalException(); - } - } - - public static boolean contains( - PermissionChecker permissionChecker, long groupId, String actionId) { - - return permissionChecker.hasPermission( - groupId, RESOURCE_NAME, groupId, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/DisplayPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/DisplayPermission.java deleted file mode 100644 index 473c3d55cc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/DisplayPermission.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.permission; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class DisplayPermission { - - public static final String RESOURCE_NAME = - "com.liferay.knowledgebase.display"; - - public static void check( - PermissionChecker permissionChecker, long groupId, String actionId) - throws PortalException { - - if (!contains(permissionChecker, groupId, actionId)) { - throw new PrincipalException(); - } - } - - public static boolean contains( - PermissionChecker permissionChecker, long groupId, String actionId) { - - return permissionChecker.hasPermission( - groupId, RESOURCE_NAME, groupId, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBArticlePermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBArticlePermission.java deleted file mode 100644 index e2ff9b5b92..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBArticlePermission.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.permission; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticlePermission { - - public static void check( - PermissionChecker permissionChecker, KBArticle kbArticle, - String actionId) - throws PortalException { - - if (!contains(permissionChecker, kbArticle, actionId)) { - throw new PrincipalException(); - } - } - - public static void check( - PermissionChecker permissionChecker, long resourcePrimKey, - String actionId) - throws PortalException, SystemException { - - if (!contains(permissionChecker, resourcePrimKey, actionId)) { - throw new PrincipalException(); - } - } - - public static boolean contains( - PermissionChecker permissionChecker, KBArticle kbArticle, - String actionId) { - - if (permissionChecker.hasOwnerPermission( - kbArticle.getCompanyId(), KBArticle.class.getName(), - kbArticle.getRootResourcePrimKey(), kbArticle.getUserId(), - actionId)) { - - return true; - } - - return permissionChecker.hasPermission( - kbArticle.getGroupId(), KBArticle.class.getName(), - kbArticle.getRootResourcePrimKey(), actionId); - } - - public static boolean contains( - PermissionChecker permissionChecker, long resourcePrimKey, - String actionId) - throws PortalException, SystemException { - - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - return contains(permissionChecker, kbArticle, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBCommentPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBCommentPermission.java deleted file mode 100644 index 2aee67aac5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBCommentPermission.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.permission; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBCommentLocalServiceUtil; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -/** - * @author Shinn Lok - */ -public class KBCommentPermission { - - public static void check( - PermissionChecker permissionChecker, KBComment kbComment, - String actionId) - throws PortalException, SystemException { - - if (!contains(permissionChecker, kbComment, actionId)) { - throw new PrincipalException(); - } - } - - public static void check( - PermissionChecker permissionChecker, long kbCommentId, - String actionId) - throws PortalException, SystemException { - - if (!contains(permissionChecker, kbCommentId, actionId)) { - throw new PrincipalException(); - } - } - - public static boolean contains( - PermissionChecker permissionChecker, KBComment kbComment, - String actionId) - throws PortalException, SystemException { - - if (permissionChecker.getUserId() == kbComment.getUserId()) { - return true; - } - - if (actionId.equals(ActionKeys.VIEW)) { - return AdminPermission.contains( - permissionChecker, kbComment.getGroupId(), - ActionKeys.VIEW_SUGGESTIONS); - } - - if (!actionId.equals(ActionKeys.DELETE) && - !actionId.equals(ActionKeys.UPDATE)) { - - return false; - } - - String className = kbComment.getClassName(); - - if (className.equals(KBArticle.class.getName())) { - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - kbComment.getClassPK(), WorkflowConstants.STATUS_ANY); - - return permissionChecker.hasPermission( - kbArticle.getGroupId(), KBArticle.class.getName(), - kbArticle.getPrimaryKey(), ActionKeys.UPDATE); - } - else if (className.equals(KBTemplate.class.getName())) { - KBTemplate kbTemplate = KBTemplateLocalServiceUtil.getKBTemplate( - kbComment.getClassPK()); - - return permissionChecker.hasPermission( - kbTemplate.getGroupId(), KBTemplate.class.getName(), - kbTemplate.getPrimaryKey(), ActionKeys.UPDATE); - } - - return false; - } - - public static boolean contains( - PermissionChecker permissionChecker, long kbCommentId, - String actionId) - throws PortalException, SystemException { - - KBComment kbComment = KBCommentLocalServiceUtil.getKBComment( - kbCommentId); - - return contains(permissionChecker, kbComment, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBFolderPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBFolderPermission.java deleted file mode 100644 index 6bbb10df7b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBFolderPermission.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.permission; - -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -/** - * @author Adolfo Pérez - */ -public class KBFolderPermission { - - public static void check( - PermissionChecker permissionChecker, KBFolder kbFolder, - String actionId) - throws PortalException { - - if (!contains(permissionChecker, kbFolder, actionId)) { - throw new PrincipalException(); - } - } - - public static void check( - PermissionChecker permissionChecker, long groupId, long kbFolderId, - String actionId) - throws PortalException, SystemException { - - if (!contains(permissionChecker, groupId, kbFolderId, actionId)) { - throw new PrincipalException(); - } - } - - public static void check( - PermissionChecker permissionChecker, long kbFolderId, - String actionId) - throws PortalException, SystemException { - - KBFolder kbFolder = KBFolderLocalServiceUtil.getKBFolder(kbFolderId); - - check(permissionChecker, kbFolder, actionId); - } - - public static boolean contains( - PermissionChecker permissionChecker, KBFolder kbFolder, - String actionId) { - - if (permissionChecker.hasOwnerPermission( - kbFolder.getCompanyId(), KBFolder.class.getName(), - kbFolder.getKbFolderId(), kbFolder.getUserId(), actionId)) { - - return true; - } - - return permissionChecker.hasPermission( - kbFolder.getGroupId(), KBFolder.class.getName(), - kbFolder.getKbFolderId(), actionId); - } - - public static boolean contains( - PermissionChecker permissionChecker, long groupId, long kbFolderId, - String actionId) - throws PortalException, SystemException { - - if (kbFolderId == KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - return AdminPermission.contains( - permissionChecker, groupId, actionId); - } - - KBFolder kbFolder = KBFolderLocalServiceUtil.getKBFolder(kbFolderId); - - return contains(permissionChecker, kbFolder, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBTemplatePermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBTemplatePermission.java deleted file mode 100644 index 9853ba7486..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/KBTemplatePermission.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.permission; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBTemplatePermission { - - public static void check( - PermissionChecker permissionChecker, KBTemplate kbTemplate, - String actionId) - throws PortalException { - - if (!contains(permissionChecker, kbTemplate, actionId)) { - throw new PrincipalException(); - } - } - - public static void check( - PermissionChecker permissionChecker, long kbTemplateId, - String actionId) - throws PortalException, SystemException { - - if (!contains(permissionChecker, kbTemplateId, actionId)) { - throw new PrincipalException(); - } - } - - public static boolean contains( - PermissionChecker permissionChecker, KBTemplate kbTemplate, - String actionId) { - - if (permissionChecker.hasOwnerPermission( - kbTemplate.getCompanyId(), KBTemplate.class.getName(), - kbTemplate.getKbTemplateId(), kbTemplate.getUserId(), - actionId)) { - - return true; - } - - return permissionChecker.hasPermission( - kbTemplate.getGroupId(), KBTemplate.class.getName(), - kbTemplate.getKbTemplateId(), actionId); - } - - public static boolean contains( - PermissionChecker permissionChecker, long kbTemplateId, - String actionId) - throws PortalException, SystemException { - - KBTemplate kbTemplate = KBTemplateLocalServiceUtil.getKBTemplate( - kbTemplateId); - - return contains(permissionChecker, kbTemplate, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/SuggestionPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/SuggestionPermission.java deleted file mode 100644 index 683cff2d3a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/permission/SuggestionPermission.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.permission; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -/** - * @author Adolfo Pérez - */ -public class SuggestionPermission { - - public static boolean contains( - PermissionChecker permissionChecker, long groupId, - KBArticle kbArticle, String actionId) - throws PrincipalException { - - if (!actionId.equals(ActionKeys.VIEW_SUGGESTIONS)) { - throw new IllegalArgumentException( - "Suggestions only support the " + ActionKeys.VIEW_SUGGESTIONS + - " permission"); - } - - if (AdminPermission.contains( - permissionChecker, groupId, ActionKeys.VIEW_SUGGESTIONS) || - KBArticlePermission.contains( - permissionChecker, kbArticle, ActionKeys.UPDATE)) { - - return true; - } - - return false; - } - - public static boolean contains( - PermissionChecker permissionChecker, long groupId, String className, - long classPK, String actionId) - throws PortalException, SystemException { - - if (!className.equals(KBArticleConstants.getClassName())) { - throw new IllegalArgumentException( - "Only KB articles support suggestions"); - } - - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - classPK, WorkflowConstants.STATUS_ANY); - - return contains(permissionChecker, groupId, kbArticle, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleActionableDynamicQuery.java deleted file mode 100644 index 856c1e1236..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public abstract class KBArticleActionableDynamicQuery - extends BaseActionableDynamicQuery { - public KBArticleActionableDynamicQuery() throws SystemException { - setBaseLocalService(KBArticleLocalServiceUtil.getService()); - setClass(KBArticle.class); - - setClassLoader(com.liferay.knowledgebase.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("kbArticleId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleExportActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleExportActionableDynamicQuery.java deleted file mode 100644 index dc5bc7fcb9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleExportActionableDynamicQuery.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBArticle; - -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.Projection; -import com.liferay.portal.kernel.dao.orm.ProjectionFactoryUtil; -import com.liferay.portal.kernel.dao.orm.Property; -import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.ExportImportHelperUtil; -import com.liferay.portal.kernel.lar.ManifestSummary; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandler; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerRegistryUtil; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.util.PortalUtil; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBArticleExportActionableDynamicQuery - extends KBArticleActionableDynamicQuery { - public KBArticleExportActionableDynamicQuery( - PortletDataContext portletDataContext) throws SystemException { - _portletDataContext = portletDataContext; - - setCompanyId(_portletDataContext.getCompanyId()); - - setGroupId(_portletDataContext.getScopeGroupId()); - } - - @Override - public long performCount() throws PortalException, SystemException { - ManifestSummary manifestSummary = _portletDataContext.getManifestSummary(); - - StagedModelType stagedModelType = getStagedModelType(); - - long modelAdditionCount = super.performCount(); - - manifestSummary.addModelAdditionCount(stagedModelType.toString(), - modelAdditionCount); - - long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(_portletDataContext, - stagedModelType); - - manifestSummary.addModelDeletionCount(stagedModelType.toString(), - modelDeletionCount); - - return modelAdditionCount; - } - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - _portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate"); - - StagedModelDataHandler stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(KBArticle.class.getName()); - - Property workflowStatusProperty = PropertyFactoryUtil.forName("status"); - - dynamicQuery.add(workflowStatusProperty.in( - stagedModelDataHandler.getExportableStatuses())); - } - - @Override - protected Projection getCountProjection() { - return ProjectionFactoryUtil.countDistinct("resourcePrimKey"); - } - - protected StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBArticle.class.getName())); - } - - @Override - @SuppressWarnings("unused") - protected void performAction(Object object) - throws PortalException, SystemException { - KBArticle stagedModel = (KBArticle)object; - - StagedModelDataHandlerUtil.exportStagedModel(_portletDataContext, - stagedModel); - } - - private PortletDataContext _portletDataContext; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleFinder.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleFinder.java deleted file mode 100644 index 8bd0954e59..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleFinder.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -/** - * @author Brian Wing Shun Chan - */ -public interface KBArticleFinder { - public int countByUrlTitle(long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String kbArticleUrlTitle, int[] status); - - public java.util.List findByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String kbArticleUrlTitle, int[] status, int start, int end); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleFinderUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleFinderUtil.java deleted file mode 100644 index 8d5a855be6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleFinderUtil.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; -import com.liferay.portal.kernel.util.ReferenceRegistry; - -/** - * @author Brian Wing Shun Chan - */ -public class KBArticleFinderUtil { - public static int countByUrlTitle(long groupId, - java.lang.String kbFolderUrlTitle, java.lang.String kbArticleUrlTitle, - int[] status) { - return getFinder() - .countByUrlTitle(groupId, kbFolderUrlTitle, - kbArticleUrlTitle, status); - } - - public static java.util.List findByUrlTitle( - long groupId, java.lang.String kbFolderUrlTitle, - java.lang.String kbArticleUrlTitle, int[] status, int start, int end) { - return getFinder() - .findByUrlTitle(groupId, kbFolderUrlTitle, - kbArticleUrlTitle, status, start, end); - } - - public static KBArticleFinder getFinder() { - if (_finder == null) { - _finder = (KBArticleFinder)PortletBeanLocatorUtil.locate(com.liferay.knowledgebase.service.ClpSerializer.getServletContextName(), - KBArticleFinder.class.getName()); - - ReferenceRegistry.registerReference(KBArticleFinderUtil.class, - "_finder"); - } - - return _finder; - } - - public void setFinder(KBArticleFinder finder) { - _finder = finder; - - ReferenceRegistry.registerReference(KBArticleFinderUtil.class, "_finder"); - } - - private static KBArticleFinder _finder; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticlePersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticlePersistence.java deleted file mode 100644 index 1b9e13a82a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticlePersistence.java +++ /dev/null @@ -1,7788 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBArticle; - -import com.liferay.portal.service.persistence.BasePersistence; - -/** - * The persistence interface for the k b article service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBArticlePersistenceImpl - * @see KBArticleUtil - * @generated - */ -public interface KBArticlePersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBArticleUtil} to access the k b article persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the k b articles where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where uuid = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByUuid_PrevAndNext( - long kbArticleId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchArticleException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the k b article where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b article that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByUuid_C_PrevAndNext( - long kbArticleId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByResourcePrimKey( - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByResourcePrimKey( - long resourcePrimKey, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByResourcePrimKey( - long resourcePrimKey, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByResourcePrimKey_First( - long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByResourcePrimKey_First( - long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByResourcePrimKey_Last( - long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByResourcePrimKey_Last( - long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByResourcePrimKey_PrevAndNext( - long kbArticleId, long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where resourcePrimKey = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @throws SystemException if a system exception occurred - */ - public void removeByResourcePrimKey(long resourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByResourcePrimKey(long resourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G( - long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G( - long resourcePrimKey, long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G( - long resourcePrimKey, long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_G_First( - long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_G_First( - long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_G_Last( - long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_G_Last( - long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByR_G_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G( - long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G( - long resourcePrimKey, long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G( - long resourcePrimKey, long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByR_G_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public void removeByR_G(long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_G(long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByR_G(long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article where resourcePrimKey = ? and version = ? or throws a {@link com.liferay.knowledgebase.NoSuchArticleException} if it could not be found. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_V( - long resourcePrimKey, int version) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article where resourcePrimKey = ? and version = ? or returns null if it could not be found. Uses the finder cache. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_V( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article where resourcePrimKey = ? and version = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_V( - long resourcePrimKey, int version, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the k b article where resourcePrimKey = ? and version = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the k b article that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle removeByR_V( - long resourcePrimKey, int version) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = ? and version = ?. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_V(long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_L( - long resourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_L( - long resourcePrimKey, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_L( - long resourcePrimKey, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_L_First( - long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_L_First( - long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_L_Last( - long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_L_Last( - long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByR_L_PrevAndNext( - long kbArticleId, long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_L( - long[] resourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_L( - long[] resourcePrimKeies, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_L( - long[] resourcePrimKeies, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where resourcePrimKey = ? and latest = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public void removeByR_L(long resourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_L(long resourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_L(long[] resourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_M( - long resourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_M( - long resourcePrimKey, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_M( - long resourcePrimKey, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_M_First( - long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_M_First( - long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_M_Last( - long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_M_Last( - long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByR_M_PrevAndNext( - long kbArticleId, long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_M( - long[] resourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_M( - long[] resourcePrimKeies, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_M( - long[] resourcePrimKeies, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where resourcePrimKey = ? and main = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @throws SystemException if a system exception occurred - */ - public void removeByR_M(long resourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_M(long resourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_M(long[] resourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_S( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_S( - long resourcePrimKey, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_S( - long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_S_First( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_S_First( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_S_Last( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_S_Last( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByR_S_PrevAndNext( - long kbArticleId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_S( - long[] resourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_S( - long[] resourcePrimKeies, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_S( - long[] resourcePrimKeies, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where resourcePrimKey = ? and status = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByR_S(long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_S(long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_S(long[] resourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_L( - long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_L( - long groupId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_L( - long groupId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_L_First( - long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_L_First( - long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_L_Last( - long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_L_Last( - long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_L_PrevAndNext( - long kbArticleId, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_L( - long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_L( - long groupId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_L( - long groupId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_L_PrevAndNext( - long kbArticleId, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and latest = ? from the database. - * - * @param groupId the group ID - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public void removeByG_L(long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_L(long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_L(long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_M( - long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_M( - long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_M( - long groupId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_M_First( - long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_M_First( - long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_M_Last( - long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_M_Last( - long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_M_PrevAndNext( - long kbArticleId, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_M( - long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_M( - long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_M( - long groupId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_M_PrevAndNext( - long kbArticleId, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and main = ? from the database. - * - * @param groupId the group ID - * @param main the main - * @throws SystemException if a system exception occurred - */ - public void removeByG_M(long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_M(long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_M(long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_S_PrevAndNext( - long kbArticleId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_S_PrevAndNext( - long kbArticleId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_L( - long companyId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where companyId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_L( - long companyId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where companyId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_L( - long companyId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByC_L_First( - long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByC_L_First( - long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByC_L_Last( - long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByC_L_Last( - long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where companyId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByC_L_PrevAndNext( - long kbArticleId, long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where companyId = ? and latest = ? from the database. - * - * @param companyId the company ID - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public void removeByC_L(long companyId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByC_L(long companyId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_M( - long companyId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where companyId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_M( - long companyId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where companyId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_M( - long companyId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByC_M_First( - long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByC_M_First( - long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByC_M_Last( - long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByC_M_Last( - long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where companyId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByC_M_PrevAndNext( - long kbArticleId, long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where companyId = ? and main = ? from the database. - * - * @param companyId the company ID - * @param main the main - * @throws SystemException if a system exception occurred - */ - public void removeByC_M(long companyId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByC_M(long companyId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_S( - long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where companyId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_S( - long companyId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where companyId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_S( - long companyId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByC_S_First( - long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByC_S_First( - long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByC_S_Last( - long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByC_S_Last( - long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where companyId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByC_S_PrevAndNext( - long kbArticleId, long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where companyId = ? and status = ? from the database. - * - * @param companyId the company ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByC_S(long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByC_S(long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_L( - long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_L( - long parentResourcePrimKey, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_L( - long parentResourcePrimKey, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByP_L_First( - long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByP_L_First( - long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByP_L_Last( - long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByP_L_Last( - long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByP_L_PrevAndNext( - long kbArticleId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_L( - long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_L( - long[] parentResourcePrimKeies, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_L( - long[] parentResourcePrimKeies, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where parentResourcePrimKey = ? and latest = ? from the database. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public void removeByP_L(long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByP_L(long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where parentResourcePrimKey = any ? and latest = ?. - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByP_L(long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_M( - long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_M( - long parentResourcePrimKey, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_M( - long parentResourcePrimKey, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByP_M_First( - long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByP_M_First( - long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByP_M_Last( - long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByP_M_Last( - long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByP_M_PrevAndNext( - long kbArticleId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_M( - long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_M( - long[] parentResourcePrimKeies, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_M( - long[] parentResourcePrimKeies, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where parentResourcePrimKey = ? and main = ? from the database. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @throws SystemException if a system exception occurred - */ - public void removeByP_M(long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByP_M(long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where parentResourcePrimKey = any ? and main = ?. - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByP_M(long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_S( - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_S( - long parentResourcePrimKey, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_S( - long parentResourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByP_S_First( - long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByP_S_First( - long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByP_S_Last( - long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByP_S_Last( - long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByP_S_PrevAndNext( - long kbArticleId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_S( - long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_S( - long[] parentResourcePrimKeies, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByP_S( - long[] parentResourcePrimKeies, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where parentResourcePrimKey = ? and status = ? from the database. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByP_S(long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByP_S(long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where parentResourcePrimKey = any ? and status = ?. - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByP_S(long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_L( - long resourcePrimKey, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_L( - long resourcePrimKey, long groupId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_L( - long resourcePrimKey, long groupId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_G_L_First( - long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_G_L_First( - long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_G_L_Last( - long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_G_L_Last( - long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByR_G_L_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_L( - long resourcePrimKey, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_L( - long resourcePrimKey, long groupId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_L( - long resourcePrimKey, long groupId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByR_G_L_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public void removeByR_G_L(long resourcePrimKey, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_G_L(long resourcePrimKey, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_G_L(long[] resourcePrimKeies, long groupId, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByR_G_L(long resourcePrimKey, long groupId, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByR_G_L(long[] resourcePrimKeies, long groupId, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_M( - long resourcePrimKey, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_M( - long resourcePrimKey, long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_M( - long resourcePrimKey, long groupId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_G_M_First( - long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_G_M_First( - long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_G_M_Last( - long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_G_M_Last( - long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByR_G_M_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_M( - long resourcePrimKey, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_M( - long resourcePrimKey, long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_M( - long resourcePrimKey, long groupId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByR_G_M_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? and main = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @throws SystemException if a system exception occurred - */ - public void removeByR_G_M(long resourcePrimKey, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_G_M(long resourcePrimKey, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_G_M(long[] resourcePrimKeies, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByR_G_M(long resourcePrimKey, long groupId, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByR_G_M(long[] resourcePrimKeies, long groupId, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_S( - long resourcePrimKey, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_S( - long resourcePrimKey, long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_S( - long resourcePrimKey, long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_G_S_First( - long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_G_S_First( - long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByR_G_S_Last( - long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByR_G_S_Last( - long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByR_G_S_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_S( - long resourcePrimKey, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_S( - long resourcePrimKey, long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_S( - long resourcePrimKey, long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByR_G_S_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_S( - long[] resourcePrimKeies, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_S( - long[] resourcePrimKeies, long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByR_G_S( - long[] resourcePrimKeies, long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_S( - long[] resourcePrimKeies, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_S( - long[] resourcePrimKeies, long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByR_G_S( - long[] resourcePrimKeies, long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? and status = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByR_G_S(long resourcePrimKey, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_G_S(long resourcePrimKey, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByR_G_S(long[] resourcePrimKeies, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByR_G_S(long resourcePrimKey, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByR_G_S(long[] resourcePrimKeies, long groupId, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_L_First( - long groupId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_L_First( - long groupId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_L_Last( - long groupId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_L_Last( - long groupId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_P_L_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_L_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest, - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest, - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public void removeByG_P_L(long groupId, long parentResourcePrimKey, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_L(long groupId, long parentResourcePrimKey, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_L(long groupId, long[] parentResourcePrimKeies, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_L(long groupId, long parentResourcePrimKey, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_L(long groupId, long[] parentResourcePrimKeies, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_M( - long groupId, long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_M( - long groupId, long parentResourcePrimKey, boolean main, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_M( - long groupId, long parentResourcePrimKey, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_M_First( - long groupId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_M_First( - long groupId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_M_Last( - long groupId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_M_Last( - long groupId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_P_M_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_M( - long groupId, long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_M( - long groupId, long parentResourcePrimKey, boolean main, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_M( - long groupId, long parentResourcePrimKey, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_M_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @throws SystemException if a system exception occurred - */ - public void removeByG_P_M(long groupId, long parentResourcePrimKey, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_M(long groupId, long parentResourcePrimKey, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_M(long groupId, long[] parentResourcePrimKeies, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_M(long groupId, long parentResourcePrimKey, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_M(long groupId, long[] parentResourcePrimKeies, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S( - long groupId, long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S( - long groupId, long parentResourcePrimKey, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_S_First( - long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_First( - long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_S_Last( - long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_Last( - long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_P_S_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S( - long groupId, long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S( - long groupId, long parentResourcePrimKey, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_S_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_P_S(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_S(long groupId, long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_S(long groupId, long[] parentResourcePrimKeies, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_S(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_S(long groupId, long[] parentResourcePrimKeies, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_KBFI_UT_First( - long groupId, long kbFolderId, java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_UT_First( - long groupId, long kbFolderId, java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_KBFI_UT_Last( - long groupId, long kbFolderId, java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_UT_Last( - long groupId, long kbFolderId, java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_KBFI_UT_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, - java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_KBFI_UT_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, - java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? from the database. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @throws SystemException if a system exception occurred - */ - public void removeByG_KBFI_UT(long groupId, long kbFolderId, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_KBFI_UT(long groupId, long kbFolderId, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_KBFI_UT(long groupId, long kbFolderId, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_S( - long groupId, long kbFolderId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_S( - long groupId, long kbFolderId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_S( - long groupId, long kbFolderId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_KBFI_S_First( - long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_S_First( - long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_KBFI_S_Last( - long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_S_Last( - long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_KBFI_S_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_S( - long groupId, long kbFolderId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_S( - long groupId, long kbFolderId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_S( - long groupId, long kbFolderId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_KBFI_S_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and kbFolderId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_KBFI_S(long groupId, long kbFolderId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_KBFI_S(long groupId, long kbFolderId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_KBFI_S(long groupId, long kbFolderId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_S_L_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_L_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_S_L_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_L_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_P_S_L_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_S_L_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public void removeByG_P_S_L(long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_S_L(long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_S_L(long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_S_L(long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_S_L(long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_S_M_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_M_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_S_M_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_M_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_P_S_M_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_S_M_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @throws SystemException if a system exception occurred - */ - public void removeByG_P_S_M(long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_S_M(long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_S_M(long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_S_M(long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_S_M(long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_S_S_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_S_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_P_S_S_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_S_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_P_S_S_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_S_S_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_P_S_S(long groupId, long parentResourcePrimKey, - java.lang.String sections, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_S_S(long groupId, long parentResourcePrimKey, - java.lang.String sections, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_P_S_S(long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_S_S(long groupId, long parentResourcePrimKey, - java.lang.String sections, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P_S_S(long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_KBFI_UT_ST_First( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_UT_ST_First( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByG_KBFI_UT_ST_Last( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_UT_ST_Last( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] findByG_KBFI_UT_ST_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, - java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle[] filterFindByG_KBFI_UT_ST_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, - java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, - int[] statuses, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, - int[] statuses, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, - int[] statuses, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, - int[] statuses, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ? from the database. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public int countByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the k b article in the entity cache if it is enabled. - * - * @param kbArticle the k b article - */ - public void cacheResult(com.liferay.knowledgebase.model.KBArticle kbArticle); - - /** - * Caches the k b articles in the entity cache if it is enabled. - * - * @param kbArticles the k b articles - */ - public void cacheResult( - java.util.List kbArticles); - - /** - * Creates a new k b article with the primary key. Does not add the k b article to the database. - * - * @param kbArticleId the primary key for the new k b article - * @return the new k b article - */ - public com.liferay.knowledgebase.model.KBArticle create(long kbArticleId); - - /** - * Removes the k b article with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article that was removed - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle remove(long kbArticleId) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBArticle updateImpl( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchArticleException} if it could not be found. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle findByPrimaryKey( - long kbArticleId) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b article with the primary key or returns null if it could not be found. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article, or null if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBArticle fetchByPrimaryKey( - long kbArticleId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b articles. - * - * @return the k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b articles - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b articles from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b articles. - * - * @return the number of k b articles - * @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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleUtil.java deleted file mode 100644 index 2816e7d2a6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBArticleUtil.java +++ /dev/null @@ -1,9438 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBArticle; - -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 java.util.List; - -/** - * The persistence utility for the k b article service. This utility wraps {@link KBArticlePersistenceImpl} 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. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBArticlePersistence - * @see KBArticlePersistenceImpl - * @generated - */ -public class KBArticleUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(KBArticle kbArticle) { - getPersistence().clearCache(kbArticle); - } - - /** - * @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 findWithDynamicQuery( - DynamicQuery dynamicQuery) throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 KBArticle update(KBArticle kbArticle) - throws SystemException { - return getPersistence().update(kbArticle); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static KBArticle update(KBArticle kbArticle, - ServiceContext serviceContext) throws SystemException { - return getPersistence().update(kbArticle, serviceContext); - } - - /** - * Returns all the k b articles where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid); - } - - /** - * Returns a range of all the k b articles where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end); - } - - /** - * Returns an ordered range of all the k b articles where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where uuid = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByUuid_PrevAndNext( - long kbArticleId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_PrevAndNext(kbArticleId, uuid, orderByComparator); - } - - /** - * Removes all the k b articles where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid(uuid); - } - - /** - * Returns the number of k b articles where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid(uuid); - } - - /** - * Returns the k b article where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchArticleException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUUID_G(uuid, groupId); - } - - /** - * Returns the k b article where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the k b article where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); - } - - /** - * Removes the k b article where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b article that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().removeByUUID_G(uuid, groupId); - } - - /** - * Returns the number of k b articles where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUUID_G(uuid, groupId); - } - - /** - * Returns all the k b articles where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId); - } - - /** - * Returns a range of all the k b articles where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId, start, end); - } - - /** - * Returns an ordered range of all the k b articles where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C(uuid, companyId, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByUuid_C_PrevAndNext( - long kbArticleId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_PrevAndNext(kbArticleId, uuid, companyId, - orderByComparator); - } - - /** - * Removes all the k b articles where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid_C(uuid, companyId); - } - - /** - * Returns the number of k b articles where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid_C(uuid, companyId); - } - - /** - * Returns all the k b articles where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByResourcePrimKey( - long resourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByResourcePrimKey(resourcePrimKey); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByResourcePrimKey( - long resourcePrimKey, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByResourcePrimKey(resourcePrimKey, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByResourcePrimKey( - long resourcePrimKey, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByResourcePrimKey(resourcePrimKey, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByResourcePrimKey_First( - long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByResourcePrimKey_First(resourcePrimKey, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByResourcePrimKey_First( - long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByResourcePrimKey_First(resourcePrimKey, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByResourcePrimKey_Last( - long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByResourcePrimKey_Last(resourcePrimKey, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByResourcePrimKey_Last( - long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByResourcePrimKey_Last(resourcePrimKey, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByResourcePrimKey_PrevAndNext( - long kbArticleId, long resourcePrimKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByResourcePrimKey_PrevAndNext(kbArticleId, - resourcePrimKey, orderByComparator); - } - - /** - * Removes all the k b articles where resourcePrimKey = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @throws SystemException if a system exception occurred - */ - public static void removeByResourcePrimKey(long resourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByResourcePrimKey(resourcePrimKey); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByResourcePrimKey(long resourcePrimKey) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByResourcePrimKey(resourcePrimKey); - } - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G( - long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_G(resourcePrimKey, groupId); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G( - long resourcePrimKey, long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_G(resourcePrimKey, groupId, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G( - long resourcePrimKey, long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G(resourcePrimKey, groupId, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_G_First( - long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_First(resourcePrimKey, groupId, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_G_First( - long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_G_First(resourcePrimKey, groupId, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_G_Last( - long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_Last(resourcePrimKey, groupId, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_G_Last( - long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_G_Last(resourcePrimKey, groupId, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByR_G_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G( - long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByR_G(resourcePrimKey, groupId); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G( - long resourcePrimKey, long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G(resourcePrimKey, groupId, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G( - long resourcePrimKey, long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G(resourcePrimKey, groupId, start, end, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByR_G_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, orderByComparator); - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public static void removeByR_G(long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByR_G(resourcePrimKey, groupId); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_G(long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_G(resourcePrimKey, groupId); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByR_G(long resourcePrimKey, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByR_G(resourcePrimKey, groupId); - } - - /** - * Returns the k b article where resourcePrimKey = ? and version = ? or throws a {@link com.liferay.knowledgebase.NoSuchArticleException} if it could not be found. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_V( - long resourcePrimKey, int version) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_V(resourcePrimKey, version); - } - - /** - * Returns the k b article where resourcePrimKey = ? and version = ? or returns null if it could not be found. Uses the finder cache. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_V( - long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByR_V(resourcePrimKey, version); - } - - /** - * Returns the k b article where resourcePrimKey = ? and version = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_V( - long resourcePrimKey, int version, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_V(resourcePrimKey, version, retrieveFromCache); - } - - /** - * Removes the k b article where resourcePrimKey = ? and version = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the k b article that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle removeByR_V( - long resourcePrimKey, int version) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().removeByR_V(resourcePrimKey, version); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and version = ?. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_V(long resourcePrimKey, int version) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_V(resourcePrimKey, version); - } - - /** - * Returns all the k b articles where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_L( - long resourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_L(resourcePrimKey, latest); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_L( - long resourcePrimKey, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_L(resourcePrimKey, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_L( - long resourcePrimKey, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_L(resourcePrimKey, latest, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_L_First( - long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_L_First(resourcePrimKey, latest, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_L_First( - long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_L_First(resourcePrimKey, latest, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_L_Last( - long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_L_Last(resourcePrimKey, latest, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_L_Last( - long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_L_Last(resourcePrimKey, latest, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByR_L_PrevAndNext( - long kbArticleId, long resourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_L_PrevAndNext(kbArticleId, resourcePrimKey, latest, - orderByComparator); - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_L( - long[] resourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_L(resourcePrimKeies, latest); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_L( - long[] resourcePrimKeies, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_L(resourcePrimKeies, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_L( - long[] resourcePrimKeies, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_L(resourcePrimKeies, latest, start, end, - orderByComparator); - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and latest = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public static void removeByR_L(long resourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByR_L(resourcePrimKey, latest); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_L(long resourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_L(resourcePrimKey, latest); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_L(long[] resourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_L(resourcePrimKeies, latest); - } - - /** - * Returns all the k b articles where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_M( - long resourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_M(resourcePrimKey, main); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_M( - long resourcePrimKey, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_M(resourcePrimKey, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_M( - long resourcePrimKey, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_M(resourcePrimKey, main, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_M_First( - long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_M_First(resourcePrimKey, main, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_M_First( - long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_M_First(resourcePrimKey, main, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_M_Last( - long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_M_Last(resourcePrimKey, main, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_M_Last( - long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_M_Last(resourcePrimKey, main, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByR_M_PrevAndNext( - long kbArticleId, long resourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_M_PrevAndNext(kbArticleId, resourcePrimKey, main, - orderByComparator); - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_M( - long[] resourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_M(resourcePrimKeies, main); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_M( - long[] resourcePrimKeies, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_M(resourcePrimKeies, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_M( - long[] resourcePrimKeies, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_M(resourcePrimKeies, main, start, end, - orderByComparator); - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and main = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @throws SystemException if a system exception occurred - */ - public static void removeByR_M(long resourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByR_M(resourcePrimKey, main); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_M(long resourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_M(resourcePrimKey, main); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_M(long[] resourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_M(resourcePrimKeies, main); - } - - /** - * Returns all the k b articles where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_S( - long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_S(resourcePrimKey, status); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_S( - long resourcePrimKey, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_S(resourcePrimKey, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_S( - long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_S(resourcePrimKey, status, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_S_First( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_S_First(resourcePrimKey, status, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_S_First( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_S_First(resourcePrimKey, status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_S_Last( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_S_Last(resourcePrimKey, status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_S_Last( - long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_S_Last(resourcePrimKey, status, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByR_S_PrevAndNext( - long kbArticleId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_S_PrevAndNext(kbArticleId, resourcePrimKey, status, - orderByComparator); - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_S( - long[] resourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_S(resourcePrimKeies, status); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_S( - long[] resourcePrimKeies, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_S(resourcePrimKeies, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_S( - long[] resourcePrimKeies, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_S(resourcePrimKeies, status, start, end, - orderByComparator); - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and status = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByR_S(long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByR_S(resourcePrimKey, status); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_S(long resourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_S(resourcePrimKey, status); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_S(long[] resourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_S(resourcePrimKeies, status); - } - - /** - * Returns all the k b articles where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_L( - long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_L(groupId, latest); - } - - /** - * Returns a range of all the k b articles where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_L( - long groupId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_L(groupId, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_L( - long groupId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_L(groupId, latest, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_L_First( - long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_L_First(groupId, latest, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_L_First( - long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_L_First(groupId, latest, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_L_Last( - long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_L_Last(groupId, latest, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_L_Last( - long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_L_Last(groupId, latest, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_L_PrevAndNext( - long kbArticleId, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_L_PrevAndNext(kbArticleId, groupId, latest, - orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_L( - long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_L(groupId, latest); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_L( - long groupId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_L(groupId, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_L( - long groupId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_L(groupId, latest, start, end, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_L_PrevAndNext( - long kbArticleId, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_L_PrevAndNext(kbArticleId, groupId, latest, - orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and latest = ? from the database. - * - * @param groupId the group ID - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public static void removeByG_L(long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_L(groupId, latest); - } - - /** - * Returns the number of k b articles where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_L(long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_L(groupId, latest); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_L(long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_L(groupId, latest); - } - - /** - * Returns all the k b articles where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_M( - long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_M(groupId, main); - } - - /** - * Returns a range of all the k b articles where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_M( - long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_M(groupId, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_M( - long groupId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_M(groupId, main, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_M_First( - long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_M_First(groupId, main, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_M_First( - long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_M_First(groupId, main, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_M_Last( - long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_M_Last(groupId, main, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_M_Last( - long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByG_M_Last(groupId, main, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_M_PrevAndNext( - long kbArticleId, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_M_PrevAndNext(kbArticleId, groupId, main, - orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_M( - long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_M(groupId, main); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_M( - long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_M(groupId, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_M( - long groupId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_M(groupId, main, start, end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_M_PrevAndNext( - long kbArticleId, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_M_PrevAndNext(kbArticleId, groupId, main, - orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and main = ? from the database. - * - * @param groupId the group ID - * @param main the main - * @throws SystemException if a system exception occurred - */ - public static void removeByG_M(long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_M(groupId, main); - } - - /** - * Returns the number of k b articles where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_M(long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_M(groupId, main); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_M(long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_M(groupId, main); - } - - /** - * Returns all the k b articles where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status); - } - - /** - * Returns a range of all the k b articles where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S(groupId, status, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_S_PrevAndNext( - long kbArticleId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S_PrevAndNext(kbArticleId, groupId, status, - orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_S(groupId, status); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_S(groupId, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_S(groupId, status, start, end, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_S_PrevAndNext( - long kbArticleId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_S_PrevAndNext(kbArticleId, groupId, status, - orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_S(groupId, status); - } - - /** - * Returns the number of k b articles where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_S(groupId, status); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_S(groupId, status); - } - - /** - * Returns all the k b articles where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_L( - long companyId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_L(companyId, latest); - } - - /** - * Returns a range of all the k b articles where companyId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_L( - long companyId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_L(companyId, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where companyId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_L( - long companyId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_L(companyId, latest, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByC_L_First( - long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_L_First(companyId, latest, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByC_L_First( - long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_L_First(companyId, latest, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByC_L_Last( - long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_L_Last(companyId, latest, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByC_L_Last( - long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_L_Last(companyId, latest, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where companyId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByC_L_PrevAndNext( - long kbArticleId, long companyId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_L_PrevAndNext(kbArticleId, companyId, latest, - orderByComparator); - } - - /** - * Removes all the k b articles where companyId = ? and latest = ? from the database. - * - * @param companyId the company ID - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public static void removeByC_L(long companyId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByC_L(companyId, latest); - } - - /** - * Returns the number of k b articles where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByC_L(long companyId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByC_L(companyId, latest); - } - - /** - * Returns all the k b articles where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_M( - long companyId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_M(companyId, main); - } - - /** - * Returns a range of all the k b articles where companyId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_M( - long companyId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_M(companyId, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where companyId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_M( - long companyId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_M(companyId, main, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByC_M_First( - long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_M_First(companyId, main, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByC_M_First( - long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_M_First(companyId, main, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByC_M_Last( - long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_M_Last(companyId, main, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByC_M_Last( - long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_M_Last(companyId, main, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where companyId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByC_M_PrevAndNext( - long kbArticleId, long companyId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_M_PrevAndNext(kbArticleId, companyId, main, - orderByComparator); - } - - /** - * Removes all the k b articles where companyId = ? and main = ? from the database. - * - * @param companyId the company ID - * @param main the main - * @throws SystemException if a system exception occurred - */ - public static void removeByC_M(long companyId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByC_M(companyId, main); - } - - /** - * Returns the number of k b articles where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByC_M(long companyId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByC_M(companyId, main); - } - - /** - * Returns all the k b articles where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_S( - long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_S(companyId, status); - } - - /** - * Returns a range of all the k b articles where companyId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_S( - long companyId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_S(companyId, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where companyId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_S( - long companyId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_S(companyId, status, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByC_S_First( - long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_S_First(companyId, status, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByC_S_First( - long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_S_First(companyId, status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByC_S_Last( - long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_S_Last(companyId, status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByC_S_Last( - long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_S_Last(companyId, status, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where companyId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByC_S_PrevAndNext( - long kbArticleId, long companyId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_S_PrevAndNext(kbArticleId, companyId, status, - orderByComparator); - } - - /** - * Removes all the k b articles where companyId = ? and status = ? from the database. - * - * @param companyId the company ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByC_S(long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByC_S(companyId, status); - } - - /** - * Returns the number of k b articles where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByC_S(long companyId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByC_S(companyId, status); - } - - /** - * Returns all the k b articles where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_L( - long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByP_L(parentResourcePrimKey, latest); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_L( - long parentResourcePrimKey, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_L(parentResourcePrimKey, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_L( - long parentResourcePrimKey, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_L(parentResourcePrimKey, latest, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByP_L_First( - long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_L_First(parentResourcePrimKey, latest, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByP_L_First( - long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByP_L_First(parentResourcePrimKey, latest, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByP_L_Last( - long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_L_Last(parentResourcePrimKey, latest, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByP_L_Last( - long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByP_L_Last(parentResourcePrimKey, latest, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByP_L_PrevAndNext( - long kbArticleId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_L_PrevAndNext(kbArticleId, parentResourcePrimKey, - latest, orderByComparator); - } - - /** - * Returns all the k b articles where parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_L( - long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByP_L(parentResourcePrimKeies, latest); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_L( - long[] parentResourcePrimKeies, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_L(parentResourcePrimKeies, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_L( - long[] parentResourcePrimKeies, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_L(parentResourcePrimKeies, latest, start, end, - orderByComparator); - } - - /** - * Removes all the k b articles where parentResourcePrimKey = ? and latest = ? from the database. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public static void removeByP_L(long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByP_L(parentResourcePrimKey, latest); - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByP_L(long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByP_L(parentResourcePrimKey, latest); - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = any ? and latest = ?. - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByP_L(long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByP_L(parentResourcePrimKeies, latest); - } - - /** - * Returns all the k b articles where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_M( - long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByP_M(parentResourcePrimKey, main); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_M( - long parentResourcePrimKey, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_M(parentResourcePrimKey, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_M( - long parentResourcePrimKey, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_M(parentResourcePrimKey, main, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByP_M_First( - long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_M_First(parentResourcePrimKey, main, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByP_M_First( - long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByP_M_First(parentResourcePrimKey, main, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByP_M_Last( - long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_M_Last(parentResourcePrimKey, main, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByP_M_Last( - long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByP_M_Last(parentResourcePrimKey, main, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByP_M_PrevAndNext( - long kbArticleId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_M_PrevAndNext(kbArticleId, parentResourcePrimKey, - main, orderByComparator); - } - - /** - * Returns all the k b articles where parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_M( - long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByP_M(parentResourcePrimKeies, main); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_M( - long[] parentResourcePrimKeies, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_M(parentResourcePrimKeies, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_M( - long[] parentResourcePrimKeies, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_M(parentResourcePrimKeies, main, start, end, - orderByComparator); - } - - /** - * Removes all the k b articles where parentResourcePrimKey = ? and main = ? from the database. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @throws SystemException if a system exception occurred - */ - public static void removeByP_M(long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByP_M(parentResourcePrimKey, main); - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByP_M(long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByP_M(parentResourcePrimKey, main); - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = any ? and main = ?. - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByP_M(long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByP_M(parentResourcePrimKeies, main); - } - - /** - * Returns all the k b articles where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_S( - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByP_S(parentResourcePrimKey, status); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_S( - long parentResourcePrimKey, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_S(parentResourcePrimKey, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_S( - long parentResourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_S(parentResourcePrimKey, status, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByP_S_First( - long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_S_First(parentResourcePrimKey, status, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByP_S_First( - long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByP_S_First(parentResourcePrimKey, status, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByP_S_Last( - long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_S_Last(parentResourcePrimKey, status, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByP_S_Last( - long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByP_S_Last(parentResourcePrimKey, status, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByP_S_PrevAndNext( - long kbArticleId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_S_PrevAndNext(kbArticleId, parentResourcePrimKey, - status, orderByComparator); - } - - /** - * Returns all the k b articles where parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_S( - long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByP_S(parentResourcePrimKeies, status); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_S( - long[] parentResourcePrimKeies, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_S(parentResourcePrimKeies, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByP_S( - long[] parentResourcePrimKeies, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByP_S(parentResourcePrimKeies, status, start, end, - orderByComparator); - } - - /** - * Removes all the k b articles where parentResourcePrimKey = ? and status = ? from the database. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByP_S(long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByP_S(parentResourcePrimKey, status); - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByP_S(long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByP_S(parentResourcePrimKey, status); - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = any ? and status = ?. - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByP_S(long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByP_S(parentResourcePrimKeies, status); - } - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_L( - long resourcePrimKey, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_G_L(resourcePrimKey, groupId, latest); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_L( - long resourcePrimKey, long groupId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_L(resourcePrimKey, groupId, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_L( - long resourcePrimKey, long groupId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_L(resourcePrimKey, groupId, latest, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_G_L_First( - long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_L_First(resourcePrimKey, groupId, latest, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_G_L_First( - long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_G_L_First(resourcePrimKey, groupId, latest, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_G_L_Last( - long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_L_Last(resourcePrimKey, groupId, latest, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_G_L_Last( - long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_G_L_Last(resourcePrimKey, groupId, latest, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByR_G_L_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_L_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, latest, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_L( - long resourcePrimKey, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_L(resourcePrimKey, groupId, latest); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_L( - long resourcePrimKey, long groupId, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_L(resourcePrimKey, groupId, latest, start, - end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_L( - long resourcePrimKey, long groupId, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_L(resourcePrimKey, groupId, latest, start, - end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByR_G_L_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_L_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, latest, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_L(resourcePrimKeies, groupId, latest); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_L(resourcePrimKeies, groupId, latest, - start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_L(resourcePrimKeies, groupId, latest, - start, end, orderByComparator); - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_G_L(resourcePrimKeies, groupId, latest); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_L(resourcePrimKeies, groupId, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_L( - long[] resourcePrimKeies, long groupId, boolean latest, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_L(resourcePrimKeies, groupId, latest, start, end, - orderByComparator); - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public static void removeByR_G_L(long resourcePrimKey, long groupId, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByR_G_L(resourcePrimKey, groupId, latest); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_G_L(long resourcePrimKey, long groupId, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_G_L(resourcePrimKey, groupId, latest); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_G_L(long[] resourcePrimKeies, long groupId, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_G_L(resourcePrimKeies, groupId, latest); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByR_G_L(long resourcePrimKey, long groupId, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByR_G_L(resourcePrimKey, groupId, latest); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByR_G_L(long[] resourcePrimKeies, - long groupId, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByR_G_L(resourcePrimKeies, groupId, latest); - } - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_M( - long resourcePrimKey, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_G_M(resourcePrimKey, groupId, main); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_M( - long resourcePrimKey, long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_M(resourcePrimKey, groupId, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_M( - long resourcePrimKey, long groupId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_M(resourcePrimKey, groupId, main, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_G_M_First( - long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_M_First(resourcePrimKey, groupId, main, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_G_M_First( - long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_G_M_First(resourcePrimKey, groupId, main, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_G_M_Last( - long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_M_Last(resourcePrimKey, groupId, main, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_G_M_Last( - long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_G_M_Last(resourcePrimKey, groupId, main, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByR_G_M_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_M_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, main, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_M( - long resourcePrimKey, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByR_G_M(resourcePrimKey, groupId, main); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_M( - long resourcePrimKey, long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_M(resourcePrimKey, groupId, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_M( - long resourcePrimKey, long groupId, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_M(resourcePrimKey, groupId, main, start, - end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByR_G_M_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_M_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, main, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_M(resourcePrimKeies, groupId, main); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_M(resourcePrimKeies, groupId, main, start, - end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_M(resourcePrimKeies, groupId, main, start, - end, orderByComparator); - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_G_M(resourcePrimKeies, groupId, main); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_M(resourcePrimKeies, groupId, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_M( - long[] resourcePrimKeies, long groupId, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_M(resourcePrimKeies, groupId, main, start, end, - orderByComparator); - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? and main = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @throws SystemException if a system exception occurred - */ - public static void removeByR_G_M(long resourcePrimKey, long groupId, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByR_G_M(resourcePrimKey, groupId, main); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_G_M(long resourcePrimKey, long groupId, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_G_M(resourcePrimKey, groupId, main); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_G_M(long[] resourcePrimKeies, long groupId, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_G_M(resourcePrimKeies, groupId, main); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByR_G_M(long resourcePrimKey, long groupId, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByR_G_M(resourcePrimKey, groupId, main); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByR_G_M(long[] resourcePrimKeies, - long groupId, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByR_G_M(resourcePrimKeies, groupId, main); - } - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_S( - long resourcePrimKey, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_G_S(resourcePrimKey, groupId, status); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_S( - long resourcePrimKey, long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_S(resourcePrimKey, groupId, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_S( - long resourcePrimKey, long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_S(resourcePrimKey, groupId, status, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_G_S_First( - long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_S_First(resourcePrimKey, groupId, status, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_G_S_First( - long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_G_S_First(resourcePrimKey, groupId, status, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByR_G_S_Last( - long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_S_Last(resourcePrimKey, groupId, status, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByR_G_S_Last( - long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByR_G_S_Last(resourcePrimKey, groupId, status, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByR_G_S_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_S_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, status, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_S( - long resourcePrimKey, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_S(resourcePrimKey, groupId, status); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_S( - long resourcePrimKey, long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_S(resourcePrimKey, groupId, status, start, - end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_S( - long resourcePrimKey, long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_S(resourcePrimKey, groupId, status, start, - end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByR_G_S_PrevAndNext( - long kbArticleId, long resourcePrimKey, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_S_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, status, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_S( - long[] resourcePrimKeies, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_S(resourcePrimKeies, groupId, status); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_S( - long[] resourcePrimKeies, long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_S(resourcePrimKeies, groupId, status, - start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByR_G_S( - long[] resourcePrimKeies, long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByR_G_S(resourcePrimKeies, groupId, status, - start, end, orderByComparator); - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_S( - long[] resourcePrimKeies, long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByR_G_S(resourcePrimKeies, groupId, status); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_S( - long[] resourcePrimKeies, long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_S(resourcePrimKeies, groupId, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByR_G_S( - long[] resourcePrimKeies, long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByR_G_S(resourcePrimKeies, groupId, status, start, end, - orderByComparator); - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? and status = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByR_G_S(long resourcePrimKey, long groupId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByR_G_S(resourcePrimKey, groupId, status); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_G_S(long resourcePrimKey, long groupId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_G_S(resourcePrimKey, groupId, status); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByR_G_S(long[] resourcePrimKeies, long groupId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByR_G_S(resourcePrimKeies, groupId, status); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByR_G_S(long resourcePrimKey, long groupId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByR_G_S(resourcePrimKey, groupId, status); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByR_G_S(long[] resourcePrimKeies, - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByR_G_S(resourcePrimKeies, groupId, status); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_L(groupId, parentResourcePrimKey, latest); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_L(groupId, parentResourcePrimKey, latest, start, - end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_L(groupId, parentResourcePrimKey, latest, start, - end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_L_First( - long groupId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_L_First(groupId, parentResourcePrimKey, latest, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_L_First( - long groupId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_L_First(groupId, parentResourcePrimKey, latest, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_L_Last( - long groupId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_L_Last(groupId, parentResourcePrimKey, latest, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_L_Last( - long groupId, long parentResourcePrimKey, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_L_Last(groupId, parentResourcePrimKey, latest, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_P_L_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_L_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, latest, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_L(groupId, parentResourcePrimKey, latest); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_L(groupId, parentResourcePrimKey, latest, - start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_L( - long groupId, long parentResourcePrimKey, boolean latest, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_L(groupId, parentResourcePrimKey, latest, - start, end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_L_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_L_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, latest, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_L(groupId, parentResourcePrimKeies, latest); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest, - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_L(groupId, parentResourcePrimKeies, latest, - start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_L(groupId, parentResourcePrimKeies, latest, - start, end, orderByComparator); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_L(groupId, parentResourcePrimKeies, latest); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest, - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_L(groupId, parentResourcePrimKeies, latest, - start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_L( - long groupId, long[] parentResourcePrimKeies, boolean latest, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_L(groupId, parentResourcePrimKeies, latest, - start, end, orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public static void removeByG_P_L(long groupId, long parentResourcePrimKey, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_P_L(groupId, parentResourcePrimKey, latest); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_L(long groupId, long parentResourcePrimKey, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_L(groupId, parentResourcePrimKey, latest); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_L(long groupId, - long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_L(groupId, parentResourcePrimKeies, latest); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_L(long groupId, - long parentResourcePrimKey, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_L(groupId, parentResourcePrimKey, latest); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_L(long groupId, - long[] parentResourcePrimKeies, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_L(groupId, parentResourcePrimKeies, latest); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_M( - long groupId, long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_P_M(groupId, parentResourcePrimKey, main); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_M( - long groupId, long parentResourcePrimKey, boolean main, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_M(groupId, parentResourcePrimKey, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_M( - long groupId, long parentResourcePrimKey, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_M(groupId, parentResourcePrimKey, main, start, - end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_M_First( - long groupId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_M_First(groupId, parentResourcePrimKey, main, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_M_First( - long groupId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_M_First(groupId, parentResourcePrimKey, main, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_M_Last( - long groupId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_M_Last(groupId, parentResourcePrimKey, main, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_M_Last( - long groupId, long parentResourcePrimKey, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_M_Last(groupId, parentResourcePrimKey, main, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_P_M_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_M_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, main, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_M( - long groupId, long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_M(groupId, parentResourcePrimKey, main); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_M( - long groupId, long parentResourcePrimKey, boolean main, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_M(groupId, parentResourcePrimKey, main, - start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_M( - long groupId, long parentResourcePrimKey, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_M(groupId, parentResourcePrimKey, main, - start, end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_M_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_M_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, main, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_M(groupId, parentResourcePrimKeies, main); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_M(groupId, parentResourcePrimKeies, main, - start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_M(groupId, parentResourcePrimKeies, main, - start, end, orderByComparator); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_M(groupId, parentResourcePrimKeies, main); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_M(groupId, parentResourcePrimKeies, main, start, - end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_M( - long groupId, long[] parentResourcePrimKeies, boolean main, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_M(groupId, parentResourcePrimKeies, main, start, - end, orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @throws SystemException if a system exception occurred - */ - public static void removeByG_P_M(long groupId, long parentResourcePrimKey, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_P_M(groupId, parentResourcePrimKey, main); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_M(long groupId, long parentResourcePrimKey, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_M(groupId, parentResourcePrimKey, main); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_M(long groupId, - long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_M(groupId, parentResourcePrimKeies, main); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_M(long groupId, - long parentResourcePrimKey, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_M(groupId, parentResourcePrimKey, main); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_M(long groupId, - long[] parentResourcePrimKeies, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_M(groupId, parentResourcePrimKeies, main); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S( - long groupId, long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S(groupId, parentResourcePrimKey, status); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S( - long groupId, long parentResourcePrimKey, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S(groupId, parentResourcePrimKey, status, start, - end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S(groupId, parentResourcePrimKey, status, start, - end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_S_First( - long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_First(groupId, parentResourcePrimKey, status, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_First( - long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_S_First(groupId, parentResourcePrimKey, status, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_S_Last( - long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_Last(groupId, parentResourcePrimKey, status, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_Last( - long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_S_Last(groupId, parentResourcePrimKey, status, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_P_S_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, status, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S( - long groupId, long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S(groupId, parentResourcePrimKey, status); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S( - long groupId, long parentResourcePrimKey, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S(groupId, parentResourcePrimKey, status, - start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S(groupId, parentResourcePrimKey, status, - start, end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_S_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, status, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S(groupId, parentResourcePrimKeies, status); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S(groupId, parentResourcePrimKeies, status, - start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S(groupId, parentResourcePrimKeies, status, - start, end, orderByComparator); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S(groupId, parentResourcePrimKeies, status); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S(groupId, parentResourcePrimKeies, status, - start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S( - long groupId, long[] parentResourcePrimKeies, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S(groupId, parentResourcePrimKeies, status, - start, end, orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_P_S(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_P_S(groupId, parentResourcePrimKey, status); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_S(long groupId, long parentResourcePrimKey, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_S(groupId, parentResourcePrimKey, status); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_S(long groupId, - long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_S(groupId, parentResourcePrimKeies, status); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_S(long groupId, - long parentResourcePrimKey, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_S(groupId, parentResourcePrimKey, status); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_S(long groupId, - long[] parentResourcePrimKeies, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_S(groupId, parentResourcePrimKeies, status); - } - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_KBFI_UT(groupId, kbFolderId, urlTitle); - } - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT(groupId, kbFolderId, urlTitle, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT(groupId, kbFolderId, urlTitle, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_KBFI_UT_First( - long groupId, long kbFolderId, java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_First(groupId, kbFolderId, urlTitle, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_UT_First( - long groupId, long kbFolderId, java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_KBFI_UT_First(groupId, kbFolderId, urlTitle, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_KBFI_UT_Last( - long groupId, long kbFolderId, java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_Last(groupId, kbFolderId, urlTitle, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_UT_Last( - long groupId, long kbFolderId, java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_KBFI_UT_Last(groupId, kbFolderId, urlTitle, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_KBFI_UT_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, - java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_PrevAndNext(kbArticleId, groupId, - kbFolderId, urlTitle, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT(groupId, kbFolderId, urlTitle); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT(groupId, kbFolderId, urlTitle, start, - end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_UT( - long groupId, long kbFolderId, java.lang.String urlTitle, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT(groupId, kbFolderId, urlTitle, start, - end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_KBFI_UT_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, - java.lang.String urlTitle, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT_PrevAndNext(kbArticleId, groupId, - kbFolderId, urlTitle, orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? from the database. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @throws SystemException if a system exception occurred - */ - public static void removeByG_KBFI_UT(long groupId, long kbFolderId, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_KBFI_UT(groupId, kbFolderId, urlTitle); - } - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_KBFI_UT(long groupId, long kbFolderId, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_KBFI_UT(groupId, kbFolderId, urlTitle); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_KBFI_UT(long groupId, long kbFolderId, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_KBFI_UT(groupId, kbFolderId, urlTitle); - } - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_S( - long groupId, long kbFolderId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_KBFI_S(groupId, kbFolderId, status); - } - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_S( - long groupId, long kbFolderId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_S(groupId, kbFolderId, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_S( - long groupId, long kbFolderId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_S(groupId, kbFolderId, status, start, end, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_KBFI_S_First( - long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_S_First(groupId, kbFolderId, status, - orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_S_First( - long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_KBFI_S_First(groupId, kbFolderId, status, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_KBFI_S_Last( - long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_S_Last(groupId, kbFolderId, status, - orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_S_Last( - long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_KBFI_S_Last(groupId, kbFolderId, status, - orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_KBFI_S_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_S_PrevAndNext(kbArticleId, groupId, - kbFolderId, status, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_S( - long groupId, long kbFolderId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_KBFI_S(groupId, kbFolderId, status); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_S( - long groupId, long kbFolderId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_S(groupId, kbFolderId, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_S( - long groupId, long kbFolderId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_S(groupId, kbFolderId, status, start, - end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_KBFI_S_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_S_PrevAndNext(kbArticleId, groupId, - kbFolderId, status, orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and kbFolderId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_KBFI_S(long groupId, long kbFolderId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_KBFI_S(groupId, kbFolderId, status); - } - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_KBFI_S(long groupId, long kbFolderId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_KBFI_S(groupId, kbFolderId, status); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_KBFI_S(long groupId, long kbFolderId, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_KBFI_S(groupId, kbFolderId, status); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_L(groupId, parentResourcePrimKey, sections, - latest); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_L(groupId, parentResourcePrimKey, sections, - latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_L(groupId, parentResourcePrimKey, sections, - latest, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_S_L_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_L_First(groupId, parentResourcePrimKey, - sections, latest, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_L_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_S_L_First(groupId, parentResourcePrimKey, - sections, latest, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_S_L_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_L_Last(groupId, parentResourcePrimKey, - sections, latest, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_L_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_S_L_Last(groupId, parentResourcePrimKey, - sections, latest, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_P_S_L_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_L_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, sections, latest, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_L(groupId, parentResourcePrimKey, - sections, latest); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_L(groupId, parentResourcePrimKey, - sections, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_L(groupId, parentResourcePrimKey, - sections, latest, start, end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_S_L_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean latest, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_L_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, sections, latest, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_L(groupId, parentResourcePrimKey, - sectionses, latest); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_L(groupId, parentResourcePrimKey, - sectionses, latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_L(groupId, parentResourcePrimKey, - sectionses, latest, start, end, orderByComparator); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_L( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest, start, end, orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - public static void removeByG_P_S_L(long groupId, - long parentResourcePrimKey, java.lang.String sections, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence() - .removeByG_P_S_L(groupId, parentResourcePrimKey, sections, latest); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_S_L(long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_S_L(groupId, parentResourcePrimKey, sections, - latest); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_S_L(long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_S_L(long groupId, - long parentResourcePrimKey, java.lang.String sections, boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_S_L(groupId, parentResourcePrimKey, - sections, latest); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_S_L(long groupId, - long parentResourcePrimKey, java.lang.String[] sectionses, - boolean latest) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_S_L(groupId, parentResourcePrimKey, - sectionses, latest); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_M(groupId, parentResourcePrimKey, sections, main); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_M(groupId, parentResourcePrimKey, sections, - main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_M(groupId, parentResourcePrimKey, sections, - main, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_S_M_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_M_First(groupId, parentResourcePrimKey, - sections, main, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_M_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_S_M_First(groupId, parentResourcePrimKey, - sections, main, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_S_M_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_M_Last(groupId, parentResourcePrimKey, - sections, main, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_M_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_S_M_Last(groupId, parentResourcePrimKey, - sections, main, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_P_S_M_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_M_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, sections, main, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_M(groupId, parentResourcePrimKey, - sections, main); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_M(groupId, parentResourcePrimKey, - sections, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, java.lang.String sections, - boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_M(groupId, parentResourcePrimKey, - sections, main, start, end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_S_M_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean main, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_M_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, sections, main, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_M(groupId, parentResourcePrimKey, - sectionses, main); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_M(groupId, parentResourcePrimKey, - sectionses, main, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_M(groupId, parentResourcePrimKey, - sectionses, main, start, end, orderByComparator); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_M(groupId, parentResourcePrimKey, sectionses, - main); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_M(groupId, parentResourcePrimKey, sectionses, - main, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_M( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_M(groupId, parentResourcePrimKey, sectionses, - main, start, end, orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @throws SystemException if a system exception occurred - */ - public static void removeByG_P_S_M(long groupId, - long parentResourcePrimKey, java.lang.String sections, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence() - .removeByG_P_S_M(groupId, parentResourcePrimKey, sections, main); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_S_M(long groupId, long parentResourcePrimKey, - java.lang.String sections, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_S_M(groupId, parentResourcePrimKey, sections, - main); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_S_M(long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_S_M(groupId, parentResourcePrimKey, sectionses, - main); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_S_M(long groupId, - long parentResourcePrimKey, java.lang.String sections, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_S_M(groupId, parentResourcePrimKey, - sections, main); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_S_M(long groupId, - long parentResourcePrimKey, java.lang.String[] sectionses, boolean main) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_S_M(groupId, parentResourcePrimKey, - sectionses, main); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_S(groupId, parentResourcePrimKey, sections, - status); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_S(groupId, parentResourcePrimKey, sections, - status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_S(groupId, parentResourcePrimKey, sections, - status, start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_S_S_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_S_First(groupId, parentResourcePrimKey, - sections, status, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_S_First( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_S_S_First(groupId, parentResourcePrimKey, - sections, status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_P_S_S_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_S_Last(groupId, parentResourcePrimKey, - sections, status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_P_S_S_Last( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_S_S_Last(groupId, parentResourcePrimKey, - sections, status, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_P_S_S_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_S_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, sections, status, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_S(groupId, parentResourcePrimKey, - sections, status); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_S(groupId, parentResourcePrimKey, - sections, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, java.lang.String sections, - int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_S(groupId, parentResourcePrimKey, - sections, status, start, end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_P_S_S_PrevAndNext( - long kbArticleId, long groupId, long parentResourcePrimKey, - java.lang.String sections, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_S_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, sections, status, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_S(groupId, parentResourcePrimKey, - sectionses, status); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_S(groupId, parentResourcePrimKey, - sectionses, status, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_S_S(groupId, parentResourcePrimKey, - sectionses, status, start, end, orderByComparator); - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status, start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P_S_S( - long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status, start, end, orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_P_S_S(long groupId, - long parentResourcePrimKey, java.lang.String sections, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence() - .removeByG_P_S_S(groupId, parentResourcePrimKey, sections, status); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_S_S(long groupId, long parentResourcePrimKey, - java.lang.String sections, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_S_S(groupId, parentResourcePrimKey, sections, - status); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_S_S(long groupId, long parentResourcePrimKey, - java.lang.String[] sectionses, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_S_S(long groupId, - long parentResourcePrimKey, java.lang.String sections, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_S_S(groupId, parentResourcePrimKey, - sections, status); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P_S_S(long groupId, - long parentResourcePrimKey, java.lang.String[] sectionses, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_P_S_S(groupId, parentResourcePrimKey, - sectionses, status); - } - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status); - } - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status, - start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status, - start, end, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_KBFI_UT_ST_First( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_ST_First(groupId, kbFolderId, urlTitle, - status, orderByComparator); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_UT_ST_First( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_KBFI_UT_ST_First(groupId, kbFolderId, urlTitle, - status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByG_KBFI_UT_ST_Last( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_ST_Last(groupId, kbFolderId, urlTitle, - status, orderByComparator); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByG_KBFI_UT_ST_Last( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_KBFI_UT_ST_Last(groupId, kbFolderId, urlTitle, - status, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] findByG_KBFI_UT_ST_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, - java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_ST_PrevAndNext(kbArticleId, groupId, - kbFolderId, urlTitle, status, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - status); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - status, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int status, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - status, start, end, orderByComparator); - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle[] filterFindByG_KBFI_UT_ST_PrevAndNext( - long kbArticleId, long groupId, long kbFolderId, - java.lang.String urlTitle, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT_ST_PrevAndNext(kbArticleId, groupId, - kbFolderId, urlTitle, status, orderByComparator); - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - statuses); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, - int[] statuses, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - statuses, start, end); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, - int[] statuses, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - statuses, start, end, orderByComparator); - } - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, statuses); - } - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, - int[] statuses, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, statuses, - start, end); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_KBFI_UT_ST( - long groupId, long kbFolderId, java.lang.String urlTitle, - int[] statuses, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, statuses, - start, end, orderByComparator); - } - - /** - * Removes all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ? from the database. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence() - .removeByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status); - } - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status); - } - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - public static int countByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, statuses); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - status); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_KBFI_UT_ST(long groupId, long kbFolderId, - java.lang.String urlTitle, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterCountByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - statuses); - } - - /** - * Caches the k b article in the entity cache if it is enabled. - * - * @param kbArticle the k b article - */ - public static void cacheResult( - com.liferay.knowledgebase.model.KBArticle kbArticle) { - getPersistence().cacheResult(kbArticle); - } - - /** - * Caches the k b articles in the entity cache if it is enabled. - * - * @param kbArticles the k b articles - */ - public static void cacheResult( - java.util.List kbArticles) { - getPersistence().cacheResult(kbArticles); - } - - /** - * Creates a new k b article with the primary key. Does not add the k b article to the database. - * - * @param kbArticleId the primary key for the new k b article - * @return the new k b article - */ - public static com.liferay.knowledgebase.model.KBArticle create( - long kbArticleId) { - return getPersistence().create(kbArticleId); - } - - /** - * Removes the k b article with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article that was removed - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle remove( - long kbArticleId) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().remove(kbArticleId); - } - - public static com.liferay.knowledgebase.model.KBArticle updateImpl( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(kbArticle); - } - - /** - * Returns the k b article with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchArticleException} if it could not be found. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle findByPrimaryKey( - long kbArticleId) - throws com.liferay.knowledgebase.NoSuchArticleException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByPrimaryKey(kbArticleId); - } - - /** - * Returns the k b article with the primary key or returns null if it could not be found. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article, or null if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBArticle fetchByPrimaryKey( - long kbArticleId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(kbArticleId); - } - - /** - * Returns all the k b articles. - * - * @return the k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b articles - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 k b articles 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 k b articles. - * - * @return the number of k b articles - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static KBArticlePersistence getPersistence() { - if (_persistence == null) { - _persistence = (KBArticlePersistence)PortletBeanLocatorUtil.locate(com.liferay.knowledgebase.service.ClpSerializer.getServletContextName(), - KBArticlePersistence.class.getName()); - - ReferenceRegistry.registerReference(KBArticleUtil.class, - "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(KBArticlePersistence persistence) { - } - - private static KBArticlePersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentActionableDynamicQuery.java deleted file mode 100644 index 85f35b12a1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.service.KBCommentLocalServiceUtil; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public abstract class KBCommentActionableDynamicQuery - extends BaseActionableDynamicQuery { - public KBCommentActionableDynamicQuery() throws SystemException { - setBaseLocalService(KBCommentLocalServiceUtil.getService()); - setClass(KBComment.class); - - setClassLoader(com.liferay.knowledgebase.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("kbCommentId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentExportActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentExportActionableDynamicQuery.java deleted file mode 100644 index ef01f71450..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentExportActionableDynamicQuery.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBComment; - -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.Property; -import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.ExportImportHelperUtil; -import com.liferay.portal.kernel.lar.ManifestSummary; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.util.PortalUtil; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBCommentExportActionableDynamicQuery - extends KBCommentActionableDynamicQuery { - public KBCommentExportActionableDynamicQuery( - PortletDataContext portletDataContext) throws SystemException { - _portletDataContext = portletDataContext; - - setCompanyId(_portletDataContext.getCompanyId()); - - setGroupId(_portletDataContext.getScopeGroupId()); - } - - @Override - public long performCount() throws PortalException, SystemException { - ManifestSummary manifestSummary = _portletDataContext.getManifestSummary(); - - StagedModelType stagedModelType = getStagedModelType(); - - long modelAdditionCount = super.performCount(); - - manifestSummary.addModelAdditionCount(stagedModelType.toString(), - modelAdditionCount); - - long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(_portletDataContext, - stagedModelType); - - manifestSummary.addModelDeletionCount(stagedModelType.toString(), - modelDeletionCount); - - return modelAdditionCount; - } - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - _portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate"); - - if (getStagedModelType().getReferrerClassNameId() >= 0) { - Property classNameIdProperty = PropertyFactoryUtil.forName( - "classNameId"); - - dynamicQuery.add(classNameIdProperty.eq(getStagedModelType() - .getReferrerClassNameId())); - } - } - - protected StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBComment.class.getName())); - } - - @Override - @SuppressWarnings("unused") - protected void performAction(Object object) - throws PortalException, SystemException { - KBComment stagedModel = (KBComment)object; - - StagedModelDataHandlerUtil.exportStagedModel(_portletDataContext, - stagedModel); - } - - private PortletDataContext _portletDataContext; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentPersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentPersistence.java deleted file mode 100644 index 4b5ff559f8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentPersistence.java +++ /dev/null @@ -1,1478 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBComment; - -import com.liferay.portal.service.persistence.BasePersistence; - -/** - * The persistence interface for the k b comment service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBCommentPersistenceImpl - * @see KBCommentUtil - * @generated - */ -public interface KBCommentPersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBCommentUtil} to access the k b comment persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the k b comments where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where uuid = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment[] findByUuid_PrevAndNext( - long kbCommentId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b comments where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comment where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchCommentException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comment where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comment where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the k b comment where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b comment that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b comments where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment[] findByUuid_C_PrevAndNext( - long kbCommentId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b comments where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b comments where groupId = ?. - * - * @param groupId the group ID - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where groupId = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment[] findByGroupId_PrevAndNext( - long kbCommentId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b comments where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b comments where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_C( - long groupId, long classNameId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments where groupId = ? and classNameId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_C( - long groupId, long classNameId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments where groupId = ? and classNameId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_C( - long groupId, long classNameId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByG_C_First( - long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByG_C_First( - long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByG_C_Last( - long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByG_C_Last( - long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment[] findByG_C_PrevAndNext( - long kbCommentId, long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b comments where groupId = ? and classNameId = ? from the database. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @throws SystemException if a system exception occurred - */ - public void removeByG_C(long groupId, long classNameId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByG_C(long groupId, long classNameId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b comments where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where groupId = ? and status = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment[] findByG_S_PrevAndNext( - long kbCommentId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b comments where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b comments where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_C( - long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments where classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_C( - long classNameId, long classPK, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments where classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_C( - long classNameId, long classPK, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByC_C_First( - long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByC_C_First( - long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByC_C_Last( - long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByC_C_Last( - long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment[] findByC_C_PrevAndNext( - long kbCommentId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b comments where classNameId = ? and classPK = ? from the database. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @throws SystemException if a system exception occurred - */ - public void removeByC_C(long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByC_C(long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b comments where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByU_C_C( - long userId, long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments where userId = ? and classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByU_C_C( - long userId, long classNameId, long classPK, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments where userId = ? and classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByU_C_C( - long userId, long classNameId, long classPK, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByU_C_C_First( - long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByU_C_C_First( - long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByU_C_C_Last( - long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByU_C_C_Last( - long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment[] findByU_C_C_PrevAndNext( - long kbCommentId, long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b comments where userId = ? and classNameId = ? and classPK = ? from the database. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @throws SystemException if a system exception occurred - */ - public void removeByU_C_C(long userId, long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByU_C_C(long userId, long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b comments where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_C_S( - long classNameId, long classPK, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments where classNameId = ? and classPK = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_C_S( - long classNameId, long classPK, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments where classNameId = ? and classPK = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_C_S( - long classNameId, long classPK, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByC_C_S_First( - long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByC_C_S_First( - long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByC_C_S_Last( - long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByC_C_S_Last( - long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment[] findByC_C_S_PrevAndNext( - long kbCommentId, long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b comments where classNameId = ? and classPK = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_C_S( - long classNameId, long classPK, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments where classNameId = ? and classPK = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_C_S( - long classNameId, long classPK, int[] statuses, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments where classNameId = ? and classPK = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByC_C_S( - long classNameId, long classPK, int[] statuses, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b comments where classNameId = ? and classPK = ? and status = ? from the database. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @throws SystemException if a system exception occurred - */ - public void removeByC_C_S(long classNameId, long classPK, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByC_C_S(long classNameId, long classPK, int status) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b comments where classNameId = ? and classPK = ? and status = any ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public int countByC_C_S(long classNameId, long classPK, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the k b comment in the entity cache if it is enabled. - * - * @param kbComment the k b comment - */ - public void cacheResult(com.liferay.knowledgebase.model.KBComment kbComment); - - /** - * Caches the k b comments in the entity cache if it is enabled. - * - * @param kbComments the k b comments - */ - public void cacheResult( - java.util.List kbComments); - - /** - * Creates a new k b comment with the primary key. Does not add the k b comment to the database. - * - * @param kbCommentId the primary key for the new k b comment - * @return the new k b comment - */ - public com.liferay.knowledgebase.model.KBComment create(long kbCommentId); - - /** - * Removes the k b comment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment that was removed - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment remove(long kbCommentId) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBComment updateImpl( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comment with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchCommentException} if it could not be found. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment findByPrimaryKey( - long kbCommentId) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b comment with the primary key or returns null if it could not be found. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment, or null if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBComment fetchByPrimaryKey( - long kbCommentId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b comments. - * - * @return the k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b comments - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b 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 k b comments. - * - * @return the number of k b 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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentUtil.java deleted file mode 100644 index fd4dd5b08c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBCommentUtil.java +++ /dev/null @@ -1,1840 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBComment; - -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 java.util.List; - -/** - * The persistence utility for the k b comment service. This utility wraps {@link KBCommentPersistenceImpl} 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. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBCommentPersistence - * @see KBCommentPersistenceImpl - * @generated - */ -public class KBCommentUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(KBComment kbComment) { - getPersistence().clearCache(kbComment); - } - - /** - * @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 findWithDynamicQuery( - DynamicQuery dynamicQuery) throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 KBComment update(KBComment kbComment) - throws SystemException { - return getPersistence().update(kbComment); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static KBComment update(KBComment kbComment, - ServiceContext serviceContext) throws SystemException { - return getPersistence().update(kbComment, serviceContext); - } - - /** - * Returns all the k b comments where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid); - } - - /** - * Returns a range of all the k b comments where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end); - } - - /** - * Returns an ordered range of all the k b comments where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where uuid = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment[] findByUuid_PrevAndNext( - long kbCommentId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_PrevAndNext(kbCommentId, uuid, orderByComparator); - } - - /** - * Removes all the k b comments where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid(uuid); - } - - /** - * Returns the number of k b comments where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid(uuid); - } - - /** - * Returns the k b comment where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchCommentException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUUID_G(uuid, groupId); - } - - /** - * Returns the k b comment where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the k b comment where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); - } - - /** - * Removes the k b comment where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b comment that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().removeByUUID_G(uuid, groupId); - } - - /** - * Returns the number of k b comments where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUUID_G(uuid, groupId); - } - - /** - * Returns all the k b comments where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId); - } - - /** - * Returns a range of all the k b comments where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId, start, end); - } - - /** - * Returns an ordered range of all the k b comments where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C(uuid, companyId, start, end, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment[] findByUuid_C_PrevAndNext( - long kbCommentId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_PrevAndNext(kbCommentId, uuid, companyId, - orderByComparator); - } - - /** - * Removes all the k b comments where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid_C(uuid, companyId); - } - - /** - * Returns the number of k b comments where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid_C(uuid, companyId); - } - - /** - * Returns all the k b comments where groupId = ?. - * - * @param groupId the group ID - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId); - } - - /** - * Returns a range of all the k b comments where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId, start, end); - } - - /** - * Returns an ordered range of all the k b comments where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGroupId(groupId, start, end, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where groupId = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment[] findByGroupId_PrevAndNext( - long kbCommentId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGroupId_PrevAndNext(kbCommentId, groupId, - orderByComparator); - } - - /** - * Removes all the k b comments where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public static void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByGroupId(groupId); - } - - /** - * Returns the number of k b comments where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByGroupId(groupId); - } - - /** - * Returns all the k b comments where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_C( - long groupId, long classNameId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_C(groupId, classNameId); - } - - /** - * Returns a range of all the k b comments where groupId = ? and classNameId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_C( - long groupId, long classNameId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_C(groupId, classNameId, start, end); - } - - /** - * Returns an ordered range of all the k b comments where groupId = ? and classNameId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_C( - long groupId, long classNameId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_C(groupId, classNameId, start, end, - orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByG_C_First( - long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_C_First(groupId, classNameId, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByG_C_First( - long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_C_First(groupId, classNameId, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByG_C_Last( - long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_C_Last(groupId, classNameId, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByG_C_Last( - long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_C_Last(groupId, classNameId, orderByComparator); - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment[] findByG_C_PrevAndNext( - long kbCommentId, long groupId, long classNameId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_C_PrevAndNext(kbCommentId, groupId, classNameId, - orderByComparator); - } - - /** - * Removes all the k b comments where groupId = ? and classNameId = ? from the database. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @throws SystemException if a system exception occurred - */ - public static void removeByG_C(long groupId, long classNameId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_C(groupId, classNameId); - } - - /** - * Returns the number of k b comments where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByG_C(long groupId, long classNameId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_C(groupId, classNameId); - } - - /** - * Returns all the k b comments where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status); - } - - /** - * Returns a range of all the k b comments where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(groupId, status, start, end); - } - - /** - * Returns an ordered range of all the k b comments where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S(groupId, status, start, end, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByG_S_First( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_First(groupId, status, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByG_S_Last( - long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_Last(groupId, status, orderByComparator); - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where groupId = ? and status = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment[] findByG_S_PrevAndNext( - long kbCommentId, long groupId, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S_PrevAndNext(kbCommentId, groupId, status, - orderByComparator); - } - - /** - * Removes all the k b comments where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_S(groupId, status); - } - - /** - * Returns the number of k b comments where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByG_S(long groupId, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_S(groupId, status); - } - - /** - * Returns all the k b comments where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_C( - long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_C(classNameId, classPK); - } - - /** - * Returns a range of all the k b comments where classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_C( - long classNameId, long classPK, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_C(classNameId, classPK, start, end); - } - - /** - * Returns an ordered range of all the k b comments where classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_C( - long classNameId, long classPK, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C(classNameId, classPK, start, end, - orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByC_C_First( - long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_First(classNameId, classPK, orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByC_C_First( - long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_C_First(classNameId, classPK, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByC_C_Last( - long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_Last(classNameId, classPK, orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByC_C_Last( - long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_C_Last(classNameId, classPK, orderByComparator); - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment[] findByC_C_PrevAndNext( - long kbCommentId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_PrevAndNext(kbCommentId, classNameId, classPK, - orderByComparator); - } - - /** - * Removes all the k b comments where classNameId = ? and classPK = ? from the database. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @throws SystemException if a system exception occurred - */ - public static void removeByC_C(long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByC_C(classNameId, classPK); - } - - /** - * Returns the number of k b comments where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByC_C(long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByC_C(classNameId, classPK); - } - - /** - * Returns all the k b comments where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByU_C_C( - long userId, long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByU_C_C(userId, classNameId, classPK); - } - - /** - * Returns a range of all the k b comments where userId = ? and classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByU_C_C( - long userId, long classNameId, long classPK, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByU_C_C(userId, classNameId, classPK, start, end); - } - - /** - * Returns an ordered range of all the k b comments where userId = ? and classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByU_C_C( - long userId, long classNameId, long classPK, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByU_C_C(userId, classNameId, classPK, start, end, - orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByU_C_C_First( - long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByU_C_C_First(userId, classNameId, classPK, - orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByU_C_C_First( - long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByU_C_C_First(userId, classNameId, classPK, - orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByU_C_C_Last( - long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByU_C_C_Last(userId, classNameId, classPK, - orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByU_C_C_Last( - long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByU_C_C_Last(userId, classNameId, classPK, - orderByComparator); - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment[] findByU_C_C_PrevAndNext( - long kbCommentId, long userId, long classNameId, long classPK, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByU_C_C_PrevAndNext(kbCommentId, userId, classNameId, - classPK, orderByComparator); - } - - /** - * Removes all the k b comments where userId = ? and classNameId = ? and classPK = ? from the database. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @throws SystemException if a system exception occurred - */ - public static void removeByU_C_C(long userId, long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByU_C_C(userId, classNameId, classPK); - } - - /** - * Returns the number of k b comments where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByU_C_C(long userId, long classNameId, long classPK) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByU_C_C(userId, classNameId, classPK); - } - - /** - * Returns all the k b comments where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_C_S( - long classNameId, long classPK, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_C_S(classNameId, classPK, status); - } - - /** - * Returns a range of all the k b comments where classNameId = ? and classPK = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_C_S( - long classNameId, long classPK, int status, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_S(classNameId, classPK, status, start, end); - } - - /** - * Returns an ordered range of all the k b comments where classNameId = ? and classPK = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_C_S( - long classNameId, long classPK, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_S(classNameId, classPK, status, start, end, - orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByC_C_S_First( - long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_S_First(classNameId, classPK, status, - orderByComparator); - } - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByC_C_S_First( - long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_C_S_First(classNameId, classPK, status, - orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByC_C_S_Last( - long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_S_Last(classNameId, classPK, status, - orderByComparator); - } - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByC_C_S_Last( - long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByC_C_S_Last(classNameId, classPK, status, - orderByComparator); - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment[] findByC_C_S_PrevAndNext( - long kbCommentId, long classNameId, long classPK, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_S_PrevAndNext(kbCommentId, classNameId, classPK, - status, orderByComparator); - } - - /** - * Returns all the k b comments where classNameId = ? and classPK = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_C_S( - long classNameId, long classPK, int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_C_S(classNameId, classPK, statuses); - } - - /** - * Returns a range of all the k b comments where classNameId = ? and classPK = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_C_S( - long classNameId, long classPK, int[] statuses, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_S(classNameId, classPK, statuses, start, end); - } - - /** - * Returns an ordered range of all the k b comments where classNameId = ? and classPK = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByC_C_S( - long classNameId, long classPK, int[] statuses, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByC_C_S(classNameId, classPK, statuses, start, end, - orderByComparator); - } - - /** - * Removes all the k b comments where classNameId = ? and classPK = ? and status = ? from the database. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @throws SystemException if a system exception occurred - */ - public static void removeByC_C_S(long classNameId, long classPK, int status) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByC_C_S(classNameId, classPK, status); - } - - /** - * Returns the number of k b comments where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByC_C_S(long classNameId, long classPK, int status) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByC_C_S(classNameId, classPK, status); - } - - /** - * Returns the number of k b comments where classNameId = ? and classPK = ? and status = any ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - public static int countByC_C_S(long classNameId, long classPK, - int[] statuses) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByC_C_S(classNameId, classPK, statuses); - } - - /** - * Caches the k b comment in the entity cache if it is enabled. - * - * @param kbComment the k b comment - */ - public static void cacheResult( - com.liferay.knowledgebase.model.KBComment kbComment) { - getPersistence().cacheResult(kbComment); - } - - /** - * Caches the k b comments in the entity cache if it is enabled. - * - * @param kbComments the k b comments - */ - public static void cacheResult( - java.util.List kbComments) { - getPersistence().cacheResult(kbComments); - } - - /** - * Creates a new k b comment with the primary key. Does not add the k b comment to the database. - * - * @param kbCommentId the primary key for the new k b comment - * @return the new k b comment - */ - public static com.liferay.knowledgebase.model.KBComment create( - long kbCommentId) { - return getPersistence().create(kbCommentId); - } - - /** - * Removes the k b comment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment that was removed - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment remove( - long kbCommentId) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().remove(kbCommentId); - } - - public static com.liferay.knowledgebase.model.KBComment updateImpl( - com.liferay.knowledgebase.model.KBComment kbComment) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(kbComment); - } - - /** - * Returns the k b comment with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchCommentException} if it could not be found. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment findByPrimaryKey( - long kbCommentId) - throws com.liferay.knowledgebase.NoSuchCommentException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByPrimaryKey(kbCommentId); - } - - /** - * Returns the k b comment with the primary key or returns null if it could not be found. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment, or null if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBComment fetchByPrimaryKey( - long kbCommentId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(kbCommentId); - } - - /** - * Returns all the k b comments. - * - * @return the k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b comments - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 k b 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 k b comments. - * - * @return the number of k b comments - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static KBCommentPersistence getPersistence() { - if (_persistence == null) { - _persistence = (KBCommentPersistence)PortletBeanLocatorUtil.locate(com.liferay.knowledgebase.service.ClpSerializer.getServletContextName(), - KBCommentPersistence.class.getName()); - - ReferenceRegistry.registerReference(KBCommentUtil.class, - "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(KBCommentPersistence persistence) { - } - - private static KBCommentPersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderActionableDynamicQuery.java deleted file mode 100644 index 2e1c17c7e2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public abstract class KBFolderActionableDynamicQuery - extends BaseActionableDynamicQuery { - public KBFolderActionableDynamicQuery() throws SystemException { - setBaseLocalService(KBFolderLocalServiceUtil.getService()); - setClass(KBFolder.class); - - setClassLoader(com.liferay.knowledgebase.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("kbFolderId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderExportActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderExportActionableDynamicQuery.java deleted file mode 100644 index bcbb936232..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderExportActionableDynamicQuery.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBFolder; - -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.ExportImportHelperUtil; -import com.liferay.portal.kernel.lar.ManifestSummary; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.util.PortalUtil; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBFolderExportActionableDynamicQuery - extends KBFolderActionableDynamicQuery { - public KBFolderExportActionableDynamicQuery( - PortletDataContext portletDataContext) throws SystemException { - _portletDataContext = portletDataContext; - - setCompanyId(_portletDataContext.getCompanyId()); - - setGroupId(_portletDataContext.getScopeGroupId()); - } - - @Override - public long performCount() throws PortalException, SystemException { - ManifestSummary manifestSummary = _portletDataContext.getManifestSummary(); - - StagedModelType stagedModelType = getStagedModelType(); - - long modelAdditionCount = super.performCount(); - - manifestSummary.addModelAdditionCount(stagedModelType.toString(), - modelAdditionCount); - - long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(_portletDataContext, - stagedModelType); - - manifestSummary.addModelDeletionCount(stagedModelType.toString(), - modelDeletionCount); - - return modelAdditionCount; - } - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - _portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate"); - } - - protected StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBFolder.class.getName())); - } - - @Override - @SuppressWarnings("unused") - protected void performAction(Object object) - throws PortalException, SystemException { - KBFolder stagedModel = (KBFolder)object; - - StagedModelDataHandlerUtil.exportStagedModel(_portletDataContext, - stagedModel); - } - - private PortletDataContext _portletDataContext; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderPersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderPersistence.java deleted file mode 100644 index 98ca720f56..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderPersistence.java +++ /dev/null @@ -1,876 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBFolder; - -import com.liferay.portal.service.persistence.BasePersistence; - -/** - * The persistence interface for the k b folder service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBFolderPersistenceImpl - * @see KBFolderUtil - * @generated - */ -public interface KBFolderPersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBFolderUtil} to access the k b folder persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the k b folders where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b folders where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b folders where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folders before and after the current k b folder in the ordered set where uuid = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder[] findByUuid_PrevAndNext( - long kbFolderId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b folders where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b folders where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the k b folder where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b folders where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b folders where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b folders where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b folders where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folders before and after the current k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder[] findByUuid_C_PrevAndNext( - long kbFolderId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b folders where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b folders where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b folders where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the matching k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P( - long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b folders where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b folders where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_P( - long groupId, long parentKBFolderId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByG_P_First( - long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByG_P_First( - long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByG_P_Last( - long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByG_P_Last( - long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folders before and after the current k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder[] findByG_P_PrevAndNext( - long kbFolderId, long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P( - long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b folders that the user has permissions to view where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByG_P( - long groupId, long parentKBFolderId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folders before and after the current k b folder in the ordered set of k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder[] filterFindByG_P_PrevAndNext( - long kbFolderId, long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b folders where groupId = ? and parentKBFolderId = ? from the database. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @throws SystemException if a system exception occurred - */ - public void removeByG_P(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b folders where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public int countByG_P(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the number of matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByG_P(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and name = ? or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByG_P_N(long groupId, - long parentKBFolderId, java.lang.String name) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and name = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByG_P_N(long groupId, - long parentKBFolderId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and name = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByG_P_N(long groupId, - long parentKBFolderId, java.lang.String name, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the k b folder where groupId = ? and parentKBFolderId = ? and name = ? from the database. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder removeByG_P_N( - long groupId, long parentKBFolderId, java.lang.String name) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b folders where groupId = ? and parentKBFolderId = ? and name = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public int countByG_P_N(long groupId, long parentKBFolderId, - java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByG_P_UT(long groupId, - long parentKBFolderId, java.lang.String urlTitle) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByG_P_UT( - long groupId, long parentKBFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByG_P_UT( - long groupId, long parentKBFolderId, java.lang.String urlTitle, - boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? from the database. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder removeByG_P_UT( - long groupId, long parentKBFolderId, java.lang.String urlTitle) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b folders where groupId = ? and parentKBFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public int countByG_P_UT(long groupId, long parentKBFolderId, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the k b folder in the entity cache if it is enabled. - * - * @param kbFolder the k b folder - */ - public void cacheResult(com.liferay.knowledgebase.model.KBFolder kbFolder); - - /** - * Caches the k b folders in the entity cache if it is enabled. - * - * @param kbFolders the k b folders - */ - public void cacheResult( - java.util.List kbFolders); - - /** - * Creates a new k b folder with the primary key. Does not add the k b folder to the database. - * - * @param kbFolderId the primary key for the new k b folder - * @return the new k b folder - */ - public com.liferay.knowledgebase.model.KBFolder create(long kbFolderId); - - /** - * Removes the k b folder with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder that was removed - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder remove(long kbFolderId) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBFolder updateImpl( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder findByPrimaryKey( - long kbFolderId) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b folder with the primary key or returns null if it could not be found. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder, or null if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBFolder fetchByPrimaryKey( - long kbFolderId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b folders. - * - * @return the k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b folders - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b folders from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b folders. - * - * @return the number of k b folders - * @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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderUtil.java deleted file mode 100644 index a5689d969a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBFolderUtil.java +++ /dev/null @@ -1,1125 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBFolder; - -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 java.util.List; - -/** - * The persistence utility for the k b folder service. This utility wraps {@link KBFolderPersistenceImpl} 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. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBFolderPersistence - * @see KBFolderPersistenceImpl - * @generated - */ -public class KBFolderUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(KBFolder kbFolder) { - getPersistence().clearCache(kbFolder); - } - - /** - * @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 findWithDynamicQuery(DynamicQuery dynamicQuery) - throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 KBFolder update(KBFolder kbFolder) throws SystemException { - return getPersistence().update(kbFolder); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static KBFolder update(KBFolder kbFolder, - ServiceContext serviceContext) throws SystemException { - return getPersistence().update(kbFolder, serviceContext); - } - - /** - * Returns all the k b folders where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid); - } - - /** - * Returns a range of all the k b folders where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end); - } - - /** - * Returns an ordered range of all the k b folders where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end, orderByComparator); - } - - /** - * Returns the first k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the first k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the last k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the last k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the k b folders before and after the current k b folder in the ordered set where uuid = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder[] findByUuid_PrevAndNext( - long kbFolderId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_PrevAndNext(kbFolderId, uuid, orderByComparator); - } - - /** - * Removes all the k b folders where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid(uuid); - } - - /** - * Returns the number of k b folders where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid(uuid); - } - - /** - * Returns the k b folder where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUUID_G(uuid, groupId); - } - - /** - * Returns the k b folder where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the k b folder where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); - } - - /** - * Removes the k b folder where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().removeByUUID_G(uuid, groupId); - } - - /** - * Returns the number of k b folders where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUUID_G(uuid, groupId); - } - - /** - * Returns all the k b folders where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId); - } - - /** - * Returns a range of all the k b folders where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId, start, end); - } - - /** - * Returns an ordered range of all the k b folders where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C(uuid, companyId, start, end, orderByComparator); - } - - /** - * Returns the first k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the first k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the last k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the last k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the k b folders before and after the current k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder[] findByUuid_C_PrevAndNext( - long kbFolderId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_PrevAndNext(kbFolderId, uuid, companyId, - orderByComparator); - } - - /** - * Removes all the k b folders where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid_C(uuid, companyId); - } - - /** - * Returns the number of k b folders where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid_C(uuid, companyId); - } - - /** - * Returns all the k b folders where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the matching k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P( - long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_P(groupId, parentKBFolderId); - } - - /** - * Returns a range of all the k b folders where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_P(groupId, parentKBFolderId, start, end); - } - - /** - * Returns an ordered range of all the k b folders where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_P( - long groupId, long parentKBFolderId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P(groupId, parentKBFolderId, start, end, - orderByComparator); - } - - /** - * Returns the first k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByG_P_First( - long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_First(groupId, parentKBFolderId, orderByComparator); - } - - /** - * Returns the first k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByG_P_First( - long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_First(groupId, parentKBFolderId, - orderByComparator); - } - - /** - * Returns the last k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByG_P_Last( - long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_Last(groupId, parentKBFolderId, orderByComparator); - } - - /** - * Returns the last k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByG_P_Last( - long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_Last(groupId, parentKBFolderId, orderByComparator); - } - - /** - * Returns the k b folders before and after the current k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder[] findByG_P_PrevAndNext( - long kbFolderId, long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_P_PrevAndNext(kbFolderId, groupId, - parentKBFolderId, orderByComparator); - } - - /** - * Returns all the k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P( - long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByG_P(groupId, parentKBFolderId); - } - - /** - * Returns a range of all the k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P( - long groupId, long parentKBFolderId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P(groupId, parentKBFolderId, start, end); - } - - /** - * Returns an ordered range of all the k b folders that the user has permissions to view where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByG_P( - long groupId, long parentKBFolderId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P(groupId, parentKBFolderId, start, end, - orderByComparator); - } - - /** - * Returns the k b folders before and after the current k b folder in the ordered set of k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder[] filterFindByG_P_PrevAndNext( - long kbFolderId, long groupId, long parentKBFolderId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByG_P_PrevAndNext(kbFolderId, groupId, - parentKBFolderId, orderByComparator); - } - - /** - * Removes all the k b folders where groupId = ? and parentKBFolderId = ? from the database. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @throws SystemException if a system exception occurred - */ - public static void removeByG_P(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_P(groupId, parentKBFolderId); - } - - /** - * Returns the number of k b folders where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static int countByG_P(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_P(groupId, parentKBFolderId); - } - - /** - * Returns the number of k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the number of matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByG_P(long groupId, long parentKBFolderId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByG_P(groupId, parentKBFolderId); - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and name = ? or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByG_P_N( - long groupId, long parentKBFolderId, java.lang.String name) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_P_N(groupId, parentKBFolderId, name); - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and name = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByG_P_N( - long groupId, long parentKBFolderId, java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByG_P_N(groupId, parentKBFolderId, name); - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and name = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByG_P_N( - long groupId, long parentKBFolderId, java.lang.String name, - boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_N(groupId, parentKBFolderId, name, - retrieveFromCache); - } - - /** - * Removes the k b folder where groupId = ? and parentKBFolderId = ? and name = ? from the database. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder removeByG_P_N( - long groupId, long parentKBFolderId, java.lang.String name) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().removeByG_P_N(groupId, parentKBFolderId, name); - } - - /** - * Returns the number of k b folders where groupId = ? and parentKBFolderId = ? and name = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_N(long groupId, long parentKBFolderId, - java.lang.String name) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_P_N(groupId, parentKBFolderId, name); - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByG_P_UT( - long groupId, long parentKBFolderId, java.lang.String urlTitle) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_P_UT(groupId, parentKBFolderId, urlTitle); - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByG_P_UT( - long groupId, long parentKBFolderId, java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_UT(groupId, parentKBFolderId, urlTitle); - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByG_P_UT( - long groupId, long parentKBFolderId, java.lang.String urlTitle, - boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_P_UT(groupId, parentKBFolderId, urlTitle, - retrieveFromCache); - } - - /** - * Removes the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? from the database. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder removeByG_P_UT( - long groupId, long parentKBFolderId, java.lang.String urlTitle) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .removeByG_P_UT(groupId, parentKBFolderId, urlTitle); - } - - /** - * Returns the number of k b folders where groupId = ? and parentKBFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - public static int countByG_P_UT(long groupId, long parentKBFolderId, - java.lang.String urlTitle) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByG_P_UT(groupId, parentKBFolderId, urlTitle); - } - - /** - * Caches the k b folder in the entity cache if it is enabled. - * - * @param kbFolder the k b folder - */ - public static void cacheResult( - com.liferay.knowledgebase.model.KBFolder kbFolder) { - getPersistence().cacheResult(kbFolder); - } - - /** - * Caches the k b folders in the entity cache if it is enabled. - * - * @param kbFolders the k b folders - */ - public static void cacheResult( - java.util.List kbFolders) { - getPersistence().cacheResult(kbFolders); - } - - /** - * Creates a new k b folder with the primary key. Does not add the k b folder to the database. - * - * @param kbFolderId the primary key for the new k b folder - * @return the new k b folder - */ - public static com.liferay.knowledgebase.model.KBFolder create( - long kbFolderId) { - return getPersistence().create(kbFolderId); - } - - /** - * Removes the k b folder with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder that was removed - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder remove( - long kbFolderId) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().remove(kbFolderId); - } - - public static com.liferay.knowledgebase.model.KBFolder updateImpl( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(kbFolder); - } - - /** - * Returns the k b folder with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder findByPrimaryKey( - long kbFolderId) - throws com.liferay.knowledgebase.NoSuchFolderException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByPrimaryKey(kbFolderId); - } - - /** - * Returns the k b folder with the primary key or returns null if it could not be found. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder, or null if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBFolder fetchByPrimaryKey( - long kbFolderId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(kbFolderId); - } - - /** - * Returns all the k b folders. - * - * @return the k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b folders - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 k b folders 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 k b folders. - * - * @return the number of k b folders - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static KBFolderPersistence getPersistence() { - if (_persistence == null) { - _persistence = (KBFolderPersistence)PortletBeanLocatorUtil.locate(com.liferay.knowledgebase.service.ClpSerializer.getServletContextName(), - KBFolderPersistence.class.getName()); - - ReferenceRegistry.registerReference(KBFolderUtil.class, - "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(KBFolderPersistence persistence) { - } - - private static KBFolderPersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplateActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplateActionableDynamicQuery.java deleted file mode 100644 index 5b9fe0e25e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplateActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public abstract class KBTemplateActionableDynamicQuery - extends BaseActionableDynamicQuery { - public KBTemplateActionableDynamicQuery() throws SystemException { - setBaseLocalService(KBTemplateLocalServiceUtil.getService()); - setClass(KBTemplate.class); - - setClassLoader(com.liferay.knowledgebase.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("kbTemplateId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplateExportActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplateExportActionableDynamicQuery.java deleted file mode 100644 index 7873e473e6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplateExportActionableDynamicQuery.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBTemplate; - -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.ExportImportHelperUtil; -import com.liferay.portal.kernel.lar.ManifestSummary; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.util.PortalUtil; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBTemplateExportActionableDynamicQuery - extends KBTemplateActionableDynamicQuery { - public KBTemplateExportActionableDynamicQuery( - PortletDataContext portletDataContext) throws SystemException { - _portletDataContext = portletDataContext; - - setCompanyId(_portletDataContext.getCompanyId()); - - setGroupId(_portletDataContext.getScopeGroupId()); - } - - @Override - public long performCount() throws PortalException, SystemException { - ManifestSummary manifestSummary = _portletDataContext.getManifestSummary(); - - StagedModelType stagedModelType = getStagedModelType(); - - long modelAdditionCount = super.performCount(); - - manifestSummary.addModelAdditionCount(stagedModelType.toString(), - modelAdditionCount); - - long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(_portletDataContext, - stagedModelType); - - manifestSummary.addModelDeletionCount(stagedModelType.toString(), - modelDeletionCount); - - return modelAdditionCount; - } - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - _portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate"); - } - - protected StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBTemplate.class.getName())); - } - - @Override - @SuppressWarnings("unused") - protected void performAction(Object object) - throws PortalException, SystemException { - KBTemplate stagedModel = (KBTemplate)object; - - StagedModelDataHandlerUtil.exportStagedModel(_portletDataContext, - stagedModel); - } - - private PortletDataContext _portletDataContext; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplatePersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplatePersistence.java deleted file mode 100644 index 59772face4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplatePersistence.java +++ /dev/null @@ -1,723 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBTemplate; - -import com.liferay.portal.service.persistence.BasePersistence; - -/** - * The persistence interface for the k b template service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBTemplatePersistenceImpl - * @see KBTemplateUtil - * @generated - */ -public interface KBTemplatePersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link KBTemplateUtil} to access the k b template persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the k b templates where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b templates where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b templates where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b templates before and after the current k b template in the ordered set where uuid = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate[] findByUuid_PrevAndNext( - long kbTemplateId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b templates where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b templates where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - public int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b template where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchTemplateException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b template where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b template where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the k b template where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b template that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b templates where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - public int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b templates where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b templates where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b templates where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b templates before and after the current k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate[] findByUuid_C_PrevAndNext( - long kbTemplateId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b templates where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b templates where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - public int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b templates where groupId = ?. - * - * @param groupId the group ID - * @return the matching k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b templates where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b templates where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate findByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate fetchByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate findByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate fetchByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b templates before and after the current k b template in the ordered set where groupId = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate[] findByGroupId_PrevAndNext( - long kbTemplateId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b templates that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b templates that the user has permission to view where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b templates that the user has permissions to view where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b templates before and after the current k b template in the ordered set of k b templates that the user has permission to view where groupId = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate[] filterFindByGroupId_PrevAndNext( - long kbTemplateId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b templates where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b templates where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - public int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b templates that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the k b template in the entity cache if it is enabled. - * - * @param kbTemplate the k b template - */ - public void cacheResult( - com.liferay.knowledgebase.model.KBTemplate kbTemplate); - - /** - * Caches the k b templates in the entity cache if it is enabled. - * - * @param kbTemplates the k b templates - */ - public void cacheResult( - java.util.List kbTemplates); - - /** - * Creates a new k b template with the primary key. Does not add the k b template to the database. - * - * @param kbTemplateId the primary key for the new k b template - * @return the new k b template - */ - public com.liferay.knowledgebase.model.KBTemplate create(long kbTemplateId); - - /** - * Removes the k b template with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template that was removed - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate remove(long kbTemplateId) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.knowledgebase.model.KBTemplate updateImpl( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b template with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchTemplateException} if it could not be found. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate findByPrimaryKey( - long kbTemplateId) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the k b template with the primary key or returns null if it could not be found. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template, or null if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.knowledgebase.model.KBTemplate fetchByPrimaryKey( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the k b templates. - * - * @return the k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b templates - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the k b templates from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of k b templates. - * - * @return the number of k b templates - * @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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplateUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplateUtil.java deleted file mode 100644 index 3e4953ef85..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/service/persistence/KBTemplateUtil.java +++ /dev/null @@ -1,936 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.model.KBTemplate; - -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 java.util.List; - -/** - * The persistence utility for the k b template service. This utility wraps {@link KBTemplatePersistenceImpl} 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. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBTemplatePersistence - * @see KBTemplatePersistenceImpl - * @generated - */ -public class KBTemplateUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(KBTemplate kbTemplate) { - getPersistence().clearCache(kbTemplate); - } - - /** - * @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 findWithDynamicQuery( - DynamicQuery dynamicQuery) throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 KBTemplate update(KBTemplate kbTemplate) - throws SystemException { - return getPersistence().update(kbTemplate); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static KBTemplate update(KBTemplate kbTemplate, - ServiceContext serviceContext) throws SystemException { - return getPersistence().update(kbTemplate, serviceContext); - } - - /** - * Returns all the k b templates where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid); - } - - /** - * Returns a range of all the k b templates where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end); - } - - /** - * Returns an ordered range of all the k b templates where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end, orderByComparator); - } - - /** - * Returns the first k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the first k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the last k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the last k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the k b templates before and after the current k b template in the ordered set where uuid = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate[] findByUuid_PrevAndNext( - long kbTemplateId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_PrevAndNext(kbTemplateId, uuid, orderByComparator); - } - - /** - * Removes all the k b templates where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid(uuid); - } - - /** - * Returns the number of k b templates where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid(uuid); - } - - /** - * Returns the k b template where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchTemplateException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate findByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUUID_G(uuid, groupId); - } - - /** - * Returns the k b template where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the k b template where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchByUUID_G( - java.lang.String uuid, long groupId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); - } - - /** - * Removes the k b template where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b template that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate removeByUUID_G( - java.lang.String uuid, long groupId) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().removeByUUID_G(uuid, groupId); - } - - /** - * Returns the number of k b templates where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static int countByUUID_G(java.lang.String uuid, long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUUID_G(uuid, groupId); - } - - /** - * Returns all the k b templates where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId); - } - - /** - * Returns a range of all the k b templates where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId, start, end); - } - - /** - * Returns an ordered range of all the k b templates where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C(uuid, companyId, start, end, orderByComparator); - } - - /** - * Returns the first k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the first k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the last k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the last k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the k b templates before and after the current k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate[] findByUuid_C_PrevAndNext( - long kbTemplateId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_PrevAndNext(kbTemplateId, uuid, companyId, - orderByComparator); - } - - /** - * Removes all the k b templates where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid_C(uuid, companyId); - } - - /** - * Returns the number of k b templates where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid_C(uuid, companyId); - } - - /** - * Returns all the k b templates where groupId = ?. - * - * @param groupId the group ID - * @return the matching k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId); - } - - /** - * Returns a range of all the k b templates where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId(groupId, start, end); - } - - /** - * Returns an ordered range of all the k b templates where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGroupId(groupId, start, end, orderByComparator); - } - - /** - * Returns the first k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate findByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the first k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchByGroupId_First( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_First(groupId, orderByComparator); - } - - /** - * Returns the last k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate findByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the last k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchByGroupId_Last( - long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); - } - - /** - * Returns the k b templates before and after the current k b template in the ordered set where groupId = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate[] findByGroupId_PrevAndNext( - long kbTemplateId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGroupId_PrevAndNext(kbTemplateId, groupId, - orderByComparator); - } - - /** - * Returns all the k b templates that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByGroupId(groupId); - } - - /** - * Returns a range of all the k b templates that the user has permission to view where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByGroupId(groupId, start, end); - } - - /** - * Returns an ordered range of all the k b templates that the user has permissions to view where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByGroupId( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByGroupId(groupId, start, end, orderByComparator); - } - - /** - * Returns the k b templates before and after the current k b template in the ordered set of k b templates that the user has permission to view where groupId = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate[] filterFindByGroupId_PrevAndNext( - long kbTemplateId, long groupId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByGroupId_PrevAndNext(kbTemplateId, groupId, - orderByComparator); - } - - /** - * Removes all the k b templates where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - public static void removeByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByGroupId(groupId); - } - - /** - * Returns the number of k b templates where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - public static int countByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByGroupId(groupId); - } - - /** - * Returns the number of k b templates that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByGroupId(long groupId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByGroupId(groupId); - } - - /** - * Caches the k b template in the entity cache if it is enabled. - * - * @param kbTemplate the k b template - */ - public static void cacheResult( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) { - getPersistence().cacheResult(kbTemplate); - } - - /** - * Caches the k b templates in the entity cache if it is enabled. - * - * @param kbTemplates the k b templates - */ - public static void cacheResult( - java.util.List kbTemplates) { - getPersistence().cacheResult(kbTemplates); - } - - /** - * Creates a new k b template with the primary key. Does not add the k b template to the database. - * - * @param kbTemplateId the primary key for the new k b template - * @return the new k b template - */ - public static com.liferay.knowledgebase.model.KBTemplate create( - long kbTemplateId) { - return getPersistence().create(kbTemplateId); - } - - /** - * Removes the k b template with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template that was removed - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate remove( - long kbTemplateId) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().remove(kbTemplateId); - } - - public static com.liferay.knowledgebase.model.KBTemplate updateImpl( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(kbTemplate); - } - - /** - * Returns the k b template with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchTemplateException} if it could not be found. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate findByPrimaryKey( - long kbTemplateId) - throws com.liferay.knowledgebase.NoSuchTemplateException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByPrimaryKey(kbTemplateId); - } - - /** - * Returns the k b template with the primary key or returns null if it could not be found. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template, or null if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.knowledgebase.model.KBTemplate fetchByPrimaryKey( - long kbTemplateId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(kbTemplateId); - } - - /** - * Returns all the k b templates. - * - * @return the k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b templates - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 k b templates 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 k b templates. - * - * @return the number of k b templates - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static KBTemplatePersistence getPersistence() { - if (_persistence == null) { - _persistence = (KBTemplatePersistence)PortletBeanLocatorUtil.locate(com.liferay.knowledgebase.service.ClpSerializer.getServletContextName(), - KBTemplatePersistence.class.getName()); - - ReferenceRegistry.registerReference(KBTemplateUtil.class, - "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(KBTemplatePersistence persistence) { - } - - private static KBTemplatePersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/ActionKeys.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/ActionKeys.java deleted file mode 100644 index 24aeee4f08..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/ActionKeys.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class ActionKeys - extends com.liferay.portal.security.permission.ActionKeys { - - public static final String ADD_KB_ARTICLE = "ADD_KB_ARTICLE"; - - public static final String ADD_KB_FOLDER = "ADD_KB_FOLDER"; - - public static final String ADD_KB_TEMPLATE = "ADD_KB_TEMPLATE"; - - public static final String ADMINISTRATOR = "ADMINISTRATOR"; - - public static final String DELETE_KB_ARTICLES = "DELETE_KB_ARTICLES"; - - public static final String DELETE_KB_TEMPLATES = "DELETE_KB_TEMPLATES"; - - public static final String MOVE_KB_ARTICLE = "MOVE_KB_ARTICLE"; - - public static final String MOVE_KB_FOLDER = "MOVE_KB_FOLDER"; - - public static final String UPDATE_KB_ARTICLES_PRIORITIES = - "UPDATE_KB_ARTICLES_PRIORITIES"; - - public static final String VIEW_KB_TEMPLATES = "VIEW_KB_TEMPLATES"; - - public static final String VIEW_SUGGESTIONS = "VIEW_SUGGESTIONS"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleCreateDateComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleCreateDateComparator.java deleted file mode 100644 index 90153d6091..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleCreateDateComparator.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleCreateDateComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBArticle.createDate ASC"; - - public static final String ORDER_BY_DESC = "KBArticle.createDate DESC"; - - public static final String[] ORDER_BY_FIELDS = {"createDate"}; - - public KBArticleCreateDateComparator() { - this(false); - } - - public KBArticleCreateDateComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBArticle kbArticle1 = (KBArticle)obj1; - KBArticle kbArticle2 = (KBArticle)obj2; - - int value = DateUtil.compareTo( - kbArticle1.getCreateDate(), kbArticle2.getCreateDate()); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleModifiedDateComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleModifiedDateComparator.java deleted file mode 100644 index a48d01fb10..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleModifiedDateComparator.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleModifiedDateComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBArticle.modifiedDate ASC"; - - public static final String ORDER_BY_DESC = "KBArticle.modifiedDate DESC"; - - public static final String[] ORDER_BY_FIELDS = {"modifiedDate"}; - - public KBArticleModifiedDateComparator() { - this(false); - } - - public KBArticleModifiedDateComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBArticle kbArticle1 = (KBArticle)obj1; - KBArticle kbArticle2 = (KBArticle)obj2; - - int value = DateUtil.compareTo( - kbArticle1.getModifiedDate(), kbArticle2.getModifiedDate()); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticlePriorityComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticlePriorityComparator.java deleted file mode 100644 index e497605dd0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticlePriorityComparator.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticlePriorityComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBArticle.priority ASC"; - - public static final String ORDER_BY_DESC = "KBArticle.priority DESC"; - - public static final String[] ORDER_BY_FIELDS = {"priority"}; - - public KBArticlePriorityComparator() { - this(false); - } - - public KBArticlePriorityComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBArticle kbArticle1 = (KBArticle)obj1; - KBArticle kbArticle2 = (KBArticle)obj2; - - int value = 0; - - if (kbArticle1.getPriority() < kbArticle2.getPriority()) { - value = -1; - } - else if (kbArticle1.getPriority() > kbArticle2.getPriority()) { - value = 1; - } - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleStatusComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleStatusComparator.java deleted file mode 100644 index 21a5bceb8c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleStatusComparator.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleStatusComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBArticle.status ASC"; - - public static final String ORDER_BY_DESC = "KBArticle.status DESC"; - - public static final String[] ORDER_BY_FIELDS = {"status"}; - - public KBArticleStatusComparator() { - this(false); - } - - public KBArticleStatusComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBArticle kbArticle1 = (KBArticle)obj1; - KBArticle kbArticle2 = (KBArticle)obj2; - - int value = 0; - - if (kbArticle1.getStatus() < kbArticle2.getStatus()) { - value = -1; - } - else if (kbArticle1.getStatus() > kbArticle2.getStatus()) { - value = 1; - } - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleTitleComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleTitleComparator.java deleted file mode 100644 index cf99461f52..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleTitleComparator.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.StringUtil; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleTitleComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBArticle.title ASC"; - - public static final String ORDER_BY_DESC = "KBArticle.title DESC"; - - public static final String[] ORDER_BY_FIELDS = {"title"}; - - public KBArticleTitleComparator() { - this(false); - } - - public KBArticleTitleComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBArticle kbArticle1 = (KBArticle)obj1; - KBArticle kbArticle2 = (KBArticle)obj2; - - int value = StringUtil.toLowerCase(kbArticle1.getTitle()).compareTo( - StringUtil.toLowerCase(kbArticle2.getTitle())); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleUserNameComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleUserNameComparator.java deleted file mode 100644 index fc627552e8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleUserNameComparator.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.StringUtil; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleUserNameComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBArticle.userName ASC"; - - public static final String ORDER_BY_DESC = "KBArticle.userName DESC"; - - public static final String[] ORDER_BY_FIELDS = {"userName"}; - - public KBArticleUserNameComparator() { - this(false); - } - - public KBArticleUserNameComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBArticle kbArticle1 = (KBArticle)obj1; - KBArticle kbArticle2 = (KBArticle)obj2; - - int value = StringUtil.toLowerCase(kbArticle1.getUserName()).compareTo( - StringUtil.toLowerCase(kbArticle2.getUserName())); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleVersionComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleVersionComparator.java deleted file mode 100644 index ebccd8acb0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleVersionComparator.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleVersionComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBArticle.version ASC"; - - public static final String ORDER_BY_DESC = "KBArticle.version DESC"; - - public static final String[] ORDER_BY_FIELDS = {"version"}; - - public KBArticleVersionComparator() { - this(false); - } - - public KBArticleVersionComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBArticle kbArticle1 = (KBArticle)obj1; - KBArticle kbArticle2 = (KBArticle)obj2; - - int value = 0; - - if (kbArticle1.getVersion() < kbArticle2.getVersion()) { - value = -1; - } - else if (kbArticle1.getVersion() > kbArticle2.getVersion()) { - value = 1; - } - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleViewCountComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleViewCountComparator.java deleted file mode 100644 index d208422b10..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBArticleViewCountComparator.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleViewCountComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBArticle.viewCount ASC"; - - public static final String ORDER_BY_DESC = "KBArticle.viewCount DESC"; - - public static final String[] ORDER_BY_FIELDS = {"viewCount"}; - - public KBArticleViewCountComparator() { - this(false); - } - - public KBArticleViewCountComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBArticle kbArticle1 = (KBArticle)obj1; - KBArticle kbArticle2 = (KBArticle)obj2; - - int value = 0; - - if (kbArticle1.getViewCount() < kbArticle2.getViewCount()) { - value = -1; - } - else if (kbArticle1.getViewCount() > kbArticle2.getViewCount()) { - value = 1; - } - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBCommentCreateDateComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBCommentCreateDateComparator.java deleted file mode 100644 index 83cc2813d2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBCommentCreateDateComparator.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Sergio González - */ -public class KBCommentCreateDateComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBComment.createDate ASC"; - - public static final String ORDER_BY_DESC = "KBComment.createDate DESC"; - - public static final String[] ORDER_BY_FIELDS = {"createDate"}; - - public KBCommentCreateDateComparator() { - this(false); - } - - public KBCommentCreateDateComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBComment kbComment1 = (KBComment)obj1; - KBComment kbComment2 = (KBComment)obj2; - - int value = DateUtil.compareTo( - kbComment1.getCreateDate(), kbComment2.getCreateDate()); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBCommentModifiedDateComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBCommentModifiedDateComparator.java deleted file mode 100644 index a555a787c1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBCommentModifiedDateComparator.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Sergio González - */ -public class KBCommentModifiedDateComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBComment.modifiedDate ASC"; - - public static final String ORDER_BY_DESC = "KBComment.modifiedDate DESC"; - - public static final String[] ORDER_BY_FIELDS = {"modifiedDate"}; - - public KBCommentModifiedDateComparator() { - this(false); - } - - public KBCommentModifiedDateComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBComment kbComment1 = (KBComment)obj1; - KBComment kbComment2 = (KBComment)obj2; - - int value = DateUtil.compareTo( - kbComment1.getModifiedDate(), kbComment2.getModifiedDate()); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateCreateDateComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateCreateDateComparator.java deleted file mode 100644 index a11b8e9d2c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateCreateDateComparator.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBTemplateCreateDateComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBTemplate.createDate ASC"; - - public static final String ORDER_BY_DESC = "KBTemplate.createDate DESC"; - - public static final String[] ORDER_BY_FIELDS = {"createDate"}; - - public KBTemplateCreateDateComparator() { - this(false); - } - - public KBTemplateCreateDateComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBTemplate kbTemplate1 = (KBTemplate)obj1; - KBTemplate kbTemplate2 = (KBTemplate)obj2; - - int value = DateUtil.compareTo( - kbTemplate1.getCreateDate(), kbTemplate2.getCreateDate()); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateModifiedDateComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateModifiedDateComparator.java deleted file mode 100644 index a69f48b9e2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateModifiedDateComparator.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.OrderByComparator; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBTemplateModifiedDateComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBTemplate.modifiedDate ASC"; - - public static final String ORDER_BY_DESC = "KBTemplate.modifiedDate DESC"; - - public static final String[] ORDER_BY_FIELDS = {"modifiedDate"}; - - public KBTemplateModifiedDateComparator() { - this(false); - } - - public KBTemplateModifiedDateComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBTemplate kbTemplate1 = (KBTemplate)obj1; - KBTemplate kbTemplate2 = (KBTemplate)obj2; - - int value = DateUtil.compareTo( - kbTemplate1.getModifiedDate(), kbTemplate2.getModifiedDate()); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateTitleComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateTitleComparator.java deleted file mode 100644 index 70f911c6bf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateTitleComparator.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.StringUtil; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBTemplateTitleComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBTemplate.title ASC"; - - public static final String ORDER_BY_DESC = "KBTemplate.title DESC"; - - public static final String[] ORDER_BY_FIELDS = {"title"}; - - public KBTemplateTitleComparator() { - this(false); - } - - public KBTemplateTitleComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBTemplate kbTemplate1 = (KBTemplate)obj1; - KBTemplate kbTemplate2 = (KBTemplate)obj2; - - int value = StringUtil.toLowerCase(kbTemplate1.getTitle()).compareTo( - StringUtil.toLowerCase(kbTemplate2.getTitle())); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateUserNameComparator.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateUserNameComparator.java deleted file mode 100644 index 4d4b8c0480..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/knowledgebase/util/comparator/KBTemplateUserNameComparator.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util.comparator; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.StringUtil; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBTemplateUserNameComparator extends OrderByComparator { - - public static final String ORDER_BY_ASC = "KBTemplate.userName ASC"; - - public static final String ORDER_BY_DESC = "KBTemplate.userName DESC"; - - public static final String[] ORDER_BY_FIELDS = {"userName"}; - - public KBTemplateUserNameComparator() { - this(false); - } - - public KBTemplateUserNameComparator(boolean ascending) { - _ascending = ascending; - } - - @Override - public int compare(Object obj1, Object obj2) { - KBTemplate kbTemplate1 = (KBTemplate)obj1; - KBTemplate kbTemplate2 = (KBTemplate)obj2; - - int value = StringUtil.toLowerCase(kbTemplate1.getUserName()).compareTo( - StringUtil.toLowerCase(kbTemplate2.getUserName())); - - if (_ascending) { - return value; - } - else { - return -value; - } - } - - @Override - public String getOrderBy() { - if (_ascending) { - return ORDER_BY_ASC; - } - else { - return ORDER_BY_DESC; - } - } - - @Override - public String[] getOrderByFields() { - return ORDER_BY_FIELDS; - } - - @Override - public boolean isAscending() { - return _ascending; - } - - private boolean _ascending; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/indexes.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/indexes.properties deleted file mode 100644 index 53543cd941..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/indexes.properties +++ /dev/null @@ -1,51 +0,0 @@ -IX_571C019E=KBArticle.C_L -IX_5A381890=KBArticle.C_M -IX_FBC2D349=KBArticle.C_S -IX_CFB8C81F=KBArticle.G_KBFI_S -IX_4A49CDD6=KBArticle.G_KBFI_UT -IX_379FD6BC=KBArticle.G_KBFI_UT_ST -IX_694EA2E0=KBArticle.G_L -IX_97C62252=KBArticle.G_M -IX_B0FCBB47=KBArticle.G_P_L -IX_D91D2879=KBArticle.G_P_M -IX_55A38CF2=KBArticle.G_P_S -IX_DF5748B=KBArticle.G_S -IX_EC0D0F42=KBArticle.G_UT -IX_5370EC28=KBArticle.G_UT_ST -IX_86BA3247=KBArticle.P_L -IX_1DCC5F79=KBArticle.P_M -IX_2B6103F2=KBArticle.P_S -IX_A5A54614=KBArticle.R_G -IX_5FEF5F4F=KBArticle.R_G_L -IX_8EF92E81=KBArticle.R_G_M -IX_49630FA=KBArticle.R_G_S -IX_A9E2C691=KBArticle.R_L -IX_69C17E43=KBArticle.R_M -IX_4E89983C=KBArticle.R_S -IX_AA304772=KBArticle.R_V -IX_11CD0F56=KBArticle.ResourcePrimKey -IX_5C941F1B=KBArticle.UUID_G -IX_C23FA26F=KBArticle.Uuid -IX_4E87D659=KBArticle.Uuid_C - -IX_9FE4C2A3=KBComment.C_C -IX_47D3AE89=KBComment.C_C_S -IX_E8D43932=KBComment.G_C -IX_828BA082=KBComment.G_S -IX_20A6BD9C=KBComment.GroupId -IX_791D1844=KBComment.UUID_G -IX_FD56A55D=KBComment.U_C_C -IX_8E470726=KBComment.Uuid -IX_6CB72942=KBComment.Uuid_C - -IX_1F52AB5D=KBFolder.G_P -IX_3FA4415C=KBFolder.G_P_N -IX_729A89FA=KBFolder.G_P_UT -IX_1FD022A1=KBFolder.UUID_G -IX_30B67029=KBFolder.Uuid -IX_32D1105F=KBFolder.Uuid_C - -IX_83D9CC13=KBTemplate.GroupId -IX_40AA25ED=KBTemplate.UUID_G -IX_9909475D=KBTemplate.Uuid -IX_853770AB=KBTemplate.Uuid_C \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/indexes.sql b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/indexes.sql deleted file mode 100644 index 71945d7702..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/indexes.sql +++ /dev/null @@ -1,51 +0,0 @@ -create index IX_571C019E on KBArticle (companyId, latest); -create index IX_5A381890 on KBArticle (companyId, main); -create index IX_FBC2D349 on KBArticle (companyId, status); -create index IX_CFB8C81F on KBArticle (groupId, kbFolderId, status); -create index IX_4A49CDD6 on KBArticle (groupId, kbFolderId, urlTitle); -create index IX_379FD6BC on KBArticle (groupId, kbFolderId, urlTitle, status); -create index IX_694EA2E0 on KBArticle (groupId, latest); -create index IX_97C62252 on KBArticle (groupId, main); -create index IX_B0FCBB47 on KBArticle (groupId, parentResourcePrimKey, latest); -create index IX_D91D2879 on KBArticle (groupId, parentResourcePrimKey, main); -create index IX_55A38CF2 on KBArticle (groupId, parentResourcePrimKey, status); -create index IX_DF5748B on KBArticle (groupId, status); -create index IX_EC0D0F42 on KBArticle (groupId, urlTitle); -create index IX_5370EC28 on KBArticle (groupId, urlTitle, status); -create index IX_86BA3247 on KBArticle (parentResourcePrimKey, latest); -create index IX_1DCC5F79 on KBArticle (parentResourcePrimKey, main); -create index IX_2B6103F2 on KBArticle (parentResourcePrimKey, status); -create index IX_11CD0F56 on KBArticle (resourcePrimKey); -create index IX_A5A54614 on KBArticle (resourcePrimKey, groupId); -create index IX_5FEF5F4F on KBArticle (resourcePrimKey, groupId, latest); -create index IX_8EF92E81 on KBArticle (resourcePrimKey, groupId, main); -create index IX_49630FA on KBArticle (resourcePrimKey, groupId, status); -create index IX_A9E2C691 on KBArticle (resourcePrimKey, latest); -create index IX_69C17E43 on KBArticle (resourcePrimKey, main); -create index IX_4E89983C on KBArticle (resourcePrimKey, status); -create unique index IX_AA304772 on KBArticle (resourcePrimKey, version); -create index IX_C23FA26F on KBArticle (uuid_); -create index IX_4E87D659 on KBArticle (uuid_, companyId); -create unique index IX_5C941F1B on KBArticle (uuid_, groupId); - -create index IX_9FE4C2A3 on KBComment (classNameId, classPK); -create index IX_47D3AE89 on KBComment (classNameId, classPK, status); -create index IX_20A6BD9C on KBComment (groupId); -create index IX_E8D43932 on KBComment (groupId, classNameId); -create index IX_828BA082 on KBComment (groupId, status); -create index IX_FD56A55D on KBComment (userId, classNameId, classPK); -create index IX_8E470726 on KBComment (uuid_); -create index IX_6CB72942 on KBComment (uuid_, companyId); -create unique index IX_791D1844 on KBComment (uuid_, groupId); - -create index IX_1F52AB5D on KBFolder (groupId, parentKBFolderId); -create index IX_3FA4415C on KBFolder (groupId, parentKBFolderId, name); -create index IX_729A89FA on KBFolder (groupId, parentKBFolderId, urlTitle); -create index IX_30B67029 on KBFolder (uuid_); -create index IX_32D1105F on KBFolder (uuid_, companyId); -create unique index IX_1FD022A1 on KBFolder (uuid_, groupId); - -create index IX_83D9CC13 on KBTemplate (groupId); -create index IX_9909475D on KBTemplate (uuid_); -create index IX_853770AB on KBTemplate (uuid_, companyId); -create unique index IX_40AA25ED on KBTemplate (uuid_, groupId); \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/sequences.sql b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/sequences.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/tables.sql b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/tables.sql deleted file mode 100644 index b26040c717..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/sql/tables.sql +++ /dev/null @@ -1,74 +0,0 @@ -create table KBArticle ( - uuid_ VARCHAR(75) null, - kbArticleId LONG not null primary key, - resourcePrimKey LONG, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(75) null, - createDate DATE null, - modifiedDate DATE null, - rootResourcePrimKey LONG, - parentResourceClassNameId LONG, - parentResourcePrimKey LONG, - kbFolderId LONG, - version INTEGER, - title STRING null, - urlTitle VARCHAR(75) null, - content TEXT null, - description STRING null, - priority DOUBLE, - sections STRING null, - viewCount INTEGER, - latest BOOLEAN, - main BOOLEAN, - sourceURL STRING null, - status INTEGER, - statusByUserId LONG, - statusByUserName VARCHAR(75) null, - statusDate DATE null -); - -create table KBComment ( - uuid_ VARCHAR(75) null, - kbCommentId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(75) null, - createDate DATE null, - modifiedDate DATE null, - classNameId LONG, - classPK LONG, - content STRING null, - userRating INTEGER, - status INTEGER -); - -create table KBFolder ( - uuid_ VARCHAR(75) null, - kbFolderId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(75) null, - createDate DATE null, - modifiedDate DATE null, - parentKBFolderId LONG, - name VARCHAR(75) null, - urlTitle VARCHAR(75) null, - description STRING null -); - -create table KBTemplate ( - uuid_ VARCHAR(75) null, - kbTemplateId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(75) null, - createDate DATE null, - modifiedDate DATE null, - title STRING null, - content TEXT null -); \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/base-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/base-spring.xml deleted file mode 100644 index 8e5edbab1f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/base-spring.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/cluster-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/cluster-spring.xml deleted file mode 100644 index cd5219ba85..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/cluster-spring.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/hibernate-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/hibernate-spring.xml deleted file mode 100644 index 27564a2f12..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/hibernate-spring.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml deleted file mode 100644 index 380d6975c4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-all.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-all.xml deleted file mode 100644 index 8e094aba0e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-all.xml +++ /dev/null @@ -1,10205 +0,0 @@ - - - - - ConfigurationActionImpl - com.liferay.knowledgebase.admin.action.ConfigurationActionImpl - - - - processAction - - portletConfig - javax.portlet.PortletConfig - - - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - isVariableTerm - - s - java.lang.String - - - - - - - - validateEmailFrom - - actionRequest - javax.portlet.ActionRequest - - - - - validateEmailKBArticleAdded - - actionRequest - javax.portlet.ActionRequest - - - - - validateEmailKBArticleUpdated - - actionRequest - javax.portlet.ActionRequest - - - - - - KBArticleAssetRenderer - com.liferay.knowledgebase.admin.asset.KBArticleAssetRenderer - - - KBArticleAssetRenderer - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - - getClassName - - - - - - getClassPK - - - - - - getGroupId - - - - - - getSummary - - locale - java.util.Locale - - - - - - - - getTitle - - locale - java.util.Locale - - - - - - - - getURLEdit - - liferayPortletRequest - com.liferay.portal.kernel.portlet.LiferayPortletRequest - - - - liferayPortletResponse - com.liferay.portal.kernel.portlet.LiferayPortletResponse - - - - - - - Exception - java.lang.Exception - - - - - getURLViewInContext - - liferayPortletRequest - com.liferay.portal.kernel.portlet.LiferayPortletRequest - - - - liferayPortletResponse - com.liferay.portal.kernel.portlet.LiferayPortletResponse - - - - noSuchEntryRedirect - java.lang.String - - - - - - - - getUserId - - - - - - getUserName - - - - - - getUuid - - - - - - hasEditPermission - - permissionChecker - com.liferay.portal.security.permission.PermissionChecker - - - - - - - - hasViewPermission - - permissionChecker - com.liferay.portal.security.permission.PermissionChecker - - - - - - - - isPrintable - - - - - - render - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - template - java.lang.String - - - - - - - - getIconPath - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - - - - - _kbArticle - - - - KBArticleAssetRendererFactory - com.liferay.knowledgebase.admin.asset.KBArticleAssetRendererFactory - - - getAssetRenderer - - classPK - long - - - - type - int - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getClassName - - - - - - getPortletId - - - - - - getType - - - - - - getURLAdd - - liferayPortletRequest - com.liferay.portal.kernel.portlet.LiferayPortletRequest - - - - liferayPortletResponse - com.liferay.portal.kernel.portlet.LiferayPortletResponse - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - hasPermission - - permissionChecker - com.liferay.portal.security.permission.PermissionChecker - - - - classPK - long - - - - actionId - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - getIconPath - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - - - - - TYPE - - - - AdminPortletDataHandler - com.liferay.knowledgebase.admin.lar.AdminPortletDataHandler - - - - AdminPortletDataHandler - - - doDeleteData - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - portletId - java.lang.String - - - - portletPreferences - javax.portlet.PortletPreferences - - - - - - - Exception - java.lang.Exception - - - - - doExportData - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - portletId - java.lang.String - - - - portletPreferences - javax.portlet.PortletPreferences - - - - - - - Exception - java.lang.Exception - - - - - doImportData - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - portletId - java.lang.String - - - - portletPreferences - javax.portlet.PortletPreferences - - - - data - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - doPrepareManifestSummary - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - portletPreferences - javax.portlet.PortletPreferences - - - - Exception - java.lang.Exception - - - - - getKBArticleActionableDynamicQuery - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - - - - Exception - java.lang.Exception - - - - - getKBCommentActionableDynamicQuery - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - - - - Exception - java.lang.Exception - - - - - NAMESPACE - - - RESOURCE_NAME - - - - KBArticleStagedModelDataHandler - com.liferay.knowledgebase.admin.lar.KBArticleStagedModelDataHandler - - - deleteStagedModel - - uuid - java.lang.String - - - - groupId - long - - - - className - java.lang.String - - - - extraData - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getClassNames - - - - - - getDisplayName - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - - - - - countStagedModel - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - - - - - doExportStagedModel - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - Exception - java.lang.Exception - - - - - doImportStagedModel - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - Exception - java.lang.Exception - - - - - exportKBArticleAttachments - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - kbArticleElement - com.liferay.portal.kernel.xml.Element - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - Exception - java.lang.Exception - - - - - importKBArticleAttachments - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - importedKBArticle - com.liferay.knowledgebase.model.KBArticle - - - - Exception - java.lang.Exception - - - - - CLASS_NAMES - - - - KBCommentStagedModelDataHandler - com.liferay.knowledgebase.admin.lar.KBCommentStagedModelDataHandler - - - deleteStagedModel - - uuid - java.lang.String - - - - groupId - long - - - - className - java.lang.String - - - - extraData - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getClassNames - - - - - - getDisplayName - - kbComment - com.liferay.knowledgebase.model.KBComment - - - - - - - - doExportStagedModel - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - kbComment - com.liferay.knowledgebase.model.KBComment - - - - Exception - java.lang.Exception - - - - - doImportStagedModel - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - kbComment - com.liferay.knowledgebase.model.KBComment - - - - Exception - java.lang.Exception - - - - - CLASS_NAMES - - - - KBTemplateStagedModelDataHandler - com.liferay.knowledgebase.admin.lar.KBTemplateStagedModelDataHandler - - - deleteStagedModel - - uuid - java.lang.String - - - - groupId - long - - - - className - java.lang.String - - - - extraData - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getClassNames - - - - - - getDisplayName - - kbTemplate - com.liferay.knowledgebase.model.KBTemplate - - - - - - - - doExportStagedModel - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - kbTemplate - com.liferay.knowledgebase.model.KBTemplate - - - - Exception - java.lang.Exception - - - - - doImportStagedModel - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - kbTemplate - com.liferay.knowledgebase.model.KBTemplate - - - - Exception - java.lang.Exception - - - - - CLASS_NAMES - - - - CheckAttachmentsMessageListener - com.liferay.knowledgebase.admin.messaging.CheckAttachmentsMessageListener - - - - doReceive - - message - com.liferay.portal.kernel.messaging.Message - - - - Exception - java.lang.Exception - - - - - - AdminPortlet - com.liferay.knowledgebase.admin.portlet.AdminPortlet - - - - - addAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBArticles - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBTemplate - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBTemplates - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - moveKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - render - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - serveAttachment - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveResource - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - subscribeGroupKBArticles - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - subscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - unsubscribeGroupKBArticles - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - unsubscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateAttachments - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBArticlesPriorities - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBTemplate - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - addSuccessMessage - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - - checkExceededSizeLimit - - request - javax.servlet.http.HttpServletRequest - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - doDispatch - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - isSessionErrorException - - cause - java.lang.Throwable - - - - - - - - - KBArticleDisplayTerms - com.liferay.knowledgebase.admin.search.KBArticleDisplayTerms - - - KBArticleDisplayTerms - - portletRequest - javax.portlet.PortletRequest - - - - - getContent - - - - - - getEndDateDay - - - - - - getEndDateMonth - - - - - - getEndDateYear - - - - - - getFirstDayOfWeek - - - - - - getStartDateDay - - - - - - getStartDateMonth - - - - - - getStartDateYear - - - - - - getStatus - - - - - - getTitle - - - - - - getYearRangeEnd - - - - - - getYearRangeStart - - - - - - isAnytime - - - - - - ANYTIME - - - CONTENT - - - END_DATE_DAY - - - END_DATE_MONTH - - - END_DATE_YEAR - - - START_DATE_DAY - - - START_DATE_MONTH - - - START_DATE_YEAR - - - STATUS - - - TITLE - - - anytime - - - content - - - endDateDay - - - endDateMonth - - - endDateYear - - - firstDayOfWeek - - - startDateDay - - - startDateMonth - - - startDateYear - - - status - - - title - - - yearRangeEnd - - - yearRangeStart - - - - KBArticleSearch - com.liferay.knowledgebase.admin.search.KBArticleSearch - - - - KBArticleSearch - - portletRequest - javax.portlet.PortletRequest - - - - iteratorURL - javax.portlet.PortletURL - - - - - EMPTY_RESULTS_MESSAGE - - - _log - - - - KBArticleSearchTerms - com.liferay.knowledgebase.admin.search.KBArticleSearchTerms - - - KBArticleSearchTerms - - portletRequest - javax.portlet.PortletRequest - - - - - getCurStartValues - - - - - - getEndDate - - timeZone - java.util.TimeZone - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - getStartDate - - timeZone - java.util.TimeZone - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - hasSearchTerms - - - - - - setCurStartValues - - curStartValues - int[] - - - - - hasAdvancedSearchTerms - - - - - - hasBasicSearchTerms - - - - - - CUR_START_VALUES - - - curStartValues - - - - KBTemplateDisplayTerms - com.liferay.knowledgebase.admin.search.KBTemplateDisplayTerms - - - KBTemplateDisplayTerms - - portletRequest - javax.portlet.PortletRequest - - - - - getContent - - - - - - getEndDateDay - - - - - - getEndDateMonth - - - - - - getEndDateYear - - - - - - getFirstDayOfWeek - - - - - - getStartDateDay - - - - - - getStartDateMonth - - - - - - getStartDateYear - - - - - - getTitle - - - - - - getYearRangeEnd - - - - - - getYearRangeStart - - - - - - isAnytime - - - - - - ANYTIME - - - CONTENT - - - END_DATE_DAY - - - END_DATE_MONTH - - - END_DATE_YEAR - - - START_DATE_DAY - - - START_DATE_MONTH - - - START_DATE_YEAR - - - TITLE - - - anytime - - - content - - - endDateDay - - - endDateMonth - - - endDateYear - - - firstDayOfWeek - - - startDateDay - - - startDateMonth - - - startDateYear - - - title - - - yearRangeEnd - - - yearRangeStart - - - - KBTemplateSearch - com.liferay.knowledgebase.admin.search.KBTemplateSearch - - - - KBTemplateSearch - - portletRequest - javax.portlet.PortletRequest - - - - iteratorURL - javax.portlet.PortletURL - - - - - EMPTY_RESULTS_MESSAGE - - - _log - - - - KBTemplateSearchTerms - com.liferay.knowledgebase.admin.search.KBTemplateSearchTerms - - - KBTemplateSearchTerms - - portletRequest - javax.portlet.PortletRequest - - - - - getCurStartValues - - - - - - getEndDate - - timeZone - java.util.TimeZone - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - getStartDate - - timeZone - java.util.TimeZone - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - hasSearchTerms - - - - - - setCurStartValues - - curStartValues - int[] - - - - - hasAdvancedSearchTerms - - - - - - hasBasicSearchTerms - - - - - - CUR_START_VALUES - - - curStartValues - - - - AdminActivityInterpreter - com.liferay.knowledgebase.admin.social.AdminActivityInterpreter - - - - getClassNames - - - - - - getEntryTitle - - activity - com.liferay.portlet.social.model.SocialActivity - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - Exception - java.lang.Exception - - - - - getLink - - activity - com.liferay.portlet.social.model.SocialActivity - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - Exception - java.lang.Exception - - - - - getTitlePattern - - groupName - java.lang.String - - - - activity - com.liferay.portlet.social.model.SocialActivity - - - - - - - - hasPermissions - - permissionChecker - com.liferay.portal.security.permission.PermissionChecker - - - - activity - com.liferay.portlet.social.model.SocialActivity - - - - actionId - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - Exception - java.lang.Exception - - - - - _CLASS_NAMES - - - - AdminActivityKeys - com.liferay.knowledgebase.admin.social.AdminActivityKeys - - - - ADD_KB_ARTICLE - - - ADD_KB_COMMENT - - - ADD_KB_TEMPLATE - - - MOVE_KB_ARTICLE - - - UPDATE_KB_ARTICLE - - - UPDATE_KB_COMMENT - - - UPDATE_KB_TEMPLATE - - - - AdminIndexer - com.liferay.knowledgebase.admin.util.AdminIndexer - - - - AdminIndexer - - - getClassNames - - - - - - getPortletId - - - - - - hasPermission - - permissionChecker - com.liferay.portal.security.permission.PermissionChecker - - - - entryClassName - java.lang.String - - - - entryClassPK - long - - - - actionId - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - postProcessSearchQuery - - searchQuery - com.liferay.portal.kernel.search.BooleanQuery - - - - searchContext - com.liferay.portal.kernel.search.SearchContext - - - - Exception - java.lang.Exception - - - - - search - - searchContext - com.liferay.portal.kernel.search.SearchContext - - - - - - - SearchException - com.liferay.portal.kernel.search.SearchException - - - - - doDelete - - obj - java.lang.Object - - - - Exception - java.lang.Exception - - - - - doGetDocument - - obj - java.lang.Object - - - - - - - Exception - java.lang.Exception - - - - - doGetSummary - - document - com.liferay.portal.kernel.search.Document - - - - locale - java.util.Locale - - - - snippet - java.lang.String - - - - portletURL - javax.portlet.PortletURL - - - - - - - - doReindex - - obj - java.lang.Object - - - - Exception - java.lang.Exception - - - - - doReindex - - className - java.lang.String - - - - classPK - long - - - - Exception - java.lang.Exception - - - - - doReindex - - ids - java.lang.String[] - - - - Exception - java.lang.Exception - - - - - getPortletId - - searchContext - com.liferay.portal.kernel.search.SearchContext - - - - - - - - reindexKBArticles - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - Exception - java.lang.Exception - - - - - reindexKBArticles - - companyId - long - - - - Exception - java.lang.Exception - - - - - CLASS_NAMES - - - PORTLET_ID - - - - AdminOpenSearchImpl - com.liferay.knowledgebase.admin.util.AdminOpenSearchImpl - - - - getIndexer - - - - - - getPortletId - - - - - - getSearchPath - - - - - - getTitle - - keywords - java.lang.String - - - - - - - - getURL - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - groupId - long - - - - result - com.liferay.portal.kernel.search.Document - - - - portletURL - javax.portlet.PortletURL - - - - - - - - SEARCH_PATH - - - TITLE - - - - AdminSubscriptionSender - com.liferay.knowledgebase.admin.util.AdminSubscriptionSender - - - - AdminSubscriptionSender - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - deleteSubscription - - subscription - com.liferay.portal.model.Subscription - - - - Exception - java.lang.Exception - - - - - getEmailKBArticleAttachments - - locale - java.util.Locale - - - - - - - Exception - java.lang.Exception - - - - - hasPermission - - subscription - com.liferay.portal.model.Subscription - - - - inferredClassName - java.lang.String - - - - inferredClassPK - long - - - - user - com.liferay.portal.model.User - - - - - - - Exception - java.lang.Exception - - - - - replaceContent - - content - java.lang.String - - - - locale - java.util.Locale - - - - - - - Exception - java.lang.Exception - - - - - _kbArticle - - - _serviceContext - - - - AdminUtil - com.liferay.knowledgebase.admin.util.AdminUtil - - - - escapeSections - - sections - java.lang.String[] - - - - - - - - getEmailFromAddress - - preferences - javax.portlet.PortletPreferences - - - - companyId - long - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getEmailFromName - - preferences - javax.portlet.PortletPreferences - - - - companyId - long - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getEmailKBArticleAddedBody - - preferences - javax.portlet.PortletPreferences - - - - - - - - getEmailKBArticleAddedEnabled - - preferences - javax.portlet.PortletPreferences - - - - - - - - getEmailKBArticleAddedSubject - - preferences - javax.portlet.PortletPreferences - - - - - - - - getEmailKBArticleUpdatedBody - - preferences - javax.portlet.PortletPreferences - - - - - - - - getEmailKBArticleUpdatedEnabled - - preferences - javax.portlet.PortletPreferences - - - - - - - - getEmailKBArticleUpdatedSubject - - preferences - javax.portlet.PortletPreferences - - - - - - - - getKBArticleDiff - - resourcePrimKey - long - - - - sourceVersion - int - - - - targetVersion - int - - - - param - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - unescapeSections - - sections - java.lang.String - - - - - - - - - KBArticleAssetEntriesUtil - com.liferay.knowledgebase.admin.util.KBArticleAssetEntriesUtil - - - getAssetEntries - - groupIds - long[] - - - - classNameIds - long[] - - - - assetTagIds - long[] - - - - resourcePrimKey - long - - - - start - int - - - - end - int - - - - orderByColumn - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getAssetTagIds - - groupIds - long[] - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupIds - - companyGroup - com.liferay.portal.model.Group - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - - - - - getURL - - request - javax.servlet.http.HttpServletRequest - - - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - assetRendererFactory - com.liferay.portlet.asset.model.AssetRendererFactory - - - - assetRenderer - com.liferay.portlet.asset.model.AssetRenderer - - - - - - - Exception - java.lang.Exception - - - - - - KBArticleWorkflowHandler - com.liferay.knowledgebase.admin.workflow.KBArticleWorkflowHandler - - - getClassName - - - - - - getType - - locale - java.util.Locale - - - - - - - - updateStatus - - status - int - - - - workflowContext - java.util.Map - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getIconPath - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - - - - - - ArticlePortlet - com.liferay.knowledgebase.article.portlet.ArticlePortlet - - - - addAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - moveKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - render - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - serveAttachment - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveKBArticleRSS - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveResource - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - subscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - unsubscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateAttachments - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - addSuccessMessage - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - - checkExceededSizeLimit - - request - javax.servlet.http.HttpServletRequest - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - doDispatch - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - getResourcePrimKey - - renderRequest - javax.portlet.RenderRequest - - - - - - - Exception - java.lang.Exception - - - - - getStatus - - renderRequest - javax.portlet.RenderRequest - - - - - - - Exception - java.lang.Exception - - - - - isSessionErrorException - - cause - java.lang.Throwable - - - - - - - - - KBArticleAttachmentsUtil - com.liferay.knowledgebase.article.util.KBArticleAttachmentsUtil - - - getFolderId - - groupId - long - - - - userId - long - - - - resourcePrimKey - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - - DisplayPortlet - com.liferay.knowledgebase.display.portlet.DisplayPortlet - - - - addAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBTemplate - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - moveKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - render - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - serveAttachment - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveGroupKBArticlesRSS - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveKBArticleRSS - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveResource - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - subscribeGroupKBArticles - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - subscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - unsubscribeGroupKBArticles - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - unsubscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateAttachments - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBTemplate - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - addSuccessMessage - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - - checkExceededSizeLimit - - request - javax.servlet.http.HttpServletRequest - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - doDispatch - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - getStatus - - renderRequest - javax.portlet.RenderRequest - - - - - - - Exception - java.lang.Exception - - - - - isSessionErrorException - - cause - java.lang.Throwable - - - - - - - - - KBArticleSearch - com.liferay.knowledgebase.display.search.KBArticleSearch - - - - KBArticleSearch - - portletRequest - javax.portlet.PortletRequest - - - - iteratorURL - javax.portlet.PortletURL - - - - - EMPTY_RESULTS_MESSAGE - - - _log - - - - FindKBArticleAction - com.liferay.knowledgebase.hook.action.FindKBArticleAction - - - execute - - originalStrutsAction - com.liferay.portal.kernel.struts.StrutsAction - - - - request - javax.servlet.http.HttpServletRequest - - - - response - javax.servlet.http.HttpServletResponse - - - - - - - Exception - java.lang.Exception - - - - - getDynamicPortletURL - - plid - long - - - - status - int - - - - request - javax.servlet.http.HttpServletRequest - - - - - - - Exception - java.lang.Exception - - - - - getKBArticle - - resourcePrimKey - long - - - - status - int - - - - - - - Exception - java.lang.Exception - - - - - getKBArticleURL - - plid - long - - - - privateLayout - boolean - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - request - javax.servlet.http.HttpServletRequest - - - - - - - Exception - java.lang.Exception - - - - - getKBArticleURL - - plid - long - - - - portletId - java.lang.String - - - - request - javax.servlet.http.HttpServletRequest - - - - - - - Exception - java.lang.Exception - - - - - getPortletId - - plid - long - - - - - - - Exception - java.lang.Exception - - - - - isValidPlid - - plid - long - - - - - - - Exception - java.lang.Exception - - - - - _PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED - - - - ServicePreAction - com.liferay.knowledgebase.hook.events.ServicePreAction - - - run - - request - javax.servlet.http.HttpServletRequest - - - - response - javax.servlet.http.HttpServletResponse - - - - - doRun - - request - javax.servlet.http.HttpServletRequest - - - - response - javax.servlet.http.HttpServletResponse - - - - Exception - java.lang.Exception - - - - - _PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED - - - _log - - - - GroupListener - com.liferay.knowledgebase.hook.listeners.GroupListener - - - onBeforeRemove - - group - com.liferay.portal.model.Group - - - - ModelListenerException - com.liferay.portal.ModelListenerException - - - - - doOnBeforeRemove - - group - com.liferay.portal.model.Group - - - - Exception - java.lang.Exception - - - - - - UpgradeProcess_1_0_0 - com.liferay.knowledgebase.hook.upgrade.UpgradeProcess_1_0_0 - - - getThreshold - - - - - - doUpgrade - - Exception - java.lang.Exception - - - - - - UpgradeProcess_1_1_0 - com.liferay.knowledgebase.hook.upgrade.UpgradeProcess_1_1_0 - - - getThreshold - - - - - - clearCache - - Exception - java.lang.Exception - - - - - doUpgrade - - Exception - java.lang.Exception - - - - - - UpgradeProcess_1_2_0 - com.liferay.knowledgebase.hook.upgrade.UpgradeProcess_1_2_0 - - - getThreshold - - - - - - doUpgrade - - Exception - java.lang.Exception - - - - - - UpgradeProcess_1_3_0 - com.liferay.knowledgebase.hook.upgrade.UpgradeProcess_1_3_0 - - - getThreshold - - - - - - doUpgrade - - Exception - java.lang.Exception - - - - - - UpgradeRatingsEntry - com.liferay.knowledgebase.hook.upgrade.v1_0_0.UpgradeRatingsEntry - - - doUpgrade - - Exception - java.lang.Exception - - - - - getClassNameId - - className - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - updateRatingsEntries - - Exception - java.lang.Exception - - - - - - UpgradeRatingsStats - com.liferay.knowledgebase.hook.upgrade.v1_0_0.UpgradeRatingsStats - - - doUpgrade - - Exception - java.lang.Exception - - - - - getClassNameId - - className - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - updateRatingsStats - - Exception - java.lang.Exception - - - - - - UpgradeClassName - com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeClassName - - - doUpgrade - - Exception - java.lang.Exception - - - - - getClassNameId - - className - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - updateClassName - - oldClassName - java.lang.String - - - - newClassName - java.lang.String - - - - Exception - java.lang.Exception - - - - - - UpgradeExpandoTable - com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeExpandoTable - - - doUpgrade - - Exception - java.lang.Exception - - - - - updateExpandoTable - - companyId - long - - - - Exception - java.lang.Exception - - - - - - UpgradeKBArticle - com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeKBArticle - - - doUpgrade - - Exception - java.lang.Exception - - - - - renameAndUpdateTable - - oldTableName - java.lang.String - - - - newTableName - java.lang.String - - - - tableColumns - java.lang.Object[] - - - - tableSqlCreate - java.lang.String - - - - tableSqlDrop - java.lang.String - - - - Exception - java.lang.Exception - - - - - renameTable - - oldTableName - java.lang.String - - - - tableColumns - java.lang.Object[] - - - - tableSqlCreate - java.lang.String - - - - Exception - java.lang.Exception - - - - - updateColumn - - tableName - java.lang.String - - - - columnName - java.lang.String - - - - dataType - java.lang.String - - - - data - java.lang.String - - - - Exception - java.lang.Exception - - - - - updateSchema - - oldTableName - java.lang.String - - - - newTableName - java.lang.String - - - - tableSqlDrop - java.lang.String - - - - Exception - java.lang.Exception - - - - - updateTable - - newTableName - java.lang.String - - - - tableColumns - java.lang.Object[] - - - - tableSqlCreate - java.lang.String - - - - Exception - java.lang.Exception - - - - - _log - - - - UpgradeKBComment - com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeKBComment - - - doUpgrade - - Exception - java.lang.Exception - - - - - renameAndUpdateTable - - oldTableName - java.lang.String - - - - newTableName - java.lang.String - - - - tableColumns - java.lang.Object[] - - - - tableSqlCreate - java.lang.String - - - - tableSqlDrop - java.lang.String - - - - Exception - java.lang.Exception - - - - - renameTable - - oldTableName - java.lang.String - - - - tableColumns - java.lang.Object[] - - - - tableSqlCreate - java.lang.String - - - - Exception - java.lang.Exception - - - - - updateColumn - - tableName - java.lang.String - - - - columnName - java.lang.String - - - - dataType - java.lang.String - - - - data - java.lang.String - - - - Exception - java.lang.Exception - - - - - updateSchema - - oldTableName - java.lang.String - - - - newTableName - java.lang.String - - - - tableSqlDrop - java.lang.String - - - - Exception - java.lang.Exception - - - - - _log - - - - UpgradeKBTemplate - com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeKBTemplate - - - doUpgrade - - Exception - java.lang.Exception - - - - - renameAndUpdateTable - - oldTableName - java.lang.String - - - - newTableName - java.lang.String - - - - tableColumns - java.lang.Object[] - - - - tableSqlCreate - java.lang.String - - - - tableSqlDrop - java.lang.String - - - - Exception - java.lang.Exception - - - - - renameTable - - oldTableName - java.lang.String - - - - tableColumns - java.lang.Object[] - - - - tableSqlCreate - java.lang.String - - - - Exception - java.lang.Exception - - - - - updateColumn - - tableName - java.lang.String - - - - columnName - java.lang.String - - - - dataType - java.lang.String - - - - data - java.lang.String - - - - Exception - java.lang.Exception - - - - - updateSchema - - oldTableName - java.lang.String - - - - newTableName - java.lang.String - - - - tableSqlDrop - java.lang.String - - - - Exception - java.lang.Exception - - - - - _log - - - - UpgradePortletPreferences - com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradePortletPreferences - - - getDefaultPreferencesMap - - rootPortletId - java.lang.String - - - - - - - - getName - - rootPortletId - java.lang.String - - - - oldName - java.lang.String - - - - - - - - getPortletIds - - - - - - updatePreferences - - companyId - long - - - - ownerId - long - - - - ownerType - int - - - - plid - long - - - - portletId - java.lang.String - - - - xml - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - upgradePreferences - - companyId - long - - - - ownerId - long - - - - ownerType - int - - - - plid - long - - - - portletId - java.lang.String - - - - xml - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - _PORTLET_IDS - - - _adminDefaultPreferencesMap - - - _articleDefaultPreferencesMap - - - _displayDefaultPreferencesMap - - - _oldAdminPreferenceNamesMap - - - _oldArticlePreferenceNamesMap - - - _oldDisplayPreferenceNamesMap - - - - UpgradeResourceAction - com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeResourceAction - - - doUpgrade - - Exception - java.lang.Exception - - - - - hasResourceAction - - name - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - updateKBArticleResourceActions - - Exception - java.lang.Exception - - - - - updateKBTemplateResourceActions - - Exception - java.lang.Exception - - - - - - UpgradeResourcePermission - com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeResourcePermission - - - doUpgrade - - Exception - java.lang.Exception - - - - - hasResourcePermission - - name - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - updateKBArticleResourcePermissions - - Exception - java.lang.Exception - - - - - updateKBTemplateResourcePermissions - - Exception - java.lang.Exception - - - - - - KBArticleAttachmentsUtil - com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleAttachmentsUtil - - - deleteAttachmentsDirectory - - companyId - long - - - - - updateAttachments - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - - _log - - - - KBArticleLatestUpgradeColumnImpl - com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleLatestUpgradeColumnImpl - - - KBArticleLatestUpgradeColumnImpl - - kbArticleIdColumn - com.liferay.portal.kernel.upgrade.util.UpgradeColumn - - - - resourcePrimKeyColumn - com.liferay.portal.kernel.upgrade.util.UpgradeColumn - - - - - getNewValue - - oldValue - java.lang.Object - - - - - - - Exception - java.lang.Exception - - - - - _kbArticleIdColumn - - - _resourcePrimKeyColumn - - - - KBArticleMainUpgradeColumnImpl - com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleMainUpgradeColumnImpl - - - KBArticleMainUpgradeColumnImpl - - kbArticleIdColumn - com.liferay.portal.kernel.upgrade.util.UpgradeColumn - - - - resourcePrimKeyColumn - com.liferay.portal.kernel.upgrade.util.UpgradeColumn - - - - - getNewValue - - oldValue - java.lang.Object - - - - - - - Exception - java.lang.Exception - - - - - _kbArticleIdColumn - - - _resourcePrimKeyColumn - - - - KBArticleRootResourcePrimKeyUpgradeColumnImpl - com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleRootResourcePrimKeyUpgradeColumnImpl - - - KBArticleRootResourcePrimKeyUpgradeColumnImpl - - resourcePrimKeyColumn - com.liferay.portal.kernel.upgrade.util.UpgradeColumn - - - - - getNewValue - - oldValue - java.lang.Object - - - - - - - Exception - java.lang.Exception - - - - - _resourcePrimKeyColumn - - - - KBArticleTable - com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleTable - - - TABLE_COLUMNS - - - TABLE_NAME - - - TABLE_SQL_CREATE - - - TABLE_SQL_DROP - - - - KBCommentTable - com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBCommentTable - - - TABLE_COLUMNS - - - TABLE_NAME - - - TABLE_SQL_CREATE - - - TABLE_SQL_DROP - - - - KBTemplateTable - com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBTemplateTable - - - TABLE_COLUMNS - - - TABLE_NAME - - - TABLE_SQL_CREATE - - - TABLE_SQL_DROP - - - - UpgradeKBArticle - com.liferay.knowledgebase.hook.upgrade.v1_2_0.UpgradeKBArticle - - - doUpgrade - - Exception - java.lang.Exception - - - - - - UpgradeKBStructure - com.liferay.knowledgebase.hook.upgrade.v1_2_0.UpgradeKBStructure - - - doUpgrade - - Exception - java.lang.Exception - - - - - - UpgradeKBTemplate - com.liferay.knowledgebase.hook.upgrade.v1_2_0.UpgradeKBTemplate - - - doUpgrade - - Exception - java.lang.Exception - - - - - - UpgradeKBAttachments - com.liferay.knowledgebase.hook.upgrade.v1_3_0.UpgradeKBAttachments - - - deleteEmptyDirectories - - Exception - java.lang.Exception - - - - - doUpgrade - - Exception - java.lang.Exception - - - - - getClassName - - - - - - getContainerModelFolderId - - groupId - long - - - - companyId - long - - - - resourcePrimKey - long - - - - containerId - long - - - - userId - long - - - - userName - java.lang.String - - - - createDate - java.sql.Timestamp - - - - - - - Exception - java.lang.Exception - - - - - getDirName - - containerModelId - long - - - - resourcePrimKey - long - - - - - - - - getPortletId - - - - - - updateAttachments - - Exception - java.lang.Exception - - - - - - UpgradePortletPreferences - com.liferay.knowledgebase.hook.upgrade.v1_3_0.UpgradePortletPreferences - - - getPortletIds - - - - - - upgradePreferences - - companyId - long - - - - ownerId - long - - - - ownerType - int - - - - plid - long - - - - portletId - java.lang.String - - - - xml - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - _PORTLET_IDS - - - - KBArticleImpl - com.liferay.knowledgebase.model.impl.KBArticleImpl - - - - KBArticleImpl - - - getAttachmentsDirName - - - - - - getAttachmentsFileEntries - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getAttachmentsFileNames - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getAttachmentsFolderId - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getClassPK - - - - - - isFirstVersion - - - - - - isResourceMain - - - - - - isRoot - - - - - - _log - - - _attachmentsFolderId - - - - KBArticleSearchDisplayImpl - com.liferay.knowledgebase.model.impl.KBArticleSearchDisplayImpl - - - KBArticleSearchDisplayImpl - - results - java.util.List - - - - total - int - - - - curStartValues - int[] - - - - - getCurStartValues - - - - - - getResults - - - - - - getTotal - - - - - - setCurStartValues - - curStartValues - int[] - - - - - setResults - - results - java.util.List - - - - - setTotal - - total - int - - - - - _curStartValues - - - _results - - - _total - - - - KBCommentImpl - com.liferay.knowledgebase.model.impl.KBCommentImpl - - - - KBCommentImpl - - - getStagedModelType - - - - - - - KBTemplateImpl - com.liferay.knowledgebase.model.impl.KBTemplateImpl - - - - KBTemplateImpl - - - - KBTemplateSearchDisplayImpl - com.liferay.knowledgebase.model.impl.KBTemplateSearchDisplayImpl - - - KBTemplateSearchDisplayImpl - - results - java.util.List - - - - total - int - - - - curStartValues - int[] - - - - - getCurStartValues - - - - - - getResults - - - - - - getTotal - - - - - - setCurStartValues - - curStartValues - int[] - - - - - setResults - - results - java.util.List - - - - - setTotal - - total - int - - - - - _curStartValues - - - _results - - - _total - - - - SearchPortlet - com.liferay.knowledgebase.search.portlet.SearchPortlet - - - - addAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - moveKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - render - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - serveAttachment - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveKBArticleRSS - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveResource - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - subscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - unsubscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateAttachments - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - addSuccessMessage - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - - checkExceededSizeLimit - - request - javax.servlet.http.HttpServletRequest - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - doDispatch - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - getStatus - - renderRequest - javax.portlet.RenderRequest - - - - - - - Exception - java.lang.Exception - - - - - isSessionErrorException - - cause - java.lang.Throwable - - - - - - - - - ConfigurationActionImpl - com.liferay.knowledgebase.section.action.ConfigurationActionImpl - - - processAction - - portletConfig - javax.portlet.PortletConfig - - - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateGeneral - - actionRequest - javax.portlet.ActionRequest - - - - - - SectionPortlet - com.liferay.knowledgebase.section.portlet.SectionPortlet - - - - addAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteAttachment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - deleteKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - moveKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - render - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - serveAttachment - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveKBArticleRSS - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveResource - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - subscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - unsubscribeKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateAttachments - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBArticle - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateKBComment - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - addSuccessMessage - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - - checkExceededSizeLimit - - request - javax.servlet.http.HttpServletRequest - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - doDispatch - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - getStatus - - renderRequest - javax.portlet.RenderRequest - - - - - - - Exception - java.lang.Exception - - - - - isSessionErrorException - - cause - java.lang.Throwable - - - - - - - - - KBArticleSearch - com.liferay.knowledgebase.section.search.KBArticleSearch - - - - KBArticleSearch - - portletRequest - javax.portlet.PortletRequest - - - - iteratorURL - javax.portlet.PortletURL - - - - - EMPTY_RESULTS_MESSAGE - - - _log - - - - KBArticleLocalServiceImpl - com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl - - - - - addAttachment - - dirName - java.lang.String - - - - shortFileName - java.lang.String - - - - inputStream - java.io.InputStream - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - addKBArticle - - userId - long - - - - parentResourcePrimKey - long - - - - title - java.lang.String - - - - urlTitle - java.lang.String - - - - content - java.lang.String - - - - description - java.lang.String - - - - sections - java.lang.String[] - - - - dirName - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - addKBArticleResources - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - addGroupPermissions - boolean - - - - addGuestPermissions - boolean - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - addKBArticleResources - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - groupPermissions - java.lang.String[] - - - - guestPermissions - java.lang.String[] - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - addKBArticleResources - - kbArticleId - long - - - - addGroupPermissions - boolean - - - - addGuestPermissions - boolean - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - addKBArticleResources - - kbArticleId - long - - - - groupPermissions - java.lang.String[] - - - - guestPermissions - java.lang.String[] - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - checkAttachments - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteAttachment - - companyId - long - - - - fileName - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteGroupKBArticles - - groupId - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBArticle - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBArticle - - resourcePrimKey - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBArticles - - resourcePrimKeys - long[] - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - fetchLatestKBArticle - - resourcePrimKey - long - - - - status - int - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getAttachment - - companyId - long - - - - fileName - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getCompanyKBArticles - - companyId - long - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getCompanyKBArticlesCount - - companyId - long - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupKBArticles - - groupId - long - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupKBArticlesCount - - groupId - long - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticle - - resourcePrimKey - long - - - - version - int - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticleAndAllDescendants - - resourcePrimKey - long - - - - status - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticleByUrlTitle - - groupId - long - - - - urlTitle - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticles - - resourcePrimKeys - long[] - - - - status - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticleVersions - - resourcePrimKey - long - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticleVersionsCount - - resourcePrimKey - long - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getLatestKBArticle - - resourcePrimKey - long - - - - status - int - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getLatestKBArticleByUrlTitle - - groupId - long - - - - urlTitle - java.lang.String - - - - status - int - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getSectionsKBArticles - - groupId - long - - - - sections - java.lang.String[] - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getSectionsKBArticlesCount - - groupId - long - - - - sections - java.lang.String[] - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getSiblingKBArticles - - groupId - long - - - - parentResourcePrimKey - long - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getSiblingKBArticlesCount - - groupId - long - - - - parentResourcePrimKey - long - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - moveKBArticle - - userId - long - - - - resourcePrimKey - long - - - - parentResourcePrimKey - long - - - - priority - double - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - search - - groupId - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - status - int - - - - startDate - java.util.Date - - - - endDate - java.util.Date - - - - andOperator - boolean - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - subscribeGroupKBArticles - - userId - long - - - - groupId - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - subscribeKBArticle - - userId - long - - - - groupId - long - - - - resourcePrimKey - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - unsubscribeGroupKBArticles - - userId - long - - - - groupId - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - unsubscribeKBArticle - - userId - long - - - - resourcePrimKey - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateAttachments - - resourcePrimKey - long - - - - dirName - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBArticle - - userId - long - - - - resourcePrimKey - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - description - java.lang.String - - - - sections - java.lang.String[] - - - - dirName - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBArticleAsset - - userId - long - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - assetCategoryIds - long[] - - - - assetTagNames - java.lang.String[] - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBArticleResources - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - groupPermissions - java.lang.String[] - - - - guestPermissions - java.lang.String[] - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBArticlesPriorities - - resourcePrimKeyToPriorityMap - java.util.Map - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updatePriority - - resourcePrimKey - long - - - - priority - double - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateStatus - - userId - long - - - - resourcePrimKey - long - - - - status - int - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateViewCount - - userId - long - - - - resourcePrimKey - long - - - - viewCount - int - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - addKBArticleAttachments - - userId - long - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - dirName - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - buildDynamicQuery - - groupId - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - status - int - - - - startDate - java.util.Date - - - - endDate - java.util.Date - - - - andOperator - boolean - - - - - - - - checkAttachments - - companyId - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteAssets - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBArticleAttachments - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBArticleAttachments - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - folderId - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteSubscriptions - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getEmailKBArticleDiffs - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - - - - - getPriority - - groupId - long - - - - parentResourcePrimKey - long - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getRootResourcePrimKey - - resourcePrimKey - long - - - - parentResourcePrimKey - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getTicketExpirationDate - - - - - - getUniqueUrlTitle - - groupId - long - - - - kbArticleId - long - - - - title - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getUniqueUrlTitle - - kbArticleId - long - - - - title - java.lang.String - - - - urlTitle - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - isValidDirName - - dirName - java.lang.String - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - isValidFileName - - name - java.lang.String - - - - - - - - notifySubscribers - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBArticleAttachments - - userId - long - - - - kbArticle - com.liferay.knowledgebase.model.KBArticle - - - - oldVersion - int - - - - dirName - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updatePermissionFields - - resourcePrimKey - long - - - - parentResourcePrimKey - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - validate - - priority - double - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - validate - - title - java.lang.String - - - - content - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - _TEMP_DIR_NAME_PREFIX - - - _TICKET_EXPIRATION - - - _log - - - - KBArticleServiceImpl - com.liferay.knowledgebase.service.impl.KBArticleServiceImpl - - - - addAttachment - - portletId - java.lang.String - - - - resourcePrimKey - long - - - - dirName - java.lang.String - - - - shortFileName - java.lang.String - - - - inputStream - java.io.InputStream - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - addKBArticle - - portletId - java.lang.String - - - - parentResourcePrimKey - long - - - - title - java.lang.String - - - - urlTitle - java.lang.String - - - - content - java.lang.String - - - - description - java.lang.String - - - - sections - java.lang.String[] - - - - dirName - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteAttachment - - companyId - long - - - - groupId - long - - - - portletId - java.lang.String - - - - resourcePrimKey - long - - - - fileName - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBArticle - - resourcePrimKey - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBArticles - - groupId - long - - - - resourcePrimKeys - long[] - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getAttachment - - companyId - long - - - - groupId - long - - - - portletId - java.lang.String - - - - resourcePrimKey - long - - - - fileName - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupKBArticles - - groupId - long - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupKBArticlesCount - - groupId - long - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupKBArticlesRSS - - status - int - - - - rssDelta - int - - - - rssDisplayStyle - java.lang.String - - - - rssFormat - java.lang.String - - - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticle - - resourcePrimKey - long - - - - version - int - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticleAndAllDescendants - - groupId - long - - - - resourcePrimKey - long - - - - status - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticleRSS - - resourcePrimKey - long - - - - status - int - - - - rssDelta - int - - - - rssDisplayStyle - java.lang.String - - - - rssFormat - java.lang.String - - - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticles - - groupId - long - - - - resourcePrimKeys - long[] - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticles - - groupId - long - - - - resourcePrimKeys - long[] - - - - status - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticlesCount - - groupId - long - - - - resourcePrimKeys - long[] - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticleSearchDisplay - - groupId - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - status - int - - - - startDate - java.util.Date - - - - endDate - java.util.Date - - - - andOperator - boolean - - - - curStartValues - int[] - - - - cur - int - - - - delta - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticleVersions - - groupId - long - - - - resourcePrimKey - long - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBArticleVersionsCount - - groupId - long - - - - resourcePrimKey - long - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getLatestKBArticle - - resourcePrimKey - long - - - - status - int - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getSectionsKBArticles - - groupId - long - - - - sections - java.lang.String[] - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getSectionsKBArticlesCount - - groupId - long - - - - sections - java.lang.String[] - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getSiblingKBArticles - - groupId - long - - - - parentResourcePrimKey - long - - - - status - int - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getSiblingKBArticlesCount - - groupId - long - - - - parentResourcePrimKey - long - - - - status - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - moveKBArticle - - resourcePrimKey - long - - - - parentResourcePrimKey - long - - - - priority - double - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - subscribeGroupKBArticles - - groupId - long - - - - portletId - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - subscribeKBArticle - - groupId - long - - - - resourcePrimKey - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - unsubscribeGroupKBArticles - - groupId - long - - - - portletId - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - unsubscribeKBArticle - - resourcePrimKey - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateAttachments - - portletId - java.lang.String - - - - resourcePrimKey - long - - - - dirName - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBArticle - - resourcePrimKey - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - description - java.lang.String - - - - sections - java.lang.String[] - - - - dirName - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBArticlesPriorities - - groupId - long - - - - resourcePrimKeyToPriorityMap - java.util.Map - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - exportToRSS - - rssDisplayStyle - java.lang.String - - - - rssFormat - java.lang.String - - - - name - java.lang.String - - - - description - java.lang.String - - - - feedURL - java.lang.String - - - - kbArticles - java.util.List - - - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - checkAttachmentPermissions - - groupId - long - - - - portletId - java.lang.String - - - - resourcePrimKey - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - _INTERVAL - - - - KBCommentLocalServiceImpl - com.liferay.knowledgebase.service.impl.KBCommentLocalServiceImpl - - - addKBComment - - userId - long - - - - classNameId - long - - - - classPK - long - - - - content - java.lang.String - - - - helpful - boolean - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBComment - - kbComment - com.liferay.knowledgebase.model.KBComment - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBComment - - kbCommentId - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBComments - - className - java.lang.String - - - - classPK - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBComment - - userId - long - - - - className - java.lang.String - - - - classPK - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBComments - - className - java.lang.String - - - - classPK - long - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBCommentsCount - - className - java.lang.String - - - - classPK - long - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBComment - - kbCommentId - long - - - - classNameId - long - - - - classPK - long - - - - content - java.lang.String - - - - helpful - boolean - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - putTitle - - jsonObject - com.liferay.portal.kernel.json.JSONObject - - - - kbComment - com.liferay.knowledgebase.model.KBComment - - - - - validate - - content - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - _log - - - - KBCommentServiceImpl - com.liferay.knowledgebase.service.impl.KBCommentServiceImpl - - - deleteKBComment - - kbComment - com.liferay.knowledgebase.model.KBComment - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBComment - - kbCommentId - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBComment - - kbCommentId - long - - - - classNameId - long - - - - classPK - long - - - - content - java.lang.String - - - - helpful - boolean - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - - KBTemplateLocalServiceImpl - com.liferay.knowledgebase.service.impl.KBTemplateLocalServiceImpl - - - - addKBTemplate - - userId - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteGroupKBTemplates - - groupId - long - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBTemplate - - kbTemplate - com.liferay.knowledgebase.model.KBTemplate - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBTemplate - - kbTemplateId - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBTemplates - - kbTemplateIds - long[] - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupKBTemplates - - groupId - long - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupKBTemplatesCount - - groupId - long - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - search - - groupId - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - startDate - java.util.Date - - - - endDate - java.util.Date - - - - andOperator - boolean - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBTemplate - - kbTemplateId - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBTemplateResources - - kbTemplate - com.liferay.knowledgebase.model.KBTemplate - - - - groupPermissions - java.lang.String[] - - - - guestPermissions - java.lang.String[] - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - buildDynamicQuery - - groupId - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - startDate - java.util.Date - - - - endDate - java.util.Date - - - - andOperator - boolean - - - - - - - - validate - - title - java.lang.String - - - - content - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - - KBTemplateServiceImpl - com.liferay.knowledgebase.service.impl.KBTemplateServiceImpl - - - - addKBTemplate - - portletId - java.lang.String - - - - title - java.lang.String - - - - content - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBTemplate - - kbTemplateId - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteKBTemplates - - groupId - long - - - - kbTemplateIds - long[] - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupKBTemplates - - groupId - long - - - - start - int - - - - end - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGroupKBTemplatesCount - - groupId - long - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBTemplate - - kbTemplateId - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getKBTemplateSearchDisplay - - groupId - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - startDate - java.util.Date - - - - endDate - java.util.Date - - - - andOperator - boolean - - - - curStartValues - int[] - - - - cur - int - - - - delta - int - - - - orderByComparator - com.liferay.portal.kernel.util.OrderByComparator - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateKBTemplate - - kbTemplateId - long - - - - title - java.lang.String - - - - content - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - _INTERVAL - - - - ActionKeys - com.liferay.knowledgebase.util.ActionKeys - - - - ADD_KB_ARTICLE - - - ADD_KB_TEMPLATE - - - ADMINISTRATOR - - - DELETE_KB_ARTICLES - - - DELETE_KB_TEMPLATES - - - MOVE_KB_ARTICLE - - - UPDATE_KB_ARTICLES_PRIORITIES - - - VIEW_KB_TEMPLATES - - - - KnowledgeBaseUtil - com.liferay.knowledgebase.util.KnowledgeBaseUtil - - - - getKBArticleOrderByComparator - - orderByCol - java.lang.String - - - - orderByType - java.lang.String - - - - - - - - getKBArticleSorts - - orderByCol - java.lang.String - - - - orderByType - java.lang.String - - - - - - - - getKBArticleURL - - plid - long - - - - resourcePrimKey - long - - - - status - int - - - - portalURL - java.lang.String - - - - maximized - boolean - - - - - - - - getKBTemplateOrderByComparator - - orderByCol - java.lang.String - - - - orderByType - java.lang.String - - - - - - - - getMimeType - - bytes - byte[] - - - - fileName - java.lang.String - - - - - - - - getParams - - params - java.lang.Long[] - - - - - - - - getUrlTitle - - id - long - - - - title - java.lang.String - - - - - - - - parseKeywords - - values - java.lang.String - - - - - - - - sort - - resourcePrimKeys - long[] - - - - kbArticles - java.util.List - - - - - - - - trimLeadingSlash - - s - java.lang.String - - - - - - - - _SQL_DATA_MAX_PARAMETERS - - - _friendlyURLPattern - - - - PortletPropsKeys - com.liferay.knowledgebase.util.PortletPropsKeys - - - ADMIN_EMAIL_FROM_ADDRESS - - - ADMIN_EMAIL_FROM_NAME - - - ADMIN_EMAIL_KB_ARTICLE_ADDED_BODY - - - ADMIN_EMAIL_KB_ARTICLE_ADDED_ENABLED - - - ADMIN_EMAIL_KB_ARTICLE_ADDED_SUBJECT - - - ADMIN_EMAIL_KB_ARTICLE_UPDATED_BODY - - - ADMIN_EMAIL_KB_ARTICLE_UPDATED_ENABLED - - - ADMIN_EMAIL_KB_ARTICLE_UPDATED_SUBJECT - - - ADMIN_KB_ARTICLE_DEFAULT_SECTIONS - - - ADMIN_KB_ARTICLE_INCREMENT_PRIORITY_ENABLED - - - ADMIN_KB_ARTICLE_SECTIONS - - - - PortletPropsValues - com.liferay.knowledgebase.util.PortletPropsValues - - - ADMIN_EMAIL_FROM_ADDRESS - - - ADMIN_EMAIL_FROM_NAME - - - ADMIN_EMAIL_KB_ARTICLE_ADDED_BODY - - - ADMIN_EMAIL_KB_ARTICLE_ADDED_ENABLED - - - ADMIN_EMAIL_KB_ARTICLE_ADDED_SUBJECT - - - ADMIN_EMAIL_KB_ARTICLE_UPDATED_BODY - - - ADMIN_EMAIL_KB_ARTICLE_UPDATED_ENABLED - - - ADMIN_EMAIL_KB_ARTICLE_UPDATED_SUBJECT - - - ADMIN_KB_ARTICLE_DEFAULT_SECTIONS - - - ADMIN_KB_ARTICLE_INCREMENT_PRIORITY_ENABLED - - - ADMIN_KB_ARTICLE_SECTIONS - - - - WebKeys - com.liferay.knowledgebase.util.WebKeys - - - - KNOWLEDGE_BASE_KB_ARTICLE - - - KNOWLEDGE_BASE_KB_TEMPLATE - - - KNOWLEDGE_BASE_STATUS - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-rt.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-rt.xml deleted file mode 100644 index 14b608a112..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-rt.xml +++ /dev/null @@ -1,2 +0,0 @@ - -KBArticleLocalServiceImplcom.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpladdAttachmentdirNamejava.lang.StringshortFileNamejava.lang.StringinputStreamjava.io.InputStreamserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionaddKBArticleuserIdlongparentResourcePrimKeylongtitlejava.lang.StringurlTitlejava.lang.Stringcontentjava.lang.Stringdescriptionjava.lang.Stringsectionsjava.lang.String[]dirNamejava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionaddKBArticleResourceskbArticlecom.liferay.knowledgebase.model.KBArticleaddGroupPermissionsbooleanaddGuestPermissionsbooleanPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionaddKBArticleResourceskbArticlecom.liferay.knowledgebase.model.KBArticlegroupPermissionsjava.lang.String[]guestPermissionsjava.lang.String[]PortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionaddKBArticleResourceskbArticleIdlongaddGroupPermissionsbooleanaddGuestPermissionsbooleanPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionaddKBArticleResourceskbArticleIdlonggroupPermissionsjava.lang.String[]guestPermissionsjava.lang.String[]PortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptioncheckAttachmentsPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteAttachmentcompanyIdlongfileNamejava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteGroupKBArticlesgroupIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBArticlekbArticlecom.liferay.knowledgebase.model.KBArticlePortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBArticleresourcePrimKeylongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBArticlesresourcePrimKeyslong[]PortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionfetchLatestKBArticleresourcePrimKeylongstatusintPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetAttachmentcompanyIdlongfileNamejava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetCompanyKBArticlescompanyIdlongstatusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetCompanyKBArticlesCountcompanyIdlongstatusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGroupKBArticlesgroupIdlongstatusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGroupKBArticlesCountgroupIdlongstatusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleresourcePrimKeylongversionintPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleAndAllDescendantsresourcePrimKeylongstatusintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleByUrlTitlegroupIdlongurlTitlejava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticlesresourcePrimKeyslong[]statusintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleVersionsresourcePrimKeylongstatusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleVersionsCountresourcePrimKeylongstatusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetLatestKBArticleresourcePrimKeylongstatusintPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetLatestKBArticleByUrlTitlegroupIdlongurlTitlejava.lang.StringstatusintPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetSectionsKBArticlesgroupIdlongsectionsjava.lang.String[]statusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetSectionsKBArticlesCountgroupIdlongsectionsjava.lang.String[]statusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetSiblingKBArticlesgroupIdlongparentResourcePrimKeylongstatusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetSiblingKBArticlesCountgroupIdlongparentResourcePrimKeylongstatusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionmoveKBArticleuserIdlongresourcePrimKeylongparentResourcePrimKeylongprioritydoublePortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionsearchgroupIdlongtitlejava.lang.Stringcontentjava.lang.StringstatusintstartDatejava.util.DateendDatejava.util.DateandOperatorbooleanstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionsubscribeGroupKBArticlesuserIdlonggroupIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionsubscribeKBArticleuserIdlonggroupIdlongresourcePrimKeylongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionunsubscribeGroupKBArticlesuserIdlonggroupIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionunsubscribeKBArticleuserIdlongresourcePrimKeylongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateAttachmentsresourcePrimKeylongdirNamejava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBArticleuserIdlongresourcePrimKeylongtitlejava.lang.Stringcontentjava.lang.Stringdescriptionjava.lang.Stringsectionsjava.lang.String[]dirNamejava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBArticleAssetuserIdlongkbArticlecom.liferay.knowledgebase.model.KBArticleassetCategoryIdslong[]assetTagNamesjava.lang.String[]PortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBArticleResourceskbArticlecom.liferay.knowledgebase.model.KBArticlegroupPermissionsjava.lang.String[]guestPermissionsjava.lang.String[]PortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBArticlesPrioritiesresourcePrimKeyToPriorityMapjava.util.MapPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdatePriorityresourcePrimKeylongprioritydoublePortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateStatususerIdlongresourcePrimKeylongstatusintserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateViewCountuserIdlongresourcePrimKeylongviewCountintPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionaddKBArticleAttachmentsuserIdlongkbArticlecom.liferay.knowledgebase.model.KBArticledirNamejava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionbuildDynamicQuerygroupIdlongtitlejava.lang.Stringcontentjava.lang.StringstatusintstartDatejava.util.DateendDatejava.util.DateandOperatorbooleancheckAttachmentscompanyIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteAssetskbArticlecom.liferay.knowledgebase.model.KBArticlePortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBArticleAttachmentskbArticlecom.liferay.knowledgebase.model.KBArticlePortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBArticleAttachmentskbArticlecom.liferay.knowledgebase.model.KBArticlefolderIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteSubscriptionskbArticlecom.liferay.knowledgebase.model.KBArticlePortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetEmailKBArticleDiffskbArticlecom.liferay.knowledgebase.model.KBArticlegetPrioritygroupIdlongparentResourcePrimKeylongSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetRootResourcePrimKeyresourcePrimKeylongparentResourcePrimKeylongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetTicketExpirationDategetUniqueUrlTitlegroupIdlongkbArticleIdlongtitlejava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetUniqueUrlTitlekbArticleIdlongtitlejava.lang.StringurlTitlejava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionisValidDirNamedirNamejava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionisValidFileNamenamejava.lang.StringnotifySubscriberskbArticlecom.liferay.knowledgebase.model.KBArticleserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBArticleAttachmentsuserIdlongkbArticlecom.liferay.knowledgebase.model.KBArticleoldVersionintdirNamejava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdatePermissionFieldsresourcePrimKeylongparentResourcePrimKeylongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionvalidateprioritydoublePortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionvalidatetitlejava.lang.Stringcontentjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalException_TEMP_DIR_NAME_PREFIX_TICKET_EXPIRATION_logKBArticleServiceImplcom.liferay.knowledgebase.service.impl.KBArticleServiceImpladdAttachmentportletIdjava.lang.StringresourcePrimKeylongdirNamejava.lang.StringshortFileNamejava.lang.StringinputStreamjava.io.InputStreamserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionaddKBArticleportletIdjava.lang.StringparentResourcePrimKeylongtitlejava.lang.StringurlTitlejava.lang.Stringcontentjava.lang.Stringdescriptionjava.lang.Stringsectionsjava.lang.String[]dirNamejava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteAttachmentcompanyIdlonggroupIdlongportletIdjava.lang.StringresourcePrimKeylongfileNamejava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBArticleresourcePrimKeylongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBArticlesgroupIdlongresourcePrimKeyslong[]PortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetAttachmentcompanyIdlonggroupIdlongportletIdjava.lang.StringresourcePrimKeylongfileNamejava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGroupKBArticlesgroupIdlongstatusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGroupKBArticlesCountgroupIdlongstatusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGroupKBArticlesRSSstatusintrssDeltaintrssDisplayStylejava.lang.StringrssFormatjava.lang.StringthemeDisplaycom.liferay.portal.theme.ThemeDisplayPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleresourcePrimKeylongversionintPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleAndAllDescendantsgroupIdlongresourcePrimKeylongstatusintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleRSSresourcePrimKeylongstatusintrssDeltaintrssDisplayStylejava.lang.StringrssFormatjava.lang.StringthemeDisplaycom.liferay.portal.theme.ThemeDisplayPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticlesgroupIdlongresourcePrimKeyslong[]statusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticlesgroupIdlongresourcePrimKeyslong[]statusintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticlesCountgroupIdlongresourcePrimKeyslong[]statusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleSearchDisplaygroupIdlongtitlejava.lang.Stringcontentjava.lang.StringstatusintstartDatejava.util.DateendDatejava.util.DateandOperatorbooleancurStartValuesint[]curintdeltaintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleVersionsgroupIdlongresourcePrimKeylongstatusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBArticleVersionsCountgroupIdlongresourcePrimKeylongstatusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetLatestKBArticleresourcePrimKeylongstatusintPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetSectionsKBArticlesgroupIdlongsectionsjava.lang.String[]statusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetSectionsKBArticlesCountgroupIdlongsectionsjava.lang.String[]statusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetSiblingKBArticlesgroupIdlongparentResourcePrimKeylongstatusintstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetSiblingKBArticlesCountgroupIdlongparentResourcePrimKeylongstatusintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionmoveKBArticleresourcePrimKeylongparentResourcePrimKeylongprioritydoublePortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionsubscribeGroupKBArticlesgroupIdlongportletIdjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionsubscribeKBArticlegroupIdlongresourcePrimKeylongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionunsubscribeGroupKBArticlesgroupIdlongportletIdjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionunsubscribeKBArticleresourcePrimKeylongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateAttachmentsportletIdjava.lang.StringresourcePrimKeylongdirNamejava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBArticleresourcePrimKeylongtitlejava.lang.Stringcontentjava.lang.Stringdescriptionjava.lang.Stringsectionsjava.lang.String[]dirNamejava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBArticlesPrioritiesgroupIdlongresourcePrimKeyToPriorityMapjava.util.MapPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionexportToRSSrssDisplayStylejava.lang.StringrssFormatjava.lang.Stringnamejava.lang.Stringdescriptionjava.lang.StringfeedURLjava.lang.StringkbArticlesjava.util.ListthemeDisplaycom.liferay.portal.theme.ThemeDisplaySystemExceptioncom.liferay.portal.kernel.exception.SystemExceptioncheckAttachmentPermissionsgroupIdlongportletIdjava.lang.StringresourcePrimKeylongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemException_INTERVALKBCommentLocalServiceImplcom.liferay.knowledgebase.service.impl.KBCommentLocalServiceImpladdKBCommentuserIdlongclassNameIdlongclassPKlongcontentjava.lang.StringhelpfulbooleanserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBCommentkbCommentcom.liferay.knowledgebase.model.KBCommentPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBCommentkbCommentIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBCommentsclassNamejava.lang.StringclassPKlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBCommentuserIdlongclassNamejava.lang.StringclassPKlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBCommentsclassNamejava.lang.StringclassPKlongstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBCommentsCountclassNamejava.lang.StringclassPKlongSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBCommentkbCommentIdlongclassNameIdlongclassPKlongcontentjava.lang.StringhelpfulbooleanserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionputTitlejsonObjectcom.liferay.portal.kernel.json.JSONObjectkbCommentcom.liferay.knowledgebase.model.KBCommentvalidatecontentjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalException_logKBCommentServiceImplcom.liferay.knowledgebase.service.impl.KBCommentServiceImpldeleteKBCommentkbCommentcom.liferay.knowledgebase.model.KBCommentPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBCommentkbCommentIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBCommentkbCommentIdlongclassNameIdlongclassPKlongcontentjava.lang.StringhelpfulbooleanserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionKBTemplateLocalServiceImplcom.liferay.knowledgebase.service.impl.KBTemplateLocalServiceImpladdKBTemplateuserIdlongtitlejava.lang.Stringcontentjava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteGroupKBTemplatesgroupIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBTemplatekbTemplatecom.liferay.knowledgebase.model.KBTemplatePortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBTemplatekbTemplateIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBTemplateskbTemplateIdslong[]PortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGroupKBTemplatesgroupIdlongstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGroupKBTemplatesCountgroupIdlongSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionsearchgroupIdlongtitlejava.lang.Stringcontentjava.lang.StringstartDatejava.util.DateendDatejava.util.DateandOperatorbooleanstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBTemplatekbTemplateIdlongtitlejava.lang.Stringcontentjava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBTemplateResourceskbTemplatecom.liferay.knowledgebase.model.KBTemplategroupPermissionsjava.lang.String[]guestPermissionsjava.lang.String[]PortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionbuildDynamicQuerygroupIdlongtitlejava.lang.Stringcontentjava.lang.StringstartDatejava.util.DateendDatejava.util.DateandOperatorbooleanvalidatetitlejava.lang.Stringcontentjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionKBTemplateServiceImplcom.liferay.knowledgebase.service.impl.KBTemplateServiceImpladdKBTemplateportletIdjava.lang.Stringtitlejava.lang.Stringcontentjava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBTemplatekbTemplateIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteKBTemplatesgroupIdlongkbTemplateIdslong[]PortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGroupKBTemplatesgroupIdlongstartintendintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGroupKBTemplatesCountgroupIdlongSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBTemplatekbTemplateIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetKBTemplateSearchDisplaygroupIdlongtitlejava.lang.Stringcontentjava.lang.StringstartDatejava.util.DateendDatejava.util.DateandOperatorbooleancurStartValuesint[]curintdeltaintorderByComparatorcom.liferay.portal.kernel.util.OrderByComparatorPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateKBTemplatekbTemplateIdlongtitlejava.lang.Stringcontentjava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemException_INTERVAL \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-hbm.xml deleted file mode 100644 index 3f7acde8a8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-hbm.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml deleted file mode 100644 index 46ff17ebdd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - 4000 - - - - - - - - - - - 4000 - - - - - - 4000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4000 - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-orm.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-orm.xml deleted file mode 100644 index 141fe09a77..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-orm.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - PROPERTY - - - - - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - - - - - - - - - - - - - - - - TIMESTAMP - - - - - - - - - - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - - - - - - - - - - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - - - - - - - - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - - - - - -
    - - - -
    - - - -
    - - - -
    - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-spring.xml deleted file mode 100644 index b2cca1d5c6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-spring.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml deleted file mode 100644 index fe293f420e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/action/ConfigurationActionImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/action/ConfigurationActionImpl.java deleted file mode 100644 index 5acb827b77..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/action/ConfigurationActionImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.action; - -import com.liferay.portal.kernel.portlet.DefaultConfigurationAction; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.Validator; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class ConfigurationActionImpl extends DefaultConfigurationAction { - - @Override - public void processAction( - PortletConfig portletConfig, ActionRequest actionRequest, - ActionResponse actionResponse) - throws Exception { - - String tabs2 = ParamUtil.getString(actionRequest, "tabs2"); - - if (tabs2.equals("article-added-email")) { - validateEmailKBArticleAdded(actionRequest); - } - else if (tabs2.equals("article-updated-email")) { - validateEmailKBArticleUpdated(actionRequest); - } - else if (tabs2.equals("email-from")) { - validateEmailFrom(actionRequest); - } - - super.processAction(portletConfig, actionRequest, actionResponse); - } - - protected boolean isVariableTerm(String s) { - if (s.contains("[$") && s.contains("$]")) { - return true; - } - else { - return false; - } - } - - protected void validateEmailFrom(ActionRequest actionRequest) { - String emailFromName = getParameter(actionRequest, "emailFromName"); - String emailFromAddress = getParameter( - actionRequest, "emailFromAddress"); - - if (Validator.isNull(emailFromName)) { - SessionErrors.add(actionRequest, "emailFromName"); - } - else if (!Validator.isEmailAddress(emailFromAddress) && - !isVariableTerm(emailFromAddress)) { - - SessionErrors.add(actionRequest, "emailFromAddress"); - } - } - - protected void validateEmailKBArticleAdded(ActionRequest actionRequest) { - String emailKBArticleAddedSubject = getParameter( - actionRequest, "emailKBArticleAddedSubject"); - String emailKBArticleAddedBody = getParameter( - actionRequest, "emailKBArticleAddedBody"); - - if (Validator.isNull(emailKBArticleAddedSubject)) { - SessionErrors.add(actionRequest, "emailKBArticleAddedSubject"); - } - else if (Validator.isNull(emailKBArticleAddedBody)) { - SessionErrors.add(actionRequest, "emailKBArticleAddedBody"); - } - } - - protected void validateEmailKBArticleUpdated(ActionRequest actionRequest) { - String emailKBArticleUpdatedSubject = getParameter( - actionRequest, "emailKBArticleUpdatedSubject"); - String emailKBArticleUpdatedBody = getParameter( - actionRequest, "emailKBArticleUpdatedBody"); - - if (Validator.isNull(emailKBArticleUpdatedSubject)) { - SessionErrors.add(actionRequest, "emailKBArticleUpdatedSubject"); - } - else if (Validator.isNull(emailKBArticleUpdatedBody)) { - SessionErrors.add(actionRequest, "emailKBArticleUpdatedBody"); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/asset/KBArticleAssetRenderer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/asset/KBArticleAssetRenderer.java deleted file mode 100644 index 7f440e0608..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/asset/KBArticleAssetRenderer.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.asset; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.knowledgebase.util.WebKeys; -import com.liferay.portal.kernel.portlet.LiferayPortletRequest; -import com.liferay.portal.kernel.portlet.LiferayPortletResponse; -import com.liferay.portal.kernel.util.HtmlUtil; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.asset.model.BaseAssetRenderer; - -import java.util.Locale; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -/** - * @author Peter Shin - */ -public class KBArticleAssetRenderer extends BaseAssetRenderer { - - public KBArticleAssetRenderer(KBArticle kbArticle) { - _kbArticle = kbArticle; - } - - @Override - public String getClassName() { - return KBArticle.class.getName(); - } - - @Override - public long getClassPK() { - return _kbArticle.getClassPK(); - } - - @Override - public long getGroupId() { - return _kbArticle.getGroupId(); - } - - @Override - public String getSummary(Locale locale) { - String summary = _kbArticle.getDescription(); - - if (Validator.isNull(summary)) { - summary = StringUtil.shorten( - HtmlUtil.extractText(_kbArticle.getContent()), 200); - } - - return summary; - } - - @Override - public String getTitle(Locale locale) { - return _kbArticle.getTitle(); - } - - @Override - public PortletURL getURLEdit( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse) - throws Exception { - - PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL( - getControlPanelPlid(liferayPortletRequest), - PortletKeys.KNOWLEDGE_BASE_ADMIN, PortletRequest.RENDER_PHASE); - - portletURL.setParameter("mvcPath", "/admin/edit_article.jsp"); - portletURL.setParameter( - "resourcePrimKey", String.valueOf(_kbArticle.getResourcePrimKey())); - - return portletURL; - } - - @Override - public PortletURL getURLView( - LiferayPortletResponse liferayPortletResponse, - WindowState windowState) - throws Exception { - - return null; - } - - @Override - public String getURLViewInContext( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse, - String noSuchEntryRedirect) { - - ThemeDisplay themeDisplay = - (ThemeDisplay)liferayPortletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - return KnowledgeBaseUtil.getKBArticleURL( - themeDisplay.getPlid(), _kbArticle.getResourcePrimKey(), - _kbArticle.getStatus(), themeDisplay.getPortalURL(), false); - } - - @Override - public long getUserId() { - return _kbArticle.getUserId(); - } - - @Override - public String getUserName() { - return _kbArticle.getUserName(); - } - - @Override - public String getUuid() { - return _kbArticle.getUuid(); - } - - @Override - public boolean hasEditPermission(PermissionChecker permissionChecker) { - return KBArticlePermission.contains( - permissionChecker, _kbArticle, ActionKeys.UPDATE); - } - - @Override - public boolean hasViewPermission(PermissionChecker permissionChecker) { - return KBArticlePermission.contains( - permissionChecker, _kbArticle, ActionKeys.VIEW); - } - - @Override - public boolean isPrintable() { - return true; - } - - @Override - public String render( - RenderRequest renderRequest, RenderResponse renderResponse, - String template) { - - if (template.equals(TEMPLATE_FULL_CONTENT)) { - renderRequest.setAttribute( - WebKeys.KNOWLEDGE_BASE_KB_ARTICLE, _kbArticle); - - return "/admin/asset/" + template + ".jsp"; - } - else { - return null; - } - } - - @Override - protected String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPathThemeImages() + "/trees/page.png"; - } - - private KBArticle _kbArticle; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/asset/KBArticleAssetRendererFactory.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/asset/KBArticleAssetRendererFactory.java deleted file mode 100644 index 64f49672df..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/asset/KBArticleAssetRendererFactory.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.asset; - -import com.liferay.knowledgebase.NoSuchArticleException; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.permission.AdminPermission; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.knowledgebase.util.WebKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.portlet.LiferayPortletRequest; -import com.liferay.portal.kernel.portlet.LiferayPortletResponse; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.PortletURLFactoryUtil; -import com.liferay.portlet.asset.model.AssetRenderer; -import com.liferay.portlet.asset.model.BaseAssetRendererFactory; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -/** - * @author Peter Shin - */ -public class KBArticleAssetRendererFactory extends BaseAssetRendererFactory { - - public static final String TYPE = "article"; - - @Override - public AssetRenderer getAssetRenderer(long classPK, int type) - throws PortalException, SystemException { - - KBArticle kbArticle = null; - - if (type == TYPE_LATEST_APPROVED) { - kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - classPK, WorkflowConstants.STATUS_APPROVED); - } - else { - try { - kbArticle = KBArticleLocalServiceUtil.getKBArticle(classPK); - } - catch (NoSuchArticleException nsae) { - kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - classPK, WorkflowConstants.STATUS_ANY); - } - } - - KBArticleAssetRenderer kbArticleAssetRenderer = - new KBArticleAssetRenderer(kbArticle); - - kbArticleAssetRenderer.setAssetRendererType(type); - - return kbArticleAssetRenderer; - } - - @Override - public String getClassName() { - return KBArticle.class.getName(); - } - - @Override - public String getPortletId() { - return PortletKeys.KNOWLEDGE_BASE_DISPLAY; - } - - @Override - public String getType() { - return TYPE; - } - - @Override - public PortletURL getURLAdd( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse) - throws PortalException, SystemException { - - ThemeDisplay themeDisplay = - (ThemeDisplay)liferayPortletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (!AdminPermission.contains( - themeDisplay.getPermissionChecker(), - themeDisplay.getScopeGroupId(), ActionKeys.ADD_KB_ARTICLE)) { - - return null; - } - - PortletURL portletURL = PortletURLFactoryUtil.create( - liferayPortletRequest, PortletKeys.KNOWLEDGE_BASE_ADMIN, - getControlPanelPlid(themeDisplay), PortletRequest.RENDER_PHASE); - - portletURL.setParameter("mvcPath", "/admin/edit_article.jsp"); - - return portletURL; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, long classPK, String actionId) - throws Exception { - - return KBArticlePermission.contains( - permissionChecker, classPK, actionId); - } - - @Override - public boolean isLinkable() { - return _LINKABLE; - } - - @Override - protected String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPathThemeImages() + "/trees/page.png"; - } - - private static final boolean _LINKABLE = true; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_added_body.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_added_body.tmpl deleted file mode 100644 index f654daa63f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_added_body.tmpl +++ /dev/null @@ -1,7 +0,0 @@ -[$ARTICLE_CONTENT$] - -[$ARTICLE_ATTACHMENTS$] - ---
    -[[$SITE_NAME$]][[$CATEGORY_TITLE$]]
    -[$ARTICLE_TITLE$] - [$ARTICLE_VERSION$] \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_added_subject.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_added_subject.tmpl deleted file mode 100644 index 3e269b9a5f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_added_subject.tmpl +++ /dev/null @@ -1 +0,0 @@ -[[$CATEGORY_TITLE$]] [$ARTICLE_TITLE$] \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_updated_body.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_updated_body.tmpl deleted file mode 100644 index 86eb7335a0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_updated_body.tmpl +++ /dev/null @@ -1,7 +0,0 @@ -[$ARTICLE_CONTENT_DIFF$] - -[$ARTICLE_ATTACHMENTS$] - ---
    -[[$SITE_NAME$]][[$CATEGORY_TITLE$]]
    -[$ARTICLE_TITLE_DIFF$] - [$ARTICLE_VERSION$] \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_updated_subject.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_updated_subject.tmpl deleted file mode 100644 index 3e269b9a5f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_article_updated_subject.tmpl +++ /dev/null @@ -1 +0,0 @@ -[[$CATEGORY_TITLE$]] [$ARTICLE_TITLE$] \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_in_progress_body.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_in_progress_body.tmpl deleted file mode 100644 index 69554bdd68..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_in_progress_body.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -Dear [$TO_NAME$],
    - -

    - We've started working on article [$ARTICLE_TITLE$] based on the following suggestion you sent us on [$COMMENT_CREATE_DATE$]: -

    - -
    - [$COMMENT_CONTENT$] -
    - -

    - We'll notify you when we finish so that you can take a look to the results. -

    - -Thank you very much!
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_in_progress_subject.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_in_progress_subject.tmpl deleted file mode 100644 index e248f99b96..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_in_progress_subject.tmpl +++ /dev/null @@ -1 +0,0 @@ -We are reviewing your suggestion for article [$ARTICLE_TITLE$] \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_received_body.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_received_body.tmpl deleted file mode 100644 index 058b497a7e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_received_body.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -Dear [$TO_NAME$],
    - -

    - Thank you very much for your feedback for article [$ARTICLE_TITLE$]. This is your suggestion: -

    - -
    - [$COMMENT_CONTENT$] -
    - -

    - In short time our team will review it and will start working on it. We will keep you informed on any action derived from your suggestions. -

    - -Thank you!
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_received_subject.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_received_subject.tmpl deleted file mode 100644 index fb73df107b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_received_subject.tmpl +++ /dev/null @@ -1 +0,0 @@ -We have received your suggestion for article [$ARTICLE_TITLE$] \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_resolved_body.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_resolved_body.tmpl deleted file mode 100644 index 1e2f1194d2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_resolved_body.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -Dear [$TO_NAME$],
    - -

    - Great news! We have resolved your feedback for article [$ARTICLE_TITLE$] sent on [$COMMENT_CREATE_DATE$]. This was your suggestion: -

    - -
    - [$COMMENT_CONTENT$] -
    - -

    - If you have any additional suggestion or comment, don't hesitate and get in contact with us. -

    - -Thank you very much!
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_resolved_subject.tmpl b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_resolved_subject.tmpl deleted file mode 100644 index f85352f633..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_resolved_subject.tmpl +++ /dev/null @@ -1 +0,0 @@ -We have resolved your suggestion for article [$ARTICLE_TITLE$] \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/KBArticleImporter.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/KBArticleImporter.java deleted file mode 100644 index ab639c61fa..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/KBArticleImporter.java +++ /dev/null @@ -1,353 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.importer; - -import com.liferay.knowledgebase.KBArticleImportException; -import com.liferay.knowledgebase.admin.importer.util.KBArticleMarkdownConverter; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.util.PortletPropsValues; -import com.liferay.portal.kernel.exception.PortalException; -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.repository.model.FileEntry; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.CharPool; -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.util.StreamUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.kernel.zip.ZipReader; -import com.liferay.portal.kernel.zip.ZipReaderFactoryUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.util.PortalUtil; - -import java.io.IOException; -import java.io.InputStream; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.TreeMap; - -/** - * @author James Hinkey - * @author Sergio González - * @author Jesse Rao - */ -public class KBArticleImporter { - - public int processZipFile( - long userId, long groupId, long parentKBFolderId, - boolean prioritizeByNumericalPrefix, InputStream inputStream, - ServiceContext serviceContext) - throws PortalException, SystemException { - - if (inputStream == null) { - throw new KBArticleImportException("Input stream is null"); - } - - try { - ZipReader zipReader = ZipReaderFactoryUtil.getZipReader( - inputStream); - - Map metadata = getMetadata(zipReader); - - return processKBArticleFiles( - userId, groupId, parentKBFolderId, prioritizeByNumericalPrefix, - zipReader, metadata, serviceContext); - } - catch (IOException ioe) { - throw new KBArticleImportException(ioe); - } - } - - protected KBArticle addKBArticleMarkdown( - long userId, long groupId, long parentKBFolderId, - long parentResourceClassNameId, long parentResourcePrimaryKey, - String markdown, String fileEntryName, ZipReader zipReader, - Map metadata, - PrioritizationStrategy prioritizationStrategy, - ServiceContext serviceContext) - throws KBArticleImportException, SystemException { - - if (Validator.isNull(markdown)) { - throw new KBArticleImportException( - "Markdown is null for file entry " + fileEntryName); - } - - KBArticleMarkdownConverter kbArticleMarkdownConverter = - new KBArticleMarkdownConverter(markdown, fileEntryName, metadata); - - String urlTitle = kbArticleMarkdownConverter.getUrlTitle(); - - KBArticle kbArticle = - KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle( - groupId, parentKBFolderId, urlTitle); - - boolean newKBArticle = false; - - if (kbArticle == null) { - newKBArticle = true; - } - - try { - if (kbArticle == null) { - int workflowAction = serviceContext.getWorkflowAction(); - - serviceContext.setWorkflowAction( - WorkflowConstants.ACTION_SAVE_DRAFT); - - kbArticle = KBArticleLocalServiceUtil.addKBArticle( - userId, parentResourceClassNameId, parentResourcePrimaryKey, - kbArticleMarkdownConverter.getTitle(), urlTitle, markdown, - null, kbArticleMarkdownConverter.getSourceURL(), null, null, - serviceContext); - - serviceContext.setWorkflowAction(workflowAction); - } - } - catch (Exception e) { - StringBundler sb = new StringBundler(4); - - sb.append("Unable to add basic KB article for file entry "); - sb.append(fileEntryName); - sb.append(": "); - sb.append(e.getLocalizedMessage()); - - throw new KBArticleImportException(sb.toString(), e); - } - - try { - String html = - kbArticleMarkdownConverter.processAttachmentsReferences( - userId, kbArticle, zipReader, - new HashMap()); - - kbArticle = KBArticleLocalServiceUtil.updateKBArticle( - userId, kbArticle.getResourcePrimKey(), - kbArticleMarkdownConverter.getTitle(), html, - kbArticle.getDescription(), - kbArticleMarkdownConverter.getSourceURL(), null, null, null, - serviceContext); - - if (newKBArticle) { - prioritizationStrategy.addKBArticle(kbArticle, fileEntryName); - } - else { - prioritizationStrategy.updateKBArticle( - kbArticle, fileEntryName); - } - - return kbArticle; - } - catch (Exception e) { - StringBundler sb = new StringBundler(4); - - sb.append("Unable to update KB article for file entry "); - sb.append(fileEntryName); - sb.append(": "); - sb.append(e.getLocalizedMessage()); - - throw new KBArticleImportException(sb.toString(), e); - } - } - - protected Map> getFolderNameFileEntryNamesMap( - ZipReader zipReader) - throws KBArticleImportException { - - Map> folderNameFileEntryNamesMap = - new TreeMap>(); - - for (String zipEntry : _getEntries(zipReader)) { - String extension = FileUtil.getExtension(zipEntry); - - if (!ArrayUtil.contains( - PortletPropsValues.MARKDOWN_IMPORTER_ARTICLE_EXTENSIONS, - StringPool.PERIOD.concat(extension))) { - - continue; - } - - String folderName = StringPool.SLASH; - - if (zipEntry.indexOf(CharPool.SLASH) != -1) { - folderName = zipEntry.substring( - 0, zipEntry.lastIndexOf(StringPool.SLASH)); - } - - List fileEntryNames = folderNameFileEntryNamesMap.get( - folderName); - - if (fileEntryNames == null) { - fileEntryNames = new ArrayList(); - } - - fileEntryNames.add(zipEntry); - - folderNameFileEntryNamesMap.put(folderName, fileEntryNames); - } - - return folderNameFileEntryNamesMap; - } - - protected Map getMetadata(ZipReader zipReader) - throws KBArticleImportException, SystemException { - - InputStream inputStream = null; - - try { - inputStream = zipReader.getEntryAsInputStream(".METADATA"); - - if (inputStream == null) { - return Collections.emptyMap(); - } - - Properties properties = new Properties(); - - properties.load(inputStream); - - Map metadata = new HashMap( - properties.size()); - - for (Object key : properties.keySet()) { - Object value = properties.get(key); - - if (value != null) { - metadata.put(key.toString(), value.toString()); - } - } - - return metadata; - } - catch (IOException ioe) { - throw new KBArticleImportException(ioe); - } - finally { - StreamUtil.cleanUp(inputStream); - } - } - - protected int processKBArticleFiles( - long userId, long groupId, long parentKBFolderId, - boolean prioritizeByNumericalPrefix, ZipReader zipReader, - Map metadata, ServiceContext serviceContext) - throws PortalException, SystemException { - - int importedKBArticleCount = 0; - - PrioritizationStrategy prioritizationStrategy = - PrioritizationStrategy.create( - groupId, parentKBFolderId, prioritizeByNumericalPrefix); - - Map> folderNameFileEntryNamesMap = - getFolderNameFileEntryNamesMap(zipReader); - - Set folderNames = folderNameFileEntryNamesMap.keySet(); - - for (String folderName : folderNames) { - List fileEntryNames = folderNameFileEntryNamesMap.get( - folderName); - - String sectionIntroFileEntryName = null; - - List sectionFileEntryNames = new ArrayList(); - - for (String fileEntryName : fileEntryNames) { - if (fileEntryName.endsWith( - PortletPropsValues.MARKDOWN_IMPORTER_ARTICLE_INTRO)) { - - sectionIntroFileEntryName = fileEntryName; - } - else { - sectionFileEntryNames.add(fileEntryName); - } - } - - long parentResourceClassNameId = PortalUtil.getClassNameId( - KBFolderConstants.getClassName()); - long parentResourcePrimaryKey = parentKBFolderId; - - long sectionResourceClassNameId = parentResourceClassNameId; - long sectionResourcePrimaryKey = parentResourcePrimaryKey; - - if (Validator.isNotNull(sectionIntroFileEntryName)) { - KBArticle sectionIntroKBArticle = addKBArticleMarkdown( - userId, groupId, parentKBFolderId, - sectionResourceClassNameId, sectionResourcePrimaryKey, - zipReader.getEntryAsString(sectionIntroFileEntryName), - sectionIntroFileEntryName, zipReader, metadata, - prioritizationStrategy, serviceContext); - - sectionResourceClassNameId = PortalUtil.getClassNameId( - KBArticleConstants.getClassName()); - sectionResourcePrimaryKey = - sectionIntroKBArticle.getResourcePrimKey(); - - importedKBArticleCount++; - } - - for (String sectionFileEntryName : sectionFileEntryNames) { - String sectionMarkdown = zipReader.getEntryAsString( - sectionFileEntryName); - - if (Validator.isNull(sectionMarkdown)) { - if (_log.isWarnEnabled()) { - _log.warn( - "Missing Markdown in file entry " + - sectionFileEntryName); - } - } - - addKBArticleMarkdown( - userId, groupId, parentKBFolderId, - sectionResourceClassNameId, sectionResourcePrimaryKey, - sectionMarkdown, sectionFileEntryName, zipReader, metadata, - prioritizationStrategy, serviceContext); - - importedKBArticleCount++; - } - } - - prioritizationStrategy.prioritizeKBArticles(); - - return importedKBArticleCount; - } - - private List _getEntries(ZipReader zipReader) - throws KBArticleImportException { - - try { - return zipReader.getEntries(); - } - catch (NullPointerException npe) { - throw new KBArticleImportException( - "The uploaded file is not a ZIP archive or it is corrupted"); - } - } - - private static Log _log = LogFactoryUtil.getLog(KBArticleImporter.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/PrioritizationStrategy.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/PrioritizationStrategy.java deleted file mode 100644 index 3487775e47..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/PrioritizationStrategy.java +++ /dev/null @@ -1,319 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.importer; - -import com.liferay.compat.portal.kernel.util.ListUtil; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.CharPool; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author Jesse Rao - */ -public class PrioritizationStrategy { - - public static PrioritizationStrategy create( - long groupId, long parentKBFolderId, - boolean prioritizeByNumericalPrefix) - throws SystemException { - - Map> existingKBArticlesMap = - new HashMap>(); - - List existingParentKBArticles = - KBArticleServiceUtil.getKBArticles( - groupId, parentKBFolderId, WorkflowConstants.STATUS_ANY, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - - existingKBArticlesMap.put(StringPool.BLANK, existingParentKBArticles); - - for (KBArticle existingParentKBArticle : existingParentKBArticles) { - long resourcePrimKey = existingParentKBArticle.getResourcePrimKey(); - - List existingChildKBArticles = - KBArticleServiceUtil.getKBArticles( - groupId, resourcePrimKey, WorkflowConstants.STATUS_ANY, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - - existingKBArticlesMap.put( - existingParentKBArticle.getUrlTitle(), existingChildKBArticles); - } - - return new PrioritizationStrategy( - groupId, parentKBFolderId, prioritizeByNumericalPrefix, - existingKBArticlesMap); - } - - public void addKBArticle(KBArticle kbArticle, String filePath) - throws PortalException, SystemException { - - handleNumericalPrefix(kbArticle, filePath); - } - - public void prioritizeKBArticles() throws PortalException, SystemException { - if (_prioritizeByNumericalPrefix) { - for (Map.Entry entry : - _importedKBArticleUrlTitlesPrioritiesMap.entrySet()) { - - if (entry.getValue() < 1.0) { - continue; - } - - KBArticle kbArticle = - KBArticleLocalServiceUtil.getKBArticleByUrlTitle( - _groupId, _parentKBFolderId, entry.getKey()); - - KBArticleLocalServiceUtil.updatePriority( - kbArticle.getResourcePrimKey(), entry.getValue()); - - remove(_importedKBArticlesMap, kbArticle); - } - } - - prioritizeKBArticles(_importedKBArticlesMap); - } - - public void updateKBArticle(KBArticle kbArticle, String filePath) - throws PortalException, SystemException { - - handleNumericalPrefix(kbArticle, filePath); - } - - protected PrioritizationStrategy( - long groupId, long parentKBFolderId, - boolean prioritizeByNumericalPrefix, - Map> existingKBArticlesMap) { - - _groupId = groupId; - _parentKBFolderId = parentKBFolderId; - _prioritizeByNumericalPrefix = prioritizeByNumericalPrefix; - } - - protected List getList(Map> map, S key) { - List list = map.get(key); - - if (list == null) { - list = new ArrayList(); - map.put(key, list); - } - - return list; - } - - protected double getNumericalPrefix( - String filePath, boolean isChildArticleFile) { - - double numericalPrefix = -1.0; - - if (isChildArticleFile) { - String fileName = filePath; - - int i = filePath.lastIndexOf(CharPool.SLASH); - - if (i != -1) { - fileName = filePath.substring(i + 1); - } - - String digits = StringUtil.extractLeadingDigits(fileName); - - if (Validator.isNull(digits)) { - return numericalPrefix; - } - - return GetterUtil.getDouble(digits); - } - else { - String[] pathEntries = filePath.split(StringPool.SLASH); - - if (pathEntries == null) { - String digits = StringUtil.extractLeadingDigits(filePath); - - if (Validator.isNull(digits)) { - return numericalPrefix; - } - - return GetterUtil.getDouble(digits); - } - - int length = pathEntries.length; - - for (int i = length - 1; i > -1; i--) { - String fileName = pathEntries[i]; - - String digits = StringUtil.extractLeadingDigits(fileName); - - if (Validator.isNull(digits)) { - continue; - } - - numericalPrefix = GetterUtil.getDouble(digits); - - if (numericalPrefix >= 1.0) { - return numericalPrefix; - } - } - } - - return numericalPrefix; - } - - protected String getParentKBArticleUrlTitle(KBArticle kbArticle) - throws PortalException, SystemException { - - KBArticle parentKBArticle = kbArticle.getParentKBArticle(); - - if (parentKBArticle == null) { - return StringPool.BLANK; - } - - return parentKBArticle.getUrlTitle(); - } - - protected void handleNumericalPrefix(KBArticle kbArticle, String filePath) - throws PortalException, SystemException { - - String parentKBArticleUrlTitle = getParentKBArticleUrlTitle(kbArticle); - - List kbArticles = getList( - _importedKBArticlesMap, parentKBArticleUrlTitle); - - kbArticles.add(kbArticle); - - if (_prioritizeByNumericalPrefix) { - boolean isChildArticle = true; - - if (kbArticle.getParentKBArticle() == null) { - isChildArticle = false; - } - - double sectionFileEntryNamePrefix = getNumericalPrefix( - filePath, isChildArticle); - - if (sectionFileEntryNamePrefix < 0.0) { - } - else if (sectionFileEntryNamePrefix < 1.0) { - kbArticle.setPriority(1.0); - - _importedKBArticleUrlTitlesPrioritiesMap.put( - kbArticle.getUrlTitle(), sectionFileEntryNamePrefix); - } - else { - _importedKBArticleUrlTitlesPrioritiesMap.put( - kbArticle.getUrlTitle(), sectionFileEntryNamePrefix); - } - } - } - - protected void prioritizeKBArticles( - Map> kbArticlesMap) - throws PortalException, SystemException { - - for (Map.Entry> entry : - kbArticlesMap.entrySet()) { - - List kbArticles = entry.getValue(); - - if (kbArticles == null) { - continue; - } - - List siblingKBArticles = null; - - if (Validator.isNull(entry.getKey())) { - - // Handle lead articles - - siblingKBArticles = KBArticleLocalServiceUtil.getKBArticles( - _groupId, _parentKBFolderId, WorkflowConstants.STATUS_ANY, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - else { - KBArticle parentKBArticle = - KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle( - _groupId, _parentKBFolderId, entry.getKey()); - - siblingKBArticles = KBArticleServiceUtil.getKBArticles( - _groupId, parentKBArticle.getResourcePrimKey(), - WorkflowConstants.STATUS_ANY, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - List siblingKBArticlesCopy = ListUtil.copy( - siblingKBArticles); - - siblingKBArticlesCopy.removeAll(kbArticles); - - double maxPriority = 0.0; - - for (KBArticle sibling : siblingKBArticlesCopy) { - double priority = sibling.getPriority(); - - if (priority > maxPriority) { - maxPriority = priority; - } - } - - int size = kbArticles.size(); - - for (int i = 0; i < size; i++) { - KBArticle kbArticle = kbArticles.get(i); - - if (kbArticle.getPriority() >= 1.0) { - continue; - } - - maxPriority++; - - KBArticleLocalServiceUtil.updatePriority( - kbArticle.getResourcePrimKey(), maxPriority); - } - } - } - - protected void remove(Map> map, T object) { - for (Map.Entry> entry : map.entrySet()) { - List list = entry.getValue(); - - if (list == null) { - continue; - } - - list.remove(object); - } - } - - private final long _groupId; - private final Map> _importedKBArticlesMap = - new HashMap>(); - private final Map _importedKBArticleUrlTitlesPrioritiesMap = - new HashMap(); - private final long _parentKBFolderId; - private final boolean _prioritizeByNumericalPrefix; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/util/KBArticleImporterUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/util/KBArticleImporterUtil.java deleted file mode 100644 index b32d0fcf5e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/util/KBArticleImporterUtil.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.importer.util; - -import com.liferay.knowledgebase.KBArticleImportException; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.knowledgebase.util.PortletPropsValues; -import com.liferay.portal.kernel.exception.PortalException; -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.repository.model.FileEntry; -import com.liferay.portal.kernel.util.MimeTypesUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.zip.ZipReader; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; - -import java.io.InputStream; - -import java.util.Map; - -/** - * @author James Hinkey - * @author Sergio González - */ -public class KBArticleImporterUtil { - - public static FileEntry addImageFileEntry( - String imageFileName, long userId, KBArticle kbArticle, - ZipReader zipReader, Map fileEntriesMap) - throws PortalException { - - try { - validateImageFileExtension(imageFileName); - } - catch (KBArticleImportException kbaie) { - if (_log.isWarnEnabled()) { - _log.warn( - "Unsupported image file suffix used in ZIP file " + - imageFileName); - } - } - - try { - return addImageFileEntry( - userId, kbArticle, imageFileName, - zipReader.getEntryAsInputStream( - PortletPropsValues.MARKDOWN_IMPORTER_IMAGE_FOLDER + - imageFileName), - fileEntriesMap); - } - catch (Exception e) { - StringBuilder sb = new StringBuilder(4); - - sb.append("Unable to import image file "); - sb.append(imageFileName); - sb.append(": "); - sb.append(e.getLocalizedMessage()); - - throw new KBArticleImportException(sb.toString()); - } - } - - public static String extractImageFileName(String html) { - String imageSrc = null; - - String[] lines = StringUtil.split(html, StringPool.QUOTE); - - for (int i = 0; i < lines.length; i++) { - if (lines[i].endsWith("src=")) { - if ((i + 1) < lines.length) { - imageSrc = lines[i + 1]; - } - - break; - } - } - - if (Validator.isNull(imageSrc)) { - if (_log.isWarnEnabled()) { - _log.warn("Missing src attribute for image " + html); - } - - return null; - } - - String[] paths = StringUtil.split(imageSrc, StringPool.SLASH); - - if (paths.length < 1) { - if (_log.isWarnEnabled()) { - _log.warn( - "Expected image file path to contain a slash " + html); - } - - return null; - } - - return paths[paths.length - 1]; - } - - public static void validateImageFileExtension(String imageFileName) - throws KBArticleImportException { - - boolean validImageFileExtension = false; - - for (String fileExtension : - PortletPropsValues.MARKDOWN_IMPORTER_IMAGE_FILE_EXTENSIONS) { - - if (StringPool.STAR.equals(fileExtension) || - StringUtil.endsWith(imageFileName, fileExtension)) { - - validImageFileExtension = true; - - break; - } - } - - if (!validImageFileExtension) { - throw new KBArticleImportException(imageFileName); - } - } - - protected static FileEntry addImageFileEntry( - long userId, KBArticle kbArticle, String imageFileName, - InputStream inputStream, Map fileEntriesMap) - throws PortalException, SystemException { - - FileEntry fileEntry = fileEntriesMap.get(imageFileName); - - if (fileEntry != null) { - return fileEntry; - } - - String mimeType = MimeTypesUtil.getContentType(imageFileName); - - try { - PortletFileRepositoryUtil.getPortletFileEntry( - kbArticle.getGroupId(), kbArticle.getAttachmentsFolderId(), - imageFileName); - - PortletFileRepositoryUtil.deletePortletFileEntry( - kbArticle.getGroupId(), kbArticle.getAttachmentsFolderId(), - imageFileName); - } - catch (NoSuchFileEntryException nsfee) { - } - - fileEntry = PortletFileRepositoryUtil.addPortletFileEntry( - kbArticle.getGroupId(), userId, KBArticle.class.getName(), - kbArticle.getClassPK(), PortletKeys.KNOWLEDGE_BASE_ARTICLE, - kbArticle.getAttachmentsFolderId(), inputStream, imageFileName, - mimeType, false); - - fileEntriesMap.put(imageFileName, fileEntry); - - return fileEntry; - } - - private static Log _log = LogFactoryUtil.getLog( - KBArticleImporterUtil.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/util/KBArticleMarkdownConverter.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/util/KBArticleMarkdownConverter.java deleted file mode 100644 index ca9d7f944d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/importer/util/KBArticleMarkdownConverter.java +++ /dev/null @@ -1,334 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.importer.util; - -import com.liferay.compat.portal.kernel.util.HtmlUtil; -import com.liferay.knowledgebase.KBArticleImportException; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.markdown.converter.MarkdownConverter; -import com.liferay.markdown.converter.factory.MarkdownConverterFactoryUtil; -import com.liferay.portal.kernel.exception.PortalException; -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.repository.model.FileEntry; -import com.liferay.portal.kernel.util.CharPool; -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.Validator; -import com.liferay.portal.kernel.zip.ZipReader; -import com.liferay.portlet.documentlibrary.util.DLUtil; - -import java.io.IOException; - -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; - -/** - * @author Sergio González - */ -public class KBArticleMarkdownConverter { - - public KBArticleMarkdownConverter( - String markdown, String fileEntryName, Map metadata) - throws KBArticleImportException { - - MarkdownConverter markdownConverter = - MarkdownConverterFactoryUtil.create(); - - String html = null; - - try { - html = markdownConverter.convert(markdown); - } - catch (IOException ioe) { - throw new KBArticleImportException( - "Unable to convert Markdown to HTML: " + - ioe.getLocalizedMessage(), - ioe); - } - - String heading = getHeading(html); - - if (Validator.isNull(heading)) { - throw new KBArticleImportException( - "Unable to extract heading from converted HTML: " + html); - } - - _urlTitle = getUrlTitle(heading); - - _title = HtmlUtil.unescape(stripIds(heading)); - - html = stripIds(html); - - _html = stripHeading(html); - - String baseSourceURL = metadata.get(_METADATA_BASE_SOURCE_URL); - - _sourceURL = buildSourceURL(baseSourceURL, fileEntryName); - } - - public String getSourceURL() { - return _sourceURL; - } - - public String getTitle() { - return _title; - } - - public String getUrlTitle() { - return _urlTitle; - } - - public String processAttachmentsReferences( - long userId, KBArticle kbArticle, ZipReader zipReader, - Map fileEntriesMap) - throws PortalException, SystemException { - - Set indexes = new TreeSet(); - - int index = 0; - - while ((index = _html.indexOf(" -1) { - indexes.add(index); - - index += 4; - } - - if (indexes.isEmpty()) { - return _html; - } - - StringBundler sb = new StringBundler(); - - int previousIndex = 0; - - for (int curIndex : indexes) { - if (curIndex < 0) { - break; - } - - if (curIndex > previousIndex) { - - // Append text from previous position up to image tag - - String text = _html.substring(previousIndex, curIndex); - - sb.append(text); - } - - int pos = _html.indexOf("/>", curIndex); - - if (pos < 0) { - if (_log.isDebugEnabled()) { - _log.debug( - "Expected close tag for image " + - _html.substring(curIndex)); - } - - sb.append(_html.substring(curIndex)); - - previousIndex = curIndex; - - break; - } - - String text = _html.substring(curIndex, pos); - - String imageFileName = KBArticleImporterUtil.extractImageFileName( - text); - - FileEntry imageFileEntry = KBArticleImporterUtil.addImageFileEntry( - imageFileName, userId, kbArticle, zipReader, fileEntriesMap); - - if (imageFileEntry == null) { - if (_log.isWarnEnabled()) { - _log.warn("Unable to find image source " + text); - } - - sb.append("\"missing= 0) { - char c = baseSourceURL.charAt(pos); - - if (c != CharPool.SLASH) { - break; - } - - pos--; - } - - StringBundler sb = new StringBundler(3); - - sb.append(baseSourceURL.substring(0, pos + 1)); - - if (!fileEntryName.startsWith(StringPool.SLASH)) { - sb.append(StringPool.SLASH); - } - - sb.append(fileEntryName); - - return sb.toString(); - } - - protected String getHeading(String html) { - int x = html.indexOf("

    "); - int y = html.indexOf("

    "); - - if ((x == -1) || (y == -1) || (x > y)) { - return null; - } - - return html.substring(x + 4, y); - } - - protected String getUrlTitle(String heading) { - String urlTitle = null; - - int x = heading.indexOf("[](id="); - int y = heading.indexOf(StringPool.CLOSE_PARENTHESIS, x); - - if (y > (x + 1)) { - int equalsSign = heading.indexOf(StringPool.EQUAL, x); - - urlTitle = heading.substring(equalsSign + 1, y); - - urlTitle = StringUtil.replace( - urlTitle, StringPool.SPACE, StringPool.DASH); - - urlTitle = StringUtil.toLowerCase(urlTitle); - } - - if (!urlTitle.startsWith(StringPool.SLASH)) { - urlTitle = StringPool.SLASH + urlTitle; - } - - return urlTitle; - } - - protected String stripHeading(String html) { - int index = html.indexOf(""); - - if (index == -1) { - return html; - } - - return html.substring(index + 5); - } - - protected String stripIds(String content) { - int index = content.indexOf("[](id="); - - if (index == -1) { - return content; - } - - StringBundler sb = new StringBundler(); - - do { - int x = content.indexOf(StringPool.EQUAL, index); - int y = content.indexOf(StringPool.CLOSE_PARENTHESIS, x); - - if (y != -1) { - sb.append(StringUtil.trimTrailing(content.substring(0, index))); - - content = content.substring(y + 1); - } - else { - if (_log.isWarnEnabled()) { - String msg = content.substring(index); - - // Get the invalid id text from the content - - int spaceIndex = content.indexOf(StringPool.SPACE); - - if (spaceIndex != -1) { - msg = content.substring(index, spaceIndex); - } - - _log.warn( - "Missing ')' for web content containing header id " + - msg); - } - - // Since no close parenthesis remains in the content, stop - // stripping out IDs and simply include all of the remaining - // content - - break; - } - } - while ((index = content.indexOf("[](id=")) != -1); - - sb.append(content); - - return sb.toString(); - } - - private static final String _METADATA_BASE_SOURCE_URL = "base.source.url"; - - private static Log _log = LogFactoryUtil.getLog( - KBArticleMarkdownConverter.class); - - private String _html; - private String _sourceURL; - private String _title; - private String _urlTitle; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/AdminPortletDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/AdminPortletDataHandler.java deleted file mode 100644 index 7399c1987f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/AdminPortletDataHandler.java +++ /dev/null @@ -1,219 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.lar; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; -import com.liferay.knowledgebase.service.persistence.KBArticleExportActionableDynamicQuery; -import com.liferay.knowledgebase.service.persistence.KBCommentExportActionableDynamicQuery; -import com.liferay.knowledgebase.service.persistence.KBTemplateExportActionableDynamicQuery; -import com.liferay.knowledgebase.util.comparator.KBArticleVersionComparator; -import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.OrderFactoryUtil; -import com.liferay.portal.kernel.lar.BasePortletDataHandler; -import com.liferay.portal.kernel.lar.DataLevel; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.PortletDataHandlerBoolean; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.util.PortalUtil; - -import java.util.List; - -import javax.portlet.PortletPreferences; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class AdminPortletDataHandler extends BasePortletDataHandler { - - public static final String NAMESPACE = "knowledge_base"; - - public AdminPortletDataHandler() { - setDataLevel(DataLevel.SITE); - setDeletionSystemEventStagedModelTypes( - new StagedModelType(KBArticle.class), - new StagedModelType(KBComment.class), - new StagedModelType(KBTemplate.class)); - setExportControls( - new PortletDataHandlerBoolean( - NAMESPACE, "kb-articles", true, true, null, - KBArticle.class.getName()), - new PortletDataHandlerBoolean( - NAMESPACE, "kb-templates", true, true, null, - KBTemplate.class.getName()), - new PortletDataHandlerBoolean( - NAMESPACE, "kb-comments", true, true, null, - KBComment.class.getName())); - } - - @Override - protected PortletPreferences doDeleteData( - PortletDataContext portletDataContext, String portletId, - PortletPreferences portletPreferences) - throws Exception { - - if (portletDataContext.addPrimaryKey( - AdminPortletDataHandler.class, "deleteData")) { - - return portletPreferences; - } - - KBArticleLocalServiceUtil.deleteGroupKBArticles( - portletDataContext.getScopeGroupId()); - - KBTemplateLocalServiceUtil.deleteGroupKBTemplates( - portletDataContext.getScopeGroupId()); - - return portletPreferences; - } - - @Override - protected String doExportData( - PortletDataContext portletDataContext, String portletId, - PortletPreferences portletPreferences) - throws Exception { - - portletDataContext.addPortletPermissions(RESOURCE_NAME); - - Element rootElement = addExportDataRootElement(portletDataContext); - - rootElement.addAttribute( - "group-id", String.valueOf(portletDataContext.getScopeGroupId())); - - ActionableDynamicQuery kbArticleActionableDynamicQuery = - getKBArticleActionableDynamicQuery(portletDataContext); - - kbArticleActionableDynamicQuery.performActions(); - - ActionableDynamicQuery kbTemplateActionableDynamicQuery = - new KBTemplateExportActionableDynamicQuery(portletDataContext); - - kbTemplateActionableDynamicQuery.performActions(); - - ActionableDynamicQuery kbCommentActionableDynamicQuery = - getKBCommentActionableDynamicQuery(portletDataContext); - - kbCommentActionableDynamicQuery.performActions(); - - return getExportDataRootElementString(rootElement); - } - - @Override - protected PortletPreferences doImportData( - PortletDataContext portletDataContext, String portletId, - PortletPreferences portletPreferences, String data) - throws Exception { - - portletDataContext.importPortletPermissions(RESOURCE_NAME); - - Element kbArticlesElement = - portletDataContext.getImportDataGroupElement(KBArticle.class); - - List kbArticleElements = kbArticlesElement.elements(); - - for (Element kbArticleElement : kbArticleElements) { - StagedModelDataHandlerUtil.importStagedModel( - portletDataContext, kbArticleElement); - } - - Element kbTemplatesElement = - portletDataContext.getImportDataGroupElement(KBTemplate.class); - - List kbTemplateElements = kbTemplatesElement.elements(); - - for (Element kbTemplateElement : kbTemplateElements) { - StagedModelDataHandlerUtil.importStagedModel( - portletDataContext, kbTemplateElement); - } - - Element kbCommentsElement = - portletDataContext.getImportDataGroupElement(KBComment.class); - - List kbCommentElements = kbCommentsElement.elements(); - - for (Element kbCommentElement : kbCommentElements) { - StagedModelDataHandlerUtil.importStagedModel( - portletDataContext, kbCommentElement); - } - - return null; - } - - @Override - protected void doPrepareManifestSummary( - PortletDataContext portletDataContext, - PortletPreferences portletPreferences) - throws Exception { - - ActionableDynamicQuery kbArticleActionableDynamicQuery = - new KBArticleExportActionableDynamicQuery(portletDataContext); - - kbArticleActionableDynamicQuery.performCount(); - - ActionableDynamicQuery kbTemplateActionableDynamicQuery = - new KBTemplateExportActionableDynamicQuery(portletDataContext); - - kbTemplateActionableDynamicQuery.performCount(); - - ActionableDynamicQuery kbCommentActionableDynamicQuery = - getKBCommentActionableDynamicQuery(portletDataContext); - - kbCommentActionableDynamicQuery.performCount(); - } - - protected ActionableDynamicQuery getKBArticleActionableDynamicQuery( - final PortletDataContext portletDataContext) - throws Exception { - - return new KBArticleExportActionableDynamicQuery(portletDataContext) { - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - super.addCriteria(dynamicQuery); - - OrderFactoryUtil.addOrderByComparator( - dynamicQuery, new KBArticleVersionComparator(true)); - } - - }; - } - - protected ActionableDynamicQuery getKBCommentActionableDynamicQuery( - final PortletDataContext portletDataContext) - throws Exception { - - return new KBCommentExportActionableDynamicQuery(portletDataContext) { - - @Override - protected StagedModelType getStagedModelType() { - return new StagedModelType( - PortalUtil.getClassNameId(KBComment.class.getName()), - StagedModelType.REFERRER_CLASS_NAME_ID_ALL); - } - - }; - } - - protected static final String RESOURCE_NAME = - "com.liferay.knowledgebase.admin"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBArticleStagedModelDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBArticleStagedModelDataHandler.java deleted file mode 100644 index ab66b0f0e3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBArticleStagedModelDataHandler.java +++ /dev/null @@ -1,335 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.lar; - -import com.liferay.knowledgebase.admin.util.AdminUtil; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; -import com.liferay.knowledgebase.service.persistence.KBArticleUtil; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.knowledgebase.util.PortletKeys; -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.lar.BaseStagedModelDataHandler; -import com.liferay.portal.kernel.lar.ExportImportPathUtil; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.util.MapUtil; -import com.liferay.portal.kernel.util.StreamUtil; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.DuplicateFileException; -import com.liferay.portlet.documentlibrary.model.DLFileEntry; - -import java.io.InputStream; - -import java.util.List; -import java.util.Map; - -/** - * @author Daniel Kocsis - */ -public class KBArticleStagedModelDataHandler - extends BaseStagedModelDataHandler { - - public static final String[] CLASS_NAMES = {KBArticle.class.getName()}; - - @Override - public void deleteStagedModel( - String uuid, long groupId, String className, String extraData) - throws PortalException, SystemException { - - KBArticle kbArticle = - KBArticleLocalServiceUtil.fetchKBArticleByUuidAndGroupId( - uuid, groupId); - - if (kbArticle != null) { - KBArticleLocalServiceUtil.deleteKBArticle(kbArticle); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getDisplayName(KBArticle kbArticle) { - return kbArticle.getTitle(); - } - - @Override - protected boolean countStagedModel( - PortletDataContext portletDataContext, KBArticle kbArticle) { - - return !portletDataContext.isModelCounted( - KBArticle.class.getName(), kbArticle.getResourcePrimKey()); - } - - @Override - protected void doExportStagedModel( - PortletDataContext portletDataContext, KBArticle kbArticle) - throws Exception { - - if (kbArticle.getParentResourcePrimKey() != - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - long kbArticleClassNameId = PortalUtil.getClassNameId( - KBArticleConstants.getClassName()); - - if (kbArticle.getParentResourceClassNameId() == - kbArticleClassNameId) { - - KBArticle parentKBArticle = - KBArticleLocalServiceUtil.getLatestKBArticle( - kbArticle.getParentResourcePrimKey(), - WorkflowConstants.STATUS_APPROVED); - - StagedModelDataHandlerUtil.exportReferenceStagedModel( - portletDataContext, kbArticle, parentKBArticle, - PortletDataContext.REFERENCE_TYPE_PARENT); - } - else { - KBFolder parentKBFolder = - KBFolderLocalServiceUtil.getKBFolder( - kbArticle.getParentResourcePrimKey()); - - StagedModelDataHandlerUtil.exportReferenceStagedModel( - portletDataContext, kbArticle, parentKBFolder, - PortletDataContext.REFERENCE_TYPE_PARENT); - } - } - - Element kbArticleElement = portletDataContext.getExportDataElement( - kbArticle); - - exportKBArticleAttachments( - portletDataContext, kbArticleElement, kbArticle); - - portletDataContext.addClassedModel( - kbArticleElement, ExportImportPathUtil.getModelPath(kbArticle), - kbArticle); - } - - @Override - protected void doImportStagedModel( - PortletDataContext portletDataContext, KBArticle kbArticle) - throws Exception { - - long userId = portletDataContext.getUserId(kbArticle.getUserUuid()); - - if (kbArticle.getParentResourcePrimKey() != - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - if (kbArticle.getClassNameId() == - kbArticle.getParentResourceClassNameId()) { - - StagedModelDataHandlerUtil.importReferenceStagedModels( - portletDataContext, kbArticle, KBArticle.class); - } - else { - StagedModelDataHandlerUtil.importReferenceStagedModels( - portletDataContext, kbArticle, KBFolder.class); - } - } - - Map kbArticleResourcePrimKeys = - (Map)portletDataContext.getNewPrimaryKeysMap( - KBArticle.class); - - long parentResourcePrimKey = MapUtil.getLong( - kbArticleResourcePrimKeys, kbArticle.getParentResourcePrimKey(), - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - - long resourcePrimaryKey = MapUtil.getLong( - kbArticleResourcePrimKeys, kbArticle.getResourcePrimKey(), 0); - - if (parentResourcePrimKey == - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - Map kbFolderResourcePrimKeys = - (Map)portletDataContext.getNewPrimaryKeysMap( - KBFolder.class); - - parentResourcePrimKey = MapUtil.getLong( - kbFolderResourcePrimKeys, kbArticle.getParentResourcePrimKey(), - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - } - - String[] sections = AdminUtil.unescapeSections(kbArticle.getSections()); - - ServiceContext serviceContext = portletDataContext.createServiceContext( - kbArticle); - - KBArticle importedKBArticle = null; - - if (portletDataContext.isDataStrategyMirror()) { - KBArticle existingKBArticle = KBArticleUtil.fetchByR_V( - resourcePrimaryKey, kbArticle.getVersion()); - - if (existingKBArticle == null) { - existingKBArticle = KBArticleUtil.fetchByUUID_G( - kbArticle.getUuid(), portletDataContext.getScopeGroupId()); - } - - if (existingKBArticle == null) { - serviceContext.setUuid(kbArticle.getUuid()); - - existingKBArticle = - KBArticleLocalServiceUtil.fetchLatestKBArticle( - resourcePrimaryKey, WorkflowConstants.STATUS_ANY); - - if (existingKBArticle == null) { - importedKBArticle = KBArticleLocalServiceUtil.addKBArticle( - userId, kbArticle.getParentResourceClassNameId(), - parentResourcePrimKey, kbArticle.getTitle(), - kbArticle.getUrlTitle(), kbArticle.getContent(), - kbArticle.getDescription(), kbArticle.getSourceURL(), - sections, null, serviceContext); - - KBArticleLocalServiceUtil.updatePriority( - importedKBArticle.getResourcePrimKey(), - kbArticle.getPriority()); - } - else { - KBArticleLocalServiceUtil.updateKBArticle( - userId, existingKBArticle.getResourcePrimKey(), - kbArticle.getTitle(), kbArticle.getContent(), - kbArticle.getDescription(), kbArticle.getSourceURL(), - sections, null, null, serviceContext); - - KBArticleLocalServiceUtil.moveKBArticle( - userId, existingKBArticle.getResourcePrimKey(), - existingKBArticle.getParentResourceClassNameId(), - parentResourcePrimKey, kbArticle.getPriority()); - - importedKBArticle = - KBArticleLocalServiceUtil.getLatestKBArticle( - existingKBArticle.getResourcePrimKey(), - WorkflowConstants.STATUS_APPROVED); - } - } - else { - importedKBArticle = existingKBArticle; - } - } - else { - importedKBArticle = KBArticleLocalServiceUtil.addKBArticle( - userId, kbArticle.getParentResourceClassNameId(), - parentResourcePrimKey, kbArticle.getTitle(), - kbArticle.getUrlTitle(), kbArticle.getContent(), - kbArticle.getDescription(), kbArticle.getSourceURL(), sections, - null, serviceContext); - - KBArticleLocalServiceUtil.updatePriority( - importedKBArticle.getResourcePrimKey(), - kbArticle.getPriority()); - } - - importKBArticleAttachments( - portletDataContext, kbArticle, importedKBArticle); - - portletDataContext.importClassedModel(kbArticle, importedKBArticle); - - if (!kbArticle.isMain()) { - kbArticleResourcePrimKeys.put( - kbArticle.getResourcePrimKey(), - importedKBArticle.getResourcePrimKey()); - } - } - - protected void exportKBArticleAttachments( - PortletDataContext portletDataContext, Element kbArticleElement, - KBArticle kbArticle) - throws Exception { - - List attachmentsFileEntries = - kbArticle.getAttachmentsFileEntries(); - - for (FileEntry fileEntry : attachmentsFileEntries) { - String path = ExportImportPathUtil.getModelPath( - kbArticle, fileEntry.getTitle()); - - Element fileEntryElement = portletDataContext.getExportDataElement( - fileEntry); - - fileEntryElement.addAttribute("path", path); - fileEntryElement.addAttribute("file-name", fileEntry.getTitle()); - - portletDataContext.addZipEntry(path, fileEntry.getContentStream()); - - portletDataContext.addReferenceElement( - kbArticle, kbArticleElement, fileEntry, - PortletDataContext.REFERENCE_TYPE_WEAK, false); - } - } - - protected void importKBArticleAttachments( - PortletDataContext portletDataContext, KBArticle kbArticle, - KBArticle importedKBArticle) - throws Exception { - - List dlFileEntryElements = - portletDataContext.getReferenceDataElements( - kbArticle, DLFileEntry.class); - - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setCompanyId(portletDataContext.getCompanyId()); - serviceContext.setScopeGroupId(portletDataContext.getScopeGroupId()); - - InputStream inputStream = null; - - for (Element dlFileEntryElement : dlFileEntryElements) { - try { - byte[] bytes = portletDataContext.getZipEntryAsByteArray( - dlFileEntryElement.attributeValue("path")); - - inputStream = new UnsyncByteArrayInputStream(bytes); - - String fileName = dlFileEntryElement.attributeValue( - "file-name"); - - String mimeType = KnowledgeBaseUtil.getMimeType( - bytes, fileName); - - PortletFileRepositoryUtil.addPortletFileEntry( - portletDataContext.getScopeGroupId(), - portletDataContext.getUserId( - importedKBArticle.getUserUuid()), - KBArticle.class.getName(), importedKBArticle.getClassPK(), - PortletKeys.KNOWLEDGE_BASE_ADMIN, - importedKBArticle.getAttachmentsFolderId(), inputStream, - fileName, mimeType, true); - } - catch (DuplicateFileException dfe) { - continue; - } - finally { - StreamUtil.cleanUp(inputStream); - } - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBCommentStagedModelDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBCommentStagedModelDataHandler.java deleted file mode 100644 index 24769734f4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBCommentStagedModelDataHandler.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.lar; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.service.KBCommentLocalServiceUtil; -import com.liferay.knowledgebase.service.persistence.KBCommentUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.BaseStagedModelDataHandler; -import com.liferay.portal.kernel.lar.ExportImportPathUtil; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.util.MapUtil; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.service.ServiceContext; - -import java.util.Map; - -/** - * @author Daniel Kocsis - */ -public class KBCommentStagedModelDataHandler - extends BaseStagedModelDataHandler { - - public static final String[] CLASS_NAMES = {KBComment.class.getName()}; - - @Override - public void deleteStagedModel( - String uuid, long groupId, String className, String extraData) - throws PortalException, SystemException { - - KBComment kbComment = - KBCommentLocalServiceUtil.fetchKBCommentByUuidAndGroupId( - uuid, groupId); - - if (kbComment != null) { - KBCommentLocalServiceUtil.deleteKBComment(kbComment); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getDisplayName(KBComment kbComment) { - return kbComment.getUuid(); - } - - @Override - protected void doExportStagedModel( - PortletDataContext portletDataContext, KBComment kbComment) - throws Exception { - - Element kbCommentElement = portletDataContext.getExportDataElement( - kbComment); - - portletDataContext.addClassedModel( - kbCommentElement, ExportImportPathUtil.getModelPath(kbComment), - kbComment); - } - - @Override - protected void doImportStagedModel( - PortletDataContext portletDataContext, KBComment kbComment) - throws Exception { - - long userId = portletDataContext.getUserId(kbComment.getUserUuid()); - - Map relatedClassPKs = - (Map)portletDataContext.getNewPrimaryKeysMap( - kbComment.getClassName()); - - long newClassPK = MapUtil.getLong( - relatedClassPKs, kbComment.getClassPK(), kbComment.getClassPK()); - - ServiceContext serviceContext = portletDataContext.createServiceContext( - kbComment); - - KBComment importedKBComment = null; - - if (portletDataContext.isDataStrategyMirror()) { - KBComment existingKBComment = KBCommentUtil.fetchByUUID_G( - kbComment.getUuid(), portletDataContext.getScopeGroupId()); - - if (existingKBComment == null) { - serviceContext.setUuid(kbComment.getUuid()); - - importedKBComment = KBCommentLocalServiceUtil.addKBComment( - userId, kbComment.getClassNameId(), newClassPK, - kbComment.getContent(), kbComment.getUserRating(), - serviceContext); - } - else { - importedKBComment = KBCommentLocalServiceUtil.updateKBComment( - existingKBComment.getKbCommentId(), - kbComment.getClassNameId(), newClassPK, - kbComment.getContent(), kbComment.getUserRating(), - kbComment.getStatus(), serviceContext); - } - } - else { - importedKBComment = KBCommentLocalServiceUtil.addKBComment( - userId, kbComment.getClassNameId(), newClassPK, - kbComment.getContent(), kbComment.getUserRating(), - serviceContext); - } - - portletDataContext.importClassedModel(kbComment, importedKBComment); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBFolderStagedModelDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBFolderStagedModelDataHandler.java deleted file mode 100644 index e3122bec89..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBFolderStagedModelDataHandler.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.lar; - -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; -import com.liferay.knowledgebase.service.persistence.KBFolderUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.BaseStagedModelDataHandler; -import com.liferay.portal.kernel.lar.ExportImportPathUtil; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.service.ServiceContext; - -import java.util.Map; - -/** - * @author Adolfo Pérez - */ -public class KBFolderStagedModelDataHandler - extends BaseStagedModelDataHandler { - - public static final String[] CLASS_NAMES = {KBFolder.class.getName()}; - - @Override - public void deleteStagedModel( - String uuid, long groupId, String className, String extraData) - throws PortalException, SystemException { - - KBFolder kbFolder = - KBFolderLocalServiceUtil.fetchKBFolderByUuidAndGroupId( - uuid, groupId); - - if (kbFolder != null) { - KBFolderLocalServiceUtil.deleteKBFolder(kbFolder.getKbFolderId()); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - protected void doExportStagedModel( - PortletDataContext portletDataContext, KBFolder kbFolder) - throws Exception { - - if (kbFolder.getParentKBFolderId() != - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - KBFolder parentKBFolder = - KBFolderLocalServiceUtil.getKBFolder( - kbFolder.getParentKBFolderId()); - - StagedModelDataHandlerUtil.exportReferenceStagedModel( - portletDataContext, kbFolder, parentKBFolder, - PortletDataContext.REFERENCE_TYPE_PARENT); - } - - Element kbFolderElement = portletDataContext.getExportDataElement( - kbFolder); - - portletDataContext.addClassedModel( - kbFolderElement, ExportImportPathUtil.getModelPath(kbFolder), - kbFolder); - } - - @Override - protected void doImportStagedModel( - PortletDataContext portletDataContext, KBFolder kbFolder) - throws Exception { - - long userId = portletDataContext.getUserId(kbFolder.getUserUuid()); - - if (kbFolder.getParentKBFolderId() != - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - StagedModelDataHandlerUtil.importReferenceStagedModels( - portletDataContext, kbFolder, KBFolder.class); - } - - ServiceContext serviceContext = portletDataContext.createServiceContext( - kbFolder); - - KBFolder importedKBFolder = null; - - if (portletDataContext.isDataStrategyMirror()) { - KBFolder existingKBFolder = KBFolderUtil.fetchByUUID_G( - kbFolder.getUuid(), portletDataContext.getScopeGroupId()); - - if (existingKBFolder == null) { - importedKBFolder = KBFolderLocalServiceUtil.addKBFolder( - userId, portletDataContext.getScopeGroupId(), - kbFolder.getClassNameId(), kbFolder.getParentKBFolderId(), - kbFolder.getName(), kbFolder.getDescription(), - serviceContext); - } - else { - importedKBFolder = KBFolderLocalServiceUtil.updateKBFolder( - kbFolder.getClassNameId(), kbFolder.getParentKBFolderId(), - kbFolder.getKbFolderId(), kbFolder.getName(), - kbFolder.getDescription()); - } - } - else { - importedKBFolder = KBFolderLocalServiceUtil.addKBFolder( - userId, portletDataContext.getScopeGroupId(), - kbFolder.getClassNameId(), kbFolder.getParentKBFolderId(), - kbFolder.getName(), kbFolder.getDescription(), serviceContext); - } - - portletDataContext.importClassedModel(kbFolder, importedKBFolder); - - Map kbFolderIds = - (Map)portletDataContext.getNewPrimaryKeysMap( - KBFolder.class); - - kbFolderIds.put( - kbFolder.getKbFolderId(), importedKBFolder.getKbFolderId()); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBTemplateStagedModelDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBTemplateStagedModelDataHandler.java deleted file mode 100644 index ec9ec7fd54..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/lar/KBTemplateStagedModelDataHandler.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.lar; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; -import com.liferay.knowledgebase.service.persistence.KBTemplateUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.BaseStagedModelDataHandler; -import com.liferay.portal.kernel.lar.ExportImportPathUtil; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.service.ServiceContext; - -/** - * @author Daniel Kocsis - */ -public class KBTemplateStagedModelDataHandler - extends BaseStagedModelDataHandler { - - public static final String[] CLASS_NAMES = {KBTemplate.class.getName()}; - - @Override - public void deleteStagedModel( - String uuid, long groupId, String className, String extraData) - throws PortalException, SystemException { - - KBTemplate kbTemplate = - KBTemplateLocalServiceUtil.fetchKBTemplateByUuidAndGroupId( - uuid, groupId); - - if (kbTemplate != null) { - KBTemplateLocalServiceUtil.deleteKBTemplate(kbTemplate); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getDisplayName(KBTemplate kbTemplate) { - return kbTemplate.getTitle(); - } - - @Override - protected void doExportStagedModel( - PortletDataContext portletDataContext, KBTemplate kbTemplate) - throws Exception { - - Element kbTemplateElement = portletDataContext.getExportDataElement( - kbTemplate); - - portletDataContext.addClassedModel( - kbTemplateElement, ExportImportPathUtil.getModelPath(kbTemplate), - kbTemplate); - } - - @Override - protected void doImportStagedModel( - PortletDataContext portletDataContext, KBTemplate kbTemplate) - throws Exception { - - long userId = portletDataContext.getUserId(kbTemplate.getUserUuid()); - - ServiceContext serviceContext = portletDataContext.createServiceContext( - kbTemplate); - - KBTemplate importedKBTemplate = null; - - if (portletDataContext.isDataStrategyMirror()) { - KBTemplate existingKBTemplate = KBTemplateUtil.fetchByUUID_G( - kbTemplate.getUuid(), portletDataContext.getScopeGroupId()); - - if (existingKBTemplate == null) { - serviceContext.setUuid(kbTemplate.getUuid()); - - importedKBTemplate = KBTemplateLocalServiceUtil.addKBTemplate( - userId, kbTemplate.getTitle(), kbTemplate.getContent(), - serviceContext); - } - else { - importedKBTemplate = - KBTemplateLocalServiceUtil.updateKBTemplate( - existingKBTemplate.getKbTemplateId(), - kbTemplate.getTitle(), kbTemplate.getContent(), - serviceContext); - } - } - else { - importedKBTemplate = KBTemplateLocalServiceUtil.addKBTemplate( - userId, kbTemplate.getTitle(), kbTemplate.getContent(), - serviceContext); - } - - portletDataContext.importClassedModel(kbTemplate, importedKBTemplate); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/portlet/AdminPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/portlet/AdminPortlet.java deleted file mode 100644 index a3da2a2945..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/portlet/AdminPortlet.java +++ /dev/null @@ -1,412 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.portlet; - -import com.liferay.knowledgebase.KBArticleImportException; -import com.liferay.knowledgebase.KBTemplateContentException; -import com.liferay.knowledgebase.KBTemplateTitleException; -import com.liferay.knowledgebase.NoSuchArticleException; -import com.liferay.knowledgebase.NoSuchCommentException; -import com.liferay.knowledgebase.NoSuchTemplateException; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.portlet.BaseKBPortlet; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.knowledgebase.service.KBFolderServiceUtil; -import com.liferay.knowledgebase.service.KBTemplateServiceUtil; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.knowledgebase.util.WebKeys; -import com.liferay.portal.NoSuchSubscriptionException; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.servlet.SessionMessages; -import com.liferay.portal.kernel.upload.UploadPortletRequest; -import com.liferay.portal.kernel.util.Constants; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StreamUtil; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortletURLFactoryUtil; - -import java.io.IOException; -import java.io.InputStream; - -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Map; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletException; -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.WindowStateException; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - * @author Eric Min - */ -public class AdminPortlet extends BaseKBPortlet { - - public void deleteKBArticles( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long[] resourcePrimKeys = StringUtil.split( - ParamUtil.getString(actionRequest, "resourcePrimKeys"), 0L); - - KBArticleServiceUtil.deleteKBArticles( - themeDisplay.getScopeGroupId(), resourcePrimKeys); - } - - public void deleteKBFolder( - ActionRequest actionRequest, ActionResponse actionResponse) - throws PortalException, SystemException { - - long kbFolderId = ParamUtil.getLong(actionRequest, "kbFolderId"); - - KBFolderServiceUtil.deleteKBFolder(kbFolderId); - } - - public void deleteKBTemplate( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - long kbTemplateId = ParamUtil.getLong(actionRequest, "kbTemplateId"); - - KBTemplateServiceUtil.deleteKBTemplate(kbTemplateId); - } - - public void deleteKBTemplates( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long[] kbTemplateIds = StringUtil.split( - ParamUtil.getString(actionRequest, "kbTemplateIds"), 0L); - - KBTemplateServiceUtil.deleteKBTemplates( - themeDisplay.getScopeGroupId(), kbTemplateIds); - } - - public void importFile( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - InputStream inputStream = null; - - try { - ThemeDisplay themeDisplay = - (ThemeDisplay)actionRequest.getAttribute(WebKeys.THEME_DISPLAY); - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(actionRequest); - - long parentKBFolderId = ParamUtil.getLong( - uploadPortletRequest, "parentKBFolderId", - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - - String fileName = uploadPortletRequest.getFileName("file"); - - if (Validator.isNull(fileName)) { - throw new KBArticleImportException("File name is null"); - } - - boolean prioritizeByNumericalPrefix = ParamUtil.getBoolean( - uploadPortletRequest, "prioritizeByNumericalPrefix"); - - inputStream = uploadPortletRequest.getFileAsStream("file"); - - ServiceContext serviceContext = - ServiceContextFactory.getInstance( - AdminPortlet.class.getName(), actionRequest); - - serviceContext.setGuestPermissions(new String[] {ActionKeys.VIEW}); - - int kbArticleCount = KBArticleServiceUtil.addKBArticlesMarkdown( - themeDisplay.getScopeGroupId(), parentKBFolderId, fileName, - prioritizeByNumericalPrefix, inputStream, serviceContext); - - SessionMessages.add( - actionRequest, "importedKBArticlesCount", kbArticleCount); - } - catch (KBArticleImportException kbaie) { - SessionErrors.add(actionRequest, kbaie.getClass(), kbaie); - } - finally { - StreamUtil.cleanUp(inputStream); - } - } - - @Override - public void render( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - try { - int status = WorkflowConstants.STATUS_ANY; - - renderRequest.setAttribute(WebKeys.KNOWLEDGE_BASE_STATUS, status); - - KBArticle kbArticle = null; - - long kbArticleClassNameId = PortalUtil.getClassNameId( - KBArticleConstants.getClassName()); - - long resourceClassNameId = ParamUtil.getLong( - renderRequest, "resourceClassNameId", kbArticleClassNameId); - long resourcePrimKey = ParamUtil.getLong( - renderRequest, "resourcePrimKey"); - - if ((resourcePrimKey > 0) && - (resourceClassNameId == kbArticleClassNameId)) { - - kbArticle = KBArticleServiceUtil.getLatestKBArticle( - resourcePrimKey, status); - } - - renderRequest.setAttribute( - WebKeys.KNOWLEDGE_BASE_KB_ARTICLE, kbArticle); - - KBTemplate kbTemplate = null; - - long kbTemplateId = ParamUtil.getLong( - renderRequest, "kbTemplateId"); - - if (kbTemplateId > 0) { - kbTemplate = KBTemplateServiceUtil.getKBTemplate(kbTemplateId); - } - - renderRequest.setAttribute( - WebKeys.KNOWLEDGE_BASE_KB_TEMPLATE, kbTemplate); - } - catch (Exception e) { - if (e instanceof NoSuchArticleException || - e instanceof NoSuchTemplateException || - e instanceof PrincipalException) { - - SessionErrors.add(renderRequest, e.getClass()); - } - else { - throw new PortletException(e); - } - } - - super.render(renderRequest, renderResponse); - } - - public void subscribeGroupKBArticles( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String portletId = PortalUtil.getPortletId(actionRequest); - - KBArticleServiceUtil.subscribeGroupKBArticles( - themeDisplay.getScopeGroupId(), portletId); - } - - public void unsubscribeGroupKBArticles( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String portletId = PortalUtil.getPortletId(actionRequest); - - KBArticleServiceUtil.unsubscribeGroupKBArticles( - themeDisplay.getScopeGroupId(), portletId); - } - - public void updateKBArticlesPriorities( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - Enumeration enu = actionRequest.getParameterNames(); - - Map resourcePrimKeyToPriorityMap = - new HashMap(); - - while (enu.hasMoreElements()) { - String name = enu.nextElement(); - - if (!name.startsWith("priority")) { - continue; - } - - double priority = ParamUtil.getDouble(actionRequest, name); - - long resourcePrimKey = GetterUtil.getLong(name.substring(8)); - - resourcePrimKeyToPriorityMap.put(resourcePrimKey, priority); - } - - KBArticleServiceUtil.updateKBArticlesPriorities( - themeDisplay.getScopeGroupId(), resourcePrimKeyToPriorityMap); - } - - public void updateKBFolder( - ActionRequest actionRequest, ActionResponse actionResponse) - throws PortalException, SystemException { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - - long kbFolderId = ParamUtil.getLong(actionRequest, "kbFolderId"); - - long parentResourceClassNameId = ParamUtil.getLong( - actionRequest, "parentResourceClassNameId"); - long parentResourcePrimKey = ParamUtil.getLong( - actionRequest, "parentResourcePrimKey"); - String name = ParamUtil.getString(actionRequest, "name"); - String description = ParamUtil.getString(actionRequest, "description"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - KBFolder.class.getName(), actionRequest); - - if (cmd.equals(Constants.ADD)) { - KBFolderServiceUtil.addKBFolder( - themeDisplay.getScopeGroupId(), parentResourceClassNameId, - parentResourcePrimKey, name, description, serviceContext); - } - else if (cmd.equals(Constants.UPDATE)) { - KBFolderServiceUtil.updateKBFolder( - parentResourceClassNameId, parentResourcePrimKey, kbFolderId, - name, description); - } - } - - public void updateKBTemplate( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - String portletId = PortalUtil.getPortletId(actionRequest); - - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - - long kbTemplateId = ParamUtil.getLong(actionRequest, "kbTemplateId"); - - String title = ParamUtil.getString(actionRequest, "title"); - String content = ParamUtil.getString(actionRequest, "content"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - KBTemplate.class.getName(), actionRequest); - - if (cmd.equals(Constants.ADD)) { - KBTemplateServiceUtil.addKBTemplate( - portletId, title, content, serviceContext); - } - else if (cmd.equals(Constants.UPDATE)) { - KBTemplateServiceUtil.updateKBTemplate( - kbTemplateId, title, content, serviceContext); - } - } - - @Override - protected String buildEditURL( - ActionRequest actionRequest, ActionResponse actionResponse, - KBArticle kbArticle) - throws PortalException, SystemException { - - try { - ThemeDisplay themeDisplay = - (ThemeDisplay)actionRequest.getAttribute(WebKeys.THEME_DISPLAY); - - PortletURL portletURL = PortletURLFactoryUtil.create( - actionRequest, PortletKeys.KNOWLEDGE_BASE_ADMIN, - themeDisplay.getPlid(), PortletRequest.RENDER_PHASE); - - portletURL.setParameter( - "mvcPath", templatePath + "edit_article.jsp"); - portletURL.setParameter( - "redirect", getRedirect(actionRequest, actionResponse)); - portletURL.setParameter( - "resourcePrimKey", - String.valueOf(kbArticle.getResourcePrimKey())); - portletURL.setWindowState(actionRequest.getWindowState()); - - return portletURL.toString(); - } - catch (WindowStateException wse) { - throw new PortalException(wse); - } - } - - @Override - protected void doDispatch( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - if (SessionErrors.contains( - renderRequest, NoSuchArticleException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchCommentException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchSubscriptionException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchTemplateException.class.getName()) || - SessionErrors.contains( - renderRequest, PrincipalException.class.getName())) { - - include(templatePath + "error.jsp", renderRequest, renderResponse); - } - else { - super.doDispatch(renderRequest, renderResponse); - } - } - - @Override - protected boolean isSessionErrorException(Throwable cause) { - if (cause instanceof KBArticleImportException || - cause instanceof KBTemplateContentException || - cause instanceof KBTemplateTitleException || - cause instanceof NoSuchTemplateException || - super.isSessionErrorException(cause)) { - - return true; - } - - return false; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/portlet/admin-friendly-url-routes.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/portlet/admin-friendly-url-routes.xml deleted file mode 100644 index a5dbf38c9f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/portlet/admin-friendly-url-routes.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - /articles - /admin/view.jsp - normal - - - /templates - /admin/view_templates.jsp - normal - - - /article/{resourcePrimKey:\d+} - /admin/view_article.jsp - normal - - - /template/{kbTemplateId:\d+} - /admin/view_template.jsp - normal - - - /articles/{p_p_state} - /admin/view.jsp - - - /suggestions/{p_p_state} - /admin/view_suggestions.jsp - - - /templates/{p_p_state} - /admin/view_templates.jsp - - - /suggestions/completed/{p_p_state} - /admin/view_suggestions.jsp - viewCompletedSuggestions - - - /suggestions/in_progress/{p_p_state} - /admin/view_suggestions.jsp - viewInProgressSuggestions - - - /suggestions/new/{p_p_state} - /admin/view_suggestions.jsp - viewNewSuggestions - - - /article/{resourcePrimKey:\d+}/{p_p_state} - /admin/view_article.jsp - - - /template/{kbTemplateId:\d+}/{p_p_state} - /admin/view_template.jsp - - - /article/{resourcePrimKey:\d+}/{status:-?\d+}/history - /admin/history.jsp - normal - - - /article/{resourcePrimKey:\d+}/{status:-?\d+}/history/{p_p_state} - /admin/history.jsp - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBArticleDisplayTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBArticleDisplayTerms.java deleted file mode 100644 index 954a0fbca4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBArticleDisplayTerms.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.search; - -import com.liferay.portal.kernel.dao.search.DisplayTerms; -import com.liferay.portal.kernel.util.CalendarFactoryUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.theme.ThemeDisplay; - -import java.util.Calendar; - -import javax.portlet.PortletRequest; - -/** - * @author Peter Shin - */ -public class KBArticleDisplayTerms extends DisplayTerms { - - public static final String ANYTIME = "anytime"; - - public static final String CONTENT = "content"; - - public static final String END_DATE_DAY = "endDateDay"; - - public static final String END_DATE_MONTH = "endDateMonth"; - - public static final String END_DATE_YEAR = "endDateYear"; - - public static final String START_DATE_DAY = "startDateDay"; - - public static final String START_DATE_MONTH = "startDateMonth"; - - public static final String START_DATE_YEAR = "startDateYear"; - - public static final String STATUS = "status"; - - public static final String TITLE = "title"; - - public KBArticleDisplayTerms(PortletRequest portletRequest) { - super(portletRequest); - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - Calendar today = CalendarFactoryUtil.getCalendar( - themeDisplay.getTimeZone(), themeDisplay.getLocale()); - - Calendar calendar = CalendarFactoryUtil.getCalendar( - themeDisplay.getTimeZone(), themeDisplay.getLocale()); - - calendar.add(Calendar.MONTH, -1); - - anytime = ParamUtil.getBoolean(portletRequest, ANYTIME, true); - content = ParamUtil.getString(portletRequest, CONTENT); - endDateDay = ParamUtil.getInteger( - portletRequest, END_DATE_DAY, today.get(Calendar.DATE)); - endDateMonth = ParamUtil.getInteger( - portletRequest, END_DATE_MONTH, today.get(Calendar.MONTH)); - endDateYear = ParamUtil.getInteger( - portletRequest, END_DATE_YEAR, today.get(Calendar.YEAR)); - startDateDay = ParamUtil.getInteger( - portletRequest, START_DATE_DAY, calendar.get(Calendar.DATE)); - startDateMonth = ParamUtil.getInteger( - portletRequest, START_DATE_MONTH, calendar.get(Calendar.MONTH)); - startDateYear = ParamUtil.getInteger( - portletRequest, START_DATE_YEAR, calendar.get(Calendar.YEAR)); - status = ParamUtil.getInteger( - portletRequest, STATUS, WorkflowConstants.STATUS_ANY); - title = ParamUtil.getString(portletRequest, TITLE); - - firstDayOfWeek = today.getFirstDayOfWeek() - 1; - yearRangeEnd = today.get(Calendar.YEAR); - yearRangeStart = today.get(Calendar.YEAR) - 100; - } - - public String getContent() { - return content; - } - - public int getEndDateDay() { - return endDateDay; - } - - public int getEndDateMonth() { - return endDateMonth; - } - - public int getEndDateYear() { - return endDateYear; - } - - public int getFirstDayOfWeek() { - return firstDayOfWeek; - } - - public int getStartDateDay() { - return startDateDay; - } - - public int getStartDateMonth() { - return startDateMonth; - } - - public int getStartDateYear() { - return startDateYear; - } - - public int getStatus() { - return status; - } - - public String getTitle() { - return title; - } - - public int getYearRangeEnd() { - return yearRangeEnd; - } - - public int getYearRangeStart() { - return yearRangeStart; - } - - public boolean isAnytime() { - return anytime; - } - - protected boolean anytime; - protected String content; - protected int endDateDay; - protected int endDateMonth; - protected int endDateYear; - protected int firstDayOfWeek; - protected int startDateDay; - protected int startDateMonth; - protected int startDateYear; - protected int status; - protected String title; - protected int yearRangeEnd; - protected int yearRangeStart; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBArticleSearch.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBArticleSearch.java deleted file mode 100644 index 8a29e3fa48..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBArticleSearch.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.search; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.portal.kernel.dao.search.SearchContainer; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portlet.PortalPreferences; -import com.liferay.portlet.PortletPreferencesFactoryUtil; - -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleSearch extends SearchContainer { - - public static final String EMPTY_RESULTS_MESSAGE = "no-articles-were-found"; - - public KBArticleSearch( - PortletRequest portletRequest, PortletURL iteratorURL) { - - super( - portletRequest, new KBArticleDisplayTerms(portletRequest), - new KBArticleSearchTerms(portletRequest), DEFAULT_CUR_PARAM, - DEFAULT_DELTA, iteratorURL, null, EMPTY_RESULTS_MESSAGE); - - KBArticleDisplayTerms displayTerms = - (KBArticleDisplayTerms)getDisplayTerms(); - - iteratorURL.setParameter( - KBArticleDisplayTerms.ANYTIME, - String.valueOf(displayTerms.isAnytime())); - iteratorURL.setParameter( - KBArticleDisplayTerms.CONTENT, displayTerms.getContent()); - iteratorURL.setParameter( - KBArticleDisplayTerms.END_DATE_DAY, - String.valueOf(displayTerms.getEndDateDay())); - iteratorURL.setParameter( - KBArticleDisplayTerms.END_DATE_MONTH, - String.valueOf(displayTerms.getEndDateMonth())); - iteratorURL.setParameter( - KBArticleDisplayTerms.END_DATE_YEAR, - String.valueOf(displayTerms.getEndDateYear())); - iteratorURL.setParameter( - KBArticleDisplayTerms.START_DATE_DAY, - String.valueOf(displayTerms.getStartDateDay())); - iteratorURL.setParameter( - KBArticleDisplayTerms.START_DATE_MONTH, - String.valueOf(displayTerms.getStartDateMonth())); - iteratorURL.setParameter( - KBArticleDisplayTerms.START_DATE_YEAR, - String.valueOf(displayTerms.getStartDateYear())); - iteratorURL.setParameter( - KBArticleDisplayTerms.STATUS, - String.valueOf(displayTerms.getStatus())); - iteratorURL.setParameter( - KBArticleDisplayTerms.TITLE, displayTerms.getTitle()); - - try { - PortalPreferences preferences = - PortletPreferencesFactoryUtil.getPortalPreferences( - portletRequest); - - PortletPreferences portletPreferences = - PortletPreferencesFactoryUtil.getPortletSetup(portletRequest); - - String portletOrderByCol = portletPreferences.getValue( - "kbArticlesOrderByCol", StringPool.BLANK); - String portletOrderByType = portletPreferences.getValue( - "kbArticlesOrderByType", StringPool.BLANK); - - String oldOrderByCol = preferences.getValue( - PortletKeys.KNOWLEDGE_BASE_ADMIN, "kb-articles-order-by-col", - portletOrderByCol); - String oldOrderByType = preferences.getValue( - PortletKeys.KNOWLEDGE_BASE_ADMIN, "kb-articles-order-by-type", - portletOrderByType); - - String orderByCol = ParamUtil.getString( - portletRequest, "orderByCol", oldOrderByCol); - String orderByType = ParamUtil.getString( - portletRequest, "orderByType", oldOrderByType); - - if (!Validator.equals(orderByCol, oldOrderByCol) || - !Validator.equals(orderByType, oldOrderByType)) { - - preferences.setValue( - PortletKeys.KNOWLEDGE_BASE_ADMIN, - "kb-articles-order-by-col", orderByCol); - preferences.setValue( - PortletKeys.KNOWLEDGE_BASE_ADMIN, - "kb-articles-order-by-type", orderByType); - - KBArticleSearchTerms searchTerms = - (KBArticleSearchTerms)getSearchTerms(); - - searchTerms.setCurStartValues(new int[0]); - } - - OrderByComparator orderByComparator = - KnowledgeBaseUtil.getKBArticleOrderByComparator( - orderByCol, orderByType); - - setOrderByCol(orderByCol); - setOrderByType(orderByType); - setOrderByComparator(orderByComparator); - } - catch (Exception e) { - _log.error(e); - } - } - - private static Log _log = LogFactoryUtil.getLog(KBArticleSearch.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBArticleSearchTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBArticleSearchTerms.java deleted file mode 100644 index b1e7777311..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBArticleSearchTerms.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.search; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.util.PortalUtil; - -import java.util.Date; -import java.util.TimeZone; - -import javax.portlet.PortletRequest; - -/** - * @author Peter Shin - */ -public class KBArticleSearchTerms extends KBArticleDisplayTerms { - - public static final String CUR_START_VALUES = "curStartValues"; - - public KBArticleSearchTerms(PortletRequest portletRequest) { - super(portletRequest); - - curStartValues = StringUtil.split( - ParamUtil.getString(portletRequest, CUR_START_VALUES), 0); - } - - public int[] getCurStartValues() { - return curStartValues; - } - - public Date getEndDate(TimeZone timeZone) throws PortalException { - if (anytime) { - return null; - } - - return PortalUtil.getDate( - endDateMonth, endDateDay + 1, endDateYear, timeZone, null); - } - - public Date getStartDate(TimeZone timeZone) throws PortalException { - if (anytime) { - return null; - } - - return PortalUtil.getDate( - startDateMonth, startDateDay, startDateYear, timeZone, null); - } - - public boolean hasSearchTerms() { - if (advancedSearch && hasAdvancedSearchTerms()) { - return true; - } - - if (!advancedSearch && hasBasicSearchTerms()) { - return true; - } - - return false; - } - - public void setCurStartValues(int[] curStartValues) { - this.curStartValues = curStartValues; - } - - protected boolean hasAdvancedSearchTerms() { - if (!anytime) { - return true; - } - - if (Validator.isNotNull(content)) { - return true; - } - - if (Validator.isNotNull(title)) { - return true; - } - - if (status != WorkflowConstants.STATUS_ANY) { - return true; - } - - return false; - } - - protected boolean hasBasicSearchTerms() { - if (Validator.isNotNull(keywords)) { - return true; - } - - return false; - } - - protected int[] curStartValues; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBTemplateDisplayTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBTemplateDisplayTerms.java deleted file mode 100644 index cb530da797..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBTemplateDisplayTerms.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.search; - -import com.liferay.portal.kernel.dao.search.DisplayTerms; -import com.liferay.portal.kernel.util.CalendarFactoryUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.theme.ThemeDisplay; - -import java.util.Calendar; - -import javax.portlet.PortletRequest; - -/** - * @author Peter Shin - */ -public class KBTemplateDisplayTerms extends DisplayTerms { - - public static final String ANYTIME = "anytime"; - - public static final String CONTENT = "content"; - - public static final String END_DATE_DAY = "endDateDay"; - - public static final String END_DATE_MONTH = "endDateMonth"; - - public static final String END_DATE_YEAR = "endDateYear"; - - public static final String START_DATE_DAY = "startDateDay"; - - public static final String START_DATE_MONTH = "startDateMonth"; - - public static final String START_DATE_YEAR = "startDateYear"; - - public static final String TITLE = "title"; - - public KBTemplateDisplayTerms(PortletRequest portletRequest) { - super(portletRequest); - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - Calendar today = CalendarFactoryUtil.getCalendar( - themeDisplay.getTimeZone(), themeDisplay.getLocale()); - - Calendar calendar = CalendarFactoryUtil.getCalendar( - themeDisplay.getTimeZone(), themeDisplay.getLocale()); - - calendar.add(Calendar.MONTH, -1); - - anytime = ParamUtil.getBoolean(portletRequest, ANYTIME, true); - content = ParamUtil.getString(portletRequest, CONTENT); - endDateDay = ParamUtil.getInteger( - portletRequest, END_DATE_DAY, today.get(Calendar.DATE)); - endDateMonth = ParamUtil.getInteger( - portletRequest, END_DATE_MONTH, today.get(Calendar.MONTH)); - endDateYear = ParamUtil.getInteger( - portletRequest, END_DATE_YEAR, today.get(Calendar.YEAR)); - startDateDay = ParamUtil.getInteger( - portletRequest, START_DATE_DAY, calendar.get(Calendar.DATE)); - startDateMonth = ParamUtil.getInteger( - portletRequest, START_DATE_MONTH, calendar.get(Calendar.MONTH)); - startDateYear = ParamUtil.getInteger( - portletRequest, START_DATE_YEAR, calendar.get(Calendar.YEAR)); - title = ParamUtil.getString(portletRequest, TITLE); - - firstDayOfWeek = today.getFirstDayOfWeek() - 1; - yearRangeEnd = today.get(Calendar.YEAR); - yearRangeStart = today.get(Calendar.YEAR) - 100; - } - - public String getContent() { - return content; - } - - public int getEndDateDay() { - return endDateDay; - } - - public int getEndDateMonth() { - return endDateMonth; - } - - public int getEndDateYear() { - return endDateYear; - } - - public int getFirstDayOfWeek() { - return firstDayOfWeek; - } - - public int getStartDateDay() { - return startDateDay; - } - - public int getStartDateMonth() { - return startDateMonth; - } - - public int getStartDateYear() { - return startDateYear; - } - - public String getTitle() { - return title; - } - - public int getYearRangeEnd() { - return yearRangeEnd; - } - - public int getYearRangeStart() { - return yearRangeStart; - } - - public boolean isAnytime() { - return anytime; - } - - protected boolean anytime; - protected String content; - protected int endDateDay; - protected int endDateMonth; - protected int endDateYear; - protected int firstDayOfWeek; - protected int startDateDay; - protected int startDateMonth; - protected int startDateYear; - protected String title; - protected int yearRangeEnd; - protected int yearRangeStart; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBTemplateSearch.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBTemplateSearch.java deleted file mode 100644 index bad94d5bb6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBTemplateSearch.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.search; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.portal.kernel.dao.search.SearchContainer; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portlet.PortalPreferences; -import com.liferay.portlet.PortletPreferencesFactoryUtil; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBTemplateSearch extends SearchContainer { - - public static final String EMPTY_RESULTS_MESSAGE = - "no-templates-were-found"; - - public KBTemplateSearch( - PortletRequest portletRequest, PortletURL iteratorURL) { - - super( - portletRequest, new KBTemplateDisplayTerms(portletRequest), - new KBTemplateSearchTerms(portletRequest), DEFAULT_CUR_PARAM, - DEFAULT_DELTA, iteratorURL, null, EMPTY_RESULTS_MESSAGE); - - KBTemplateDisplayTerms displayTerms = - (KBTemplateDisplayTerms)getDisplayTerms(); - - iteratorURL.setParameter( - KBTemplateDisplayTerms.ANYTIME, - String.valueOf(displayTerms.isAnytime())); - iteratorURL.setParameter( - KBTemplateDisplayTerms.CONTENT, displayTerms.getContent()); - iteratorURL.setParameter( - KBTemplateDisplayTerms.END_DATE_DAY, - String.valueOf(displayTerms.getEndDateDay())); - iteratorURL.setParameter( - KBTemplateDisplayTerms.END_DATE_MONTH, - String.valueOf(displayTerms.getEndDateMonth())); - iteratorURL.setParameter( - KBTemplateDisplayTerms.END_DATE_YEAR, - String.valueOf(displayTerms.getEndDateYear())); - iteratorURL.setParameter( - KBTemplateDisplayTerms.START_DATE_DAY, - String.valueOf(displayTerms.getStartDateDay())); - iteratorURL.setParameter( - KBTemplateDisplayTerms.START_DATE_MONTH, - String.valueOf(displayTerms.getStartDateMonth())); - iteratorURL.setParameter( - KBTemplateDisplayTerms.START_DATE_YEAR, - String.valueOf(displayTerms.getStartDateYear())); - iteratorURL.setParameter( - KBTemplateDisplayTerms.TITLE, displayTerms.getTitle()); - - try { - PortalPreferences preferences = - PortletPreferencesFactoryUtil.getPortalPreferences( - portletRequest); - - String oldOrderByCol = preferences.getValue( - PortletKeys.KNOWLEDGE_BASE_ADMIN, "kb-templates-order-by-col", - "modified-date"); - String oldOrderByType = preferences.getValue( - PortletKeys.KNOWLEDGE_BASE_ADMIN, "kb-templates-order-by-type", - "desc"); - - String orderByCol = ParamUtil.getString( - portletRequest, "orderByCol", oldOrderByCol); - String orderByType = ParamUtil.getString( - portletRequest, "orderByType", oldOrderByType); - - if (!Validator.equals(orderByCol, oldOrderByCol) || - !Validator.equals(orderByType, oldOrderByType)) { - - preferences.setValue( - PortletKeys.KNOWLEDGE_BASE_ADMIN, - "kb-templates-order-by-col", orderByCol); - preferences.setValue( - PortletKeys.KNOWLEDGE_BASE_ADMIN, - "kb-templates-order-by-type", orderByType); - - KBTemplateSearchTerms searchTerms = - (KBTemplateSearchTerms)getSearchTerms(); - - searchTerms.setCurStartValues(new int[0]); - } - - OrderByComparator orderByComparator = - KnowledgeBaseUtil.getKBTemplateOrderByComparator( - orderByCol, orderByType); - - setOrderByCol(orderByCol); - setOrderByType(orderByType); - setOrderByComparator(orderByComparator); - } - catch (Exception e) { - _log.error(e); - } - } - - private static Log _log = LogFactoryUtil.getLog(KBTemplateSearch.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBTemplateSearchTerms.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBTemplateSearchTerms.java deleted file mode 100644 index e9358ec68a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/search/KBTemplateSearchTerms.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.search; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.util.PortalUtil; - -import java.util.Date; -import java.util.TimeZone; - -import javax.portlet.PortletRequest; - -/** - * @author Peter Shin - */ -public class KBTemplateSearchTerms extends KBTemplateDisplayTerms { - - public static final String CUR_START_VALUES = "curStartValues"; - - public KBTemplateSearchTerms(PortletRequest portletRequest) { - super(portletRequest); - - curStartValues = StringUtil.split( - ParamUtil.getString(portletRequest, CUR_START_VALUES), 0); - } - - public int[] getCurStartValues() { - return curStartValues; - } - - public Date getEndDate(TimeZone timeZone) throws PortalException { - if (anytime) { - return null; - } - - return PortalUtil.getDate( - endDateMonth, endDateDay + 1, endDateYear, timeZone, null); - } - - public Date getStartDate(TimeZone timeZone) throws PortalException { - if (anytime) { - return null; - } - - return PortalUtil.getDate( - startDateMonth, startDateDay, startDateYear, timeZone, null); - } - - public boolean hasSearchTerms() { - if (advancedSearch && hasAdvancedSearchTerms()) { - return true; - } - - if (!advancedSearch && hasBasicSearchTerms()) { - return true; - } - - return false; - } - - public void setCurStartValues(int[] curStartValues) { - this.curStartValues = curStartValues; - } - - protected boolean hasAdvancedSearchTerms() { - if (!anytime) { - return true; - } - - if (Validator.isNotNull(content)) { - return true; - } - - if (Validator.isNotNull(title)) { - return true; - } - - return false; - } - - protected boolean hasBasicSearchTerms() { - if (Validator.isNotNull(keywords)) { - return true; - } - - return false; - } - - protected int[] curStartValues; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/social/AdminActivityInterpreter.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/social/AdminActivityInterpreter.java deleted file mode 100644 index d83f4f0081..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/social/AdminActivityInterpreter.java +++ /dev/null @@ -1,243 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.social; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBCommentLocalServiceUtil; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.service.permission.KBTemplatePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portlet.social.model.BaseSocialActivityInterpreter; -import com.liferay.portlet.social.model.SocialActivity; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class AdminActivityInterpreter extends BaseSocialActivityInterpreter { - - @Override - public String[] getClassNames() { - return _CLASS_NAMES; - } - - @Override - protected String getEntryTitle( - SocialActivity activity, ServiceContext serviceContext) - throws Exception { - - String title = StringPool.BLANK; - - String className = activity.getClassName(); - - if (className.equals(KBArticle.class.getName())) { - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - activity.getClassPK(), WorkflowConstants.STATUS_APPROVED); - - title = kbArticle.getTitle(); - } - else if (className.equals(KBComment.class.getName())) { - KBComment kbComment = KBCommentLocalServiceUtil.getKBComment( - activity.getClassPK()); - - String kbCommentClassName = kbComment.getClassName(); - - if (kbCommentClassName.equals(KBArticle.class.getName())) { - KBArticle kbArticle = - KBArticleLocalServiceUtil.getLatestKBArticle( - kbComment.getClassPK(), - WorkflowConstants.STATUS_APPROVED); - - title = kbArticle.getTitle(); - } - else if (kbCommentClassName.equals(KBTemplate.class.getName())) { - KBTemplate kbTemplate = - KBTemplateLocalServiceUtil.getKBTemplate( - kbComment.getClassPK()); - - title = kbTemplate.getTitle(); - } - } - else if (className.equals(KBTemplate.class.getName())) { - KBTemplate kbTemplate = KBTemplateLocalServiceUtil.getKBTemplate( - activity.getClassPK()); - - title = kbTemplate.getTitle(); - } - - return getJSONValue(activity.getExtraData(), "title", title); - } - - @Override - protected String getLink( - SocialActivity activity, ServiceContext serviceContext) - throws Exception { - - String className = activity.getClassName(); - - if (className.equals(KBArticle.class.getName())) { - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - activity.getClassPK(), WorkflowConstants.STATUS_APPROVED); - - return KnowledgeBaseUtil.getKBArticleURL( - serviceContext.getPlid(), kbArticle.getResourcePrimKey(), - kbArticle.getStatus(), serviceContext.getPortalURL(), false); - } - else if (className.equals(KBComment.class.getName())) { - KBComment kbComment = KBCommentLocalServiceUtil.getKBComment( - activity.getClassPK()); - - String kbCommentClassName = kbComment.getClassName(); - - if (kbCommentClassName.equals(KBArticle.class.getName())) { - KBArticle kbArticle = - KBArticleLocalServiceUtil.getLatestKBArticle( - activity.getClassPK(), - WorkflowConstants.STATUS_APPROVED); - - return KnowledgeBaseUtil.getKBArticleURL( - serviceContext.getPlid(), kbArticle.getResourcePrimKey(), - kbArticle.getStatus(), serviceContext.getPortalURL(), - false); - } - } - - return StringPool.BLANK; - } - - @Override - protected String getTitlePattern( - String groupName, SocialActivity activity) { - - String className = activity.getClassName(); - - if (className.equals(KBArticle.class.getName())) { - if (activity.getType() == AdminActivityKeys.ADD_KB_ARTICLE) { - if (Validator.isNull(groupName)) { - return "activity-knowledge-base-admin-add-kb-article"; - } - else { - return "activity-knowledge-base-admin-add-kb-article-in"; - } - } - else if (activity.getType() == AdminActivityKeys.MOVE_KB_ARTICLE) { - if (Validator.isNull(groupName)) { - return "activity-knowledge-base-admin-move-kb-article"; - } - else { - return "activity-knowledge-base-admin-move-kb-article-in"; - } - } - else if (activity.getType() == - AdminActivityKeys.UPDATE_KB_ARTICLE) { - - if (Validator.isNull(groupName)) { - return "activity-knowledge-base-admin-update-kb-article"; - } - else { - return "activity-knowledge-base-admin-update-kb-article-in"; - } - } - } - else if (className.equals(KBComment.class.getName())) { - if (activity.getType() == AdminActivityKeys.ADD_KB_COMMENT) { - if (Validator.isNull(groupName)) { - return "activity-knowledge-base-admin-add-kb-comment"; - } - else { - return "activity-knowledge-base-admin-add-kb-comment-in"; - } - } - else if (activity.getType() == - AdminActivityKeys.UPDATE_KB_COMMENT) { - - if (Validator.isNull(groupName)) { - return "activity-knowledge-base-admin-update-kb-comment"; - } - else { - return "activity-knowledge-base-admin-update-kb-comment-in"; - } - } - } - else if (className.equals(KBTemplate.class.getName())) { - if (activity.getType() == AdminActivityKeys.ADD_KB_TEMPLATE) { - if (Validator.isNull(groupName)) { - return "activity-knowledge-base-admin-add-kb-template"; - } - else { - return "activity-knowledge-base-admin-add-kb-template-in"; - } - } - else if (activity.getType() == - AdminActivityKeys.UPDATE_KB_TEMPLATE) { - - if (Validator.isNull(groupName)) { - return "activity-knowledge-base-admin-update-kb-template"; - } - else { - return - "activity-knowledge-base-admin-update-kb-template-in"; - } - } - } - - return StringPool.BLANK; - } - - @Override - protected boolean hasPermissions( - PermissionChecker permissionChecker, SocialActivity activity, - String actionId, ServiceContext serviceContext) - throws Exception { - - String className = activity.getClassName(); - - if (className.equals(KBArticle.class.getName())) { - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - activity.getClassPK(), WorkflowConstants.STATUS_APPROVED); - - return KBArticlePermission.contains( - permissionChecker, kbArticle, ActionKeys.VIEW); - } - else if (className.equals(KBComment.class.getName())) { - return true; - } - else if (className.equals(KBTemplate.class.getName())) { - KBTemplate kbTemplate = KBTemplateLocalServiceUtil.getKBTemplate( - activity.getClassPK()); - - return KBTemplatePermission.contains( - permissionChecker, kbTemplate, ActionKeys.VIEW); - } - - return false; - } - - private static final String[] _CLASS_NAMES = { - KBArticle.class.getName(), KBComment.class.getName(), - KBTemplate.class.getName() - }; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/social/AdminActivityKeys.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/social/AdminActivityKeys.java deleted file mode 100644 index dab9e6928c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/social/AdminActivityKeys.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.social; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class AdminActivityKeys { - - public static final int ADD_KB_ARTICLE = 1; - - public static final int ADD_KB_COMMENT = 5; - - public static final int ADD_KB_TEMPLATE = 2; - - public static final int MOVE_KB_ARTICLE = 7; - - public static final int UPDATE_KB_ARTICLE = 3; - - public static final int UPDATE_KB_COMMENT = 6; - - public static final int UPDATE_KB_TEMPLATE = 4; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminIndexer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminIndexer.java deleted file mode 100644 index dcc6eb5ed2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminIndexer.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.service.persistence.KBArticleActionableDynamicQuery; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.Property; -import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.search.BaseIndexer; -import com.liferay.portal.kernel.search.BooleanQuery; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.Hits; -import com.liferay.portal.kernel.search.SearchContext; -import com.liferay.portal.kernel.search.SearchEngineUtil; -import com.liferay.portal.kernel.search.SearchException; -import com.liferay.portal.kernel.search.Summary; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.HtmlUtil; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.security.permission.PermissionChecker; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Locale; - -import javax.portlet.PortletURL; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class AdminIndexer extends BaseIndexer { - - public static final String[] CLASS_NAMES = {KBArticle.class.getName()}; - - public static final String PORTLET_ID = PortletKeys.KNOWLEDGE_BASE_ADMIN; - - public AdminIndexer() { - setFilterSearch(true); - setPermissionAware(true); - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getPortletId() { - return PORTLET_ID; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, String entryClassName, - long entryClassPK, String actionId) - throws Exception { - - return KBArticlePermission.contains( - permissionChecker, entryClassPK, ActionKeys.VIEW); - } - - @Override - public void postProcessSearchQuery( - BooleanQuery searchQuery, SearchContext searchContext) - throws Exception { - - addSearchTerm(searchQuery, searchContext, Field.CONTENT, true); - addSearchTerm(searchQuery, searchContext, Field.DESCRIPTION, true); - addSearchTerm(searchQuery, searchContext, Field.TITLE, true); - addSearchTerm(searchQuery, searchContext, Field.USER_NAME, true); - } - - @Override - public Hits search(SearchContext searchContext) throws SearchException { - Hits hits = super.search(searchContext); - - String[] queryTerms = hits.getQueryTerms(); - - String keywords = searchContext.getKeywords(); - - queryTerms = ArrayUtil.append( - queryTerms, KnowledgeBaseUtil.splitKeywords(keywords)); - - hits.setQueryTerms(queryTerms); - - return hits; - } - - @Override - protected void doDelete(Object obj) throws Exception { - KBArticle kbArticle = (KBArticle)obj; - - deleteDocument( - kbArticle.getCompanyId(), kbArticle.getResourcePrimKey()); - } - - @Override - protected Document doGetDocument(Object obj) throws Exception { - KBArticle kbArticle = (KBArticle)obj; - - Document document = getBaseModelDocument(PORTLET_ID, kbArticle); - - document.addText( - Field.CONTENT, HtmlUtil.extractText(kbArticle.getContent())); - document.addText(Field.DESCRIPTION, kbArticle.getDescription()); - document.addText(Field.TITLE, kbArticle.getTitle()); - - document.addKeyword("titleKeyword", kbArticle.getTitle(), true); - - return document; - } - - @Override - protected Summary doGetSummary( - Document document, Locale locale, String snippet, - PortletURL portletURL) { - - String title = document.get(Field.TITLE); - - String content = snippet; - - if (Validator.isNull(snippet)) { - content = document.get(Field.DESCRIPTION); - - if (Validator.isNull(content)) { - content = StringUtil.shorten(document.get(Field.CONTENT), 200); - } - } - - String resourcePrimKey = document.get(Field.ENTRY_CLASS_PK); - - portletURL.setParameter("mvcPath", "/admin/view_article.jsp"); - portletURL.setParameter("resourcePrimKey", resourcePrimKey); - - return new Summary(title, content, portletURL); - } - - @Override - protected void doReindex(Object obj) throws Exception { - KBArticle kbArticle = (KBArticle)obj; - - SearchEngineUtil.updateDocument( - getSearchEngineId(), kbArticle.getCompanyId(), - getDocument(kbArticle)); - } - - @Override - protected void doReindex(String className, long classPK) throws Exception { - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - classPK, WorkflowConstants.STATUS_ANY); - - reindexKBArticles(kbArticle); - } - - @Override - protected void doReindex(String[] ids) throws Exception { - long companyId = GetterUtil.getLong(ids[0]); - - reindexKBArticles(companyId); - } - - @Override - protected String getPortletId(SearchContext searchContext) { - return PORTLET_ID; - } - - protected void reindexKBArticles(KBArticle kbArticle) throws Exception { - - // See KBArticlePermission#contains - - List kbArticles = - KBArticleLocalServiceUtil.getKBArticleAndAllDescendantKBArticles( - kbArticle.getResourcePrimKey(), - WorkflowConstants.STATUS_APPROVED, null); - - Collection documents = new ArrayList(); - - for (KBArticle curKBArticle : kbArticles) { - documents.add(getDocument(curKBArticle)); - } - - SearchEngineUtil.updateDocuments( - getSearchEngineId(), kbArticle.getCompanyId(), documents); - } - - protected void reindexKBArticles(long companyId) throws Exception { - ActionableDynamicQuery actionableDynamicQuery = - new KBArticleActionableDynamicQuery() { - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - Property property = PropertyFactoryUtil.forName("status"); - - dynamicQuery.add( - property.eq(WorkflowConstants.STATUS_APPROVED)); - } - - @Override - protected void performAction(Object object) throws PortalException { - KBArticle kbArticle = (KBArticle)object; - - Document document = getDocument(kbArticle); - - addDocument(document); - } - - }; - - actionableDynamicQuery.setCompanyId(companyId); - actionableDynamicQuery.setSearchEngineId(getSearchEngineId()); - - actionableDynamicQuery.performActions(); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminOpenSearchImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminOpenSearchImpl.java deleted file mode 100644 index df5db1c97a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminOpenSearchImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.portal.kernel.portlet.LiferayWindowState; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.HitsOpenSearchImpl; -import com.liferay.portal.kernel.search.Indexer; -import com.liferay.portal.kernel.search.IndexerRegistryUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.theme.ThemeDisplay; - -import javax.portlet.PortletURL; -import javax.portlet.WindowState; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class AdminOpenSearchImpl extends HitsOpenSearchImpl { - - public static final String SEARCH_PATH = "/c/knowledge_base/open_search"; - - public static final String TITLE = "Liferay Knowledge Base Search: "; - - @Override - public Indexer getIndexer() { - return IndexerRegistryUtil.getIndexer(KBArticle.class); - } - - @Override - public String getPortletId() { - return AdminIndexer.PORTLET_ID; - } - - @Override - public String getSearchPath() { - return SEARCH_PATH; - } - - @Override - public String getTitle(String keywords) { - return TITLE + keywords; - } - - @Override - protected String getURL( - ThemeDisplay themeDisplay, long groupId, Document result, - PortletURL portletURL) { - - long resourcePrimKey = GetterUtil.getLong( - result.get(Field.ENTRY_CLASS_PK)); - int status = WorkflowConstants.STATUS_APPROVED; - - WindowState windowState = portletURL.getWindowState(); - - return KnowledgeBaseUtil.getKBArticleURL( - themeDisplay.getPlid(), resourcePrimKey, status, - themeDisplay.getPortalURL(), - windowState.equals(LiferayWindowState.MAXIMIZED)); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminSubscriptionSender.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminSubscriptionSender.java deleted file mode 100644 index 168628db99..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminSubscriptionSender.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.TextFormatter; -import com.liferay.portal.model.Subscription; -import com.liferay.portal.model.User; -import com.liferay.portal.security.auth.PrincipalThreadLocal; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil; -import com.liferay.portal.security.permission.PermissionThreadLocal; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.util.SubscriptionSender; - -import java.util.List; -import java.util.Locale; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class AdminSubscriptionSender extends SubscriptionSender { - - public AdminSubscriptionSender( - KBArticle kbArticle, ServiceContext serviceContext) { - - _kbArticle = kbArticle; - _serviceContext = serviceContext; - } - - @Override - protected void deleteSubscription(Subscription subscription) - throws Exception { - - // KB article subscription - - if (subscription.getClassPK() == _kbArticle.getResourcePrimKey()) { - KBArticleLocalServiceUtil.unsubscribeKBArticle( - subscription.getUserId(), _kbArticle.getResourcePrimKey()); - } - - // Group subscription - - if (subscription.getClassPK() == _kbArticle.getGroupId()) { - KBArticleLocalServiceUtil.unsubscribeGroupKBArticles( - subscription.getUserId(), _kbArticle.getGroupId()); - } - } - - protected String getEmailKBArticleAttachments(Locale locale) - throws Exception { - - List attachmentsFileEntries = - _kbArticle.getAttachmentsFileEntries(); - - if (attachmentsFileEntries.isEmpty()) { - return StringPool.BLANK; - } - - StringBundler sb = new StringBundler(attachmentsFileEntries.size() * 5); - - for (FileEntry fileEntry : attachmentsFileEntries) { - sb.append(fileEntry.getTitle()); - sb.append(" ("); - sb.append( - TextFormatter.formatStorageSize(fileEntry.getSize(), locale)); - sb.append(")"); - sb.append("
    "); - } - - return sb.toString(); - } - - @Override - protected boolean hasPermission( - Subscription subscription, String inferredClassName, - long inferredClassPK, User user) - throws Exception { - - String name = PrincipalThreadLocal.getName(); - - PermissionChecker contextPermissionChecker = - PermissionThreadLocal.getPermissionChecker(); - - try { - PrincipalThreadLocal.setName(user.getUserId()); - - PermissionChecker permissionChecker = - PermissionCheckerFactoryUtil.create(user); - - PermissionThreadLocal.setPermissionChecker(permissionChecker); - - return KBArticlePermission.contains( - permissionChecker, _kbArticle, ActionKeys.VIEW); - } - finally { - PrincipalThreadLocal.setName(name); - - PermissionThreadLocal.setPermissionChecker( - contextPermissionChecker); - } - } - - @Override - protected String replaceContent(String content, Locale locale) - throws Exception { - - String kbArticleAttachments = getEmailKBArticleAttachments(locale); - String kbArticleURL = KnowledgeBaseUtil.getKBArticleURL( - _serviceContext.getPlid(), _kbArticle.getResourcePrimKey(), - _kbArticle.getStatus(), _serviceContext.getPortalURL(), false); - String kbArticleVersion = LanguageUtil.format( - locale, "version-x", String.valueOf(_kbArticle.getVersion()), - false); - String categoryTitle = LanguageUtil.get(locale, "category.kb"); - - setContextAttribute("[$ARTICLE_ATTACHMENTS$]", kbArticleAttachments); - setContextAttribute("[$ARTICLE_TITLE$]", _kbArticle.getTitle()); - setContextAttribute("[$ARTICLE_URL$]", kbArticleURL); - setContextAttribute("[$ARTICLE_VERSION$]", kbArticleVersion); - setContextAttribute("[$CATEGORY_TITLE$]", categoryTitle); - - return super.replaceContent(content, locale); - } - - private KBArticle _kbArticle; - private ServiceContext _serviceContext; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminUtil.java deleted file mode 100644 index 654896ac8c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/AdminUtil.java +++ /dev/null @@ -1,467 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBCommentConstants; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.util.PortletPropsValues; -import com.liferay.portal.kernel.bean.BeanPropertiesUtil; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.io.unsync.UnsyncStringReader; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.DiffHtmlUtil; -import com.liferay.portal.kernel.util.GetterUtil; -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.Validator; -import com.liferay.portal.util.PortalUtil; -import com.liferay.util.ContentUtil; - -import java.util.Map; - -import javax.portlet.PortletPreferences; - -import net.htmlparser.jericho.Attribute; -import net.htmlparser.jericho.Attributes; -import net.htmlparser.jericho.Element; -import net.htmlparser.jericho.OutputDocument; -import net.htmlparser.jericho.Source; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class AdminUtil { - - public static String[] escapeSections(String[] sections) { - if (ArrayUtil.isEmpty(sections)) { - return new String[0]; - } - - sections = ArrayUtil.clone(sections); - - for (int i = 0; i < sections.length; i++) { - sections[i] = StringPool.UNDERLINE.concat(sections[i]).concat( - StringPool.UNDERLINE); - } - - return sections; - } - - public static String getEmailFromAddress( - PortletPreferences preferences, long companyId) - throws SystemException { - - return PortalUtil.getEmailFromAddress( - preferences, companyId, - PortletPropsValues.ADMIN_EMAIL_FROM_ADDRESS); - } - - public static String getEmailFromName( - PortletPreferences preferences, long companyId) - throws SystemException { - - return PortalUtil.getEmailFromName( - preferences, companyId, PortletPropsValues.ADMIN_EMAIL_FROM_NAME); - } - - public static String getEmailKBArticleAddedBody( - PortletPreferences preferences) { - - String emailKBArticleAddedBody = preferences.getValue( - "emailKBArticleAddedBody", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleAddedBody)) { - return emailKBArticleAddedBody; - } - - return ContentUtil.get( - PortletPropsValues.ADMIN_EMAIL_KB_ARTICLE_ADDED_BODY); - } - - public static boolean getEmailKBArticleAddedEnabled( - PortletPreferences preferences) { - - String emailKBArticleAddedEnabled = preferences.getValue( - "emailKBArticleAddedEnabled", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleAddedEnabled)) { - return GetterUtil.getBoolean(emailKBArticleAddedEnabled); - } - - return PortletPropsValues.ADMIN_EMAIL_KB_ARTICLE_ADDED_ENABLED; - } - - public static String getEmailKBArticleAddedSubject( - PortletPreferences preferences) { - - String emailKBArticleAddedSubject = preferences.getValue( - "emailKBArticleAddedSubject", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleAddedSubject)) { - return emailKBArticleAddedSubject; - } - - return ContentUtil.get( - PortletPropsValues.ADMIN_EMAIL_KB_ARTICLE_ADDED_SUBJECT); - } - - public static String getEmailKBArticleSuggestionInProgressBody( - PortletPreferences preferences) { - - String emailKBArticleSuggestionInProgressBody = preferences.getValue( - "emailKBArticleSuggestionInProgressBody", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleSuggestionInProgressBody)) { - return emailKBArticleSuggestionInProgressBody; - } - - return ContentUtil.get( - PortletPropsValues. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_BODY); - } - - public static boolean getEmailKBArticleSuggestionInProgressEnabled( - PortletPreferences preferences) { - - String emailKBArticleSuggestionInProgressEnabled = preferences.getValue( - "emailKBArticleSuggestionInProgressEnabled", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleSuggestionInProgressEnabled)) { - return GetterUtil.getBoolean( - emailKBArticleSuggestionInProgressEnabled); - } - - return PortletPropsValues. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_ENABLED; - } - - public static String getEmailKBArticleSuggestionInProgressSubject( - PortletPreferences preferences) { - - String emailKBArticleSuggestionInProgressSubject = preferences.getValue( - "emailKBArticleSuggestionInProgressSubject", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleSuggestionInProgressSubject)) { - return emailKBArticleSuggestionInProgressSubject; - } - - return ContentUtil.get( - PortletPropsValues. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_SUBJECT); - } - - public static String getEmailKBArticleSuggestionNotificationBody( - int status, PortletPreferences portletPreferences) { - - if (status == KBCommentConstants.STATUS_COMPLETED) { - return AdminUtil.getEmailKBArticleSuggestionResolvedBody( - portletPreferences); - } - else if (status == KBCommentConstants.STATUS_IN_PROGRESS) { - return AdminUtil.getEmailKBArticleSuggestionInProgressBody( - portletPreferences); - } - else if (status == KBCommentConstants.STATUS_NEW) { - return AdminUtil.getEmailKBArticleSuggestionReceivedBody( - portletPreferences); - } - else { - throw new IllegalArgumentException( - String.format("Unknown suggestion status %s", status)); - } - } - - public static String getEmailKBArticleSuggestionNotificationSubject( - int status, PortletPreferences portletPreferences) { - - if (status == KBCommentConstants.STATUS_COMPLETED) { - return AdminUtil.getEmailKBArticleSuggestionResolvedSubject( - portletPreferences); - } - else if (status == KBCommentConstants.STATUS_IN_PROGRESS) { - return AdminUtil.getEmailKBArticleSuggestionInProgressSubject( - portletPreferences); - } - else if (status == KBCommentConstants.STATUS_NEW) { - return AdminUtil.getEmailKBArticleSuggestionReceivedSubject( - portletPreferences); - } - else { - throw new IllegalArgumentException( - String.format("Unknown suggestion status %s", status)); - } - } - - public static String getEmailKBArticleSuggestionReceivedBody( - PortletPreferences preferences) { - - String emailKBArticleSuggestionReceivedBody = preferences.getValue( - "emailKBArticleSuggestionReceivedBody", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleSuggestionReceivedBody)) { - return emailKBArticleSuggestionReceivedBody; - } - - return ContentUtil.get( - PortletPropsValues.ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_BODY); - } - - public static boolean getEmailKBArticleSuggestionReceivedEnabled( - PortletPreferences preferences) { - - String emailKBArticleSuggestionReceivedEnabled = preferences.getValue( - "emailKBArticleSuggestionReceivedEnabled", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleSuggestionReceivedEnabled)) { - return GetterUtil.getBoolean( - emailKBArticleSuggestionReceivedEnabled); - } - - return PortletPropsValues. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_ENABLED; - } - - public static String getEmailKBArticleSuggestionReceivedSubject( - PortletPreferences preferences) { - - String emailKBArticleSuggestionReceivedSubject = preferences.getValue( - "emailKBArticleSuggestionReceivedSubject", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleSuggestionReceivedSubject)) { - return emailKBArticleSuggestionReceivedSubject; - } - - return ContentUtil.get( - PortletPropsValues. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_SUBJECT); - } - - public static String getEmailKBArticleSuggestionResolvedBody( - PortletPreferences preferences) { - - String emailKBArticleSuggestionResolvedBody = preferences.getValue( - "emailKBArticleSuggestionResolvedBody", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleSuggestionResolvedBody)) { - return emailKBArticleSuggestionResolvedBody; - } - - return ContentUtil.get( - PortletPropsValues.ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_BODY); - } - - public static boolean getEmailKBArticleSuggestionResolvedEnabled( - PortletPreferences preferences) { - - String emailKBArticleSuggestionResolvedEnabled = preferences.getValue( - "emailKBArticleSuggestionResolvedEnabled", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleSuggestionResolvedEnabled)) { - return GetterUtil.getBoolean( - emailKBArticleSuggestionResolvedEnabled); - } - - return PortletPropsValues. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_ENABLED; - } - - public static String getEmailKBArticleSuggestionResolvedSubject( - PortletPreferences preferences) { - - String emailKBArticleSuggestionResolvedSubject = preferences.getValue( - "emailKBArticleSuggestionResolvedSubject", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleSuggestionResolvedSubject)) { - return emailKBArticleSuggestionResolvedSubject; - } - - return ContentUtil.get( - PortletPropsValues. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_SUBJECT); - } - - public static String getEmailKBArticleUpdatedBody( - PortletPreferences preferences) { - - String emailKBArticleUpdatedBody = preferences.getValue( - "emailKBArticleUpdatedBody", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleUpdatedBody)) { - return emailKBArticleUpdatedBody; - } - - return ContentUtil.get( - PortletPropsValues.ADMIN_EMAIL_KB_ARTICLE_UPDATED_BODY); - } - - public static boolean getEmailKBArticleUpdatedEnabled( - PortletPreferences preferences) { - - String emailKBArticleUpdatedEnabled = preferences.getValue( - "emailKBArticleUpdatedEnabled", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleUpdatedEnabled)) { - return GetterUtil.getBoolean(emailKBArticleUpdatedEnabled); - } - - return PortletPropsValues.ADMIN_EMAIL_KB_ARTICLE_UPDATED_ENABLED; - } - - public static String getEmailKBArticleUpdatedSubject( - PortletPreferences preferences) { - - String emailKBArticleUpdatedSubject = preferences.getValue( - "emailKBArticleUpdatedSubject", StringPool.BLANK); - - if (Validator.isNotNull(emailKBArticleUpdatedSubject)) { - return emailKBArticleUpdatedSubject; - } - - return ContentUtil.get( - PortletPropsValues.ADMIN_EMAIL_KB_ARTICLE_UPDATED_SUBJECT); - } - - public static String getKBArticleDiff( - long resourcePrimKey, int sourceVersion, int targetVersion, - String param) - throws Exception { - - if (sourceVersion < KBArticleConstants.DEFAULT_VERSION) { - sourceVersion = KBArticleConstants.DEFAULT_VERSION; - } - - if (sourceVersion == targetVersion) { - KBArticle kbArticle = KBArticleLocalServiceUtil.getKBArticle( - resourcePrimKey, targetVersion); - - return BeanPropertiesUtil.getString(kbArticle, param); - } - - KBArticle sourceKBArticle = KBArticleLocalServiceUtil.getKBArticle( - resourcePrimKey, sourceVersion); - KBArticle targetKBArticle = KBArticleLocalServiceUtil.getKBArticle( - resourcePrimKey, targetVersion); - - String sourceHtml = BeanPropertiesUtil.getString( - sourceKBArticle, param); - String targetHtml = BeanPropertiesUtil.getString( - targetKBArticle, param); - - String diff = DiffHtmlUtil.diff( - new UnsyncStringReader(sourceHtml), - new UnsyncStringReader(targetHtml)); - - Source source = new Source(diff); - - OutputDocument outputDocument = new OutputDocument(source); - - for (Element element : source.getAllElements()) { - StringBundler sb = new StringBundler(4); - - Attributes attributes = element.getAttributes(); - - if (attributes == null) { - continue; - } - - Attribute changeTypeAttribute = attributes.get("changeType"); - - if (changeTypeAttribute != null) { - String changeTypeValue = changeTypeAttribute.getValue(); - - if (changeTypeValue.contains("diff-added-image")) { - sb.append("border: 10px solid #CFC; "); - } - else if (changeTypeValue.contains("diff-changed-image")) { - sb.append("border: 10px solid #C6C6FD; "); - } - else if (changeTypeValue.contains("diff-removed-image")) { - sb.append("border: 10px solid #FDC6C6; "); - } - } - - Attribute classAttribute = attributes.get("class"); - - if (classAttribute != null) { - String classValue = classAttribute.getValue(); - - if (classValue.contains("diff-html-added")) { - sb.append("background-color: #CFC; "); - } - else if (classValue.contains("diff-html-changed")) { - sb.append("background-color: #C6C6FD; "); - } - else if (classValue.contains("diff-html-removed")) { - sb.append("background-color: #FDC6C6; "); - sb.append("text-decoration: line-through; "); - } - } - - if (Validator.isNull(sb.toString())) { - continue; - } - - Attribute styleAttribute = attributes.get("style"); - - if (styleAttribute != null) { - sb.append(GetterUtil.getString(styleAttribute.getValue())); - } - - Map map = outputDocument.replace(attributes, false); - - map.put("style", sb.toString()); - } - - return outputDocument.toString(); - } - - public static boolean isSuggestionStatusChangeNotificationEnabled( - int status, PortletPreferences preferences) { - - if (status == KBCommentConstants.STATUS_COMPLETED) { - return getEmailKBArticleSuggestionResolvedEnabled(preferences); - } - else if (status == KBCommentConstants.STATUS_IN_PROGRESS) { - return getEmailKBArticleSuggestionInProgressEnabled(preferences); - } - else if (status == KBCommentConstants.STATUS_NEW) { - return getEmailKBArticleSuggestionReceivedEnabled(preferences); - } - else { - return false; - } - } - - public static String[] unescapeSections(String sections) { - String[] sectionsArray = StringUtil.split(sections); - - for (int i = 0; i < sectionsArray.length; i++) { - String section = sectionsArray[i]; - - if (StringUtil.startsWith(section, StringPool.UNDERLINE) && - StringUtil.endsWith(section, StringPool.UNDERLINE)) { - - sectionsArray[i] = section.substring(1, section.length() - 1); - } - } - - return sectionsArray; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/KBArticleAssetEntriesUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/KBArticleAssetEntriesUtil.java deleted file mode 100644 index d5555b35ba..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util/KBArticleAssetEntriesUtil.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.ListUtil; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.model.Group; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortletURLFactoryUtil; -import com.liferay.portlet.asset.model.AssetEntry; -import com.liferay.portlet.asset.model.AssetRenderer; -import com.liferay.portlet.asset.model.AssetRendererFactory; -import com.liferay.portlet.asset.model.AssetTag; -import com.liferay.portlet.asset.service.AssetEntryServiceUtil; -import com.liferay.portlet.asset.service.AssetTagLocalServiceUtil; -import com.liferay.portlet.asset.service.AssetTagServiceUtil; -import com.liferay.portlet.asset.service.persistence.AssetEntryQuery; -import com.liferay.portlet.blogs.model.BlogsEntry; -import com.liferay.portlet.journal.model.JournalArticle; -import com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil; -import com.liferay.portlet.messageboards.model.MBMessage; -import com.liferay.portlet.wiki.model.WikiPage; -import com.liferay.portlet.wiki.service.WikiPageLocalServiceUtil; - -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -import javax.portlet.PortletMode; -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; -import javax.portlet.WindowState; - -import javax.servlet.http.HttpServletRequest; - -/** - * @author Peter Shin - */ -public class KBArticleAssetEntriesUtil { - - public static List getAssetEntries( - long[] groupIds, long[] classNameIds, long[] assetTagIds, - long resourcePrimKey, int start, int end, String orderByColumn) - throws PortalException, SystemException { - - AssetEntryQuery assetEntryQuery = new AssetEntryQuery(); - - assetEntryQuery.setAnyTagIds(assetTagIds); - assetEntryQuery.setClassNameIds(classNameIds); - assetEntryQuery.setEnd(end + 1); - assetEntryQuery.setGroupIds(groupIds); - assetEntryQuery.setOrderByCol1(orderByColumn); - assetEntryQuery.setStart(start); - - List assetEntries = ListUtil.copy( - AssetEntryServiceUtil.getEntries(assetEntryQuery)); - - AssetEntry assetEntry = null; - - for (AssetEntry curAssetEntry : assetEntries) { - if (curAssetEntry.getClassPK() == resourcePrimKey) { - assetEntry = curAssetEntry; - } - } - - assetEntries.remove(assetEntry); - - return ListUtil.subList(assetEntries, 0, 10); - } - - public static long[] getAssetTagIds(long[] groupIds, KBArticle kbArticle) - throws PortalException, SystemException { - - List assetTags = AssetTagServiceUtil.getTags( - KBArticle.class.getName(), kbArticle.getClassPK()); - - long[] tagIds = AssetTagLocalServiceUtil.getTagIds( - groupIds, StringUtil.split(ListUtil.toString(assetTags, "name"))); - - Set filteredTagIds = new LinkedHashSet(); - - for (long tagId : tagIds) { - try { - AssetTagServiceUtil.getTag(tagId); - } - catch (PrincipalException pe) { - continue; - } - - filteredTagIds.add(tagId); - } - - return StringUtil.split(StringUtil.merge(filteredTagIds), 0L); - } - - public static long[] getGroupIds(Group companyGroup, KBArticle kbArticle) { - return new long[] {kbArticle.getGroupId(), companyGroup.getGroupId()}; - } - - public static String getURL( - HttpServletRequest request, ThemeDisplay themeDisplay, - AssetRendererFactory assetRendererFactory, - AssetRenderer assetRenderer) - throws Exception { - - long classPK = assetRenderer.getClassPK(); - String className = assetRendererFactory.getClassName(); - - PortletURL portletURL = null; - - if (className.equals(BlogsEntry.class.getName())) { - portletURL = PortletURLFactoryUtil.create( - request, PortletKeys.BLOGS, themeDisplay.getPlid(), - PortletRequest.RENDER_PHASE); - - portletURL.setParameter("struts_action", "/blogs/view_entry"); - portletURL.setParameter("entryId", String.valueOf(classPK)); - } - else if (className.equals(JournalArticle.class.getName())) { - JournalArticle journalArticle = - JournalArticleLocalServiceUtil.getLatestArticle(classPK); - - portletURL = PortletURLFactoryUtil.create( - request, PortletKeys.JOURNAL_CONTENT, themeDisplay.getPlid(), - PortletRequest.RENDER_PHASE); - - portletURL.setParameter("struts_action", "/journal_content/view"); - portletURL.setParameter( - "groupId", String.valueOf(journalArticle.getGroupId())); - portletURL.setParameter("articleId", journalArticle.getArticleId()); - } - else if (className.equals(KBArticle.class.getName())) { - portletURL = PortletURLFactoryUtil.create( - request, PortletKeys.KNOWLEDGE_BASE_ARTICLE_DEFAULT_INSTANCE, - themeDisplay.getPlid(), PortletRequest.RENDER_PHASE); - - portletURL.setParameter("mvcPath", "/article/view_article.jsp"); - portletURL.setParameter("resourcePrimKey", String.valueOf(classPK)); - } - else if (className.equals(MBMessage.class.getName())) { - portletURL = PortletURLFactoryUtil.create( - request, PortletKeys.MESSAGE_BOARDS, themeDisplay.getPlid(), - PortletRequest.RENDER_PHASE); - - portletURL.setParameter( - "struts_action", "/message_boards/view_message"); - portletURL.setParameter("messageId", String.valueOf(classPK)); - } - else if (className.equals(WikiPage.class.getName())) { - WikiPage wikiPage = WikiPageLocalServiceUtil.getPage(classPK); - - portletURL = PortletURLFactoryUtil.create( - request, PortletKeys.WIKI, themeDisplay.getPlid(), - PortletRequest.RENDER_PHASE); - - portletURL.setParameter("struts_action", "/wiki/view"); - portletURL.setParameter( - "nodeId", String.valueOf(wikiPage.getNodeId())); - portletURL.setParameter("title", wikiPage.getTitle()); - } - - String currentURL = PortalUtil.getCurrentURL(request); - - if (portletURL == null) { - return currentURL; - } - - portletURL.setWindowState(WindowState.MAXIMIZED); - portletURL.setPortletMode(PortletMode.VIEW); - - portletURL.setParameter("returnToFullPageURL", currentURL); - - return portletURL.toString(); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/workflow/KBArticleWorkflowHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/workflow/KBArticleWorkflowHandler.java deleted file mode 100644 index 2856795daa..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/workflow/KBArticleWorkflowHandler.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.admin.workflow; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.workflow.BaseWorkflowHandler; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.permission.ResourceActionsUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.theme.ThemeDisplay; - -import java.io.Serializable; - -import java.util.Locale; -import java.util.Map; - -/** - * @author Peter Shin - */ -public class KBArticleWorkflowHandler extends BaseWorkflowHandler { - - @Override - public String getClassName() { - return KBArticle.class.getName(); - } - - @Override - public String getType(Locale locale) { - return ResourceActionsUtil.getModelResource(locale, getClassName()); - } - - @Override - public KBArticle updateStatus( - int status, Map workflowContext) - throws PortalException, SystemException { - - long userId = GetterUtil.getLong( - (String)workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); - long resourcePrimKey = GetterUtil.getLong( - (String)workflowContext.get( - WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); - - ServiceContext serviceContext = (ServiceContext)workflowContext.get( - "serviceContext"); - - return KBArticleLocalServiceUtil.updateStatus( - userId, resourcePrimKey, status, serviceContext); - } - - @Override - protected String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPathThemeImages() + "/trees/page.png"; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/article/portlet/ArticlePortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/article/portlet/ArticlePortlet.java deleted file mode 100644 index fced5efe73..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/article/portlet/ArticlePortlet.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.article.portlet; - -import com.liferay.knowledgebase.NoSuchArticleException; -import com.liferay.knowledgebase.NoSuchCommentException; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.portlet.BaseKBPortlet; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.WebKeys; -import com.liferay.portal.NoSuchSubscriptionException; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.servlet.SessionMessages; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; - -import java.io.IOException; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletException; -import javax.portlet.PortletPreferences; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class ArticlePortlet extends BaseKBPortlet { - - @Override - public void render( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - try { - int status = getStatus(renderRequest); - - renderRequest.setAttribute(WebKeys.KNOWLEDGE_BASE_STATUS, status); - - KBArticle kbArticle = null; - - long resourcePrimKey = getResourcePrimKey(renderRequest); - - if (resourcePrimKey > 0) { - kbArticle = KBArticleServiceUtil.getLatestKBArticle( - resourcePrimKey, status); - } - - renderRequest.setAttribute( - WebKeys.KNOWLEDGE_BASE_KB_ARTICLE, kbArticle); - } - catch (Exception e) { - if (e instanceof NoSuchArticleException || - e instanceof PrincipalException) { - - SessionErrors.add(renderRequest, e.getClass()); - - SessionMessages.add( - renderRequest, - PortalUtil.getPortletId(renderRequest) + - SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE); - } - else { - throw new PortletException(e); - } - } - - super.render(renderRequest, renderResponse); - } - - @Override - protected void addSuccessMessage( - ActionRequest actionRequest, ActionResponse actionResponse) { - - String actionName = ParamUtil.getString( - actionRequest, ActionRequest.ACTION_NAME); - - if (actionName.equals("deleteKBArticle")) { - return; - } - - super.addSuccessMessage(actionRequest, actionResponse); - } - - @Override - protected void doDispatch( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - if (SessionErrors.contains( - renderRequest, NoSuchArticleException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchCommentException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchSubscriptionException.class.getName()) || - SessionErrors.contains( - renderRequest, PrincipalException.class.getName())) { - - include(templatePath + "error.jsp", renderRequest, renderResponse); - } - else { - super.doDispatch(renderRequest, renderResponse); - } - } - - protected long getResourcePrimKey(RenderRequest renderRequest) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - PortletPreferences preferences = renderRequest.getPreferences(); - - long defaultValue = GetterUtil.getLong( - preferences.getValue("resourcePrimKey", null)); - - String mvcPath = ParamUtil.getString(renderRequest, "mvcPath"); - - if (((defaultValue == 0) && mvcPath.equals(viewTemplate)) || - mvcPath.equals("/article/select_configuration_article.jsp")) { - - return 0; - } - - long resourcePrimKey = ParamUtil.getLong( - renderRequest, "resourcePrimKey", defaultValue); - - if ((resourcePrimKey == 0) || (resourcePrimKey != defaultValue)) { - return resourcePrimKey; - } - - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - if (!KBArticlePermission.contains( - permissionChecker, defaultValue, ActionKeys.VIEW)) { - - return 0; - } - - return defaultValue; - } - - protected int getStatus(RenderRequest renderRequest) throws Exception { - ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (!themeDisplay.isSignedIn()) { - return WorkflowConstants.STATUS_APPROVED; - } - - String value = renderRequest.getParameter("status"); - int status = GetterUtil.getInteger(value); - - if ((value != null) && (status == WorkflowConstants.STATUS_APPROVED)) { - return WorkflowConstants.STATUS_APPROVED; - } - - long resourcePrimKey = getResourcePrimKey(renderRequest); - - if (resourcePrimKey == 0) { - return WorkflowConstants.STATUS_APPROVED; - } - - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - if (KBArticlePermission.contains( - permissionChecker, resourcePrimKey, ActionKeys.UPDATE)) { - - return ParamUtil.getInteger( - renderRequest, "status", WorkflowConstants.STATUS_ANY); - } - - return WorkflowConstants.STATUS_APPROVED; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/article/portlet/article-friendly-url-routes.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/article/portlet/article-friendly-url-routes.xml deleted file mode 100644 index 92d5dcf647..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/article/portlet/article-friendly-url-routes.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - /{instanceId}/rss - - - cacheLevelPage - 2 - rss - - - /{instanceId}/{resourcePrimKey:\d+} - /article/view_article.jsp - normal - - - /{instanceId}/{resourcePrimKey:\d+}/{p_p_state} - /article/view_article.jsp - - - /{instanceId}/{resourcePrimKey:\d+}/{status:-?\d+}/history - /article/history.jsp - normal - - - /{instanceId}/{resourcePrimKey:\d+}/{status:-?\d+}/history/{p_p_state} - /article/history.jsp - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/article/util/KBArticleAttachmentsUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/article/util/KBArticleAttachmentsUtil.java deleted file mode 100644 index 846bad09f8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/article/util/KBArticleAttachmentsUtil.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.article.util; - -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.repository.model.Folder; -import com.liferay.portal.model.Repository; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; - -/** - * @author Sergio González - */ -public class KBArticleAttachmentsUtil { - - public static long getFolderId( - long groupId, long userId, long resourcePrimKey) - throws PortalException, SystemException { - - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - - Repository repository = PortletFileRepositoryUtil.addPortletRepository( - groupId, PortletKeys.KNOWLEDGE_BASE_ARTICLE, serviceContext); - - Folder folder = PortletFileRepositoryUtil.addPortletFolder( - userId, repository.getRepositoryId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - String.valueOf(resourcePrimKey), serviceContext); - - return folder.getFolderId(); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/portlet/DisplayPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/portlet/DisplayPortlet.java deleted file mode 100644 index f36c8ad403..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/portlet/DisplayPortlet.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.display.portlet; - -import com.liferay.knowledgebase.NoSuchArticleException; -import com.liferay.knowledgebase.NoSuchCommentException; -import com.liferay.knowledgebase.display.selector.KBArticleSelector; -import com.liferay.knowledgebase.display.selector.KBArticleSelectorFactoryUtil; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.portlet.BaseKBPortlet; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBFolderServiceUtil; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.knowledgebase.util.WebKeys; -import com.liferay.knowledgebase.util.comparator.KBArticlePriorityComparator; -import com.liferay.portal.NoSuchSubscriptionException; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.servlet.SessionMessages; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.service.ClassNameLocalServiceUtil; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortalPreferences; -import com.liferay.portlet.PortletPreferencesFactoryUtil; -import com.liferay.portlet.PortletURLFactoryUtil; - -import java.io.IOException; - -import java.util.List; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletException; -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - * @author Sergio González - */ -public class DisplayPortlet extends BaseKBPortlet { - - @Override - public void render( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - try { - KBArticle kbArticle = getKBArticle(renderRequest); - - int status = getStatus(renderRequest, kbArticle); - - renderRequest.setAttribute(WebKeys.KNOWLEDGE_BASE_STATUS, status); - - if ((kbArticle != null) && (kbArticle.getStatus() != status)) { - kbArticle = KBArticleLocalServiceUtil.fetchLatestKBArticle( - kbArticle.getResourcePrimKey(), status); - } - - renderRequest.setAttribute( - WebKeys.KNOWLEDGE_BASE_KB_ARTICLE, kbArticle); - } - catch (Exception e) { - if (e instanceof NoSuchArticleException || - e instanceof PrincipalException) { - - SessionErrors.add(renderRequest, e.getClass()); - - SessionMessages.add( - renderRequest, - PortalUtil.getPortletId(renderRequest) + - SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE); - } - else { - throw new PortletException(e); - } - } - - super.render(renderRequest, renderResponse); - } - - public void updateRootKBFolderId( - ActionRequest actionRequest, ActionResponse actionResponse) - throws IOException, PortalException, SystemException { - - long kbFolderId = ParamUtil.getLong(actionRequest, "rootKBFolderId"); - - if (kbFolderId == KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - return; - } - - KBFolder kbFolder = KBFolderServiceUtil.getKBFolder(kbFolderId); - - PortalPreferences portalPreferences = - PortletPreferencesFactoryUtil.getPortalPreferences( - PortalUtil.getLiferayPortletRequest(actionRequest)); - - PortletPreferences portletPreferences = actionRequest.getPreferences(); - - String contentRootPrefix = GetterUtil.getString( - portletPreferences.getValue("contentRootPrefix", null)); - - String previousPreferredKBFolderURLTitle = - KnowledgeBaseUtil.getPreferredKBFolderURLTitle( - portalPreferences, contentRootPrefix); - - KnowledgeBaseUtil.setPreferredKBFolderURLTitle( - portalPreferences, contentRootPrefix, kbFolder.getUrlTitle()); - - String urlTitle = ParamUtil.getString(actionRequest, "urlTitle"); - - if (Validator.isNull(urlTitle)) { - return; - } - - KBArticle kbArticle = - KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle( - kbFolder.getGroupId(), kbFolder.getUrlTitle(), urlTitle); - - if (kbArticle == null) { - if (Validator.isNull(previousPreferredKBFolderURLTitle)) { - return; - } - - kbArticle = findClosestMatchingKBArticle( - kbFolder.getGroupId(), previousPreferredKBFolderURLTitle, - kbFolder.getKbFolderId(), urlTitle); - - if (kbArticle == null) { - return; - } - } - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (!KBArticlePermission.contains( - themeDisplay.getPermissionChecker(), kbArticle, - ActionKeys.VIEW)) { - - return; - } - - PortletURL redirectURL = PortletURLFactoryUtil.create( - actionRequest, PortletKeys.KNOWLEDGE_BASE_DISPLAY, - themeDisplay.getPlid(), PortletRequest.RENDER_PHASE); - - redirectURL.setParameter("kbFolderUrlTitle", kbFolder.getUrlTitle()); - redirectURL.setParameter("urlTitle", kbArticle.getUrlTitle()); - - actionResponse.sendRedirect(redirectURL.toString()); - } - - @Override - protected void addSuccessMessage( - ActionRequest actionRequest, ActionResponse actionResponse) { - - String actionName = ParamUtil.getString( - actionRequest, ActionRequest.ACTION_NAME); - - if (actionName.equals("deleteKBArticle") || - actionName.equals("updateKBComment") || - actionName.equals("updateRootKBFolderId")) { - - return; - } - - super.addSuccessMessage(actionRequest, actionResponse); - } - - @Override - protected void doDispatch( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - if (SessionErrors.contains( - renderRequest, NoSuchArticleException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchCommentException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchSubscriptionException.class.getName()) || - SessionErrors.contains( - renderRequest, PrincipalException.class.getName())) { - - include(templatePath + "error.jsp", renderRequest, renderResponse); - } - else { - super.doDispatch(renderRequest, renderResponse); - } - } - - protected KBArticle findClosestMatchingKBArticle( - long groupId, String oldKBFolderURLTitle, long newKBFolderId, - String urlTitle) - throws PortalException, SystemException { - - KBArticle oldKBArticle = - KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle( - groupId, oldKBFolderURLTitle, urlTitle); - - KBArticle kbArticle = null; - - while ((kbArticle == null) && (oldKBArticle != null)) { - kbArticle = KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle( - groupId, newKBFolderId, oldKBArticle.getUrlTitle()); - - if (kbArticle == null) { - oldKBArticle = oldKBArticle.getParentKBArticle(); - } - } - - if (kbArticle == null) { - List kbArticles = - KBArticleLocalServiceUtil.getKBArticles( - groupId, newKBFolderId, WorkflowConstants.STATUS_APPROVED, - 0, 1, new KBArticlePriorityComparator(true)); - - if (!kbArticles.isEmpty()) { - kbArticle = kbArticles.get(0); - } - } - - return kbArticle; - } - - protected KBArticle getKBArticle(RenderRequest renderRequest) - throws PortalException, SystemException { - - String mvcPath = ParamUtil.getString(renderRequest, "mvcPath"); - - if (mvcPath.endsWith("/edit_article.jsp")) { - long resourcePrimKey = ParamUtil.getLong( - renderRequest, "resourcePrimKey"); - - return KBArticleLocalServiceUtil.getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - } - - PortletPreferences portletPreferences = renderRequest.getPreferences(); - - long kbFolderClassNameId = ClassNameLocalServiceUtil.getClassNameId( - KBFolderConstants.getClassName()); - - long parentResourcePrimKey = GetterUtil.getLong( - portletPreferences.getValue("resourcePrimKey", null)); - long parentResourceClassNameId = GetterUtil.getLong( - portletPreferences.getValue("resourceClassNameId", null), - kbFolderClassNameId); - - KBArticleSelector kbArticleSelector = - KBArticleSelectorFactoryUtil.getKBArticleSelector( - parentResourceClassNameId); - - String urlTitle = ParamUtil.getString(renderRequest, "urlTitle"); - - String preferredKBFolderURLTitle = getPreferredKBFolderUrlTitle( - renderRequest, portletPreferences); - - if (Validator.isNotNull(urlTitle)) { - String kbFolderUrlTitle = ParamUtil.getString( - renderRequest, "kbFolderUrlTitle"); - - return kbArticleSelector.findByUrlTitle( - PortalUtil.getScopeGroupId(renderRequest), - preferredKBFolderURLTitle, parentResourcePrimKey, - kbFolderUrlTitle, urlTitle); - } - - long resourcePrimKey = ParamUtil.getLong( - renderRequest, "resourcePrimKey", - KBArticleConstants.DEFAULT_PARENT_RESOURCE_PRIM_KEY); - - return kbArticleSelector.findByResourcePrimKey( - PortalUtil.getScopeGroupId(renderRequest), - preferredKBFolderURLTitle, parentResourcePrimKey, resourcePrimKey); - } - - protected String getPreferredKBFolderUrlTitle( - RenderRequest renderRequest, PortletPreferences portletPreferences) - throws PortalException, SystemException { - - PortalPreferences portalPreferences = - PortletPreferencesFactoryUtil.getPortalPreferences(renderRequest); - - String contentRootPrefix = GetterUtil.getString( - portletPreferences.getValue("contentRootPrefix", null)); - - return KnowledgeBaseUtil.getPreferredKBFolderURLTitle( - portalPreferences, contentRootPrefix); - } - - protected int getStatus(RenderRequest renderRequest, KBArticle kbArticle) - throws Exception { - - if (kbArticle == null) { - return WorkflowConstants.STATUS_APPROVED; - } - - ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (KBArticlePermission.contains( - themeDisplay.getPermissionChecker(), kbArticle, - ActionKeys.UPDATE)) { - - return ParamUtil.getInteger( - renderRequest, "status", WorkflowConstants.STATUS_ANY); - } - - return WorkflowConstants.STATUS_APPROVED; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/portlet/display-friendly-url-routes.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/portlet/display-friendly-url-routes.xml deleted file mode 100644 index 891d93b90e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/portlet/display-friendly-url-routes.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - /{kbFolderUrlTitle}/{urlTitle} - - - /{urlTitle} - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/DefaultKBArticleSelectorFactory.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/DefaultKBArticleSelectorFactory.java deleted file mode 100644 index b8f1b21e4a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/DefaultKBArticleSelectorFactory.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.display.selector; - -import com.liferay.knowledgebase.NoSuchKBArticleSelectorException; -import com.liferay.knowledgebase.util.PortletPropsKeys; -import com.liferay.portal.kernel.configuration.Filter; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.ClassName; -import com.liferay.portal.service.ClassNameLocalServiceUtil; -import com.liferay.util.portlet.PortletProps; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author Adolfo Pérez - */ -public class DefaultKBArticleSelectorFactory - implements KBArticleSelectorFactory { - - @Override - public KBArticleSelector getKBArticleSelector(long classNameId) - throws PortalException, SystemException { - - ClassName className = ClassNameLocalServiceUtil.getClassName( - classNameId); - - return getKBArticleSelector(className.getClassName()); - } - - protected KBArticleSelector createKBArticleSelector(String className) - throws NoSuchKBArticleSelectorException { - - try { - String kbArticleSelectorClassName = PortletProps.get( - PortletPropsKeys.KNOWLEDGE_BASE_DISPLAY_SELECTOR, - new Filter(className)); - - if (Validator.isNull(kbArticleSelectorClassName)) { - throw new NoSuchKBArticleSelectorException( - "No KBArticleSelector found for key " + className); - } - - Class kbArticleSelectorClass = Class.forName( - kbArticleSelectorClassName); - - return (KBArticleSelector)kbArticleSelectorClass.newInstance(); - } - catch (ClassNotFoundException cnfe) { - throw new NoSuchKBArticleSelectorException(cnfe); - } - catch (InstantiationException ie) { - throw new NoSuchKBArticleSelectorException(ie); - } - catch (IllegalAccessException iae) { - throw new NoSuchKBArticleSelectorException(iae); - } - } - - protected KBArticleSelector getKBArticleSelector(String className) - throws PortalException { - - KBArticleSelector kbArticleSelector = _kbArticleSelectorMap.get( - className); - - if (kbArticleSelector == null) { - kbArticleSelector = createKBArticleSelector(className); - - _kbArticleSelectorMap.put(className, kbArticleSelector); - } - - return kbArticleSelector; - } - - private final Map _kbArticleSelectorMap = - new ConcurrentHashMap(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleKBArticleSelector.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleKBArticleSelector.java deleted file mode 100644 index c19d551eb3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleKBArticleSelector.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.display.selector; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.workflow.WorkflowConstants; - -/** - * @author Adolfo Pérez - */ -public class KBArticleKBArticleSelector implements KBArticleSelector { - - @Override - public KBArticle findByResourcePrimKey( - long groupId, String preferredKBFolderUrlTitle, - long ancestorResourcePrimKey, long resourcePrimKey) - throws PortalException, SystemException { - - KBArticle ancestorKBArticle = - KBArticleLocalServiceUtil.fetchLatestKBArticle( - ancestorResourcePrimKey, WorkflowConstants.STATUS_APPROVED); - - if (ancestorKBArticle == null) { - return null; - } - - KBArticle kbArticle = KBArticleLocalServiceUtil.fetchLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_APPROVED); - - return getClosestMatchingDescendantKBArticle( - groupId, ancestorKBArticle, kbArticle); - } - - @Override - public KBArticle findByUrlTitle( - long groupId, String preferredKBFolderUrlTitle, - long ancestorResourcePrimKey, String kbFolderUrlTitle, - String urlTitle) - throws PortalException, SystemException { - - KBArticle ancestorKBArticle = - KBArticleLocalServiceUtil.fetchLatestKBArticle( - ancestorResourcePrimKey, WorkflowConstants.STATUS_APPROVED); - - if (ancestorKBArticle == null) { - return null; - } - - KBArticle kbArticle = - KBArticleLocalServiceUtil.fetchLatestKBArticleByUrlTitle( - groupId, ancestorKBArticle.getKbFolderId(), urlTitle, - WorkflowConstants.STATUS_APPROVED); - - return getClosestMatchingDescendantKBArticle( - groupId, ancestorKBArticle, kbArticle); - } - - protected KBArticle findClosestMatchingKBArticle( - long groupId, KBArticle ancestorKBArticle, KBArticle kbArticle) - throws PortalException, SystemException { - - KBArticle candidateKBArticle = kbArticle; - - while (candidateKBArticle != null) { - KBArticle matchingKBArticle = - KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle( - groupId, ancestorKBArticle.getKbFolderId(), - candidateKBArticle.getUrlTitle()); - - if (matchingKBArticle != null) { - return matchingKBArticle; - } - - candidateKBArticle = candidateKBArticle.getParentKBArticle(); - } - - return ancestorKBArticle; - } - - protected KBArticle getClosestMatchingDescendantKBArticle( - long groupId, KBArticle ancestorKBArticle, KBArticle kbArticle) - throws PortalException, SystemException { - - if (kbArticle == null) { - return ancestorKBArticle; - } - - if (isDescendant(kbArticle, ancestorKBArticle)) { - return kbArticle; - } - - return findClosestMatchingKBArticle( - groupId, ancestorKBArticle, kbArticle); - } - - protected boolean isDescendant( - KBArticle kbArticle, KBArticle ancestorKBArticle) - throws PortalException, SystemException { - - KBArticle parentKBArticle = kbArticle.getParentKBArticle(); - - while ((parentKBArticle != null) && - !parentKBArticle.equals(ancestorKBArticle)) { - - parentKBArticle = parentKBArticle.getParentKBArticle(); - } - - if (parentKBArticle != null) { - return true; - } - - return false; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleSelector.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleSelector.java deleted file mode 100644 index ab45d4991d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleSelector.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.display.selector; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Adolfo Pérez - */ -public interface KBArticleSelector { - - public KBArticle findByResourcePrimKey( - long groupId, String preferredKBFolderUrlTitle, - long ancestorResourcePrimKey, long resourcePrimKey) - throws PortalException, SystemException; - - public KBArticle findByUrlTitle( - long groupId, String preferredKBFolderUrlTitle, - long ancestorResourcePrimKey, String kbFolderUrlTitle, - String urlTitle) - throws PortalException, SystemException; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleSelectorFactory.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleSelectorFactory.java deleted file mode 100644 index 00f8699efb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleSelectorFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.display.selector; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Adolfo Pérez - */ -public interface KBArticleSelectorFactory { - - public KBArticleSelector getKBArticleSelector(long classNameId) - throws PortalException, SystemException; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleSelectorFactoryUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleSelectorFactoryUtil.java deleted file mode 100644 index 9e78f8b915..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBArticleSelectorFactoryUtil.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.display.selector; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Adolfo Pérez - */ -public class KBArticleSelectorFactoryUtil { - - public static KBArticleSelector getKBArticleSelector(long classNameId) - throws PortalException, SystemException { - - return _kbArticleSelectorFactory.getKBArticleSelector(classNameId); - } - - private static final KBArticleSelectorFactory _kbArticleSelectorFactory = - new DefaultKBArticleSelectorFactory(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBFolderKBArticleSelector.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBFolderKBArticleSelector.java deleted file mode 100644 index db9c807d57..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/display/selector/KBFolderKBArticleSelector.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.display.selector; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.model.impl.KBFolderImpl; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; - -/** - * @author Adolfo Pérez - */ -public class KBFolderKBArticleSelector implements KBArticleSelector { - - @Override - public KBArticle findByResourcePrimKey( - long groupId, String preferredKBFolderUrlTitle, - long ancestorResourcePrimKey, long resourcePrimKey) - throws PortalException, SystemException { - - KBFolder ancestorKBFolder = _rootKBFolder; - - if (ancestorResourcePrimKey != - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - ancestorKBFolder = KBFolderLocalServiceUtil.fetchKBFolder( - ancestorResourcePrimKey); - - if (ancestorKBFolder == null) { - return null; - } - } - - KBArticle kbArticle = KBArticleLocalServiceUtil.fetchLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_APPROVED); - - if ((kbArticle == null) || !isDescendant(kbArticle, ancestorKBFolder)) { - return findClosestMatchingKBArticle( - groupId, ancestorKBFolder, preferredKBFolderUrlTitle); - } - - return kbArticle; - } - - @Override - public KBArticle findByUrlTitle( - long groupId, String preferredKBFolderUrlTitle, - long ancestorResourcePrimKey, String kbFolderUrlTitle, - String urlTitle) - throws PortalException, SystemException { - - KBFolder ancestorKBFolder = _rootKBFolder; - - if (ancestorResourcePrimKey != - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - ancestorKBFolder = KBFolderLocalServiceUtil.fetchKBFolder( - ancestorResourcePrimKey); - - if (ancestorKBFolder == null) { - return null; - } - } - - KBFolder kbFolder = _rootKBFolder; - - if (Validator.isNotNull(kbFolderUrlTitle)) { - if (kbFolderUrlTitle.equals(ancestorKBFolder.getUrlTitle())) { - kbFolder = ancestorKBFolder; - } - else { - kbFolder = KBFolderLocalServiceUtil.fetchKBFolderByUrlTitle( - groupId, ancestorKBFolder.getKbFolderId(), - kbFolderUrlTitle); - } - } - - KBArticle kbArticle = - KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle( - groupId, kbFolder.getKbFolderId(), urlTitle); - - if ((kbArticle == null) || !isDescendant(kbArticle, ancestorKBFolder)) { - return findClosestMatchingKBArticle( - groupId, ancestorKBFolder, preferredKBFolderUrlTitle, - kbFolderUrlTitle, urlTitle); - } - - return kbArticle; - } - - protected KBArticle findClosestMatchingKBArticle( - long groupId, KBFolder ancestorKBFolder, - String preferredKBFolderUrlTitle) - throws PortalException, SystemException { - - KBFolder kbFolder = null; - - if (Validator.isNotNull(preferredKBFolderUrlTitle)) { - kbFolder = KBFolderLocalServiceUtil.fetchKBFolderByUrlTitle( - groupId, ancestorKBFolder.getKbFolderId(), - preferredKBFolderUrlTitle); - } - - if (kbFolder == null) { - kbFolder = KBFolderLocalServiceUtil.fetchFirstChildKBFolder( - groupId, ancestorKBFolder.getKbFolderId()); - } - - if (kbFolder == null) { - kbFolder = ancestorKBFolder; - } - - return KBArticleLocalServiceUtil.fetchFirstChildKBArticle( - groupId, kbFolder.getKbFolderId()); - } - - protected KBArticle findClosestMatchingKBArticle( - long groupId, KBFolder ancestorKBFolder, - String preferredKBFolderUrlTitle, String kbFolderUrlTitle, - String urlTitle) - throws PortalException, SystemException { - - KBFolder kbFolder = getCandidateKBFolder( - groupId, preferredKBFolderUrlTitle, ancestorKBFolder, - kbFolderUrlTitle); - - KBArticle kbArticle = - KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle( - groupId, kbFolder.getKbFolderId(), urlTitle); - - if (kbArticle != null) { - return kbArticle; - } - - return KBArticleLocalServiceUtil.fetchFirstChildKBArticle( - groupId, kbFolder.getKbFolderId()); - } - - protected KBFolder getCandidateKBFolder( - long groupId, String preferredKBFolderUrlTitle, - KBFolder ancestorKBFolder, String kbFolderUrlTitle) - throws PortalException, SystemException { - - KBFolder kbFolder = null; - - if (Validator.isNotNull(kbFolderUrlTitle)) { - kbFolder = KBFolderLocalServiceUtil.fetchKBFolderByUrlTitle( - groupId, ancestorKBFolder.getKbFolderId(), kbFolderUrlTitle); - } - - if ((kbFolder == null) && - Validator.isNotNull(preferredKBFolderUrlTitle)) { - - kbFolder = KBFolderLocalServiceUtil.fetchKBFolderByUrlTitle( - groupId, ancestorKBFolder.getKbFolderId(), - preferredKBFolderUrlTitle); - } - - if (kbFolder == null) { - kbFolder = KBFolderLocalServiceUtil.fetchFirstChildKBFolder( - groupId, ancestorKBFolder.getKbFolderId()); - } - - if (kbFolder == null) { - return ancestorKBFolder; - } - - return kbFolder; - } - - protected boolean isDescendant( - KBArticle kbArticle, KBFolder ancestorKBFolder) - throws PortalException, SystemException { - - KBFolder parentKBFolder = KBFolderLocalServiceUtil.fetchKBFolder( - kbArticle.getKbFolderId()); - - while ((parentKBFolder != null) && - !parentKBFolder.equals(ancestorKBFolder)) { - - parentKBFolder = KBFolderLocalServiceUtil.fetchKBFolder( - parentKBFolder.getParentKBFolderId()); - } - - if (parentKBFolder != null) { - return true; - } - - return false; - } - - private static final KBFolder _rootKBFolder; - - static { - _rootKBFolder = new KBFolderImpl(); - - _rootKBFolder.setKbFolderId(KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/event/AddGoogleDocsFileEntryTypeAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/event/AddGoogleDocsFileEntryTypeAction.java deleted file mode 100644 index cd3ce0e65c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/event/AddGoogleDocsFileEntryTypeAction.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * 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 com.liferay.google.docs.hook.event; - -import com.liferay.google.docs.hook.util.GoogleDocsConstants; -import com.liferay.portal.kernel.events.ActionException; -import com.liferay.portal.kernel.events.SimpleAction; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.LocaleUtil; -import com.liferay.portal.model.Company; -import com.liferay.portal.service.CompanyLocalServiceUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portlet.documentlibrary.model.DLFileEntryType; -import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalServiceUtil; -import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeServiceUtil; -import com.liferay.util.ContentUtil; - -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; - -/** - * @author Iván Zaera - */ -public class AddGoogleDocsFileEntryTypeAction extends SimpleAction { - - @Override - public void run(String[] ids) throws ActionException { - try { - doRun(GetterUtil.getLong(ids[0])); - } - catch (Exception e) { - throw new ActionException(e); - } - } - - protected void addGoogleDocsFileEntryType(long userId, long groupId) - throws PortalException, SystemException { - - Map nameMap = new HashMap(); - - Locale locale = LocaleUtil.getDefault(); - - nameMap.put( - locale, GoogleDocsConstants.GOOGLE_DOCS_FILE_ENTRY_TYPE_NAME); - - Map descriptionMap = new HashMap(); - - descriptionMap.put( - locale, GoogleDocsConstants.GOOGLE_DOCS_FILE_ENTRY_TYPE_NAME); - - ServiceContext serviceContext = new ServiceContext(); - - Class clazz = getClass(); - - String xsd = ContentUtil.get( - clazz.getClassLoader(), - "com/liferay/google/docs/hook/event/dependencies" + - "/google-docs-file-entry-type-xsd.xml"); - - serviceContext.setAttribute("xsd", xsd); - - DLFileEntryTypeLocalServiceUtil.addFileEntryType( - userId, groupId, - GoogleDocsConstants.GOOGLE_DOCS_FILE_ENTRY_TYPE_KEY, nameMap, - descriptionMap, new long[0], serviceContext); - } - - protected void doRun(long companyId) - throws PortalException, SystemException { - - Company company = CompanyLocalServiceUtil.getCompanyById(companyId); - - if (!hasGoogleDocsFileEntryType(company.getGroupId())) { - long defaultUserId = UserLocalServiceUtil.getDefaultUserId( - companyId); - - addGoogleDocsFileEntryType(defaultUserId, company.getGroupId()); - } - } - - protected boolean hasGoogleDocsFileEntryType(long groupId) - throws SystemException { - - long[] groupIds = new long[] {groupId}; - - List fileEntryTypes = - DLFileEntryTypeServiceUtil.getFileEntryTypes(groupIds); - - for (DLFileEntryType fileEntryType : fileEntryTypes) { - String fileEntryTypeKey = fileEntryType.getFileEntryTypeKey(); - - if (fileEntryTypeKey.equals( - GoogleDocsConstants.GOOGLE_DOCS_FILE_ENTRY_TYPE_KEY)) { - - return true; - } - } - - return false; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/event/dependencies/google-docs-file-entry-type-xsd.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/event/dependencies/google-docs-file-entry-type-xsd.xml deleted file mode 100644 index 8e34e9f6a5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/event/dependencies/google-docs-file-entry-type-xsd.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/service/impl/GoogleDocsDLFileEntryTypeServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/service/impl/GoogleDocsDLFileEntryTypeServiceImpl.java deleted file mode 100644 index 75443d493a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/service/impl/GoogleDocsDLFileEntryTypeServiceImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * 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 com.liferay.google.docs.hook.service.impl; - -import com.liferay.google.docs.hook.util.GoogleDocsConstants; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portlet.documentlibrary.model.DLFileEntryType; -import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService; -import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeServiceWrapper; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Iván Zaera - */ -public class GoogleDocsDLFileEntryTypeServiceImpl - extends DLFileEntryTypeServiceWrapper { - - public GoogleDocsDLFileEntryTypeServiceImpl( - DLFileEntryTypeService dlFileEntryTypeService) { - - super(dlFileEntryTypeService); - } - - @Override - public List search( - long companyId, long[] groupIds, String keywords, - boolean includeBasicFileEntryType, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - List dlFileEntryTypes = super.search( - companyId, groupIds, keywords, includeBasicFileEntryType, start, - end, orderByComparator); - - if (includeBasicFileEntryType) { - return dlFileEntryTypes; - } - - return filterDLFileEntryTypes(dlFileEntryTypes); - } - - @Override - public int searchCount( - long companyId, long[] groupIds, String keywords, - boolean includeBasicFileEntryType) - throws SystemException { - - int searchCount = super.searchCount( - companyId, groupIds, keywords, includeBasicFileEntryType); - - if (!includeBasicFileEntryType) { - searchCount--; - } - - return searchCount; - } - - protected List filterDLFileEntryTypes( - List dlFileEntryTypes) { - - List filteredDLFileEntryTypes = - new ArrayList(); - - for (DLFileEntryType dlFileEntryType : dlFileEntryTypes) { - String fileEntryTypeKey = dlFileEntryType.getFileEntryTypeKey(); - - if (fileEntryTypeKey.equals( - GoogleDocsConstants. - GOOGLE_DOCS_FILE_ENTRY_TYPE_KEY)) { - - continue; - } - - filteredDLFileEntryTypes.add(dlFileEntryType); - } - - return filteredDLFileEntryTypes; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/util/GoogleDocsConstants.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/util/GoogleDocsConstants.java deleted file mode 100644 index 1d8c77508d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/google/docs/hook/util/GoogleDocsConstants.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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 com.liferay.google.docs.hook.util; - -/** - * @author Iván Zaera - */ -public class GoogleDocsConstants { - - public static final String GOOGLE_DOCS_FILE_ENTRY_TYPE_KEY = "GOOGLE-DOCS"; - - public static final String GOOGLE_DOCS_FILE_ENTRY_TYPE_NAME = "Google Docs"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/action/FindKBArticleAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/action/FindKBArticleAction.java deleted file mode 100644 index 2ae40c7930..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/action/FindKBArticleAction.java +++ /dev/null @@ -1,440 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.action; - -import com.liferay.knowledgebase.admin.util.AdminUtil; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.portlet.LiferayWindowState; -import com.liferay.portal.kernel.struts.BaseStrutsAction; -import com.liferay.portal.kernel.struts.StrutsAction; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.PropsKeys; -import com.liferay.portal.kernel.util.PropsUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.Layout; -import com.liferay.portal.model.LayoutConstants; -import com.liferay.portal.model.LayoutTypePortlet; -import com.liferay.portal.model.Portlet; -import com.liferay.portal.model.PortletConstants; -import com.liferay.portal.security.auth.AuthTokenUtil; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.security.permission.PermissionThreadLocal; -import com.liferay.portal.service.GroupLocalServiceUtil; -import com.liferay.portal.service.LayoutLocalServiceUtil; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortletPreferencesFactoryUtil; -import com.liferay.portlet.PortletURLFactoryUtil; - -import java.util.ArrayList; -import java.util.List; - -import javax.portlet.PortletMode; -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * @author Peter Shin - */ -public class FindKBArticleAction extends BaseStrutsAction { - - @Override - public String execute( - StrutsAction originalStrutsAction, HttpServletRequest request, - HttpServletResponse response) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute( - WebKeys.THEME_DISPLAY); - - long plid = ParamUtil.getLong(request, "plid"); - long resourcePrimKey = ParamUtil.getLong(request, "resourcePrimKey"); - int status = ParamUtil.getInteger( - request, "status", WorkflowConstants.STATUS_APPROVED); - boolean maximized = ParamUtil.getBoolean(request, "maximized"); - - KBArticle kbArticle = getKBArticle(resourcePrimKey, status); - - if (!isValidPlid(plid)) { - plid = themeDisplay.getPlid(); - } - - PortletURL portletURL = null; - - if (kbArticle == null) { - portletURL = getDynamicPortletURL(plid, status, request); - } - - if (status != WorkflowConstants.STATUS_APPROVED) { - portletURL = getDynamicPortletURL(plid, status, request); - } - - if (portletURL == null) { - portletURL = getKBArticleURL(plid, false, kbArticle, request); - } - - if (portletURL == null) { - portletURL = getKBArticleURL(plid, true, kbArticle, request); - } - - if (portletURL == null) { - portletURL = getDynamicPortletURL(plid, status, request); - } - - if (maximized) { - portletURL.setWindowState(LiferayWindowState.MAXIMIZED); - portletURL.setPortletMode(PortletMode.VIEW); - } - - response.sendRedirect(portletURL.toString()); - - return null; - } - - protected List getCandidateLayouts( - long plid, boolean privateLayout, KBArticle kbArticle) - throws Exception { - - List candidateLayouts = new ArrayList(); - - Group group = GroupLocalServiceUtil.getGroup(kbArticle.getGroupId()); - - if (group.isLayout()) { - Layout layout = LayoutLocalServiceUtil.getLayout( - group.getClassPK()); - - candidateLayouts.add(layout); - - group = layout.getGroup(); - } - - List layouts = LayoutLocalServiceUtil.getLayouts( - group.getGroupId(), privateLayout, LayoutConstants.TYPE_PORTLET); - - candidateLayouts.addAll(layouts); - - Layout layout = LayoutLocalServiceUtil.getLayout(plid); - - if ((layout.getGroupId() == kbArticle.getGroupId()) && - layout.isTypePortlet()) { - - candidateLayouts.remove(layout); - candidateLayouts.add(0, layout); - } - - return candidateLayouts; - } - - protected PortletURL getDynamicPortletURL( - long plid, int status, HttpServletRequest request) - throws Exception { - - String portletId = getPortletId(plid); - - PortletURL portletURL = getKBArticleURL(plid, portletId, null, request); - - if (status != WorkflowConstants.STATUS_APPROVED) { - portletURL.setParameter("status", String.valueOf(status)); - } - - if (_PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED) { - String token = AuthTokenUtil.getToken(request, plid, portletId); - - portletURL.setParameter("p_p_auth", token); - } - - portletURL.setPortletMode(PortletMode.VIEW); - - if (Validator.equals( - portletId, - PortletKeys.KNOWLEDGE_BASE_ARTICLE_DEFAULT_INSTANCE)) { - - portletURL.setWindowState(LiferayWindowState.MAXIMIZED); - } - - return portletURL; - } - - protected KBArticle getKBArticle(long resourcePrimKey, int status) - throws Exception { - - KBArticle kbArticle = KBArticleLocalServiceUtil.fetchLatestKBArticle( - resourcePrimKey, status); - - if (kbArticle == null) { - return null; - } - - PermissionChecker permissionChecker = - PermissionThreadLocal.getPermissionChecker(); - - if (!KBArticlePermission.contains( - permissionChecker, kbArticle, ActionKeys.VIEW)) { - - return null; - } - - return kbArticle; - } - - protected PortletURL getKBArticleURL( - long plid, boolean privateLayout, KBArticle kbArticle, - HttpServletRequest request) - throws Exception { - - PortletURL firstMatchPortletURL = null; - - List layouts = getCandidateLayouts( - plid, privateLayout, kbArticle); - - for (Layout layout : layouts) { - LayoutTypePortlet layoutTypePortlet = - (LayoutTypePortlet)layout.getLayoutType(); - - List portlets = layoutTypePortlet.getAllPortlets(); - - for (Portlet portlet : portlets) { - String rootPortletId = PortletConstants.getRootPortletId( - portlet.getPortletId()); - - if (rootPortletId.equals(PortletKeys.KNOWLEDGE_BASE_DISPLAY)) { - PortletPreferences portletPreferences = - PortletPreferencesFactoryUtil.getPortletSetup( - layout, portlet.getPortletId(), StringPool.BLANK); - - long kbFolderClassNameId = PortalUtil.getClassNameId( - KBFolderConstants.getClassName()); - - long resourceClassNameId = GetterUtil.getLong( - portletPreferences.getValue( - "resourceClassNameId", null), - kbFolderClassNameId); - long resourcePrimKey = GetterUtil.getLong( - portletPreferences.getValue("resourcePrimKey", null), - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - - if (resourceClassNameId == kbFolderClassNameId) { - if (isParentFolder( - resourcePrimKey, kbArticle.getKbFolderId())) { - - return getKBArticleURL( - layout.getPlid(), portlet.getPortletId(), - kbArticle, request); - } - } - else if (resourcePrimKey == - kbArticle.getResourcePrimKey()) { - - return getKBArticleURL( - layout.getPlid(), portlet.getPortletId(), kbArticle, - request); - } - - if (firstMatchPortletURL == null) { - firstMatchPortletURL = getKBArticleURL( - layout.getPlid(), portlet.getPortletId(), kbArticle, - request); - } - } - - if (rootPortletId.equals(PortletKeys.KNOWLEDGE_BASE_SECTION)) { - PortletPreferences portletPreferences = - PortletPreferencesFactoryUtil.getPortletSetup( - layout, portlet.getPortletId(), StringPool.BLANK); - - String[] kbArticlesSections = portletPreferences.getValues( - "kbArticlesSections", new String[0]); - - KBArticle rootKBArticle = - KBArticleLocalServiceUtil.fetchLatestKBArticle( - kbArticle.getRootResourcePrimKey(), - WorkflowConstants.STATUS_APPROVED); - - if (rootKBArticle == null) { - continue; - } - - String[] sections = AdminUtil.unescapeSections( - rootKBArticle.getSections()); - - for (String section : sections) { - if (!ArrayUtil.contains(kbArticlesSections, section)) { - continue; - } - - return getKBArticleURL( - layout.getPlid(), portlet.getPortletId(), kbArticle, - request); - } - } - - if (rootPortletId.equals(PortletKeys.KNOWLEDGE_BASE_ARTICLE)) { - PortletPreferences portletPreferences = - PortletPreferencesFactoryUtil.getPortletSetup( - layout, portlet.getPortletId(), StringPool.BLANK); - - long resourcePrimKey = GetterUtil.getLong( - portletPreferences.getValue("resourcePrimKey", null)); - - KBArticle selKBArticle = - KBArticleLocalServiceUtil.fetchLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_APPROVED); - - if (selKBArticle == null) { - continue; - } - - long rootResourcePrimKey = - kbArticle.getRootResourcePrimKey(); - long selRootResourcePrimKey = - selKBArticle.getRootResourcePrimKey(); - - if (rootResourcePrimKey == selRootResourcePrimKey) { - return getKBArticleURL( - layout.getPlid(), portlet.getPortletId(), kbArticle, - request); - } - - if (firstMatchPortletURL == null) { - firstMatchPortletURL = getKBArticleURL( - layout.getPlid(), portlet.getPortletId(), kbArticle, - request); - } - } - } - } - - return firstMatchPortletURL; - } - - protected PortletURL getKBArticleURL( - long plid, String portletId, KBArticle kbArticle, - HttpServletRequest request) - throws Exception { - - long resourcePrimKey = ParamUtil.getLong(request, "resourcePrimKey"); - - String mvcPath = null; - - String rootPortletId = PortletConstants.getRootPortletId(portletId); - - if (rootPortletId.equals(PortletKeys.KNOWLEDGE_BASE_ARTICLE)) { - mvcPath = "/article/view_article.jsp"; - } - else if (rootPortletId.equals(PortletKeys.KNOWLEDGE_BASE_SECTION)) { - mvcPath = "/section/view_article.jsp"; - } - - PortletURL portletURL = PortletURLFactoryUtil.create( - request, portletId, plid, PortletRequest.RENDER_PHASE); - - if (mvcPath != null) { - portletURL.setParameter("mvcPath", mvcPath); - } - - if ((kbArticle == null) || Validator.isNull(kbArticle.getUrlTitle())) { - portletURL.setParameter( - "resourcePrimKey", String.valueOf(resourcePrimKey)); - } - else { - portletURL.setParameter("urlTitle", kbArticle.getUrlTitle()); - - if (kbArticle.getKbFolderId() != - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - KBFolder kbFolder = KBFolderLocalServiceUtil.getKBFolder( - kbArticle.getKbFolderId()); - - portletURL.setParameter( - "kbFolderUrlTitle", String.valueOf(kbFolder.getUrlTitle())); - } - } - - portletURL.setPortletMode(PortletMode.VIEW); - - portletURL.setWindowState(LiferayWindowState.NORMAL); - - if (rootPortletId.equals(PortletKeys.KNOWLEDGE_BASE_SECTION)) { - portletURL.setWindowState(LiferayWindowState.MAXIMIZED); - } - - return portletURL; - } - - protected String getPortletId(long plid) throws Exception { - Layout layout = LayoutLocalServiceUtil.getLayout(plid); - - long selPlid = PortalUtil.getPlidFromPortletId( - layout.getGroupId(), PortletKeys.KNOWLEDGE_BASE_DISPLAY); - - if (selPlid != LayoutConstants.DEFAULT_PARENT_LAYOUT_ID) { - return PortletKeys.KNOWLEDGE_BASE_DISPLAY; - } - - return PortletKeys.KNOWLEDGE_BASE_ARTICLE_DEFAULT_INSTANCE; - } - - protected boolean isParentFolder(long resourcePrimKey, long kbFolderId) - throws PortalException, SystemException { - - while (kbFolderId != KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - if (resourcePrimKey == kbFolderId) { - return true; - } - - KBFolder kbFolder = KBFolderLocalServiceUtil.getKBFolder( - kbFolderId); - - kbFolderId = kbFolder.getParentKBFolderId(); - } - - return false; - } - - protected boolean isValidPlid(long plid) throws Exception { - Layout layout = LayoutLocalServiceUtil.fetchLayout(plid); - - if (layout == null) { - return false; - } - - return true; - } - - private static final boolean _PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED = - GetterUtil.getBoolean( - PropsUtil.get( - PropsKeys.PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED)); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/events/ServicePreAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/events/ServicePreAction.java deleted file mode 100644 index 46baf910c5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/events/ServicePreAction.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.events; - -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.portal.kernel.events.Action; -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.HttpUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.PropsKeys; -import com.liferay.portal.kernel.util.PropsUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.security.auth.AuthTokenUtil; -import com.liferay.portal.theme.ThemeDisplay; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * @author Peter Shin - */ -public class ServicePreAction extends Action { - - @Override - public void run(HttpServletRequest request, HttpServletResponse response) { - try { - doRun(request, response); - } - catch (Exception e) { - _log.error(e, e); - } - } - - protected void doRun( - HttpServletRequest request, HttpServletResponse response) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute( - WebKeys.THEME_DISPLAY); - - if (!_PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED) { - return; - } - - if (!themeDisplay.isLifecycleRender()) { - return; - } - - String portletId = ParamUtil.getString(request, "p_p_id"); - - if (Validator.isNull(portletId)) { - return; - } - - if (!portletId.equals( - PortletKeys.KNOWLEDGE_BASE_ARTICLE_DEFAULT_INSTANCE)) { - - return; - } - - String request_p_p_auth = ParamUtil.getString(request, "p_p_auth"); - - if (Validator.isNull(request_p_p_auth)) { - return; - } - - String actual_p_p_auth = AuthTokenUtil.getToken( - request, themeDisplay.getPlid(), portletId); - - if (request_p_p_auth.equals(actual_p_p_auth)) { - return; - } - - // A guest user that signs in will cause the original portlet - // authentication token to become stale. See SessionAuthToken. - - String redirect = HttpUtil.setParameter( - themeDisplay.getURLCurrent(), "p_p_auth", actual_p_p_auth); - - response.sendRedirect(redirect); - } - - private static final boolean _PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED = - GetterUtil.getBoolean( - PropsUtil.get( - PropsKeys.PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED)); - - private static Log _log = LogFactoryUtil.getLog(ServicePreAction.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/listeners/GroupModelListener.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/listeners/GroupModelListener.java deleted file mode 100644 index 2c399bdc1b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/listeners/GroupModelListener.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.listeners; - -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; -import com.liferay.portal.ModelListenerException; -import com.liferay.portal.model.BaseModelListener; -import com.liferay.portal.model.Group; - -/** - * @author Brian Wing Shun Chan - */ -public class GroupModelListener extends BaseModelListener { - - @Override - public void onBeforeRemove(Group group) throws ModelListenerException { - try { - doOnBeforeRemove(group); - } - catch (Exception e) { - throw new ModelListenerException(e); - } - } - - protected void doOnBeforeRemove(Group group) throws Exception { - KBArticleLocalServiceUtil.deleteGroupKBArticles(group.getGroupId()); - - KBTemplateLocalServiceUtil.deleteGroupKBTemplates(group.getGroupId()); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_0_0.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_0_0.java deleted file mode 100644 index 7c8a4f2e5d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_0_0.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade; - -import com.liferay.knowledgebase.hook.upgrade.v1_0_0.UpgradeRatingsEntry; -import com.liferay.knowledgebase.hook.upgrade.v1_0_0.UpgradeRatingsStats; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Peter Shin - */ -public class UpgradeProcess_1_0_0 extends UpgradeProcess { - - @Override - public int getThreshold() { - return 100; - } - - @Override - protected void doUpgrade() throws Exception { - upgrade(UpgradeRatingsEntry.class); - upgrade(UpgradeRatingsStats.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_1_0.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_1_0.java deleted file mode 100644 index ccf5cb88c1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_1_0.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade; - -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeClassName; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeExpandoTable; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeKBArticle; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeKBComment; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeKBTemplate; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradePortletPreferences; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeResourceAction; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.UpgradeResourcePermission; -import com.liferay.portal.kernel.cache.MultiVMPoolUtil; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; -import com.liferay.portal.service.ClassNameLocalServiceUtil; -import com.liferay.portal.service.ResourceActionLocalServiceUtil; - -/** - * @author Peter Shin - */ -public class UpgradeProcess_1_1_0 extends UpgradeProcess { - - @Override - public int getThreshold() { - return 110; - } - - protected void clearCache() throws Exception { - ClassNameLocalServiceUtil.checkClassNames(); - ResourceActionLocalServiceUtil.checkResourceActions(); - - MultiVMPoolUtil.clear(); - } - - @Override - protected void doUpgrade() throws Exception { - upgrade(UpgradeClassName.class); - upgrade(UpgradeExpandoTable.class); - upgrade(UpgradeKBArticle.class); - upgrade(UpgradeKBComment.class); - upgrade(UpgradeKBTemplate.class); - upgrade(UpgradePortletPreferences.class); - upgrade(UpgradeResourceAction.class); - upgrade(UpgradeResourcePermission.class); - - clearCache(); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_2_0.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_2_0.java deleted file mode 100644 index 4ee4964184..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_2_0.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade; - -import com.liferay.knowledgebase.hook.upgrade.v1_2_0.UpgradeKBArticle; -import com.liferay.knowledgebase.hook.upgrade.v1_2_0.UpgradeKBStructure; -import com.liferay.knowledgebase.hook.upgrade.v1_2_0.UpgradeKBTemplate; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Peter Shin - */ -public class UpgradeProcess_1_2_0 extends UpgradeProcess { - - @Override - public int getThreshold() { - return 120; - } - - @Override - protected void doUpgrade() throws Exception { - upgrade(UpgradeKBArticle.class); - upgrade(UpgradeKBStructure.class); - upgrade(UpgradeKBTemplate.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_0.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_0.java deleted file mode 100644 index aed04d20a5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_0.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade; - -import com.liferay.knowledgebase.hook.upgrade.v1_3_0.UpgradeKBAttachments; -import com.liferay.knowledgebase.hook.upgrade.v1_3_0.UpgradePortletPreferences; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Sergio González - */ -public class UpgradeProcess_1_3_0 extends UpgradeProcess { - - @Override - public int getThreshold() { - return 130; - } - - @Override - protected void doUpgrade() throws Exception { - upgrade(UpgradeKBAttachments.class); - upgrade(UpgradePortletPreferences.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_1.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_1.java deleted file mode 100644 index 1137ce428d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_1.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade; - -import com.liferay.knowledgebase.hook.upgrade.v1_3_1.UpgradeKBComment; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Sergio González - */ -public class UpgradeProcess_1_3_1 extends UpgradeProcess { - - @Override - public int getThreshold() { - return 131; - } - - @Override - protected void doUpgrade() throws Exception { - upgrade(UpgradeKBComment.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_2.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_2.java deleted file mode 100644 index 3866d22089..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_2.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade; - -import com.liferay.knowledgebase.hook.upgrade.v1_3_2.UpgradeKBArticle; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Adolfo Pérez - */ -public class UpgradeProcess_1_3_2 extends UpgradeProcess { - - @Override - public int getThreshold() { - return 132; - } - - @Override - protected void doUpgrade() throws Exception { - upgrade(UpgradeKBArticle.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_3.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_3.java deleted file mode 100644 index 772b363eb5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_3.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade; - -import com.liferay.knowledgebase.hook.upgrade.v1_3_3.UpgradeKBFolder; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Adolfo Pérez - */ -public class UpgradeProcess_1_3_3 extends UpgradeProcess { - - @Override - public int getThreshold() { - return 133; - } - - @Override - protected void doUpgrade() throws Exception { - upgrade(UpgradeKBFolder.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_4.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_4.java deleted file mode 100644 index 06ea3e4bf3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/UpgradeProcess_1_3_4.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade; - -import com.liferay.knowledgebase.hook.upgrade.v1_3_4.UpgradeKBComment; -import com.liferay.knowledgebase.hook.upgrade.v1_3_4.UpgradePortletPreferences; -import com.liferay.knowledgebase.hook.upgrade.v1_3_4.UpgradeResourceAction; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Adolfo Pérez - */ -public class UpgradeProcess_1_3_4 extends UpgradeProcess { - - @Override - public int getThreshold() { - return 134; - } - - @Override - protected void doUpgrade() throws Exception { - upgrade(UpgradeKBComment.class); - upgrade(UpgradePortletPreferences.class); - upgrade(UpgradeResourceAction.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_0_0/UpgradeRatingsEntry.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_0_0/UpgradeRatingsEntry.java deleted file mode 100644 index d0cc78348c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_0_0/UpgradeRatingsEntry.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_0_0; - -import com.liferay.compat.portal.kernel.upgrade.UpgradeProcess; -import com.liferay.portal.kernel.dao.jdbc.DataAccess; -import com.liferay.portal.kernel.util.StringBundler; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; - -/** - * @author Peter Shin - */ -public class UpgradeRatingsEntry extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - updateRatingsEntries(); - } - - protected long getClassNameId(String className) throws Exception { - Connection con = null; - PreparedStatement ps = null; - ResultSet rs = null; - - try { - con = DataAccess.getConnection(); - - ps = con.prepareStatement( - "select classNameId from ClassName_ where value = ?"); - - ps.setString(1, className); - - rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getLong("classNameId"); - } - - return 0; - } - finally { - DataAccess.cleanUp(con, ps, rs); - } - } - - protected void updateRatingsEntries() throws Exception { - Connection con = null; - PreparedStatement ps = null; - ResultSet rs = null; - - try { - con = DataAccess.getConnection(); - - long classNameId = getClassNameId(_ARTICLE_CLASS_NAME); - - ps = con.prepareStatement( - "select entryId, score from RatingsEntry where classNameId = " + - classNameId); - - rs = ps.executeQuery(); - - while (rs.next()) { - long entryId = rs.getLong("entryId"); - double score = rs.getDouble("score"); - - StringBundler sb = new StringBundler(4); - - sb.append("update RatingsEntry set score = "); - sb.append(score * 2); - sb.append(" where entryId = "); - sb.append(entryId); - - runSQL(sb.toString()); - } - } - finally { - DataAccess.cleanUp(con, ps, rs); - } - } - - private static final String _ARTICLE_CLASS_NAME = - "com.liferay.knowledgebase.model.Article"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_0_0/UpgradeRatingsStats.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_0_0/UpgradeRatingsStats.java deleted file mode 100644 index 43dcea7f22..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_0_0/UpgradeRatingsStats.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_0_0; - -import com.liferay.compat.portal.kernel.upgrade.UpgradeProcess; -import com.liferay.portal.kernel.dao.jdbc.DataAccess; -import com.liferay.portal.kernel.util.StringBundler; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; - -/** - * @author Peter Shin - */ -public class UpgradeRatingsStats extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - updateRatingsStats(); - } - - protected long getClassNameId(String className) throws Exception { - Connection con = null; - PreparedStatement ps = null; - ResultSet rs = null; - - try { - con = DataAccess.getConnection(); - - ps = con.prepareStatement( - "select classNameId from ClassName_ where value = ?"); - - ps.setString(1, className); - - rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getLong("classNameId"); - } - - return 0; - } - finally { - DataAccess.cleanUp(con, ps, rs); - } - } - - protected void updateRatingsStats() throws Exception { - Connection con = null; - PreparedStatement ps = null; - ResultSet rs = null; - - try { - con = DataAccess.getConnection(); - - long classNameId = getClassNameId(_ARTICLE_CLASS_NAME); - - ps = con.prepareStatement( - "select statsId, totalScore, averageScore from RatingsStats " + - "where classNameId = " + classNameId); - - rs = ps.executeQuery(); - - while (rs.next()) { - long statsId = rs.getLong("statsId"); - double totalScore = rs.getDouble("totalScore"); - double averageScore = rs.getDouble("averageScore"); - - StringBundler sb = new StringBundler(6); - - sb.append("update RatingsStats set totalScore = "); - sb.append(totalScore * 2); - sb.append(", averageScore = "); - sb.append(averageScore * 2); - sb.append(" where statsId = "); - sb.append(statsId); - - runSQL(sb.toString()); - } - } - finally { - DataAccess.cleanUp(con, ps, rs); - } - } - - private static final String _ARTICLE_CLASS_NAME = - "com.liferay.knowledgebase.model.Article"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeClassName.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeClassName.java deleted file mode 100644 index 44c2bc7def..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeClassName.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0; - -import com.liferay.portal.kernel.dao.jdbc.DataAccess; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; - -/** - * @author Peter Shin - */ -public class UpgradeClassName extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - updateClassName( - "com.liferay.knowledgebase.model.Article", - "com.liferay.knowledgebase.model.KBArticle"); - updateClassName( - "com.liferay.knowledgebase.model.Comment", - "com.liferay.knowledgebase.model.KBComment"); - updateClassName( - "com.liferay.knowledgebase.model.Template", - "com.liferay.knowledgebase.model.KBTemplate"); - } - - protected long getClassNameId(String className) throws Exception { - Connection con = null; - PreparedStatement ps = null; - ResultSet rs = null; - - try { - con = DataAccess.getConnection(); - - ps = con.prepareStatement( - "select classNameId from ClassName_ where value = ?"); - - ps.setString(1, className); - - rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getLong("classNameId"); - } - - return 0; - } - finally { - DataAccess.cleanUp(con, ps, rs); - } - } - - protected void updateClassName(String oldClassName, String newClassName) - throws Exception { - - long oldClassNameId = getClassNameId(oldClassName); - long newClassNameId = getClassNameId(newClassName); - - if (oldClassNameId != 0) { - runSQL( - "delete from ClassName_ where classNameId = " + newClassNameId); - - runSQL( - "update ClassName_ set value = '" + newClassName + - "' where classNameId = " + oldClassNameId); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeExpandoTable.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeExpandoTable.java deleted file mode 100644 index f3c36cccc8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeExpandoTable.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0; - -import com.liferay.portal.kernel.upgrade.UpgradeProcess; -import com.liferay.portal.model.Subscription; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.expando.NoSuchTableException; -import com.liferay.portlet.expando.model.ExpandoTable; -import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; - -/** - * @author Peter Shin - */ -public class UpgradeExpandoTable extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - updateExpandoTable(PortalUtil.getDefaultCompanyId()); - } - - protected void updateExpandoTable(long companyId) throws Exception { - ExpandoTable expandoTable = null; - - try { - expandoTable = ExpandoTableLocalServiceUtil.getTable( - companyId, Subscription.class.getName(), "KB"); - } - catch (NoSuchTableException nste) { - return; - } - - ExpandoTableLocalServiceUtil.deleteExpandoTable(expandoTable); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeKBArticle.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeKBArticle.java deleted file mode 100644 index 14f2081d67..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeKBArticle.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0; - -import com.liferay.compat.portal.kernel.upgrade.UpgradeProcess; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleAttachmentsUtil; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleLatestUpgradeColumnImpl; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleMainUpgradeColumnImpl; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleRootResourcePrimKeyUpgradeColumnImpl; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBArticleTable; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.upgrade.util.TempUpgradeColumnImpl; -import com.liferay.portal.kernel.upgrade.util.UpgradeColumn; -import com.liferay.portal.kernel.upgrade.util.UpgradeTable; -import com.liferay.portal.kernel.upgrade.util.UpgradeTableFactoryUtil; -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.util.PortalUtil; - -/** - * @author Peter Shin - */ -public class UpgradeKBArticle extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - renameAndUpdateTable( - StringUtil.replaceFirst(KBArticleTable.TABLE_NAME, "KB", "KB_"), - KBArticleTable.TABLE_NAME, KBArticleTable.TABLE_COLUMNS, - KBArticleTable.TABLE_SQL_CREATE, KBArticleTable.TABLE_SQL_DROP); - } - - protected void renameAndUpdateTable( - String oldTableName, String newTableName, Object[][] tableColumns, - String tableSqlCreate, String tableSqlDrop) - throws Exception { - - if (tableHasData(newTableName)) { - if (_log.isWarnEnabled()) { - _log.warn( - "Not renaming " + oldTableName + " to " + newTableName + - " because " + newTableName + " has data"); - } - - return; - } - - if (!tableHasData(oldTableName)) { - if (_log.isWarnEnabled()) { - _log.warn( - "Not renaming " + oldTableName + " to " + newTableName + - " because " + oldTableName + " has no data"); - } - - return; - } - - updateSchema(oldTableName, newTableName, tableSqlDrop); - - renameTable(oldTableName, tableColumns, tableSqlCreate); - - updateTable(newTableName, tableColumns, tableSqlCreate); - - KBArticleAttachmentsUtil.deleteAttachmentsDirectory( - PortalUtil.getDefaultCompanyId()); - } - - protected void renameTable( - String oldTableName, Object[][] tableColumns, String tableSqlCreate) - throws Exception { - - UpgradeTable upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable( - oldTableName, tableColumns); - - upgradeTable.setCreateSQL(tableSqlCreate); - - upgradeTable.updateTable(); - } - - protected void updateColumn( - String tableName, String columnName, String dataType, String data) - throws Exception { - - if (tableHasColumn(tableName, columnName)) { - return; - } - - String dataTypeUpperCase = StringUtil.toUpperCase(dataType); - - StringBundler sb = new StringBundler(6); - - sb.append("alter table "); - sb.append(tableName); - sb.append(" add "); - sb.append(columnName); - sb.append(StringPool.SPACE); - sb.append(dataTypeUpperCase); - - String sql = sb.toString(); - - if (dataTypeUpperCase.equals("DATE") || dataType.equals("STRING")) { - sql = sql.concat(" null"); - } - - runSQL(sql); - - sb.setIndex(0); - - sb.append("update "); - sb.append(tableName); - sb.append(" set "); - sb.append(columnName); - sb.append(" = "); - sb.append(data); - - runSQL(sb.toString()); - } - - protected void updateSchema( - String oldTableName, String newTableName, String tableSqlDrop) - throws Exception { - - if (hasTable(newTableName)) { - runSQL(tableSqlDrop); - } - - updateColumn(oldTableName, "kbArticleId", "LONG", "articleId"); - updateColumn(oldTableName, "rootResourcePrimKey", "LONG", "0"); - updateColumn(oldTableName, "kbTemplateId", "LONG", "0"); - updateColumn(oldTableName, "sections", "STRING", "'_general_'"); - updateColumn(oldTableName, "viewCount", "INTEGER", "0"); - updateColumn(oldTableName, "latest", "BOOLEAN", "FALSE"); - updateColumn(oldTableName, "main", "BOOLEAN", "FALSE"); - updateColumn(oldTableName, "status", "INTEGER", "0"); - updateColumn(oldTableName, "statusByUserId", "LONG", "userId"); - updateColumn(oldTableName, "statusByUserName", "STRING", "userName"); - updateColumn(oldTableName, "statusDate", "DATE", "modifiedDate"); - - if (tableHasColumn(oldTableName, "articleId")) { - runSQL("alter table " + oldTableName + " drop column articleId"); - } - } - - protected void updateTable( - String newTableName, Object[][] tableColumns, String tableSqlCreate) - throws Exception { - - UpgradeColumn kbArticleIdColumn = new TempUpgradeColumnImpl( - "kbArticleId"); - - UpgradeColumn resourcePrimKeyColumn = new TempUpgradeColumnImpl( - "resourcePrimKey"); - - KBArticleRootResourcePrimKeyUpgradeColumnImpl - rootResourcePrimKeyColumn = - new KBArticleRootResourcePrimKeyUpgradeColumnImpl( - resourcePrimKeyColumn); - - KBArticleLatestUpgradeColumnImpl latestColumn = - new KBArticleLatestUpgradeColumnImpl( - kbArticleIdColumn, resourcePrimKeyColumn); - - KBArticleMainUpgradeColumnImpl mainColumn = - new KBArticleMainUpgradeColumnImpl( - kbArticleIdColumn, resourcePrimKeyColumn); - - UpgradeTable upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable( - newTableName, tableColumns, kbArticleIdColumn, - resourcePrimKeyColumn, rootResourcePrimKeyColumn, latestColumn, - mainColumn); - - upgradeTable.setCreateSQL(tableSqlCreate); - - upgradeTable.updateTable(); - } - - private static Log _log = LogFactoryUtil.getLog(UpgradeKBArticle.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeKBComment.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeKBComment.java deleted file mode 100644 index 12814d8ed7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeKBComment.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0; - -import com.liferay.compat.portal.kernel.upgrade.UpgradeProcess; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBCommentTable; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.upgrade.util.UpgradeTable; -import com.liferay.portal.kernel.upgrade.util.UpgradeTableFactoryUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; - -/** - * @author Peter Shin - */ -public class UpgradeKBComment extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - renameAndUpdateTable( - StringUtil.replaceFirst(KBCommentTable.TABLE_NAME, "KB", "KB_"), - KBCommentTable.TABLE_NAME, KBCommentTable.TABLE_COLUMNS, - KBCommentTable.TABLE_SQL_CREATE, KBCommentTable.TABLE_SQL_DROP); - } - - protected void renameAndUpdateTable( - String oldTableName, String newTableName, Object[][] tableColumns, - String tableSqlCreate, String tableSqlDrop) - throws Exception { - - if (tableHasData(newTableName)) { - if (_log.isWarnEnabled()) { - _log.warn( - "Not renaming " + oldTableName + " to " + newTableName + - " because " + newTableName + " has data"); - } - - return; - } - - if (!tableHasData(oldTableName)) { - if (_log.isWarnEnabled()) { - _log.warn( - "Not renaming " + oldTableName + " to " + newTableName + - " because " + oldTableName + " has no data"); - } - - return; - } - - updateSchema(oldTableName, newTableName, tableSqlDrop); - - renameTable(oldTableName, tableColumns, tableSqlCreate); - } - - protected void renameTable( - String oldTableName, Object[][] tableColumns, String tableSqlCreate) - throws Exception { - - UpgradeTable upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable( - oldTableName, tableColumns); - - upgradeTable.setCreateSQL(tableSqlCreate); - - upgradeTable.updateTable(); - } - - protected void updateColumn( - String tableName, String columnName, String dataType, String data) - throws Exception { - - if (tableHasColumn(tableName, columnName)) { - return; - } - - String dataTypeUpperCase = StringUtil.toUpperCase(dataType); - - StringBundler sb = new StringBundler(6); - - sb.append("alter table "); - sb.append(tableName); - sb.append(" add "); - sb.append(columnName); - sb.append(StringPool.SPACE); - sb.append(dataTypeUpperCase); - - String sql = sb.toString(); - - if (dataTypeUpperCase.equals("DATE") || dataType.equals("STRING")) { - sql = sql.concat(" null"); - } - - runSQL(sql); - - sb.setIndex(0); - - sb.append("update "); - sb.append(tableName); - sb.append(" set "); - sb.append(columnName); - sb.append(" = "); - sb.append(data); - - runSQL(sb.toString()); - } - - protected void updateSchema( - String oldTableName, String newTableName, String tableSqlDrop) - throws Exception { - - if (hasTable(newTableName)) { - runSQL(tableSqlDrop); - } - - updateColumn(oldTableName, "kbCommentId", "LONG", "commentId"); - - if (tableHasColumn(oldTableName, "commentId")) { - runSQL("alter table " + oldTableName + " drop column commentId"); - } - } - - private static Log _log = LogFactoryUtil.getLog(UpgradeKBComment.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeKBTemplate.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeKBTemplate.java deleted file mode 100644 index f9153130a5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeKBTemplate.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0; - -import com.liferay.compat.portal.kernel.upgrade.UpgradeProcess; -import com.liferay.knowledgebase.hook.upgrade.v1_1_0.util.KBTemplateTable; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.upgrade.util.UpgradeTable; -import com.liferay.portal.kernel.upgrade.util.UpgradeTableFactoryUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; - -/** - * @author Peter Shin - */ -public class UpgradeKBTemplate extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - renameAndUpdateTable( - StringUtil.replaceFirst(KBTemplateTable.TABLE_NAME, "KB", "KB_"), - KBTemplateTable.TABLE_NAME, KBTemplateTable.TABLE_COLUMNS, - KBTemplateTable.TABLE_SQL_CREATE, KBTemplateTable.TABLE_SQL_DROP); - } - - protected void renameAndUpdateTable( - String oldTableName, String newTableName, Object[][] tableColumns, - String tableSqlCreate, String tableSqlDrop) - throws Exception { - - if (tableHasData(newTableName)) { - if (_log.isWarnEnabled()) { - _log.warn( - "Not renaming " + oldTableName + " to " + newTableName + - " because " + newTableName + " has data"); - } - - return; - } - - if (!tableHasData(oldTableName)) { - if (_log.isWarnEnabled()) { - _log.warn( - "Not renaming " + oldTableName + " to " + newTableName + - " because " + oldTableName + " has no data"); - } - - return; - } - - updateSchema(oldTableName, newTableName, tableSqlDrop); - - renameTable(oldTableName, tableColumns, tableSqlCreate); - } - - protected void renameTable( - String oldTableName, Object[][] tableColumns, String tableSqlCreate) - throws Exception { - - UpgradeTable upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable( - oldTableName, tableColumns); - - upgradeTable.setCreateSQL(tableSqlCreate); - - upgradeTable.updateTable(); - } - - protected void updateColumn( - String tableName, String columnName, String dataType, String data) - throws Exception { - - if (tableHasColumn(tableName, columnName)) { - return; - } - - String dataTypeUpperCase = StringUtil.toUpperCase(dataType); - - StringBundler sb = new StringBundler(6); - - sb.append("alter table "); - sb.append(tableName); - sb.append(" add "); - sb.append(columnName); - sb.append(StringPool.SPACE); - sb.append(dataTypeUpperCase); - - String sql = sb.toString(); - - if (dataTypeUpperCase.equals("DATE") || dataType.equals("STRING")) { - sql = sql.concat(" null"); - } - - runSQL(sql); - - sb.setIndex(0); - - sb.append("update "); - sb.append(tableName); - sb.append(" set "); - sb.append(columnName); - sb.append(" = "); - sb.append(data); - - runSQL(sb.toString()); - } - - protected void updateSchema( - String oldTableName, String newTableName, String tableSqlDrop) - throws Exception { - - if (hasTable(newTableName)) { - runSQL(tableSqlDrop); - } - - updateColumn(oldTableName, "kbTemplateId", "LONG", "templateId"); - updateColumn(oldTableName, "engineType", "INTEGER", "0"); - updateColumn(oldTableName, "cacheable", "BOOLEAN", "TRUE"); - - if (tableHasColumn(oldTableName, "templateId")) { - runSQL("alter table " + oldTableName + " drop column templateId"); - } - - if (tableHasColumn(oldTableName, "description")) { - runSQL("alter table " + oldTableName + " drop column description"); - } - } - - private static Log _log = LogFactoryUtil.getLog(UpgradeKBTemplate.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradePortletPreferences.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradePortletPreferences.java deleted file mode 100644 index d03d22a897..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradePortletPreferences.java +++ /dev/null @@ -1,269 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0; - -import com.liferay.portal.kernel.upgrade.CamelCaseUpgradePortletPreferences; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.model.PortletConstants; -import com.liferay.portlet.PortletPreferencesFactoryUtil; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import javax.portlet.PortletPreferences; - -/** - * @author Peter Shin - */ -public class UpgradePortletPreferences - extends CamelCaseUpgradePortletPreferences { - - protected Map getDefaultPreferencesMap( - String rootPortletId) { - - if (rootPortletId.equals("1_WAR_knowledgebaseportlet")) { - return _adminDefaultPreferencesMap; - } - else if (rootPortletId.equals("2_WAR_knowledgebaseportlet")) { - return _displayDefaultPreferencesMap; - } - else if (rootPortletId.equals("3_WAR_knowledgebaseportlet")) { - return _articleDefaultPreferencesMap; - } - - return Collections.emptyMap(); - } - - protected String getName(String rootPortletId, String oldName) { - if (rootPortletId.equals("1_WAR_knowledgebaseportlet")) { - return _oldAdminPreferenceNamesMap.get(oldName); - } - else if (rootPortletId.equals("2_WAR_knowledgebaseportlet")) { - return _oldDisplayPreferenceNamesMap.get(oldName); - } - else if (rootPortletId.equals("3_WAR_knowledgebaseportlet")) { - return _oldArticlePreferenceNamesMap.get(oldName); - } - - return null; - } - - @Override - protected String[] getPortletIds() { - return _PORTLET_IDS; - } - - protected String updatePreferences( - long companyId, long ownerId, int ownerType, long plid, - String portletId, String xml) - throws Exception { - - PortletPreferences preferences = PortletPreferencesFactoryUtil.fromXML( - companyId, ownerId, ownerType, plid, portletId, xml); - - Map preferencesMap = preferences.getMap(); - - String rootPortletId = PortletConstants.getRootPortletId(portletId); - - for (String oldName : preferencesMap.keySet()) { - String newName = getName(rootPortletId, oldName); - String[] oldValues = preferencesMap.get(oldName); - - preferences.reset(oldName); - - if (newName != null) { - preferences.setValues(newName, oldValues); - } - } - - Map defaultPreferencesMap = getDefaultPreferencesMap( - rootPortletId); - - for (String name : defaultPreferencesMap.keySet()) { - if (preferences.getValues(name, null) == null) { - preferences.setValues( - name, StringUtil.split(defaultPreferencesMap.get(name))); - } - } - - return PortletPreferencesFactoryUtil.toXML(preferences); - } - - @Override - protected String upgradePreferences( - long companyId, long ownerId, int ownerType, long plid, - String portletId, String xml) - throws Exception { - - String preferences = super.upgradePreferences( - companyId, ownerId, ownerType, plid, portletId, xml); - - return updatePreferences( - companyId, ownerId, ownerType, plid, portletId, preferences); - } - - private static final String[] _PORTLET_IDS = new String[] { - "1_WAR_knowledgebaseportlet", "2_WAR_knowledgebaseportlet", - "3_WAR_knowledgebaseportlet_INSTANCE_%" - }; - - private static Map _adminDefaultPreferencesMap; - private static Map _articleDefaultPreferencesMap; - private static Map _displayDefaultPreferencesMap; - private static Map _oldAdminPreferenceNamesMap; - private static Map _oldArticlePreferenceNamesMap; - private static Map _oldDisplayPreferenceNamesMap; - - static { - _adminDefaultPreferencesMap = new HashMap(); - - _adminDefaultPreferencesMap.put("kbArticlesOrderByCol", "priority"); - _adminDefaultPreferencesMap.put("kbArticlesOrderByType", "desc"); - _adminDefaultPreferencesMap.put("enableKBArticleDescription", "false"); - _adminDefaultPreferencesMap.put( - "enableKBArticleAssetCategories", "false"); - _adminDefaultPreferencesMap.put("enableKBArticleAssetTags", "true"); - _adminDefaultPreferencesMap.put("enableKBArticleRatings", "false"); - _adminDefaultPreferencesMap.put("showKBArticleAssetEntries", "true"); - _adminDefaultPreferencesMap.put("enableKBArticleKBComments", "true"); - _adminDefaultPreferencesMap.put("showKBArticleKBComments", "true"); - _adminDefaultPreferencesMap.put( - "enableKBArticleViewCountIncrement", "true"); - _adminDefaultPreferencesMap.put("enableKBStructureKBComments", "true"); - _adminDefaultPreferencesMap.put("showKBStructureKBComments", "true"); - _adminDefaultPreferencesMap.put("enableKBTemplateKBComments", "true"); - _adminDefaultPreferencesMap.put("showKBTemplateKBComments", "true"); - - _articleDefaultPreferencesMap = new HashMap(); - - _articleDefaultPreferencesMap.put("resourcePrimKey", "0"); - _articleDefaultPreferencesMap.put( - "enableKBArticleDescription", "false"); - _articleDefaultPreferencesMap.put( - "enableKBArticleAssetCategories", "false"); - _articleDefaultPreferencesMap.put("enableKBArticleAssetTags", "true"); - _articleDefaultPreferencesMap.put("enableKBArticleRatings", "false"); - _articleDefaultPreferencesMap.put("showKBArticleAssetEntries", "true"); - _articleDefaultPreferencesMap.put("enableKBArticleKBComments", "true"); - _articleDefaultPreferencesMap.put("showKBArticleKBComments", "true"); - _articleDefaultPreferencesMap.put( - "enableKBArticleViewCountIncrement", "true"); - _articleDefaultPreferencesMap.put("rssDelta", "20"); - _articleDefaultPreferencesMap.put("rssDisplayStyle", "full-content"); - _articleDefaultPreferencesMap.put("rssFormat", "atom10"); - - _displayDefaultPreferencesMap = new HashMap(); - - _displayDefaultPreferencesMap.put("kbArticlesOrderByCol", "priority"); - _displayDefaultPreferencesMap.put("kbArticlesOrderByType", "desc"); - _displayDefaultPreferencesMap.put( - "showKBArticlePriorityColumn", "true"); - _displayDefaultPreferencesMap.put("showKBArticleAuthorColumn", "true"); - _displayDefaultPreferencesMap.put( - "showKBArticleCreateDateColumn", "true"); - _displayDefaultPreferencesMap.put( - "showKBArticleModifiedDateColumn", "true"); - _displayDefaultPreferencesMap.put("showKBArticleStatusColumn", "true"); - _displayDefaultPreferencesMap.put("showKBArticleViewsColumn", "true"); - _displayDefaultPreferencesMap.put( - "enableKBArticleDescription", "false"); - _displayDefaultPreferencesMap.put( - "enableKBArticleAssetCategories", "false"); - _displayDefaultPreferencesMap.put("enableKBArticleAssetTags", "true"); - _displayDefaultPreferencesMap.put("enableKBArticleRatings", "false"); - _displayDefaultPreferencesMap.put("showKBArticleAssetEntries", "true"); - _displayDefaultPreferencesMap.put("enableKBArticleKBComments", "true"); - _displayDefaultPreferencesMap.put("showKBArticleKBComments", "true"); - _displayDefaultPreferencesMap.put( - "enableKBArticleViewCountIncrement", "true"); - _displayDefaultPreferencesMap.put("enableKBTemplateKBComments", "true"); - _displayDefaultPreferencesMap.put("showKBTemplateKBComments", "true"); - _displayDefaultPreferencesMap.put("rssDelta", "20"); - _displayDefaultPreferencesMap.put("rssDisplayStyle", "full-content"); - _displayDefaultPreferencesMap.put("rssFormat", "atom10"); - - _oldAdminPreferenceNamesMap = new HashMap(); - - _oldAdminPreferenceNamesMap.put( - "articlesOrderByCol", "kbArticlesOrderByCol"); - _oldAdminPreferenceNamesMap.put( - "articlesOrderByType", "kbArticlesOrderByType"); - _oldAdminPreferenceNamesMap.put( - "enableArticleDescription", "enableKBArticleDescription"); - _oldAdminPreferenceNamesMap.put( - "enableArticleAssetCategories", "enableKBArticleAssetCategories"); - _oldAdminPreferenceNamesMap.put( - "enableArticleAssetTags", "enableKBArticleAssetTags"); - _oldAdminPreferenceNamesMap.put( - "enableArticleRatings", "enableKBArticleRatings"); - _oldAdminPreferenceNamesMap.put( - "enableArticleComments", "enableKBArticleKBComments"); - _oldAdminPreferenceNamesMap.put( - "showArticleComments", "showKBArticleKBComments"); - _oldAdminPreferenceNamesMap.put( - "enableArticleViewCountIncrement", - "enableKBArticleViewCountIncrement"); - _oldAdminPreferenceNamesMap.put( - "enableTemplateComments", "enableKBTemplateKBComments"); - _oldAdminPreferenceNamesMap.put( - "showTemplateComments", "showKBTemplateKBComments"); - - _oldArticlePreferenceNamesMap = new HashMap(); - - _oldArticlePreferenceNamesMap.put( - "enableArticleDescription", "enableKBArticleDescription"); - _oldArticlePreferenceNamesMap.put( - "enableArticleAssetCategories", "enableKBArticleAssetCategories"); - _oldArticlePreferenceNamesMap.put( - "enableArticleAssetTags", "enableKBArticleAssetTags"); - _oldArticlePreferenceNamesMap.put( - "enableArticleRatings", "enableKBArticleRatings"); - _oldArticlePreferenceNamesMap.put( - "enableArticleComments", "enableKBArticleKBComments"); - _oldArticlePreferenceNamesMap.put( - "showArticleComments", "showKBArticleKBComments"); - _oldArticlePreferenceNamesMap.put( - "enableArticleViewCountIncrement", - "enableKBArticleViewCountIncrement"); - - _oldDisplayPreferenceNamesMap = new HashMap(); - - _oldDisplayPreferenceNamesMap.put( - "articlesOrderByCol", "kbArticlesOrderByCol"); - _oldDisplayPreferenceNamesMap.put( - "articlesOrderByType", "kbArticlesOrderByType"); - _oldDisplayPreferenceNamesMap.put( - "enableArticleDescription", "enableKBArticleDescription"); - _oldDisplayPreferenceNamesMap.put( - "enableArticleAssetCategories", "enableKBArticleAssetCategories"); - _oldDisplayPreferenceNamesMap.put( - "enableArticleAssetTags", "enableKBArticleAssetTags"); - _oldDisplayPreferenceNamesMap.put( - "enableArticleRatings", "enableKBArticleRatings"); - _oldDisplayPreferenceNamesMap.put( - "enableArticleComments", "enableKBArticleKBComments"); - _oldDisplayPreferenceNamesMap.put( - "showArticleComments", "showKBArticleKBComments"); - _oldDisplayPreferenceNamesMap.put( - "enableArticleViewCountIncrement", - "enableKBArticleViewCountIncrement"); - _oldDisplayPreferenceNamesMap.put( - "enableTemplateComments", "enableKBTemplateKBComments"); - _oldDisplayPreferenceNamesMap.put( - "showTemplateComments", "showKBTemplateKBComments"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeResourceAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeResourceAction.java deleted file mode 100644 index 442371494c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeResourceAction.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0; - -import com.liferay.portal.kernel.dao.jdbc.DataAccess; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; - -/** - * @author Peter Shin - */ -public class UpgradeResourceAction extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - if (hasResourceAction("com.liferay.knowledgebase.model.Article")) { - updateKBArticleResourceActions(); - } - - if (hasResourceAction("com.liferay.knowledgebase.model.Template")) { - updateKBTemplateResourceActions(); - } - } - - protected boolean hasResourceAction(String name) throws Exception { - Connection con = null; - PreparedStatement ps = null; - ResultSet rs = null; - - try { - con = DataAccess.getConnection(); - - ps = con.prepareStatement( - "select count(*) from ResourceAction where name = ?"); - - ps.setString(1, name); - - rs = ps.executeQuery(); - - while (rs.next()) { - int count = rs.getInt(1); - - if (count > 0) { - return true; - } - } - - return false; - } - finally { - DataAccess.cleanUp(con, ps, rs); - } - } - - protected void updateKBArticleResourceActions() throws Exception { - runSQL( - "delete from ResourceAction where name = " + - "'com.liferay.knowledgebase.model.KBArticle'"); - - runSQL( - "update ResourceAction set name = " + - "'com.liferay.knowledgebase.model.KBArticle' where name = " + - "'com.liferay.knowledgebase.model.Article'"); - - runSQL( - "update ResourceAction set actionId = 'MOVE_KB_ARTICLE' where " + - "name = 'com.liferay.knowledgebase.model.KBArticle' and " + - "actionId = 'MOVE'"); - } - - protected void updateKBTemplateResourceActions() throws Exception { - runSQL( - "delete from ResourceAction where name = " + - "'com.liferay.knowledgebase.model.KBTemplate'"); - - runSQL( - "update ResourceAction set name = " + - "'com.liferay.knowledgebase.model.KBTemplate' where name = " + - "'com.liferay.knowledgebase.model.Template'"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeResourcePermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeResourcePermission.java deleted file mode 100644 index 44614cdaa7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/UpgradeResourcePermission.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0; - -import com.liferay.portal.kernel.dao.jdbc.DataAccess; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; - -/** - * @author Peter Shin - */ -public class UpgradeResourcePermission extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - if (hasResourcePermission("com.liferay.knowledgebase.model.Article")) { - updateKBArticleResourcePermissions(); - } - - if (hasResourcePermission("com.liferay.knowledgebase.model.Template")) { - updateKBTemplateResourcePermissions(); - } - } - - protected boolean hasResourcePermission(String name) throws Exception { - Connection con = null; - PreparedStatement ps = null; - ResultSet rs = null; - - try { - con = DataAccess.getConnection(); - - ps = con.prepareStatement( - "select count(*) from ResourcePermission where name = ?"); - - ps.setString(1, name); - - rs = ps.executeQuery(); - - while (rs.next()) { - int count = rs.getInt(1); - - if (count > 0) { - return true; - } - } - - return false; - } - finally { - DataAccess.cleanUp(con, ps, rs); - } - } - - protected void updateKBArticleResourcePermissions() throws Exception { - runSQL( - "update ResourcePermission set name = " + - "'com.liferay.knowledgebase.model.KBArticle' where name = " + - "'com.liferay.knowledgebase.model.Article'"); - } - - protected void updateKBTemplateResourcePermissions() throws Exception { - runSQL( - "update ResourcePermission set name = " + - "'com.liferay.knowledgebase.model.KBTemplate' where name = " + - "'com.liferay.knowledgebase.model.Template'"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleAttachmentsUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleAttachmentsUtil.java deleted file mode 100644 index c5744c3c23..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleAttachmentsUtil.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CompanyConstants; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portlet.documentlibrary.store.DLStoreUtil; - -/** - * @author Peter Shin - */ -public class KBArticleAttachmentsUtil { - - public static void deleteAttachmentsDirectory(long companyId) { - try { - String[] fileNames = DLStoreUtil.getFileNames( - companyId, CompanyConstants.SYSTEM, "knowledgebase/articles"); - - if (fileNames.length > 0) { - if (_log.isWarnEnabled()) { - _log.warn("Unable to delete knowledgebase/articles"); - } - - return; - } - - DLStoreUtil.deleteDirectory( - companyId, CompanyConstants.SYSTEM, "knowledgebase/articles"); - } - catch (Exception e) { - _log.error(e.getMessage()); - } - } - - public static void updateAttachments(KBArticle kbArticle) { - try { - long folderId = kbArticle.getClassPK(); - - String oldDirName = "knowledgebase/articles/" + folderId; - String newDirName = "knowledgebase/kbarticles/" + folderId; - - DLStoreUtil.addDirectory( - kbArticle.getCompanyId(), CompanyConstants.SYSTEM, newDirName); - - String[] fileNames = DLStoreUtil.getFileNames( - kbArticle.getCompanyId(), CompanyConstants.SYSTEM, oldDirName); - - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setCompanyId(kbArticle.getCompanyId()); - serviceContext.setScopeGroupId(kbArticle.getGroupId()); - - for (String fileName : fileNames) { - String shortFileName = FileUtil.getShortFileName(fileName); - byte[] bytes = DLStoreUtil.getFileAsBytes( - kbArticle.getCompanyId(), CompanyConstants.SYSTEM, - fileName); - - DLStoreUtil.addFile( - kbArticle.getCompanyId(), CompanyConstants.SYSTEM, - newDirName + StringPool.SLASH + shortFileName, bytes); - } - - DLStoreUtil.deleteDirectory( - kbArticle.getCompanyId(), CompanyConstants.SYSTEM, oldDirName); - - if (_log.isInfoEnabled()) { - _log.info("Added attachments for " + folderId); - } - } - catch (Exception e) { - _log.error(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog( - KBArticleAttachmentsUtil.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleLatestUpgradeColumnImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleLatestUpgradeColumnImpl.java deleted file mode 100644 index f635ed96f1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleLatestUpgradeColumnImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.portal.kernel.upgrade.util.BaseUpgradeColumnImpl; -import com.liferay.portal.kernel.upgrade.util.UpgradeColumn; -import com.liferay.portal.kernel.workflow.WorkflowConstants; - -/** - * @author Peter Shin - */ -public class KBArticleLatestUpgradeColumnImpl extends BaseUpgradeColumnImpl { - - public KBArticleLatestUpgradeColumnImpl( - UpgradeColumn kbArticleIdColumn, UpgradeColumn resourcePrimKeyColumn) { - - super("latest"); - - _kbArticleIdColumn = kbArticleIdColumn; - _resourcePrimKeyColumn = resourcePrimKeyColumn; - } - - @Override - public Object getNewValue(Object oldValue) throws Exception { - Long kbArticleId = (Long)_kbArticleIdColumn.getOldValue(); - Long resourcePrimKey = (Long)_resourcePrimKeyColumn.getOldValue(); - - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - if (kbArticle.getKbArticleId() != kbArticleId) { - return Boolean.FALSE; - } - - KBArticleAttachmentsUtil.updateAttachments(kbArticle); - - return Boolean.TRUE; - } - - private UpgradeColumn _kbArticleIdColumn; - private UpgradeColumn _resourcePrimKeyColumn; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleMainUpgradeColumnImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleMainUpgradeColumnImpl.java deleted file mode 100644 index 1f7481ccd5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleMainUpgradeColumnImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.portal.kernel.upgrade.util.BaseUpgradeColumnImpl; -import com.liferay.portal.kernel.upgrade.util.UpgradeColumn; -import com.liferay.portal.kernel.workflow.WorkflowConstants; - -/** - * @author Peter Shin - */ -public class KBArticleMainUpgradeColumnImpl extends BaseUpgradeColumnImpl { - - public KBArticleMainUpgradeColumnImpl( - UpgradeColumn kbArticleIdColumn, UpgradeColumn resourcePrimKeyColumn) { - - super("main"); - - _kbArticleIdColumn = kbArticleIdColumn; - _resourcePrimKeyColumn = resourcePrimKeyColumn; - } - - @Override - public Object getNewValue(Object oldValue) throws Exception { - Long kbArticleId = (Long)_kbArticleIdColumn.getOldValue(); - Long resourcePrimKey = (Long)_resourcePrimKeyColumn.getOldValue(); - - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - if (kbArticle.isApproved()) { - return Boolean.TRUE; - } - - if (kbArticle.isFirstVersion()) { - return Boolean.FALSE; - } - - kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_APPROVED); - - if (kbArticle.getKbArticleId() != kbArticleId) { - return Boolean.FALSE; - } - - KBArticleAttachmentsUtil.updateAttachments(kbArticle); - - return Boolean.TRUE; - } - - private UpgradeColumn _kbArticleIdColumn; - private UpgradeColumn _resourcePrimKeyColumn; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleRootResourcePrimKeyUpgradeColumnImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleRootResourcePrimKeyUpgradeColumnImpl.java deleted file mode 100644 index a0fbe9a1ad..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleRootResourcePrimKeyUpgradeColumnImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.portal.kernel.upgrade.util.BaseUpgradeColumnImpl; -import com.liferay.portal.kernel.upgrade.util.UpgradeColumn; -import com.liferay.portal.kernel.workflow.WorkflowConstants; - -/** - * @author Peter Shin - */ -public class KBArticleRootResourcePrimKeyUpgradeColumnImpl - extends BaseUpgradeColumnImpl { - - public KBArticleRootResourcePrimKeyUpgradeColumnImpl( - UpgradeColumn resourcePrimKeyColumn) { - - super("rootResourcePrimKey"); - - _resourcePrimKeyColumn = resourcePrimKeyColumn; - } - - @Override - public Object getNewValue(Object oldValue) throws Exception { - Long resourcePrimKey = (Long)_resourcePrimKeyColumn.getOldValue(); - - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - while (!kbArticle.isRoot()) { - kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - kbArticle.getParentResourcePrimKey(), - WorkflowConstants.STATUS_ANY); - } - - return new Long(kbArticle.getResourcePrimKey()); - } - - private UpgradeColumn _resourcePrimKeyColumn; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleTable.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleTable.java deleted file mode 100644 index 8a0db6016a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBArticleTable.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0.util; - -import java.sql.Types; - -/** - * @author Peter Shin - */ -public class KBArticleTable { - - public static final Object[][] TABLE_COLUMNS = { - {"uuid_", Types.VARCHAR}, - {"kbArticleId", Types.BIGINT}, - {"resourcePrimKey", Types.BIGINT}, - {"groupId", Types.BIGINT}, - {"companyId", Types.BIGINT}, - {"userId", Types.BIGINT}, - {"userName", Types.VARCHAR}, - {"createDate", Types.TIMESTAMP}, - {"modifiedDate", Types.TIMESTAMP}, - {"rootResourcePrimKey", Types.BIGINT}, - {"parentResourcePrimKey", Types.BIGINT}, - {"version", Types.INTEGER}, - {"title", Types.VARCHAR}, - {"content", Types.CLOB}, - {"description", Types.VARCHAR}, - {"kbTemplateId", Types.BIGINT}, - {"priority", Types.DOUBLE}, - {"sections", Types.VARCHAR}, - {"viewCount", Types.INTEGER}, - {"latest", Types.BOOLEAN}, - {"main", Types.BOOLEAN}, - {"status", Types.INTEGER}, - {"statusByUserId", Types.BIGINT}, - {"statusByUserName", Types.VARCHAR}, - {"statusDate", Types.TIMESTAMP} - }; - - public static final String TABLE_NAME = "KBArticle"; - - public static final String TABLE_SQL_CREATE = "create table KBArticle (uuid_ VARCHAR(75) null,kbArticleId LONG not null primary key,resourcePrimKey LONG,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,rootResourcePrimKey LONG,parentResourcePrimKey LONG,version INTEGER,title STRING null,content TEXT null,description STRING null,kbTemplateId LONG,priority DOUBLE,sections STRING null,viewCount INTEGER,latest BOOLEAN,main BOOLEAN,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null)"; - - public static final String TABLE_SQL_DROP = "drop table KBArticle"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBCommentTable.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBCommentTable.java deleted file mode 100644 index b278746952..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBCommentTable.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0.util; - -import java.sql.Types; - -/** - * @author Peter Shin - */ -public class KBCommentTable { - - public static final Object[][] TABLE_COLUMNS = { - {"uuid_", Types.VARCHAR}, - {"kbCommentId", Types.BIGINT}, - {"groupId", Types.BIGINT}, - {"companyId", Types.BIGINT}, - {"userId", Types.BIGINT}, - {"userName", Types.VARCHAR}, - {"createDate", Types.TIMESTAMP}, - {"modifiedDate", Types.TIMESTAMP}, - {"classNameId", Types.BIGINT}, - {"classPK", Types.BIGINT}, - {"content", Types.VARCHAR}, - {"helpful", Types.BOOLEAN} - }; - - public static final String TABLE_NAME = "KBComment"; - - public static final String TABLE_SQL_CREATE = "create table KBComment (uuid_ VARCHAR(75) null,kbCommentId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,classNameId LONG,classPK LONG,content STRING null,helpful BOOLEAN)"; - - public static final String TABLE_SQL_DROP = "drop table KBComment"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBTemplateTable.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBTemplateTable.java deleted file mode 100644 index 1506621559..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_1_0/util/KBTemplateTable.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_1_0.util; - -import java.sql.Types; - -/** - * @author Peter Shin - */ -public class KBTemplateTable { - - public static final Object[][] TABLE_COLUMNS = { - {"uuid_", Types.VARCHAR}, - {"kbTemplateId", Types.BIGINT}, - {"groupId", Types.BIGINT}, - {"companyId", Types.BIGINT}, - {"userId", Types.BIGINT}, - {"userName", Types.VARCHAR}, - {"createDate", Types.TIMESTAMP}, - {"modifiedDate", Types.TIMESTAMP}, - {"title", Types.VARCHAR}, - {"content", Types.CLOB}, - {"engineType", Types.INTEGER}, - {"cacheable", Types.BOOLEAN} - }; - - public static final String TABLE_NAME = "KBTemplate"; - - public static final String TABLE_SQL_CREATE = "create table KBTemplate (uuid_ VARCHAR(75) null,kbTemplateId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,title STRING null,content TEXT null,engineType INTEGER,cacheable BOOLEAN)"; - - public static final String TABLE_SQL_DROP = "drop table KBTemplate"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_2_0/UpgradeKBArticle.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_2_0/UpgradeKBArticle.java deleted file mode 100644 index 34ffce5cab..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_2_0/UpgradeKBArticle.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_2_0; - -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Peter Shin - */ -public class UpgradeKBArticle extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - if (tableHasColumn("KBArticle", "kbTemplateId")) { - runSQL("alter table KBArticle drop column kbTemplateId"); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_2_0/UpgradeKBStructure.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_2_0/UpgradeKBStructure.java deleted file mode 100644 index 027f1c378d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_2_0/UpgradeKBStructure.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_2_0; - -import com.liferay.compat.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Peter Shin - */ -public class UpgradeKBStructure extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - if (hasTable("KBStructure")) { - runSQL("drop table KBStructure"); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_2_0/UpgradeKBTemplate.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_2_0/UpgradeKBTemplate.java deleted file mode 100644 index b028c2026a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_2_0/UpgradeKBTemplate.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_2_0; - -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Peter Shin - */ -public class UpgradeKBTemplate extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - if (tableHasColumn("KBTemplate", "engineType")) { - runSQL("alter table KBTemplate drop column engineType"); - } - - if (tableHasColumn("KBTemplate", "cacheable")) { - runSQL("alter table KBTemplate drop column cacheable"); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_0/UpgradeKBAttachments.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_0/UpgradeKBAttachments.java deleted file mode 100644 index a0530f8d19..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_0/UpgradeKBAttachments.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_3_0; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.portal.kernel.dao.jdbc.DataAccess; -import com.liferay.portal.kernel.upgrade.v6_2_0.BaseUpgradeAttachments; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.CompanyConstants; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.NoSuchDirectoryException; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.store.DLStoreUtil; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.Timestamp; - -/** - * @author Sergio González - */ -public class UpgradeKBAttachments extends BaseUpgradeAttachments { - - protected void deleteEmptyDirectories() throws Exception { - for (long companyId : PortalUtil.getCompanyIds()) { - try { - DLStoreUtil.deleteDirectory( - companyId, CompanyConstants.SYSTEM, - "knowledgebase/kbarticles"); - } - catch (NoSuchDirectoryException nsde) { - } - } - } - - @Override - protected void doUpgrade() throws Exception { - updateAttachments(); - deleteEmptyDirectories(); - } - - @Override - protected String getClassName() { - return KBArticle.class.getName(); - } - - @Override - protected long getContainerModelFolderId( - long groupId, long companyId, long resourcePrimKey, - long containerId, long userId, String userName, - Timestamp createDate) - throws Exception { - - long repositoryId = getRepositoryId( - groupId, companyId, userId, userName, createDate, getClassNameId(), - getPortletId()); - - long repositoryFolderId = getFolderId( - groupId, companyId, userId, userName, createDate, repositoryId, - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, getPortletId(), false); - - long kbArticleFolderId = getFolderId( - groupId, companyId, userId, userName, createDate, repositoryId, - repositoryFolderId, String.valueOf(resourcePrimKey), false); - - return kbArticleFolderId; - } - - @Override - protected String getDirName(long containerModelId, long resourcePrimKey) { - return "knowledgebase/kbarticles/" + resourcePrimKey; - } - - @Override - protected String getPortletId() { - return PortletKeys.KNOWLEDGE_BASE_ARTICLE; - } - - @Override - protected void updateAttachments() throws Exception { - Connection con = null; - PreparedStatement ps = null; - ResultSet rs = null; - - try { - con = DataAccess.getUpgradeOptimizedConnection(); - - StringBundler sb = new StringBundler(5); - - sb.append("select MIN(kbArticleId) as kbArticleId, "); - sb.append("resourcePrimKey, groupId, companyId, "); - sb.append("MIN(userId) as userId, MIN(userName) as userName, "); - sb.append("MIN(status) as status from KBArticle "); - sb.append("group by resourcePrimKey, groupId, companyId"); - - ps = con.prepareStatement(sb.toString()); - - rs = ps.executeQuery(); - - while (rs.next()) { - long kbArticleId = rs.getLong("kbArticleId"); - long resourcePrimKey = rs.getLong("resourcePrimKey"); - long groupId = rs.getLong("groupId"); - long companyId = rs.getLong("companyId"); - long userId = rs.getLong("userId"); - String userName = rs.getString("userName"); - int status = rs.getInt("status"); - - long classPK = resourcePrimKey; - - if (status != WorkflowConstants.STATUS_APPROVED) { - classPK = kbArticleId; - } - - updateEntryAttachments( - companyId, groupId, classPK, 0, userId, userName); - } - } - finally { - DataAccess.cleanUp(con, ps, rs); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_0/UpgradePortletPreferences.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_0/UpgradePortletPreferences.java deleted file mode 100644 index 55517084b0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_0/UpgradePortletPreferences.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_3_0; - -import com.liferay.portal.kernel.upgrade.BaseUpgradePortletPreferences; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portlet.PortletPreferencesFactoryUtil; -import com.liferay.util.RSSUtil; - -import javax.portlet.PortletPreferences; - -/** - * @author Eduardo Garcia - */ -public class UpgradePortletPreferences extends BaseUpgradePortletPreferences { - - @Override - protected String[] getPortletIds() { - return _PORTLET_IDS; - } - - @Override - protected String upgradePreferences( - long companyId, long ownerId, int ownerType, long plid, - String portletId, String xml) - throws Exception { - - PortletPreferences portletPreferences = - PortletPreferencesFactoryUtil.fromXML( - companyId, ownerId, ownerType, plid, portletId, xml); - - String rssFormat = GetterUtil.getString( - portletPreferences.getValue("rssFormat", null)); - - if (Validator.isNotNull(rssFormat)) { - String rssFeedType = RSSUtil.getFeedType( - RSSUtil.getFormatType(rssFormat), - RSSUtil.getFormatVersion(rssFormat)); - - portletPreferences.setValue("rssFeedType", rssFeedType); - } - - portletPreferences.reset("rssFormat"); - - return PortletPreferencesFactoryUtil.toXML(portletPreferences); - } - - private static final String[] _PORTLET_IDS = new String[] { - "2_WAR_knowledgebaseportlet", "3_WAR_knowledgebaseportlet_INSTANCE_%", - "4_WAR_knowledgebaseportlet_INSTANCE_%", "5_WAR_knowledgebaseportlet" - }; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_1/UpgradeKBComment.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_1/UpgradeKBComment.java deleted file mode 100644 index d4d140e1b4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_1/UpgradeKBComment.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_3_1; - -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Adolfo Pérez - */ -public class UpgradeKBComment extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - upgradeIndexes(); - } - - protected void upgradeIndexes() throws Exception { - runSQL("drop index IX_FD56A55D on KBComment"); - - runSQL( - "create index IX_FD56A55D on KBComment(userId, classNameId, " + - "classPK)"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_2/UpgradeKBArticle.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_2/UpgradeKBArticle.java deleted file mode 100644 index e6f066e140..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_2/UpgradeKBArticle.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_3_2; - -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.util.PortalUtil; - -/** - * @author Adolfo Pérez - */ -public class UpgradeKBArticle extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - long kbArticleClassNameId = PortalUtil.getClassNameId( - KBArticleConstants.getClassName()); - - runSQL( - "update KBArticle set parentResourceClassNameId = " + - kbArticleClassNameId + " where parentResourcePrimKey != " + - KBArticleConstants.DEFAULT_PARENT_RESOURCE_PRIM_KEY); - - StringBundler sb = new StringBundler(6); - - sb.append("update KBArticle set parentResourceClassNameId = "); - - long kbFolderClassNameId = PortalUtil.getClassNameId( - KBFolderConstants.getClassName()); - - sb.append(kbFolderClassNameId); - - sb.append(", parentResourcePrimKey = "); - sb.append(KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - sb.append(" where parentResourcePrimKey = "); - sb.append(KBArticleConstants.DEFAULT_PARENT_RESOURCE_PRIM_KEY); - - runSQL(sb.toString()); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_3/UpgradeKBFolder.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_3/UpgradeKBFolder.java deleted file mode 100644 index 6927263cb0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_3/UpgradeKBFolder.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_3_3; - -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.portal.kernel.dao.jdbc.DataAccess; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; -import com.liferay.portal.kernel.util.StringPool; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author Adolfo Pérez - */ -public class UpgradeKBFolder extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - Connection con = null; - - try { - con = DataAccess.getUpgradeOptimizedConnection(); - - Map urlTitles = _getInitialUrlTitles(con); - - for (Map.Entry entry : urlTitles.entrySet()) { - String uniqueUrlTitle = _findUniqueUrlTitle( - con, entry.getValue()); - - for (int i = 1; uniqueUrlTitle == null; i++) { - uniqueUrlTitle = _findUniqueUrlTitle( - con, entry.getValue() + StringPool.DASH + i); - } - - _updateKBFolder(con, entry.getKey(), uniqueUrlTitle); - } - } - finally { - DataAccess.cleanUp(con); - } - } - - private String _findUniqueUrlTitle(Connection con, String urlTitle) - throws SQLException { - - PreparedStatement ps = null; - ResultSet rs = null; - - try { - ps = con.prepareStatement( - "select count(*) from KBFolder where KBFolder.urlTitle like ?"); - - ps.setString(1, urlTitle + "%"); - - rs = ps.executeQuery(); - - if (!rs.next()) { - return urlTitle; - } - - int kbFolderCount = rs.getInt(1); - - if (kbFolderCount == 0) { - return urlTitle; - } - - return null; - } - finally { - DataAccess.cleanUp(ps); - DataAccess.cleanUp(rs); - } - } - - private Map _getInitialUrlTitles(Connection con) - throws SQLException { - - PreparedStatement ps = null; - ResultSet rs = null; - - try { - ps = con.prepareStatement( - "select kbFolderId, name from KBFolder where " + - "(KBFolder.urlTitle is null) or (KBFolder.urlTitle = '')"); - - rs = ps.executeQuery(); - - Map urlTitles = new HashMap(); - - while (rs.next()) { - long kbFolderId = rs.getLong(1); - String name = rs.getString(2); - - String urlTitle = KnowledgeBaseUtil.getUrlTitle( - kbFolderId, name); - - urlTitles.put(kbFolderId, urlTitle); - } - - return urlTitles; - } - finally { - DataAccess.cleanUp(ps); - DataAccess.cleanUp(rs); - } - } - - private void _updateKBFolder( - Connection con, long kbFolderId, String urlTitle) - throws SQLException { - - PreparedStatement ps = null; - - try { - ps = con.prepareStatement( - "update KBFolder set KBFolder.urlTitle = ? where " + - "KBFolder.kbFolderId = ?"); - - ps.setString(1, urlTitle); - ps.setLong(2, kbFolderId); - - ps.execute(); - } - finally { - DataAccess.cleanUp(ps); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_4/UpgradeKBComment.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_4/UpgradeKBComment.java deleted file mode 100644 index 071640e36f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_4/UpgradeKBComment.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_3_4; - -import com.liferay.knowledgebase.model.KBCommentConstants; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -/** - * @author Adolfo Pérez - */ -public class UpgradeKBComment extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - if (!tableHasColumn("KBComment", "helpful")) { - return; - } - - runSQL( - "update KBComment set userRating = " + - KBCommentConstants.USER_RATING_LIKE + " where helpful = TRUE"); - - runSQL( - "update KBComment set userRating = " + - KBCommentConstants.USER_RATING_DISLIKE + - " where helpful = FALSE"); - - runSQL("alter table KBComment drop column helpful"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_4/UpgradePortletPreferences.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_4/UpgradePortletPreferences.java deleted file mode 100644 index b82ea60bcd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_4/UpgradePortletPreferences.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_3_4; - -import com.liferay.portal.kernel.upgrade.BaseUpgradePortletPreferences; -import com.liferay.portlet.PortletPreferencesFactoryUtil; - -import javax.portlet.PortletPreferences; - -/** - * @author Adolfo Pérez - */ -public class UpgradePortletPreferences extends BaseUpgradePortletPreferences { - - @Override - protected String[] getPortletIds() { - return _PORTLET_IDS; - } - - @Override - protected String upgradePreferences( - long companyId, long ownerId, int ownerType, long plid, - String portletId, String xml) - throws Exception { - - PortletPreferences portletPreferences = - PortletPreferencesFactoryUtil.fromXML( - companyId, ownerId, ownerType, plid, portletId, xml); - - for (int i = 0; i < _PREFERENCE_NAMES.length; i++) { - String sourcePreferenceName = _PREFERENCE_NAMES[i][0]; - String targetPreferenceName = _PREFERENCE_NAMES[i][1]; - - String value = portletPreferences.getValue( - sourcePreferenceName, null); - - portletPreferences.setValue(targetPreferenceName, value); - portletPreferences.reset(sourcePreferenceName); - } - - return PortletPreferencesFactoryUtil.toXML(portletPreferences); - } - - private static final String[] _PORTLET_IDS = { - "1_WAR_knowledgebaseportlet" - }; - - private static final String[][] _PREFERENCE_NAMES = { - { - "emailKBArticleFeedbackInProgressEnabled", - "emailKBArticleSuggestionInProgressEnabled" - }, - { - "emailKBArticleFeedbackInProgressSubject", - "emailKBArticleSuggestionInProgressSubject" - }, - { - "emailKBArticleFeedbackInProgressBody", - "emailKBArticleSuggestionInProgressBody" - }, - { - "emailKBArticleFeedbackReceivedEnabled", - "emailKBArticleSuggestionReceivedEnabled" - }, - { - "emailKBArticleFeedbackReceivedSubject", - "emailKBArticleSuggestionReceivedSubject" - }, - { - "emailKBArticleFeedbackReceivedBody", - "emailKBArticleSuggestionReceivedBody" - }, - { - "emailKBArticleFeedbackResolvedEnabled", - "emailKBArticleSuggestionResolvedEnabled" - }, - { - "emailKBArticleFeedbackResolvedSubject", - "emailKBArticleSuggestionResolvedSubject" - }, - { - "emailKBArticleFeedbackResolvedBody", - "emailKBArticleSuggestionResolvedBody" - } - }; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_4/UpgradeResourceAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_4/UpgradeResourceAction.java deleted file mode 100644 index ee67009f63..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/hook/upgrade/v1_3_4/UpgradeResourceAction.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.hook.upgrade.v1_3_4; - -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.portal.kernel.dao.jdbc.DataAccess; -import com.liferay.portal.kernel.upgrade.UpgradeProcess; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -/** - * @author Adolfo Pérez - */ -public class UpgradeResourceAction extends UpgradeProcess { - - @Override - protected void doUpgrade() throws Exception { - if (_hasViewFeedbackResourceAction()) { - runSQL( - "delete from ResourceAction where actionId = '" + - ActionKeys.VIEW_SUGGESTIONS + "'"); - - runSQL( - "update ResourceAction set actionId = '" + - ActionKeys.VIEW_SUGGESTIONS + "' where actionId = '" + - _ACTION_ID_VIEW_KB_FEEDBACK + "'"); - } - } - - private boolean _hasViewFeedbackResourceAction() throws SQLException { - Connection con = null; - PreparedStatement ps = null; - ResultSet rs = null; - - try { - con = DataAccess.getUpgradeOptimizedConnection(); - - ps = con.prepareStatement( - "select count(*) from ResourceAction where actionId = ?"); - - ps.setString(1, _ACTION_ID_VIEW_KB_FEEDBACK); - - rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt(1) > 0; - } - - return false; - } - finally { - DataAccess.cleanUp(con, ps, rs); - } - } - - private static final String _ACTION_ID_VIEW_KB_FEEDBACK = - "VIEW_KB_FEEDBACK"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleBaseImpl.java deleted file mode 100644 index 29d4af98c4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleBaseImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; - -import com.liferay.portal.kernel.exception.SystemException; - -/** - * The extended model base implementation for the KBArticle service. Represents a row in the "KBArticle" database table, with each column mapped to a property of this class. - * - *

    - * 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 KBArticleImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBArticleImpl - * @see com.liferay.knowledgebase.model.KBArticle - * @generated - */ -public abstract class KBArticleBaseImpl extends KBArticleModelImpl - implements KBArticle { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a k b article model instance should use the {@link KBArticle} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - KBArticleLocalServiceUtil.addKBArticle(this); - } - else { - KBArticleLocalServiceUtil.updateKBArticle(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleCacheModel.java deleted file mode 100644 index afbd2dbca8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleCacheModel.java +++ /dev/null @@ -1,370 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBArticle; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -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 KBArticle in entity cache. - * - * @author Brian Wing Shun Chan - * @see KBArticle - * @generated - */ -public class KBArticleCacheModel implements CacheModel, - Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(57); - - sb.append("{uuid="); - sb.append(uuid); - sb.append(", kbArticleId="); - sb.append(kbArticleId); - sb.append(", resourcePrimKey="); - sb.append(resourcePrimKey); - 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(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", rootResourcePrimKey="); - sb.append(rootResourcePrimKey); - sb.append(", parentResourceClassNameId="); - sb.append(parentResourceClassNameId); - sb.append(", parentResourcePrimKey="); - sb.append(parentResourcePrimKey); - sb.append(", kbFolderId="); - sb.append(kbFolderId); - sb.append(", version="); - sb.append(version); - sb.append(", title="); - sb.append(title); - sb.append(", urlTitle="); - sb.append(urlTitle); - sb.append(", content="); - sb.append(content); - sb.append(", description="); - sb.append(description); - sb.append(", priority="); - sb.append(priority); - sb.append(", sections="); - sb.append(sections); - sb.append(", viewCount="); - sb.append(viewCount); - sb.append(", latest="); - sb.append(latest); - sb.append(", main="); - sb.append(main); - sb.append(", sourceURL="); - sb.append(sourceURL); - sb.append(", status="); - sb.append(status); - sb.append(", statusByUserId="); - sb.append(statusByUserId); - sb.append(", statusByUserName="); - sb.append(statusByUserName); - sb.append(", statusDate="); - sb.append(statusDate); - sb.append("}"); - - return sb.toString(); - } - - @Override - public KBArticle toEntityModel() { - KBArticleImpl kbArticleImpl = new KBArticleImpl(); - - if (uuid == null) { - kbArticleImpl.setUuid(StringPool.BLANK); - } - else { - kbArticleImpl.setUuid(uuid); - } - - kbArticleImpl.setKbArticleId(kbArticleId); - kbArticleImpl.setResourcePrimKey(resourcePrimKey); - kbArticleImpl.setGroupId(groupId); - kbArticleImpl.setCompanyId(companyId); - kbArticleImpl.setUserId(userId); - - if (userName == null) { - kbArticleImpl.setUserName(StringPool.BLANK); - } - else { - kbArticleImpl.setUserName(userName); - } - - if (createDate == Long.MIN_VALUE) { - kbArticleImpl.setCreateDate(null); - } - else { - kbArticleImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - kbArticleImpl.setModifiedDate(null); - } - else { - kbArticleImpl.setModifiedDate(new Date(modifiedDate)); - } - - kbArticleImpl.setRootResourcePrimKey(rootResourcePrimKey); - kbArticleImpl.setParentResourceClassNameId(parentResourceClassNameId); - kbArticleImpl.setParentResourcePrimKey(parentResourcePrimKey); - kbArticleImpl.setKbFolderId(kbFolderId); - kbArticleImpl.setVersion(version); - - if (title == null) { - kbArticleImpl.setTitle(StringPool.BLANK); - } - else { - kbArticleImpl.setTitle(title); - } - - if (urlTitle == null) { - kbArticleImpl.setUrlTitle(StringPool.BLANK); - } - else { - kbArticleImpl.setUrlTitle(urlTitle); - } - - if (content == null) { - kbArticleImpl.setContent(StringPool.BLANK); - } - else { - kbArticleImpl.setContent(content); - } - - if (description == null) { - kbArticleImpl.setDescription(StringPool.BLANK); - } - else { - kbArticleImpl.setDescription(description); - } - - kbArticleImpl.setPriority(priority); - - if (sections == null) { - kbArticleImpl.setSections(StringPool.BLANK); - } - else { - kbArticleImpl.setSections(sections); - } - - kbArticleImpl.setViewCount(viewCount); - kbArticleImpl.setLatest(latest); - kbArticleImpl.setMain(main); - - if (sourceURL == null) { - kbArticleImpl.setSourceURL(StringPool.BLANK); - } - else { - kbArticleImpl.setSourceURL(sourceURL); - } - - kbArticleImpl.setStatus(status); - kbArticleImpl.setStatusByUserId(statusByUserId); - - if (statusByUserName == null) { - kbArticleImpl.setStatusByUserName(StringPool.BLANK); - } - else { - kbArticleImpl.setStatusByUserName(statusByUserName); - } - - if (statusDate == Long.MIN_VALUE) { - kbArticleImpl.setStatusDate(null); - } - else { - kbArticleImpl.setStatusDate(new Date(statusDate)); - } - - kbArticleImpl.resetOriginalValues(); - - return kbArticleImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - uuid = objectInput.readUTF(); - kbArticleId = objectInput.readLong(); - resourcePrimKey = objectInput.readLong(); - groupId = objectInput.readLong(); - companyId = objectInput.readLong(); - userId = objectInput.readLong(); - userName = objectInput.readUTF(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - rootResourcePrimKey = objectInput.readLong(); - parentResourceClassNameId = objectInput.readLong(); - parentResourcePrimKey = objectInput.readLong(); - kbFolderId = objectInput.readLong(); - version = objectInput.readInt(); - title = objectInput.readUTF(); - urlTitle = objectInput.readUTF(); - content = objectInput.readUTF(); - description = objectInput.readUTF(); - priority = objectInput.readDouble(); - sections = objectInput.readUTF(); - viewCount = objectInput.readInt(); - latest = objectInput.readBoolean(); - main = objectInput.readBoolean(); - sourceURL = objectInput.readUTF(); - status = objectInput.readInt(); - statusByUserId = objectInput.readLong(); - statusByUserName = objectInput.readUTF(); - statusDate = objectInput.readLong(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - if (uuid == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(uuid); - } - - objectOutput.writeLong(kbArticleId); - objectOutput.writeLong(resourcePrimKey); - objectOutput.writeLong(groupId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(userId); - - if (userName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(userName); - } - - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - objectOutput.writeLong(rootResourcePrimKey); - objectOutput.writeLong(parentResourceClassNameId); - objectOutput.writeLong(parentResourcePrimKey); - objectOutput.writeLong(kbFolderId); - objectOutput.writeInt(version); - - if (title == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(title); - } - - if (urlTitle == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(urlTitle); - } - - if (content == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(content); - } - - if (description == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(description); - } - - objectOutput.writeDouble(priority); - - if (sections == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(sections); - } - - objectOutput.writeInt(viewCount); - objectOutput.writeBoolean(latest); - objectOutput.writeBoolean(main); - - if (sourceURL == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(sourceURL); - } - - objectOutput.writeInt(status); - objectOutput.writeLong(statusByUserId); - - if (statusByUserName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(statusByUserName); - } - - objectOutput.writeLong(statusDate); - } - - public String uuid; - public long kbArticleId; - public long resourcePrimKey; - public long groupId; - public long companyId; - public long userId; - public String userName; - public long createDate; - public long modifiedDate; - public long rootResourcePrimKey; - public long parentResourceClassNameId; - public long parentResourcePrimKey; - public long kbFolderId; - public int version; - public String title; - public String urlTitle; - public String content; - public String description; - public double priority; - public String sections; - public int viewCount; - public boolean latest; - public boolean main; - public String sourceURL; - public int status; - public long statusByUserId; - public String statusByUserName; - public long statusDate; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleImpl.java deleted file mode 100644 index c02bc8e904..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.article.util.KBArticleAttachmentsUtil; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.knowledgebase.service.KBFolderServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.util.PortalUtil; - -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleImpl extends KBArticleBaseImpl { - - public KBArticleImpl() { - } - - @Override - public List getAncestorResourcePrimaryKeys() - throws PortalException, SystemException { - - List ancestorResourcePrimaryKeys = new ArrayList(); - - ancestorResourcePrimaryKeys.add(getResourcePrimKey()); - - KBArticle kbArticle = this; - - while (!kbArticle.isRoot()) { - kbArticle = kbArticle.getParentKBArticle(); - - if (kbArticle == null) { - break; - } - - ancestorResourcePrimaryKeys.add(kbArticle.getResourcePrimKey()); - } - - return ancestorResourcePrimaryKeys; - } - - @Override - public List getAttachmentsFileEntries() - throws PortalException, SystemException { - - return PortletFileRepositoryUtil.getPortletFileEntries( - getGroupId(), getAttachmentsFolderId(), - WorkflowConstants.STATUS_APPROVED); - } - - @Override - public long getAttachmentsFolderId() - throws PortalException, SystemException { - - if (_attachmentsFolderId > 0) { - return _attachmentsFolderId; - } - - _attachmentsFolderId = KBArticleAttachmentsUtil.getFolderId( - getGroupId(), getUserId(), getResourcePrimKey()); - - return _attachmentsFolderId; - } - - @Override - public long getClassNameId() { - if (_classNameId == 0) { - _classNameId = PortalUtil.getClassNameId( - KBArticleConstants.getClassName()); - } - - return _classNameId; - } - - @Override - public long getClassPK() { - if (isApproved() || isPending()) { - return getResourcePrimKey(); - } - - return getKbArticleId(); - } - - @Override - public KBArticle getParentKBArticle() - throws PortalException, SystemException { - - long parentResourcePrimKey = getParentResourcePrimKey(); - - if ((parentResourcePrimKey <= 0) || - (getParentResourceClassNameId() != getClassNameId())) { - - return null; - } - - return KBArticleLocalServiceUtil.getLatestKBArticle( - parentResourcePrimKey, WorkflowConstants.STATUS_APPROVED); - } - - @Override - public String getParentTitle(Locale locale, int status) - throws PortalException, SystemException { - - if (isRoot()) { - return "(" + LanguageUtil.get(locale, "none") + ")"; - } - - if (getParentResourceClassNameId() == getClassNameId()) { - KBArticle kbArticle = KBArticleServiceUtil.getLatestKBArticle( - getParentResourcePrimKey(), status); - - return kbArticle.getTitle(); - } - else { - KBFolder kbFolder = KBFolderServiceUtil.getKBFolder( - getParentResourcePrimKey()); - - return kbFolder.getName(); - } - } - - @Override - public boolean isFirstVersion() { - if (getVersion() == KBArticleConstants.DEFAULT_VERSION) { - return true; - } - - return false; - } - - @Override - public boolean isResourceMain() { - return isMain(); - } - - @Override - public boolean isRoot() { - if (getParentResourcePrimKey() == - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - return true; - } - - return false; - } - - private static Log _log = LogFactoryUtil.getLog(KBArticleImpl.class); - - private long _attachmentsFolderId; - private long _classNameId; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleModelImpl.java deleted file mode 100644 index ea30d5b131..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleModelImpl.java +++ /dev/null @@ -1,1606 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleModel; -import com.liferay.knowledgebase.model.KBArticleSoap; - -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.lar.StagedModelType; -import com.liferay.portal.kernel.util.DateUtil; -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.kernel.workflow.WorkflowConstants; -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 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 KBArticle service. Represents a row in the "KBArticle" database table, with each column mapped to a property of this class. - * - *

    - * This implementation and its corresponding interface {@link com.liferay.knowledgebase.model.KBArticleModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link KBArticleImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBArticleImpl - * @see com.liferay.knowledgebase.model.KBArticle - * @see com.liferay.knowledgebase.model.KBArticleModel - * @generated - */ -@JSON(strict = true) -public class KBArticleModelImpl extends BaseModelImpl - implements KBArticleModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a k b article model instance should use the {@link com.liferay.knowledgebase.model.KBArticle} interface instead. - */ - public static final String TABLE_NAME = "KBArticle"; - public static final Object[][] TABLE_COLUMNS = { - { "uuid_", Types.VARCHAR }, - { "kbArticleId", Types.BIGINT }, - { "resourcePrimKey", Types.BIGINT }, - { "groupId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "userId", Types.BIGINT }, - { "userName", Types.VARCHAR }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "rootResourcePrimKey", Types.BIGINT }, - { "parentResourceClassNameId", Types.BIGINT }, - { "parentResourcePrimKey", Types.BIGINT }, - { "kbFolderId", Types.BIGINT }, - { "version", Types.INTEGER }, - { "title", Types.VARCHAR }, - { "urlTitle", Types.VARCHAR }, - { "content", Types.CLOB }, - { "description", Types.VARCHAR }, - { "priority", Types.DOUBLE }, - { "sections", Types.VARCHAR }, - { "viewCount", Types.INTEGER }, - { "latest", Types.BOOLEAN }, - { "main", Types.BOOLEAN }, - { "sourceURL", Types.VARCHAR }, - { "status", Types.INTEGER }, - { "statusByUserId", Types.BIGINT }, - { "statusByUserName", Types.VARCHAR }, - { "statusDate", Types.TIMESTAMP } - }; - public static final String TABLE_SQL_CREATE = "create table KBArticle (uuid_ VARCHAR(75) null,kbArticleId LONG not null primary key,resourcePrimKey LONG,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,rootResourcePrimKey LONG,parentResourceClassNameId LONG,parentResourcePrimKey LONG,kbFolderId LONG,version INTEGER,title STRING null,urlTitle VARCHAR(75) null,content TEXT null,description STRING null,priority DOUBLE,sections STRING null,viewCount INTEGER,latest BOOLEAN,main BOOLEAN,sourceURL STRING null,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null)"; - public static final String TABLE_SQL_DROP = "drop table KBArticle"; - public static final String ORDER_BY_JPQL = " ORDER BY kbArticle.modifiedDate DESC"; - public static final String ORDER_BY_SQL = " ORDER BY KBArticle.modifiedDate 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.com.liferay.knowledgebase.model.KBArticle"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.com.liferay.knowledgebase.model.KBArticle"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.com.liferay.knowledgebase.model.KBArticle"), - true); - public static long COMPANYID_COLUMN_BITMASK = 1L; - public static long GROUPID_COLUMN_BITMASK = 2L; - public static long KBFOLDERID_COLUMN_BITMASK = 4L; - public static long LATEST_COLUMN_BITMASK = 8L; - public static long MAIN_COLUMN_BITMASK = 16L; - public static long PARENTRESOURCEPRIMKEY_COLUMN_BITMASK = 32L; - public static long RESOURCEPRIMKEY_COLUMN_BITMASK = 64L; - public static long SECTIONS_COLUMN_BITMASK = 128L; - public static long STATUS_COLUMN_BITMASK = 256L; - public static long URLTITLE_COLUMN_BITMASK = 512L; - public static long UUID_COLUMN_BITMASK = 1024L; - public static long VERSION_COLUMN_BITMASK = 2048L; - public static long MODIFIEDDATE_COLUMN_BITMASK = 4096L; - - /** - * 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 KBArticle toModel(KBArticleSoap soapModel) { - if (soapModel == null) { - return null; - } - - KBArticle model = new KBArticleImpl(); - - model.setUuid(soapModel.getUuid()); - model.setKbArticleId(soapModel.getKbArticleId()); - model.setResourcePrimKey(soapModel.getResourcePrimKey()); - model.setGroupId(soapModel.getGroupId()); - model.setCompanyId(soapModel.getCompanyId()); - model.setUserId(soapModel.getUserId()); - model.setUserName(soapModel.getUserName()); - model.setCreateDate(soapModel.getCreateDate()); - model.setModifiedDate(soapModel.getModifiedDate()); - model.setRootResourcePrimKey(soapModel.getRootResourcePrimKey()); - model.setParentResourceClassNameId(soapModel.getParentResourceClassNameId()); - model.setParentResourcePrimKey(soapModel.getParentResourcePrimKey()); - model.setKbFolderId(soapModel.getKbFolderId()); - model.setVersion(soapModel.getVersion()); - model.setTitle(soapModel.getTitle()); - model.setUrlTitle(soapModel.getUrlTitle()); - model.setContent(soapModel.getContent()); - model.setDescription(soapModel.getDescription()); - model.setPriority(soapModel.getPriority()); - model.setSections(soapModel.getSections()); - model.setViewCount(soapModel.getViewCount()); - model.setLatest(soapModel.getLatest()); - model.setMain(soapModel.getMain()); - model.setSourceURL(soapModel.getSourceURL()); - model.setStatus(soapModel.getStatus()); - model.setStatusByUserId(soapModel.getStatusByUserId()); - model.setStatusByUserName(soapModel.getStatusByUserName()); - model.setStatusDate(soapModel.getStatusDate()); - - 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 toModels(KBArticleSoap[] soapModels) { - if (soapModels == null) { - return null; - } - - List models = new ArrayList(soapModels.length); - - for (KBArticleSoap 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.com.liferay.knowledgebase.model.KBArticle")); - - public KBArticleModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _kbArticleId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setKbArticleId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _kbArticleId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return KBArticle.class; - } - - @Override - public String getModelClassName() { - return KBArticle.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbArticleId", getKbArticleId()); - attributes.put("resourcePrimKey", getResourcePrimKey()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("rootResourcePrimKey", getRootResourcePrimKey()); - attributes.put("parentResourceClassNameId", - getParentResourceClassNameId()); - attributes.put("parentResourcePrimKey", getParentResourcePrimKey()); - attributes.put("kbFolderId", getKbFolderId()); - attributes.put("version", getVersion()); - attributes.put("title", getTitle()); - attributes.put("urlTitle", getUrlTitle()); - attributes.put("content", getContent()); - attributes.put("description", getDescription()); - attributes.put("priority", getPriority()); - attributes.put("sections", getSections()); - attributes.put("viewCount", getViewCount()); - attributes.put("latest", getLatest()); - attributes.put("main", getMain()); - attributes.put("sourceURL", getSourceURL()); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", getStatusDate()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbArticleId = (Long)attributes.get("kbArticleId"); - - if (kbArticleId != null) { - setKbArticleId(kbArticleId); - } - - Long resourcePrimKey = (Long)attributes.get("resourcePrimKey"); - - if (resourcePrimKey != null) { - setResourcePrimKey(resourcePrimKey); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long rootResourcePrimKey = (Long)attributes.get("rootResourcePrimKey"); - - if (rootResourcePrimKey != null) { - setRootResourcePrimKey(rootResourcePrimKey); - } - - Long parentResourceClassNameId = (Long)attributes.get( - "parentResourceClassNameId"); - - if (parentResourceClassNameId != null) { - setParentResourceClassNameId(parentResourceClassNameId); - } - - Long parentResourcePrimKey = (Long)attributes.get( - "parentResourcePrimKey"); - - if (parentResourcePrimKey != null) { - setParentResourcePrimKey(parentResourcePrimKey); - } - - Long kbFolderId = (Long)attributes.get("kbFolderId"); - - if (kbFolderId != null) { - setKbFolderId(kbFolderId); - } - - Integer version = (Integer)attributes.get("version"); - - if (version != null) { - setVersion(version); - } - - String title = (String)attributes.get("title"); - - if (title != null) { - setTitle(title); - } - - String urlTitle = (String)attributes.get("urlTitle"); - - if (urlTitle != null) { - setUrlTitle(urlTitle); - } - - String content = (String)attributes.get("content"); - - if (content != null) { - setContent(content); - } - - String description = (String)attributes.get("description"); - - if (description != null) { - setDescription(description); - } - - Double priority = (Double)attributes.get("priority"); - - if (priority != null) { - setPriority(priority); - } - - String sections = (String)attributes.get("sections"); - - if (sections != null) { - setSections(sections); - } - - Integer viewCount = (Integer)attributes.get("viewCount"); - - if (viewCount != null) { - setViewCount(viewCount); - } - - Boolean latest = (Boolean)attributes.get("latest"); - - if (latest != null) { - setLatest(latest); - } - - Boolean main = (Boolean)attributes.get("main"); - - if (main != null) { - setMain(main); - } - - String sourceURL = (String)attributes.get("sourceURL"); - - if (sourceURL != null) { - setSourceURL(sourceURL); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - - Long statusByUserId = (Long)attributes.get("statusByUserId"); - - if (statusByUserId != null) { - setStatusByUserId(statusByUserId); - } - - String statusByUserName = (String)attributes.get("statusByUserName"); - - if (statusByUserName != null) { - setStatusByUserName(statusByUserName); - } - - Date statusDate = (Date)attributes.get("statusDate"); - - if (statusDate != null) { - setStatusDate(statusDate); - } - } - - @JSON - @Override - public String getUuid() { - if (_uuid == null) { - return StringPool.BLANK; - } - else { - return _uuid; - } - } - - @Override - public void setUuid(String uuid) { - if (_originalUuid == null) { - _originalUuid = _uuid; - } - - _uuid = uuid; - } - - public String getOriginalUuid() { - return GetterUtil.getString(_originalUuid); - } - - @JSON - @Override - public long getKbArticleId() { - return _kbArticleId; - } - - @Override - public void setKbArticleId(long kbArticleId) { - _kbArticleId = kbArticleId; - } - - @JSON - @Override - public long getResourcePrimKey() { - return _resourcePrimKey; - } - - @Override - public void setResourcePrimKey(long resourcePrimKey) { - _columnBitmask |= RESOURCEPRIMKEY_COLUMN_BITMASK; - - if (!_setOriginalResourcePrimKey) { - _setOriginalResourcePrimKey = true; - - _originalResourcePrimKey = _resourcePrimKey; - } - - _resourcePrimKey = resourcePrimKey; - } - - @Override - public boolean isResourceMain() { - return true; - } - - public long getOriginalResourcePrimKey() { - return _originalResourcePrimKey; - } - - @JSON - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _columnBitmask |= GROUPID_COLUMN_BITMASK; - - if (!_setOriginalGroupId) { - _setOriginalGroupId = true; - - _originalGroupId = _groupId; - } - - _groupId = groupId; - } - - public long getOriginalGroupId() { - return _originalGroupId; - } - - @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 Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _columnBitmask = -1L; - - _modifiedDate = modifiedDate; - } - - @JSON - @Override - public long getRootResourcePrimKey() { - return _rootResourcePrimKey; - } - - @Override - public void setRootResourcePrimKey(long rootResourcePrimKey) { - _rootResourcePrimKey = rootResourcePrimKey; - } - - @JSON - @Override - public long getParentResourceClassNameId() { - return _parentResourceClassNameId; - } - - @Override - public void setParentResourceClassNameId(long parentResourceClassNameId) { - _parentResourceClassNameId = parentResourceClassNameId; - } - - @JSON - @Override - public long getParentResourcePrimKey() { - return _parentResourcePrimKey; - } - - @Override - public void setParentResourcePrimKey(long parentResourcePrimKey) { - _columnBitmask |= PARENTRESOURCEPRIMKEY_COLUMN_BITMASK; - - if (!_setOriginalParentResourcePrimKey) { - _setOriginalParentResourcePrimKey = true; - - _originalParentResourcePrimKey = _parentResourcePrimKey; - } - - _parentResourcePrimKey = parentResourcePrimKey; - } - - public long getOriginalParentResourcePrimKey() { - return _originalParentResourcePrimKey; - } - - @JSON - @Override - public long getKbFolderId() { - return _kbFolderId; - } - - @Override - public void setKbFolderId(long kbFolderId) { - _columnBitmask |= KBFOLDERID_COLUMN_BITMASK; - - if (!_setOriginalKbFolderId) { - _setOriginalKbFolderId = true; - - _originalKbFolderId = _kbFolderId; - } - - _kbFolderId = kbFolderId; - } - - public long getOriginalKbFolderId() { - return _originalKbFolderId; - } - - @JSON - @Override - public int getVersion() { - return _version; - } - - @Override - public void setVersion(int version) { - _columnBitmask |= VERSION_COLUMN_BITMASK; - - if (!_setOriginalVersion) { - _setOriginalVersion = true; - - _originalVersion = _version; - } - - _version = version; - } - - public int getOriginalVersion() { - return _originalVersion; - } - - @JSON - @Override - public String getTitle() { - if (_title == null) { - return StringPool.BLANK; - } - else { - return _title; - } - } - - @Override - public void setTitle(String title) { - _title = title; - } - - @JSON - @Override - public String getUrlTitle() { - if (_urlTitle == null) { - return StringPool.BLANK; - } - else { - return _urlTitle; - } - } - - @Override - public void setUrlTitle(String urlTitle) { - _columnBitmask |= URLTITLE_COLUMN_BITMASK; - - if (_originalUrlTitle == null) { - _originalUrlTitle = _urlTitle; - } - - _urlTitle = urlTitle; - } - - public String getOriginalUrlTitle() { - return GetterUtil.getString(_originalUrlTitle); - } - - @JSON - @Override - public String getContent() { - if (_content == null) { - return StringPool.BLANK; - } - else { - return _content; - } - } - - @Override - public void setContent(String content) { - _content = content; - } - - @JSON - @Override - public String getDescription() { - if (_description == null) { - return StringPool.BLANK; - } - else { - return _description; - } - } - - @Override - public void setDescription(String description) { - _description = description; - } - - @JSON - @Override - public double getPriority() { - return _priority; - } - - @Override - public void setPriority(double priority) { - _priority = priority; - } - - @JSON - @Override - public String getSections() { - if (_sections == null) { - return StringPool.BLANK; - } - else { - return _sections; - } - } - - @Override - public void setSections(String sections) { - _columnBitmask |= SECTIONS_COLUMN_BITMASK; - - if (_originalSections == null) { - _originalSections = _sections; - } - - _sections = sections; - } - - public String getOriginalSections() { - return GetterUtil.getString(_originalSections); - } - - @JSON - @Override - public int getViewCount() { - return _viewCount; - } - - @Override - public void setViewCount(int viewCount) { - _viewCount = viewCount; - } - - @JSON - @Override - public boolean getLatest() { - return _latest; - } - - @Override - public boolean isLatest() { - return _latest; - } - - @Override - public void setLatest(boolean latest) { - _columnBitmask |= LATEST_COLUMN_BITMASK; - - if (!_setOriginalLatest) { - _setOriginalLatest = true; - - _originalLatest = _latest; - } - - _latest = latest; - } - - public boolean getOriginalLatest() { - return _originalLatest; - } - - @JSON - @Override - public boolean getMain() { - return _main; - } - - @Override - public boolean isMain() { - return _main; - } - - @Override - public void setMain(boolean main) { - _columnBitmask |= MAIN_COLUMN_BITMASK; - - if (!_setOriginalMain) { - _setOriginalMain = true; - - _originalMain = _main; - } - - _main = main; - } - - public boolean getOriginalMain() { - return _originalMain; - } - - @JSON - @Override - public String getSourceURL() { - if (_sourceURL == null) { - return StringPool.BLANK; - } - else { - return _sourceURL; - } - } - - @Override - public void setSourceURL(String sourceURL) { - _sourceURL = sourceURL; - } - - @JSON - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _columnBitmask |= STATUS_COLUMN_BITMASK; - - if (!_setOriginalStatus) { - _setOriginalStatus = true; - - _originalStatus = _status; - } - - _status = status; - } - - public int getOriginalStatus() { - return _originalStatus; - } - - @JSON - @Override - public long getStatusByUserId() { - return _statusByUserId; - } - - @Override - public void setStatusByUserId(long statusByUserId) { - _statusByUserId = statusByUserId; - } - - @Override - public String getStatusByUserUuid() throws SystemException { - return PortalUtil.getUserValue(getStatusByUserId(), "uuid", - _statusByUserUuid); - } - - @Override - public void setStatusByUserUuid(String statusByUserUuid) { - _statusByUserUuid = statusByUserUuid; - } - - @JSON - @Override - public String getStatusByUserName() { - if (_statusByUserName == null) { - return StringPool.BLANK; - } - else { - return _statusByUserName; - } - } - - @Override - public void setStatusByUserName(String statusByUserName) { - _statusByUserName = statusByUserName; - } - - @JSON - @Override - public Date getStatusDate() { - return _statusDate; - } - - @Override - public void setStatusDate(Date statusDate) { - _statusDate = statusDate; - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBArticle.class.getName())); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #isApproved} - */ - @Override - public boolean getApproved() { - return isApproved(); - } - - @Override - public boolean isApproved() { - if (getStatus() == WorkflowConstants.STATUS_APPROVED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDenied() { - if (getStatus() == WorkflowConstants.STATUS_DENIED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isDraft() { - if (getStatus() == WorkflowConstants.STATUS_DRAFT) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isExpired() { - if (getStatus() == WorkflowConstants.STATUS_EXPIRED) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isInactive() { - if (getStatus() == WorkflowConstants.STATUS_INACTIVE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isIncomplete() { - if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isPending() { - if (getStatus() == WorkflowConstants.STATUS_PENDING) { - return true; - } - else { - return false; - } - } - - @Override - public boolean isScheduled() { - if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) { - return true; - } - else { - return false; - } - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - KBArticle.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public KBArticle toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (KBArticle)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - KBArticleImpl kbArticleImpl = new KBArticleImpl(); - - kbArticleImpl.setUuid(getUuid()); - kbArticleImpl.setKbArticleId(getKbArticleId()); - kbArticleImpl.setResourcePrimKey(getResourcePrimKey()); - kbArticleImpl.setGroupId(getGroupId()); - kbArticleImpl.setCompanyId(getCompanyId()); - kbArticleImpl.setUserId(getUserId()); - kbArticleImpl.setUserName(getUserName()); - kbArticleImpl.setCreateDate(getCreateDate()); - kbArticleImpl.setModifiedDate(getModifiedDate()); - kbArticleImpl.setRootResourcePrimKey(getRootResourcePrimKey()); - kbArticleImpl.setParentResourceClassNameId(getParentResourceClassNameId()); - kbArticleImpl.setParentResourcePrimKey(getParentResourcePrimKey()); - kbArticleImpl.setKbFolderId(getKbFolderId()); - kbArticleImpl.setVersion(getVersion()); - kbArticleImpl.setTitle(getTitle()); - kbArticleImpl.setUrlTitle(getUrlTitle()); - kbArticleImpl.setContent(getContent()); - kbArticleImpl.setDescription(getDescription()); - kbArticleImpl.setPriority(getPriority()); - kbArticleImpl.setSections(getSections()); - kbArticleImpl.setViewCount(getViewCount()); - kbArticleImpl.setLatest(getLatest()); - kbArticleImpl.setMain(getMain()); - kbArticleImpl.setSourceURL(getSourceURL()); - kbArticleImpl.setStatus(getStatus()); - kbArticleImpl.setStatusByUserId(getStatusByUserId()); - kbArticleImpl.setStatusByUserName(getStatusByUserName()); - kbArticleImpl.setStatusDate(getStatusDate()); - - kbArticleImpl.resetOriginalValues(); - - return kbArticleImpl; - } - - @Override - public int compareTo(KBArticle kbArticle) { - int value = 0; - - value = DateUtil.compareTo(getModifiedDate(), - kbArticle.getModifiedDate()); - - value = value * -1; - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBArticle)) { - return false; - } - - KBArticle kbArticle = (KBArticle)obj; - - long primaryKey = kbArticle.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - KBArticleModelImpl kbArticleModelImpl = this; - - kbArticleModelImpl._originalUuid = kbArticleModelImpl._uuid; - - kbArticleModelImpl._originalResourcePrimKey = kbArticleModelImpl._resourcePrimKey; - - kbArticleModelImpl._setOriginalResourcePrimKey = false; - - kbArticleModelImpl._originalGroupId = kbArticleModelImpl._groupId; - - kbArticleModelImpl._setOriginalGroupId = false; - - kbArticleModelImpl._originalCompanyId = kbArticleModelImpl._companyId; - - kbArticleModelImpl._setOriginalCompanyId = false; - - kbArticleModelImpl._originalParentResourcePrimKey = kbArticleModelImpl._parentResourcePrimKey; - - kbArticleModelImpl._setOriginalParentResourcePrimKey = false; - - kbArticleModelImpl._originalKbFolderId = kbArticleModelImpl._kbFolderId; - - kbArticleModelImpl._setOriginalKbFolderId = false; - - kbArticleModelImpl._originalVersion = kbArticleModelImpl._version; - - kbArticleModelImpl._setOriginalVersion = false; - - kbArticleModelImpl._originalUrlTitle = kbArticleModelImpl._urlTitle; - - kbArticleModelImpl._originalSections = kbArticleModelImpl._sections; - - kbArticleModelImpl._originalLatest = kbArticleModelImpl._latest; - - kbArticleModelImpl._setOriginalLatest = false; - - kbArticleModelImpl._originalMain = kbArticleModelImpl._main; - - kbArticleModelImpl._setOriginalMain = false; - - kbArticleModelImpl._originalStatus = kbArticleModelImpl._status; - - kbArticleModelImpl._setOriginalStatus = false; - - kbArticleModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - KBArticleCacheModel kbArticleCacheModel = new KBArticleCacheModel(); - - kbArticleCacheModel.uuid = getUuid(); - - String uuid = kbArticleCacheModel.uuid; - - if ((uuid != null) && (uuid.length() == 0)) { - kbArticleCacheModel.uuid = null; - } - - kbArticleCacheModel.kbArticleId = getKbArticleId(); - - kbArticleCacheModel.resourcePrimKey = getResourcePrimKey(); - - kbArticleCacheModel.groupId = getGroupId(); - - kbArticleCacheModel.companyId = getCompanyId(); - - kbArticleCacheModel.userId = getUserId(); - - kbArticleCacheModel.userName = getUserName(); - - String userName = kbArticleCacheModel.userName; - - if ((userName != null) && (userName.length() == 0)) { - kbArticleCacheModel.userName = null; - } - - Date createDate = getCreateDate(); - - if (createDate != null) { - kbArticleCacheModel.createDate = createDate.getTime(); - } - else { - kbArticleCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - kbArticleCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - kbArticleCacheModel.modifiedDate = Long.MIN_VALUE; - } - - kbArticleCacheModel.rootResourcePrimKey = getRootResourcePrimKey(); - - kbArticleCacheModel.parentResourceClassNameId = getParentResourceClassNameId(); - - kbArticleCacheModel.parentResourcePrimKey = getParentResourcePrimKey(); - - kbArticleCacheModel.kbFolderId = getKbFolderId(); - - kbArticleCacheModel.version = getVersion(); - - kbArticleCacheModel.title = getTitle(); - - String title = kbArticleCacheModel.title; - - if ((title != null) && (title.length() == 0)) { - kbArticleCacheModel.title = null; - } - - kbArticleCacheModel.urlTitle = getUrlTitle(); - - String urlTitle = kbArticleCacheModel.urlTitle; - - if ((urlTitle != null) && (urlTitle.length() == 0)) { - kbArticleCacheModel.urlTitle = null; - } - - kbArticleCacheModel.content = getContent(); - - String content = kbArticleCacheModel.content; - - if ((content != null) && (content.length() == 0)) { - kbArticleCacheModel.content = null; - } - - kbArticleCacheModel.description = getDescription(); - - String description = kbArticleCacheModel.description; - - if ((description != null) && (description.length() == 0)) { - kbArticleCacheModel.description = null; - } - - kbArticleCacheModel.priority = getPriority(); - - kbArticleCacheModel.sections = getSections(); - - String sections = kbArticleCacheModel.sections; - - if ((sections != null) && (sections.length() == 0)) { - kbArticleCacheModel.sections = null; - } - - kbArticleCacheModel.viewCount = getViewCount(); - - kbArticleCacheModel.latest = getLatest(); - - kbArticleCacheModel.main = getMain(); - - kbArticleCacheModel.sourceURL = getSourceURL(); - - String sourceURL = kbArticleCacheModel.sourceURL; - - if ((sourceURL != null) && (sourceURL.length() == 0)) { - kbArticleCacheModel.sourceURL = null; - } - - kbArticleCacheModel.status = getStatus(); - - kbArticleCacheModel.statusByUserId = getStatusByUserId(); - - kbArticleCacheModel.statusByUserName = getStatusByUserName(); - - String statusByUserName = kbArticleCacheModel.statusByUserName; - - if ((statusByUserName != null) && (statusByUserName.length() == 0)) { - kbArticleCacheModel.statusByUserName = null; - } - - Date statusDate = getStatusDate(); - - if (statusDate != null) { - kbArticleCacheModel.statusDate = statusDate.getTime(); - } - else { - kbArticleCacheModel.statusDate = Long.MIN_VALUE; - } - - return kbArticleCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(57); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", kbArticleId="); - sb.append(getKbArticleId()); - sb.append(", resourcePrimKey="); - sb.append(getResourcePrimKey()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", rootResourcePrimKey="); - sb.append(getRootResourcePrimKey()); - sb.append(", parentResourceClassNameId="); - sb.append(getParentResourceClassNameId()); - sb.append(", parentResourcePrimKey="); - sb.append(getParentResourcePrimKey()); - sb.append(", kbFolderId="); - sb.append(getKbFolderId()); - sb.append(", version="); - sb.append(getVersion()); - sb.append(", title="); - sb.append(getTitle()); - sb.append(", urlTitle="); - sb.append(getUrlTitle()); - sb.append(", content="); - sb.append(getContent()); - sb.append(", description="); - sb.append(getDescription()); - sb.append(", priority="); - sb.append(getPriority()); - sb.append(", sections="); - sb.append(getSections()); - sb.append(", viewCount="); - sb.append(getViewCount()); - sb.append(", latest="); - sb.append(getLatest()); - sb.append(", main="); - sb.append(getMain()); - sb.append(", sourceURL="); - sb.append(getSourceURL()); - sb.append(", status="); - sb.append(getStatus()); - sb.append(", statusByUserId="); - sb.append(getStatusByUserId()); - sb.append(", statusByUserName="); - sb.append(getStatusByUserName()); - sb.append(", statusDate="); - sb.append(getStatusDate()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(88); - - sb.append(""); - sb.append("com.liferay.knowledgebase.model.KBArticle"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "kbArticleId"); - sb.append( - "resourcePrimKey"); - sb.append( - "groupId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "rootResourcePrimKey"); - sb.append( - "parentResourceClassNameId"); - sb.append( - "parentResourcePrimKey"); - sb.append( - "kbFolderId"); - sb.append( - "version"); - sb.append( - "title"); - sb.append( - "urlTitle"); - sb.append( - "content"); - sb.append( - "description"); - sb.append( - "priority"); - sb.append( - "sections"); - sb.append( - "viewCount"); - sb.append( - "latest"); - sb.append( - "main"); - sb.append( - "sourceURL"); - sb.append( - "status"); - sb.append( - "statusByUserId"); - sb.append( - "statusByUserName"); - sb.append( - "statusDate"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = KBArticle.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { - KBArticle.class - }; - private String _uuid; - private String _originalUuid; - private long _kbArticleId; - private long _resourcePrimKey; - private long _originalResourcePrimKey; - private boolean _setOriginalResourcePrimKey; - private long _groupId; - private long _originalGroupId; - private boolean _setOriginalGroupId; - private long _companyId; - private long _originalCompanyId; - private boolean _setOriginalCompanyId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _rootResourcePrimKey; - private long _parentResourceClassNameId; - private long _parentResourcePrimKey; - private long _originalParentResourcePrimKey; - private boolean _setOriginalParentResourcePrimKey; - private long _kbFolderId; - private long _originalKbFolderId; - private boolean _setOriginalKbFolderId; - private int _version; - private int _originalVersion; - private boolean _setOriginalVersion; - private String _title; - private String _urlTitle; - private String _originalUrlTitle; - private String _content; - private String _description; - private double _priority; - private String _sections; - private String _originalSections; - private int _viewCount; - private boolean _latest; - private boolean _originalLatest; - private boolean _setOriginalLatest; - private boolean _main; - private boolean _originalMain; - private boolean _setOriginalMain; - private String _sourceURL; - private int _status; - private int _originalStatus; - private boolean _setOriginalStatus; - private long _statusByUserId; - private String _statusByUserUuid; - private String _statusByUserName; - private Date _statusDate; - private long _columnBitmask; - private KBArticle _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleSearchDisplayImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleSearchDisplayImpl.java deleted file mode 100644 index 722a8343c5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBArticleSearchDisplayImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleSearchDisplay; - -import java.util.List; - -/** - * @author Peter Shin - */ -public class KBArticleSearchDisplayImpl implements KBArticleSearchDisplay { - - public KBArticleSearchDisplayImpl( - List results, int total, int[] curStartValues) { - - _results = results; - _total = total; - _curStartValues = curStartValues; - } - - @Override - public int[] getCurStartValues() { - return _curStartValues; - } - - @Override - public List getResults() { - return _results; - } - - @Override - public int getTotal() { - return _total; - } - - @Override - public void setCurStartValues(int[] curStartValues) { - _curStartValues = curStartValues; - } - - @Override - public void setResults(List results) { - _results = results; - } - - @Override - public void setTotal(int total) { - _total = total; - } - - private int[] _curStartValues; - private List _results; - private int _total; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentBaseImpl.java deleted file mode 100644 index 38b127c5c7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentBaseImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.service.KBCommentLocalServiceUtil; - -import com.liferay.portal.kernel.exception.SystemException; - -/** - * The extended model base implementation for the KBComment service. Represents a row in the "KBComment" database table, with each column mapped to a property of this class. - * - *

    - * 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 KBCommentImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBCommentImpl - * @see com.liferay.knowledgebase.model.KBComment - * @generated - */ -public abstract class KBCommentBaseImpl extends KBCommentModelImpl - implements KBComment { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a k b comment model instance should use the {@link KBComment} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - KBCommentLocalServiceUtil.addKBComment(this); - } - else { - KBCommentLocalServiceUtil.updateKBComment(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentCacheModel.java deleted file mode 100644 index 17c75aa110..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentCacheModel.java +++ /dev/null @@ -1,197 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBComment; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -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 KBComment in entity cache. - * - * @author Brian Wing Shun Chan - * @see KBComment - * @generated - */ -public class KBCommentCacheModel implements CacheModel, - Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(27); - - sb.append("{uuid="); - sb.append(uuid); - sb.append(", kbCommentId="); - sb.append(kbCommentId); - 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(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", classNameId="); - sb.append(classNameId); - sb.append(", classPK="); - sb.append(classPK); - sb.append(", content="); - sb.append(content); - sb.append(", userRating="); - sb.append(userRating); - sb.append(", status="); - sb.append(status); - sb.append("}"); - - return sb.toString(); - } - - @Override - public KBComment toEntityModel() { - KBCommentImpl kbCommentImpl = new KBCommentImpl(); - - if (uuid == null) { - kbCommentImpl.setUuid(StringPool.BLANK); - } - else { - kbCommentImpl.setUuid(uuid); - } - - kbCommentImpl.setKbCommentId(kbCommentId); - kbCommentImpl.setGroupId(groupId); - kbCommentImpl.setCompanyId(companyId); - kbCommentImpl.setUserId(userId); - - if (userName == null) { - kbCommentImpl.setUserName(StringPool.BLANK); - } - else { - kbCommentImpl.setUserName(userName); - } - - if (createDate == Long.MIN_VALUE) { - kbCommentImpl.setCreateDate(null); - } - else { - kbCommentImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - kbCommentImpl.setModifiedDate(null); - } - else { - kbCommentImpl.setModifiedDate(new Date(modifiedDate)); - } - - kbCommentImpl.setClassNameId(classNameId); - kbCommentImpl.setClassPK(classPK); - - if (content == null) { - kbCommentImpl.setContent(StringPool.BLANK); - } - else { - kbCommentImpl.setContent(content); - } - - kbCommentImpl.setUserRating(userRating); - kbCommentImpl.setStatus(status); - - kbCommentImpl.resetOriginalValues(); - - return kbCommentImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - uuid = objectInput.readUTF(); - kbCommentId = objectInput.readLong(); - groupId = objectInput.readLong(); - companyId = objectInput.readLong(); - userId = objectInput.readLong(); - userName = objectInput.readUTF(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - classNameId = objectInput.readLong(); - classPK = objectInput.readLong(); - content = objectInput.readUTF(); - userRating = objectInput.readInt(); - status = objectInput.readInt(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - if (uuid == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(uuid); - } - - objectOutput.writeLong(kbCommentId); - objectOutput.writeLong(groupId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(userId); - - if (userName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(userName); - } - - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - objectOutput.writeLong(classNameId); - objectOutput.writeLong(classPK); - - if (content == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(content); - } - - objectOutput.writeInt(userRating); - objectOutput.writeInt(status); - } - - public String uuid; - public long kbCommentId; - public long groupId; - public long companyId; - public long userId; - public String userName; - public long createDate; - public long modifiedDate; - public long classNameId; - public long classPK; - public String content; - public int userRating; - public int status; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentImpl.java deleted file mode 100644 index 54585d43c6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.portal.kernel.lar.StagedModelType; - -/** - * @author Peter Shin - * @author Daniel Kocsis - */ -public class KBCommentImpl extends KBCommentBaseImpl { - - public KBCommentImpl() { - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(KBComment.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentModelImpl.java deleted file mode 100644 index cebfb73050..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBCommentModelImpl.java +++ /dev/null @@ -1,900 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.model.KBCommentModel; -import com.liferay.knowledgebase.model.KBCommentSoap; - -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.lar.StagedModelType; -import com.liferay.portal.kernel.util.DateUtil; -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.kernel.util.Validator; -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 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 KBComment service. Represents a row in the "KBComment" database table, with each column mapped to a property of this class. - * - *

    - * This implementation and its corresponding interface {@link com.liferay.knowledgebase.model.KBCommentModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link KBCommentImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBCommentImpl - * @see com.liferay.knowledgebase.model.KBComment - * @see com.liferay.knowledgebase.model.KBCommentModel - * @generated - */ -@JSON(strict = true) -public class KBCommentModelImpl extends BaseModelImpl - implements KBCommentModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a k b comment model instance should use the {@link com.liferay.knowledgebase.model.KBComment} interface instead. - */ - public static final String TABLE_NAME = "KBComment"; - public static final Object[][] TABLE_COLUMNS = { - { "uuid_", Types.VARCHAR }, - { "kbCommentId", Types.BIGINT }, - { "groupId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "userId", Types.BIGINT }, - { "userName", Types.VARCHAR }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "classNameId", Types.BIGINT }, - { "classPK", Types.BIGINT }, - { "content", Types.VARCHAR }, - { "userRating", Types.INTEGER }, - { "status", Types.INTEGER } - }; - public static final String TABLE_SQL_CREATE = "create table KBComment (uuid_ VARCHAR(75) null,kbCommentId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,classNameId LONG,classPK LONG,content STRING null,userRating INTEGER,status INTEGER)"; - public static final String TABLE_SQL_DROP = "drop table KBComment"; - public static final String ORDER_BY_JPQL = " ORDER BY kbComment.modifiedDate DESC"; - public static final String ORDER_BY_SQL = " ORDER BY KBComment.modifiedDate 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.com.liferay.knowledgebase.model.KBComment"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.com.liferay.knowledgebase.model.KBComment"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.com.liferay.knowledgebase.model.KBComment"), - true); - public static long CLASSNAMEID_COLUMN_BITMASK = 1L; - public static long CLASSPK_COLUMN_BITMASK = 2L; - public static long COMPANYID_COLUMN_BITMASK = 4L; - public static long GROUPID_COLUMN_BITMASK = 8L; - public static long STATUS_COLUMN_BITMASK = 16L; - public static long USERID_COLUMN_BITMASK = 32L; - public static long UUID_COLUMN_BITMASK = 64L; - public static long MODIFIEDDATE_COLUMN_BITMASK = 128L; - - /** - * 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 KBComment toModel(KBCommentSoap soapModel) { - if (soapModel == null) { - return null; - } - - KBComment model = new KBCommentImpl(); - - model.setUuid(soapModel.getUuid()); - model.setKbCommentId(soapModel.getKbCommentId()); - model.setGroupId(soapModel.getGroupId()); - model.setCompanyId(soapModel.getCompanyId()); - model.setUserId(soapModel.getUserId()); - model.setUserName(soapModel.getUserName()); - model.setCreateDate(soapModel.getCreateDate()); - model.setModifiedDate(soapModel.getModifiedDate()); - model.setClassNameId(soapModel.getClassNameId()); - model.setClassPK(soapModel.getClassPK()); - model.setContent(soapModel.getContent()); - model.setUserRating(soapModel.getUserRating()); - model.setStatus(soapModel.getStatus()); - - 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 toModels(KBCommentSoap[] soapModels) { - if (soapModels == null) { - return null; - } - - List models = new ArrayList(soapModels.length); - - for (KBCommentSoap 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.com.liferay.knowledgebase.model.KBComment")); - - public KBCommentModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _kbCommentId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setKbCommentId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _kbCommentId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return KBComment.class; - } - - @Override - public String getModelClassName() { - return KBComment.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbCommentId", getKbCommentId()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("classNameId", getClassNameId()); - attributes.put("classPK", getClassPK()); - attributes.put("content", getContent()); - attributes.put("userRating", getUserRating()); - attributes.put("status", getStatus()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbCommentId = (Long)attributes.get("kbCommentId"); - - if (kbCommentId != null) { - setKbCommentId(kbCommentId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long classNameId = (Long)attributes.get("classNameId"); - - if (classNameId != null) { - setClassNameId(classNameId); - } - - Long classPK = (Long)attributes.get("classPK"); - - if (classPK != null) { - setClassPK(classPK); - } - - String content = (String)attributes.get("content"); - - if (content != null) { - setContent(content); - } - - Integer userRating = (Integer)attributes.get("userRating"); - - if (userRating != null) { - setUserRating(userRating); - } - - Integer status = (Integer)attributes.get("status"); - - if (status != null) { - setStatus(status); - } - } - - @JSON - @Override - public String getUuid() { - if (_uuid == null) { - return StringPool.BLANK; - } - else { - return _uuid; - } - } - - @Override - public void setUuid(String uuid) { - if (_originalUuid == null) { - _originalUuid = _uuid; - } - - _uuid = uuid; - } - - public String getOriginalUuid() { - return GetterUtil.getString(_originalUuid); - } - - @JSON - @Override - public long getKbCommentId() { - return _kbCommentId; - } - - @Override - public void setKbCommentId(long kbCommentId) { - _kbCommentId = kbCommentId; - } - - @JSON - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _columnBitmask |= GROUPID_COLUMN_BITMASK; - - if (!_setOriginalGroupId) { - _setOriginalGroupId = true; - - _originalGroupId = _groupId; - } - - _groupId = groupId; - } - - public long getOriginalGroupId() { - return _originalGroupId; - } - - @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) { - _columnBitmask |= USERID_COLUMN_BITMASK; - - if (!_setOriginalUserId) { - _setOriginalUserId = true; - - _originalUserId = _userId; - } - - _userId = userId; - } - - @Override - public String getUserUuid() throws SystemException { - return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid); - } - - @Override - public void setUserUuid(String userUuid) { - _userUuid = userUuid; - } - - public long getOriginalUserId() { - return _originalUserId; - } - - @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 Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _columnBitmask = -1L; - - _modifiedDate = modifiedDate; - } - - @Override - public String getClassName() { - if (getClassNameId() <= 0) { - return StringPool.BLANK; - } - - return PortalUtil.getClassName(getClassNameId()); - } - - @Override - public void setClassName(String className) { - long classNameId = 0; - - if (Validator.isNotNull(className)) { - classNameId = PortalUtil.getClassNameId(className); - } - - setClassNameId(classNameId); - } - - @JSON - @Override - public long getClassNameId() { - return _classNameId; - } - - @Override - public void setClassNameId(long classNameId) { - _columnBitmask |= CLASSNAMEID_COLUMN_BITMASK; - - if (!_setOriginalClassNameId) { - _setOriginalClassNameId = true; - - _originalClassNameId = _classNameId; - } - - _classNameId = classNameId; - } - - public long getOriginalClassNameId() { - return _originalClassNameId; - } - - @JSON - @Override - public long getClassPK() { - return _classPK; - } - - @Override - public void setClassPK(long classPK) { - _columnBitmask |= CLASSPK_COLUMN_BITMASK; - - if (!_setOriginalClassPK) { - _setOriginalClassPK = true; - - _originalClassPK = _classPK; - } - - _classPK = classPK; - } - - public long getOriginalClassPK() { - return _originalClassPK; - } - - @JSON - @Override - public String getContent() { - if (_content == null) { - return StringPool.BLANK; - } - else { - return _content; - } - } - - @Override - public void setContent(String content) { - _content = content; - } - - @JSON - @Override - public int getUserRating() { - return _userRating; - } - - @Override - public void setUserRating(int userRating) { - _userRating = userRating; - } - - @JSON - @Override - public int getStatus() { - return _status; - } - - @Override - public void setStatus(int status) { - _columnBitmask |= STATUS_COLUMN_BITMASK; - - if (!_setOriginalStatus) { - _setOriginalStatus = true; - - _originalStatus = _status; - } - - _status = status; - } - - public int getOriginalStatus() { - return _originalStatus; - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBComment.class.getName()), getClassNameId()); - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - KBComment.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public KBComment toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (KBComment)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - KBCommentImpl kbCommentImpl = new KBCommentImpl(); - - kbCommentImpl.setUuid(getUuid()); - kbCommentImpl.setKbCommentId(getKbCommentId()); - kbCommentImpl.setGroupId(getGroupId()); - kbCommentImpl.setCompanyId(getCompanyId()); - kbCommentImpl.setUserId(getUserId()); - kbCommentImpl.setUserName(getUserName()); - kbCommentImpl.setCreateDate(getCreateDate()); - kbCommentImpl.setModifiedDate(getModifiedDate()); - kbCommentImpl.setClassNameId(getClassNameId()); - kbCommentImpl.setClassPK(getClassPK()); - kbCommentImpl.setContent(getContent()); - kbCommentImpl.setUserRating(getUserRating()); - kbCommentImpl.setStatus(getStatus()); - - kbCommentImpl.resetOriginalValues(); - - return kbCommentImpl; - } - - @Override - public int compareTo(KBComment kbComment) { - int value = 0; - - value = DateUtil.compareTo(getModifiedDate(), - kbComment.getModifiedDate()); - - value = value * -1; - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBComment)) { - return false; - } - - KBComment kbComment = (KBComment)obj; - - long primaryKey = kbComment.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - KBCommentModelImpl kbCommentModelImpl = this; - - kbCommentModelImpl._originalUuid = kbCommentModelImpl._uuid; - - kbCommentModelImpl._originalGroupId = kbCommentModelImpl._groupId; - - kbCommentModelImpl._setOriginalGroupId = false; - - kbCommentModelImpl._originalCompanyId = kbCommentModelImpl._companyId; - - kbCommentModelImpl._setOriginalCompanyId = false; - - kbCommentModelImpl._originalUserId = kbCommentModelImpl._userId; - - kbCommentModelImpl._setOriginalUserId = false; - - kbCommentModelImpl._originalClassNameId = kbCommentModelImpl._classNameId; - - kbCommentModelImpl._setOriginalClassNameId = false; - - kbCommentModelImpl._originalClassPK = kbCommentModelImpl._classPK; - - kbCommentModelImpl._setOriginalClassPK = false; - - kbCommentModelImpl._originalStatus = kbCommentModelImpl._status; - - kbCommentModelImpl._setOriginalStatus = false; - - kbCommentModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - KBCommentCacheModel kbCommentCacheModel = new KBCommentCacheModel(); - - kbCommentCacheModel.uuid = getUuid(); - - String uuid = kbCommentCacheModel.uuid; - - if ((uuid != null) && (uuid.length() == 0)) { - kbCommentCacheModel.uuid = null; - } - - kbCommentCacheModel.kbCommentId = getKbCommentId(); - - kbCommentCacheModel.groupId = getGroupId(); - - kbCommentCacheModel.companyId = getCompanyId(); - - kbCommentCacheModel.userId = getUserId(); - - kbCommentCacheModel.userName = getUserName(); - - String userName = kbCommentCacheModel.userName; - - if ((userName != null) && (userName.length() == 0)) { - kbCommentCacheModel.userName = null; - } - - Date createDate = getCreateDate(); - - if (createDate != null) { - kbCommentCacheModel.createDate = createDate.getTime(); - } - else { - kbCommentCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - kbCommentCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - kbCommentCacheModel.modifiedDate = Long.MIN_VALUE; - } - - kbCommentCacheModel.classNameId = getClassNameId(); - - kbCommentCacheModel.classPK = getClassPK(); - - kbCommentCacheModel.content = getContent(); - - String content = kbCommentCacheModel.content; - - if ((content != null) && (content.length() == 0)) { - kbCommentCacheModel.content = null; - } - - kbCommentCacheModel.userRating = getUserRating(); - - kbCommentCacheModel.status = getStatus(); - - return kbCommentCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(27); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", kbCommentId="); - sb.append(getKbCommentId()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", classNameId="); - sb.append(getClassNameId()); - sb.append(", classPK="); - sb.append(getClassPK()); - sb.append(", content="); - sb.append(getContent()); - sb.append(", userRating="); - sb.append(getUserRating()); - sb.append(", status="); - sb.append(getStatus()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(43); - - sb.append(""); - sb.append("com.liferay.knowledgebase.model.KBComment"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "kbCommentId"); - sb.append( - "groupId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "classNameId"); - sb.append( - "classPK"); - sb.append( - "content"); - sb.append( - "userRating"); - sb.append( - "status"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = KBComment.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { - KBComment.class - }; - private String _uuid; - private String _originalUuid; - private long _kbCommentId; - private long _groupId; - private long _originalGroupId; - private boolean _setOriginalGroupId; - private long _companyId; - private long _originalCompanyId; - private boolean _setOriginalCompanyId; - private long _userId; - private String _userUuid; - private long _originalUserId; - private boolean _setOriginalUserId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _classNameId; - private long _originalClassNameId; - private boolean _setOriginalClassNameId; - private long _classPK; - private long _originalClassPK; - private boolean _setOriginalClassPK; - private String _content; - private int _userRating; - private int _status; - private int _originalStatus; - private boolean _setOriginalStatus; - private long _columnBitmask; - private KBComment _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderBaseImpl.java deleted file mode 100644 index 08a4b39c0c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderBaseImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; - -import com.liferay.portal.kernel.exception.SystemException; - -/** - * The extended model base implementation for the KBFolder service. Represents a row in the "KBFolder" database table, with each column mapped to a property of this class. - * - *

    - * 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 KBFolderImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBFolderImpl - * @see com.liferay.knowledgebase.model.KBFolder - * @generated - */ -public abstract class KBFolderBaseImpl extends KBFolderModelImpl - implements KBFolder { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a k b folder model instance should use the {@link KBFolder} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - KBFolderLocalServiceUtil.addKBFolder(this); - } - else { - KBFolderLocalServiceUtil.updateKBFolder(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderCacheModel.java deleted file mode 100644 index dfae37760a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderCacheModel.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBFolder; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -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 KBFolder in entity cache. - * - * @author Brian Wing Shun Chan - * @see KBFolder - * @generated - */ -public class KBFolderCacheModel implements CacheModel, Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(25); - - sb.append("{uuid="); - sb.append(uuid); - sb.append(", kbFolderId="); - sb.append(kbFolderId); - 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(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", parentKBFolderId="); - sb.append(parentKBFolderId); - sb.append(", name="); - sb.append(name); - sb.append(", urlTitle="); - sb.append(urlTitle); - sb.append(", description="); - sb.append(description); - sb.append("}"); - - return sb.toString(); - } - - @Override - public KBFolder toEntityModel() { - KBFolderImpl kbFolderImpl = new KBFolderImpl(); - - if (uuid == null) { - kbFolderImpl.setUuid(StringPool.BLANK); - } - else { - kbFolderImpl.setUuid(uuid); - } - - kbFolderImpl.setKbFolderId(kbFolderId); - kbFolderImpl.setGroupId(groupId); - kbFolderImpl.setCompanyId(companyId); - kbFolderImpl.setUserId(userId); - - if (userName == null) { - kbFolderImpl.setUserName(StringPool.BLANK); - } - else { - kbFolderImpl.setUserName(userName); - } - - if (createDate == Long.MIN_VALUE) { - kbFolderImpl.setCreateDate(null); - } - else { - kbFolderImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - kbFolderImpl.setModifiedDate(null); - } - else { - kbFolderImpl.setModifiedDate(new Date(modifiedDate)); - } - - kbFolderImpl.setParentKBFolderId(parentKBFolderId); - - if (name == null) { - kbFolderImpl.setName(StringPool.BLANK); - } - else { - kbFolderImpl.setName(name); - } - - if (urlTitle == null) { - kbFolderImpl.setUrlTitle(StringPool.BLANK); - } - else { - kbFolderImpl.setUrlTitle(urlTitle); - } - - if (description == null) { - kbFolderImpl.setDescription(StringPool.BLANK); - } - else { - kbFolderImpl.setDescription(description); - } - - kbFolderImpl.resetOriginalValues(); - - return kbFolderImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - uuid = objectInput.readUTF(); - kbFolderId = objectInput.readLong(); - groupId = objectInput.readLong(); - companyId = objectInput.readLong(); - userId = objectInput.readLong(); - userName = objectInput.readUTF(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - parentKBFolderId = objectInput.readLong(); - name = objectInput.readUTF(); - urlTitle = objectInput.readUTF(); - description = objectInput.readUTF(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - if (uuid == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(uuid); - } - - objectOutput.writeLong(kbFolderId); - objectOutput.writeLong(groupId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(userId); - - if (userName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(userName); - } - - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - objectOutput.writeLong(parentKBFolderId); - - if (name == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(name); - } - - if (urlTitle == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(urlTitle); - } - - if (description == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(description); - } - } - - public String uuid; - public long kbFolderId; - public long groupId; - public long companyId; - public long userId; - public String userName; - public long createDate; - public long modifiedDate; - public long parentKBFolderId; - public String name; - public String urlTitle; - public String description; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderImpl.java deleted file mode 100644 index eb1558161f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.knowledgebase.service.KBFolderServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.util.PortalUtil; - -import java.util.Locale; - -/** - * @author Brian Wing Shun Chan - */ -public class KBFolderImpl extends KBFolderBaseImpl { - - public KBFolderImpl() { - } - - @Override - public long getClassNameId() { - if (_classNameId == 0) { - _classNameId = PortalUtil.getClassNameId( - KBFolderConstants.getClassName()); - } - - return _classNameId; - } - - @Override - public String getParentTitle(Locale locale) - throws PortalException, SystemException { - - if (getParentKBFolderId() == - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - return "(" + LanguageUtil.get(locale, "none") + ")"; - } - - KBFolder kbFolder = KBFolderServiceUtil.getKBFolder( - getParentKBFolderId()); - - return kbFolder.getName(); - } - - @Override - public boolean isEmpty() throws PortalException, SystemException { - int kbArticlesCount = KBArticleServiceUtil.getKBArticlesCount( - getGroupId(), getKbFolderId(), WorkflowConstants.STATUS_ANY); - - if (kbArticlesCount > 0) { - return false; - } - - int kbFoldersCount = KBFolderServiceUtil.getKBFoldersCount( - getGroupId(), getKbFolderId()); - - if (kbFoldersCount > 0) { - return false; - } - - return true; - } - - private long _classNameId; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderModelImpl.java deleted file mode 100644 index 03efdbe8fc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBFolderModelImpl.java +++ /dev/null @@ -1,838 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderModel; -import com.liferay.knowledgebase.model.KBFolderSoap; - -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.lar.StagedModelType; -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 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 KBFolder service. Represents a row in the "KBFolder" database table, with each column mapped to a property of this class. - * - *

    - * This implementation and its corresponding interface {@link com.liferay.knowledgebase.model.KBFolderModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link KBFolderImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBFolderImpl - * @see com.liferay.knowledgebase.model.KBFolder - * @see com.liferay.knowledgebase.model.KBFolderModel - * @generated - */ -@JSON(strict = true) -public class KBFolderModelImpl extends BaseModelImpl - implements KBFolderModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a k b folder model instance should use the {@link com.liferay.knowledgebase.model.KBFolder} interface instead. - */ - public static final String TABLE_NAME = "KBFolder"; - public static final Object[][] TABLE_COLUMNS = { - { "uuid_", Types.VARCHAR }, - { "kbFolderId", Types.BIGINT }, - { "groupId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "userId", Types.BIGINT }, - { "userName", Types.VARCHAR }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "parentKBFolderId", Types.BIGINT }, - { "name", Types.VARCHAR }, - { "urlTitle", Types.VARCHAR }, - { "description", Types.VARCHAR } - }; - public static final String TABLE_SQL_CREATE = "create table KBFolder (uuid_ VARCHAR(75) null,kbFolderId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,parentKBFolderId LONG,name VARCHAR(75) null,urlTitle VARCHAR(75) null,description STRING null)"; - public static final String TABLE_SQL_DROP = "drop table KBFolder"; - public static final String ORDER_BY_JPQL = " ORDER BY kbFolder.kbFolderId ASC"; - public static final String ORDER_BY_SQL = " ORDER BY KBFolder.kbFolderId 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.com.liferay.knowledgebase.model.KBFolder"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.com.liferay.knowledgebase.model.KBFolder"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.com.liferay.knowledgebase.model.KBFolder"), - true); - public static long COMPANYID_COLUMN_BITMASK = 1L; - public static long GROUPID_COLUMN_BITMASK = 2L; - public static long NAME_COLUMN_BITMASK = 4L; - public static long PARENTKBFOLDERID_COLUMN_BITMASK = 8L; - public static long URLTITLE_COLUMN_BITMASK = 16L; - public static long UUID_COLUMN_BITMASK = 32L; - public static long KBFOLDERID_COLUMN_BITMASK = 64L; - - /** - * 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 KBFolder toModel(KBFolderSoap soapModel) { - if (soapModel == null) { - return null; - } - - KBFolder model = new KBFolderImpl(); - - model.setUuid(soapModel.getUuid()); - model.setKbFolderId(soapModel.getKbFolderId()); - model.setGroupId(soapModel.getGroupId()); - model.setCompanyId(soapModel.getCompanyId()); - model.setUserId(soapModel.getUserId()); - model.setUserName(soapModel.getUserName()); - model.setCreateDate(soapModel.getCreateDate()); - model.setModifiedDate(soapModel.getModifiedDate()); - model.setParentKBFolderId(soapModel.getParentKBFolderId()); - model.setName(soapModel.getName()); - model.setUrlTitle(soapModel.getUrlTitle()); - model.setDescription(soapModel.getDescription()); - - 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 toModels(KBFolderSoap[] soapModels) { - if (soapModels == null) { - return null; - } - - List models = new ArrayList(soapModels.length); - - for (KBFolderSoap 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.com.liferay.knowledgebase.model.KBFolder")); - - public KBFolderModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _kbFolderId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setKbFolderId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _kbFolderId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return KBFolder.class; - } - - @Override - public String getModelClassName() { - return KBFolder.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbFolderId", getKbFolderId()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("parentKBFolderId", getParentKBFolderId()); - attributes.put("name", getName()); - attributes.put("urlTitle", getUrlTitle()); - attributes.put("description", getDescription()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbFolderId = (Long)attributes.get("kbFolderId"); - - if (kbFolderId != null) { - setKbFolderId(kbFolderId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - Long parentKBFolderId = (Long)attributes.get("parentKBFolderId"); - - if (parentKBFolderId != null) { - setParentKBFolderId(parentKBFolderId); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - String urlTitle = (String)attributes.get("urlTitle"); - - if (urlTitle != null) { - setUrlTitle(urlTitle); - } - - String description = (String)attributes.get("description"); - - if (description != null) { - setDescription(description); - } - } - - @JSON - @Override - public String getUuid() { - if (_uuid == null) { - return StringPool.BLANK; - } - else { - return _uuid; - } - } - - @Override - public void setUuid(String uuid) { - if (_originalUuid == null) { - _originalUuid = _uuid; - } - - _uuid = uuid; - } - - public String getOriginalUuid() { - return GetterUtil.getString(_originalUuid); - } - - @JSON - @Override - public long getKbFolderId() { - return _kbFolderId; - } - - @Override - public void setKbFolderId(long kbFolderId) { - _kbFolderId = kbFolderId; - } - - @JSON - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _columnBitmask |= GROUPID_COLUMN_BITMASK; - - if (!_setOriginalGroupId) { - _setOriginalGroupId = true; - - _originalGroupId = _groupId; - } - - _groupId = groupId; - } - - public long getOriginalGroupId() { - return _originalGroupId; - } - - @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 Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - @JSON - @Override - public long getParentKBFolderId() { - return _parentKBFolderId; - } - - @Override - public void setParentKBFolderId(long parentKBFolderId) { - _columnBitmask |= PARENTKBFOLDERID_COLUMN_BITMASK; - - if (!_setOriginalParentKBFolderId) { - _setOriginalParentKBFolderId = true; - - _originalParentKBFolderId = _parentKBFolderId; - } - - _parentKBFolderId = parentKBFolderId; - } - - public long getOriginalParentKBFolderId() { - return _originalParentKBFolderId; - } - - @JSON - @Override - public String getName() { - if (_name == null) { - return StringPool.BLANK; - } - else { - return _name; - } - } - - @Override - public void setName(String name) { - _columnBitmask |= NAME_COLUMN_BITMASK; - - if (_originalName == null) { - _originalName = _name; - } - - _name = name; - } - - public String getOriginalName() { - return GetterUtil.getString(_originalName); - } - - @JSON - @Override - public String getUrlTitle() { - if (_urlTitle == null) { - return StringPool.BLANK; - } - else { - return _urlTitle; - } - } - - @Override - public void setUrlTitle(String urlTitle) { - _columnBitmask |= URLTITLE_COLUMN_BITMASK; - - if (_originalUrlTitle == null) { - _originalUrlTitle = _urlTitle; - } - - _urlTitle = urlTitle; - } - - public String getOriginalUrlTitle() { - return GetterUtil.getString(_originalUrlTitle); - } - - @JSON - @Override - public String getDescription() { - if (_description == null) { - return StringPool.BLANK; - } - else { - return _description; - } - } - - @Override - public void setDescription(String description) { - _description = description; - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBFolder.class.getName())); - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - KBFolder.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public KBFolder toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (KBFolder)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - KBFolderImpl kbFolderImpl = new KBFolderImpl(); - - kbFolderImpl.setUuid(getUuid()); - kbFolderImpl.setKbFolderId(getKbFolderId()); - kbFolderImpl.setGroupId(getGroupId()); - kbFolderImpl.setCompanyId(getCompanyId()); - kbFolderImpl.setUserId(getUserId()); - kbFolderImpl.setUserName(getUserName()); - kbFolderImpl.setCreateDate(getCreateDate()); - kbFolderImpl.setModifiedDate(getModifiedDate()); - kbFolderImpl.setParentKBFolderId(getParentKBFolderId()); - kbFolderImpl.setName(getName()); - kbFolderImpl.setUrlTitle(getUrlTitle()); - kbFolderImpl.setDescription(getDescription()); - - kbFolderImpl.resetOriginalValues(); - - return kbFolderImpl; - } - - @Override - public int compareTo(KBFolder kbFolder) { - long primaryKey = kbFolder.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBFolder)) { - return false; - } - - KBFolder kbFolder = (KBFolder)obj; - - long primaryKey = kbFolder.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - KBFolderModelImpl kbFolderModelImpl = this; - - kbFolderModelImpl._originalUuid = kbFolderModelImpl._uuid; - - kbFolderModelImpl._originalGroupId = kbFolderModelImpl._groupId; - - kbFolderModelImpl._setOriginalGroupId = false; - - kbFolderModelImpl._originalCompanyId = kbFolderModelImpl._companyId; - - kbFolderModelImpl._setOriginalCompanyId = false; - - kbFolderModelImpl._originalParentKBFolderId = kbFolderModelImpl._parentKBFolderId; - - kbFolderModelImpl._setOriginalParentKBFolderId = false; - - kbFolderModelImpl._originalName = kbFolderModelImpl._name; - - kbFolderModelImpl._originalUrlTitle = kbFolderModelImpl._urlTitle; - - kbFolderModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - KBFolderCacheModel kbFolderCacheModel = new KBFolderCacheModel(); - - kbFolderCacheModel.uuid = getUuid(); - - String uuid = kbFolderCacheModel.uuid; - - if ((uuid != null) && (uuid.length() == 0)) { - kbFolderCacheModel.uuid = null; - } - - kbFolderCacheModel.kbFolderId = getKbFolderId(); - - kbFolderCacheModel.groupId = getGroupId(); - - kbFolderCacheModel.companyId = getCompanyId(); - - kbFolderCacheModel.userId = getUserId(); - - kbFolderCacheModel.userName = getUserName(); - - String userName = kbFolderCacheModel.userName; - - if ((userName != null) && (userName.length() == 0)) { - kbFolderCacheModel.userName = null; - } - - Date createDate = getCreateDate(); - - if (createDate != null) { - kbFolderCacheModel.createDate = createDate.getTime(); - } - else { - kbFolderCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - kbFolderCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - kbFolderCacheModel.modifiedDate = Long.MIN_VALUE; - } - - kbFolderCacheModel.parentKBFolderId = getParentKBFolderId(); - - kbFolderCacheModel.name = getName(); - - String name = kbFolderCacheModel.name; - - if ((name != null) && (name.length() == 0)) { - kbFolderCacheModel.name = null; - } - - kbFolderCacheModel.urlTitle = getUrlTitle(); - - String urlTitle = kbFolderCacheModel.urlTitle; - - if ((urlTitle != null) && (urlTitle.length() == 0)) { - kbFolderCacheModel.urlTitle = null; - } - - kbFolderCacheModel.description = getDescription(); - - String description = kbFolderCacheModel.description; - - if ((description != null) && (description.length() == 0)) { - kbFolderCacheModel.description = null; - } - - return kbFolderCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(25); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", kbFolderId="); - sb.append(getKbFolderId()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", parentKBFolderId="); - sb.append(getParentKBFolderId()); - sb.append(", name="); - sb.append(getName()); - sb.append(", urlTitle="); - sb.append(getUrlTitle()); - sb.append(", description="); - sb.append(getDescription()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(40); - - sb.append(""); - sb.append("com.liferay.knowledgebase.model.KBFolder"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "kbFolderId"); - sb.append( - "groupId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "parentKBFolderId"); - sb.append( - "name"); - sb.append( - "urlTitle"); - sb.append( - "description"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = KBFolder.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { - KBFolder.class - }; - private String _uuid; - private String _originalUuid; - private long _kbFolderId; - private long _groupId; - private long _originalGroupId; - private boolean _setOriginalGroupId; - private long _companyId; - private long _originalCompanyId; - private boolean _setOriginalCompanyId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private long _parentKBFolderId; - private long _originalParentKBFolderId; - private boolean _setOriginalParentKBFolderId; - private String _name; - private String _originalName; - private String _urlTitle; - private String _originalUrlTitle; - private String _description; - private long _columnBitmask; - private KBFolder _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateBaseImpl.java deleted file mode 100644 index c28edf0024..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateBaseImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; - -import com.liferay.portal.kernel.exception.SystemException; - -/** - * The extended model base implementation for the KBTemplate service. Represents a row in the "KBTemplate" database table, with each column mapped to a property of this class. - * - *

    - * 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 KBTemplateImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBTemplateImpl - * @see com.liferay.knowledgebase.model.KBTemplate - * @generated - */ -public abstract class KBTemplateBaseImpl extends KBTemplateModelImpl - implements KBTemplate { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a k b template model instance should use the {@link KBTemplate} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - KBTemplateLocalServiceUtil.addKBTemplate(this); - } - else { - KBTemplateLocalServiceUtil.updateKBTemplate(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateCacheModel.java deleted file mode 100644 index 00113a6f86..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateCacheModel.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBTemplate; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -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 KBTemplate in entity cache. - * - * @author Brian Wing Shun Chan - * @see KBTemplate - * @generated - */ -public class KBTemplateCacheModel implements CacheModel, - Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(21); - - sb.append("{uuid="); - sb.append(uuid); - sb.append(", kbTemplateId="); - sb.append(kbTemplateId); - 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(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", title="); - sb.append(title); - sb.append(", content="); - sb.append(content); - sb.append("}"); - - return sb.toString(); - } - - @Override - public KBTemplate toEntityModel() { - KBTemplateImpl kbTemplateImpl = new KBTemplateImpl(); - - if (uuid == null) { - kbTemplateImpl.setUuid(StringPool.BLANK); - } - else { - kbTemplateImpl.setUuid(uuid); - } - - kbTemplateImpl.setKbTemplateId(kbTemplateId); - kbTemplateImpl.setGroupId(groupId); - kbTemplateImpl.setCompanyId(companyId); - kbTemplateImpl.setUserId(userId); - - if (userName == null) { - kbTemplateImpl.setUserName(StringPool.BLANK); - } - else { - kbTemplateImpl.setUserName(userName); - } - - if (createDate == Long.MIN_VALUE) { - kbTemplateImpl.setCreateDate(null); - } - else { - kbTemplateImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - kbTemplateImpl.setModifiedDate(null); - } - else { - kbTemplateImpl.setModifiedDate(new Date(modifiedDate)); - } - - if (title == null) { - kbTemplateImpl.setTitle(StringPool.BLANK); - } - else { - kbTemplateImpl.setTitle(title); - } - - if (content == null) { - kbTemplateImpl.setContent(StringPool.BLANK); - } - else { - kbTemplateImpl.setContent(content); - } - - kbTemplateImpl.resetOriginalValues(); - - return kbTemplateImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - uuid = objectInput.readUTF(); - kbTemplateId = objectInput.readLong(); - groupId = objectInput.readLong(); - companyId = objectInput.readLong(); - userId = objectInput.readLong(); - userName = objectInput.readUTF(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - title = objectInput.readUTF(); - content = objectInput.readUTF(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - if (uuid == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(uuid); - } - - objectOutput.writeLong(kbTemplateId); - objectOutput.writeLong(groupId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(userId); - - if (userName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(userName); - } - - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - - if (title == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(title); - } - - if (content == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(content); - } - } - - public String uuid; - public long kbTemplateId; - public long groupId; - public long companyId; - public long userId; - public String userName; - public long createDate; - public long modifiedDate; - public String title; - public String content; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateImpl.java deleted file mode 100644 index b8c4b5f2b1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBTemplateImpl extends KBTemplateBaseImpl { - - public KBTemplateImpl() { - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateModelImpl.java deleted file mode 100644 index ff4a10c284..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateModelImpl.java +++ /dev/null @@ -1,724 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.model.KBTemplateModel; -import com.liferay.knowledgebase.model.KBTemplateSoap; - -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.lar.StagedModelType; -import com.liferay.portal.kernel.util.DateUtil; -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 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 KBTemplate service. Represents a row in the "KBTemplate" database table, with each column mapped to a property of this class. - * - *

    - * This implementation and its corresponding interface {@link com.liferay.knowledgebase.model.KBTemplateModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link KBTemplateImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see KBTemplateImpl - * @see com.liferay.knowledgebase.model.KBTemplate - * @see com.liferay.knowledgebase.model.KBTemplateModel - * @generated - */ -@JSON(strict = true) -public class KBTemplateModelImpl extends BaseModelImpl - implements KBTemplateModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a k b template model instance should use the {@link com.liferay.knowledgebase.model.KBTemplate} interface instead. - */ - public static final String TABLE_NAME = "KBTemplate"; - public static final Object[][] TABLE_COLUMNS = { - { "uuid_", Types.VARCHAR }, - { "kbTemplateId", Types.BIGINT }, - { "groupId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "userId", Types.BIGINT }, - { "userName", Types.VARCHAR }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "title", Types.VARCHAR }, - { "content", Types.CLOB } - }; - public static final String TABLE_SQL_CREATE = "create table KBTemplate (uuid_ VARCHAR(75) null,kbTemplateId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,title STRING null,content TEXT null)"; - public static final String TABLE_SQL_DROP = "drop table KBTemplate"; - public static final String ORDER_BY_JPQL = " ORDER BY kbTemplate.modifiedDate DESC"; - public static final String ORDER_BY_SQL = " ORDER BY KBTemplate.modifiedDate 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.com.liferay.knowledgebase.model.KBTemplate"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.com.liferay.knowledgebase.model.KBTemplate"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.com.liferay.knowledgebase.model.KBTemplate"), - true); - public static long COMPANYID_COLUMN_BITMASK = 1L; - public static long GROUPID_COLUMN_BITMASK = 2L; - public static long UUID_COLUMN_BITMASK = 4L; - public static long MODIFIEDDATE_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 KBTemplate toModel(KBTemplateSoap soapModel) { - if (soapModel == null) { - return null; - } - - KBTemplate model = new KBTemplateImpl(); - - model.setUuid(soapModel.getUuid()); - model.setKbTemplateId(soapModel.getKbTemplateId()); - model.setGroupId(soapModel.getGroupId()); - model.setCompanyId(soapModel.getCompanyId()); - model.setUserId(soapModel.getUserId()); - model.setUserName(soapModel.getUserName()); - model.setCreateDate(soapModel.getCreateDate()); - model.setModifiedDate(soapModel.getModifiedDate()); - model.setTitle(soapModel.getTitle()); - model.setContent(soapModel.getContent()); - - 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 toModels(KBTemplateSoap[] soapModels) { - if (soapModels == null) { - return null; - } - - List models = new ArrayList(soapModels.length); - - for (KBTemplateSoap 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.com.liferay.knowledgebase.model.KBTemplate")); - - public KBTemplateModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _kbTemplateId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setKbTemplateId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _kbTemplateId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return KBTemplate.class; - } - - @Override - public String getModelClassName() { - return KBTemplate.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("kbTemplateId", getKbTemplateId()); - attributes.put("groupId", getGroupId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("title", getTitle()); - attributes.put("content", getContent()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long kbTemplateId = (Long)attributes.get("kbTemplateId"); - - if (kbTemplateId != null) { - setKbTemplateId(kbTemplateId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String title = (String)attributes.get("title"); - - if (title != null) { - setTitle(title); - } - - String content = (String)attributes.get("content"); - - if (content != null) { - setContent(content); - } - } - - @JSON - @Override - public String getUuid() { - if (_uuid == null) { - return StringPool.BLANK; - } - else { - return _uuid; - } - } - - @Override - public void setUuid(String uuid) { - if (_originalUuid == null) { - _originalUuid = _uuid; - } - - _uuid = uuid; - } - - public String getOriginalUuid() { - return GetterUtil.getString(_originalUuid); - } - - @JSON - @Override - public long getKbTemplateId() { - return _kbTemplateId; - } - - @Override - public void setKbTemplateId(long kbTemplateId) { - _kbTemplateId = kbTemplateId; - } - - @JSON - @Override - public long getGroupId() { - return _groupId; - } - - @Override - public void setGroupId(long groupId) { - _columnBitmask |= GROUPID_COLUMN_BITMASK; - - if (!_setOriginalGroupId) { - _setOriginalGroupId = true; - - _originalGroupId = _groupId; - } - - _groupId = groupId; - } - - public long getOriginalGroupId() { - return _originalGroupId; - } - - @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 Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _columnBitmask = -1L; - - _modifiedDate = modifiedDate; - } - - @JSON - @Override - public String getTitle() { - if (_title == null) { - return StringPool.BLANK; - } - else { - return _title; - } - } - - @Override - public void setTitle(String title) { - _title = title; - } - - @JSON - @Override - public String getContent() { - if (_content == null) { - return StringPool.BLANK; - } - else { - return _content; - } - } - - @Override - public void setContent(String content) { - _content = content; - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - KBTemplate.class.getName())); - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - KBTemplate.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public KBTemplate toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (KBTemplate)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - KBTemplateImpl kbTemplateImpl = new KBTemplateImpl(); - - kbTemplateImpl.setUuid(getUuid()); - kbTemplateImpl.setKbTemplateId(getKbTemplateId()); - kbTemplateImpl.setGroupId(getGroupId()); - kbTemplateImpl.setCompanyId(getCompanyId()); - kbTemplateImpl.setUserId(getUserId()); - kbTemplateImpl.setUserName(getUserName()); - kbTemplateImpl.setCreateDate(getCreateDate()); - kbTemplateImpl.setModifiedDate(getModifiedDate()); - kbTemplateImpl.setTitle(getTitle()); - kbTemplateImpl.setContent(getContent()); - - kbTemplateImpl.resetOriginalValues(); - - return kbTemplateImpl; - } - - @Override - public int compareTo(KBTemplate kbTemplate) { - int value = 0; - - value = DateUtil.compareTo(getModifiedDate(), - kbTemplate.getModifiedDate()); - - value = value * -1; - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof KBTemplate)) { - return false; - } - - KBTemplate kbTemplate = (KBTemplate)obj; - - long primaryKey = kbTemplate.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - KBTemplateModelImpl kbTemplateModelImpl = this; - - kbTemplateModelImpl._originalUuid = kbTemplateModelImpl._uuid; - - kbTemplateModelImpl._originalGroupId = kbTemplateModelImpl._groupId; - - kbTemplateModelImpl._setOriginalGroupId = false; - - kbTemplateModelImpl._originalCompanyId = kbTemplateModelImpl._companyId; - - kbTemplateModelImpl._setOriginalCompanyId = false; - - kbTemplateModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - KBTemplateCacheModel kbTemplateCacheModel = new KBTemplateCacheModel(); - - kbTemplateCacheModel.uuid = getUuid(); - - String uuid = kbTemplateCacheModel.uuid; - - if ((uuid != null) && (uuid.length() == 0)) { - kbTemplateCacheModel.uuid = null; - } - - kbTemplateCacheModel.kbTemplateId = getKbTemplateId(); - - kbTemplateCacheModel.groupId = getGroupId(); - - kbTemplateCacheModel.companyId = getCompanyId(); - - kbTemplateCacheModel.userId = getUserId(); - - kbTemplateCacheModel.userName = getUserName(); - - String userName = kbTemplateCacheModel.userName; - - if ((userName != null) && (userName.length() == 0)) { - kbTemplateCacheModel.userName = null; - } - - Date createDate = getCreateDate(); - - if (createDate != null) { - kbTemplateCacheModel.createDate = createDate.getTime(); - } - else { - kbTemplateCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - kbTemplateCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - kbTemplateCacheModel.modifiedDate = Long.MIN_VALUE; - } - - kbTemplateCacheModel.title = getTitle(); - - String title = kbTemplateCacheModel.title; - - if ((title != null) && (title.length() == 0)) { - kbTemplateCacheModel.title = null; - } - - kbTemplateCacheModel.content = getContent(); - - String content = kbTemplateCacheModel.content; - - if ((content != null) && (content.length() == 0)) { - kbTemplateCacheModel.content = null; - } - - return kbTemplateCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(21); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", kbTemplateId="); - sb.append(getKbTemplateId()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", title="); - sb.append(getTitle()); - sb.append(", content="); - sb.append(getContent()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(34); - - sb.append(""); - sb.append("com.liferay.knowledgebase.model.KBTemplate"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "kbTemplateId"); - sb.append( - "groupId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "title"); - sb.append( - "content"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = KBTemplate.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { - KBTemplate.class - }; - private String _uuid; - private String _originalUuid; - private long _kbTemplateId; - private long _groupId; - private long _originalGroupId; - private boolean _setOriginalGroupId; - private long _companyId; - private long _originalCompanyId; - private boolean _setOriginalCompanyId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private String _title; - private String _content; - private long _columnBitmask; - private KBTemplate _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateSearchDisplayImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateSearchDisplayImpl.java deleted file mode 100644 index 8f25bd78ad..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/model/impl/KBTemplateSearchDisplayImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.model.impl; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.model.KBTemplateSearchDisplay; - -import java.util.List; - -/** - * @author Peter Shin - */ -public class KBTemplateSearchDisplayImpl implements KBTemplateSearchDisplay { - - public KBTemplateSearchDisplayImpl( - List results, int total, int[] curStartValues) { - - _results = results; - _total = total; - _curStartValues = curStartValues; - } - - @Override - public int[] getCurStartValues() { - return _curStartValues; - } - - @Override - public List getResults() { - return _results; - } - - @Override - public int getTotal() { - return _total; - } - - @Override - public void setCurStartValues(int[] curStartValues) { - _curStartValues = curStartValues; - } - - @Override - public void setResults(List results) { - _results = results; - } - - @Override - public void setTotal(int total) { - _total = total; - } - - private int[] _curStartValues; - private List _results; - private int _total; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/portlet/BaseKBPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/portlet/BaseKBPortlet.java deleted file mode 100644 index 2738d3903d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/portlet/BaseKBPortlet.java +++ /dev/null @@ -1,484 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.portlet; - -import com.liferay.compat.util.bridges.mvc.MVCPortlet; -import com.liferay.knowledgebase.KBArticleContentException; -import com.liferay.knowledgebase.KBArticlePriorityException; -import com.liferay.knowledgebase.KBArticleTitleException; -import com.liferay.knowledgebase.KBCommentContentException; -import com.liferay.knowledgebase.NoSuchArticleException; -import com.liferay.knowledgebase.NoSuchCommentException; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.model.KBCommentConstants; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.knowledgebase.service.KBCommentLocalServiceUtil; -import com.liferay.knowledgebase.service.KBCommentServiceUtil; -import com.liferay.knowledgebase.service.KBFolderServiceUtil; -import com.liferay.knowledgebase.util.KnowledgeBaseConstants; -import com.liferay.knowledgebase.util.WebKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.portlet.PortletResponseUtil; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.servlet.SessionMessages; -import com.liferay.portal.kernel.upload.UploadException; -import com.liferay.portal.kernel.upload.UploadPortletRequest; -import com.liferay.portal.kernel.util.Constants; -import com.liferay.portal.kernel.util.ContentTypes; -import com.liferay.portal.kernel.util.HttpUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StreamUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.theme.PortletDisplay; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.asset.AssetCategoryException; -import com.liferay.portlet.asset.AssetTagException; -import com.liferay.portlet.documentlibrary.DuplicateFileException; -import com.liferay.portlet.documentlibrary.FileNameException; -import com.liferay.portlet.documentlibrary.FileSizeException; -import com.liferay.portlet.documentlibrary.NoSuchFileException; - -import java.io.IOException; -import java.io.InputStream; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletException; -import javax.portlet.ResourceRequest; -import javax.portlet.ResourceResponse; - -import javax.servlet.http.HttpServletRequest; - -/** - * @author Adolfo Pérez - */ -public abstract class BaseKBPortlet extends MVCPortlet { - - public void addTempAttachment( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(actionRequest); - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long resourcePrimKey = ParamUtil.getLong( - actionRequest, "resourcePrimKey"); - String sourceFileName = uploadPortletRequest.getFileName("file"); - - InputStream inputStream = null; - - try { - inputStream = uploadPortletRequest.getFileAsStream("file"); - - String mimeType = uploadPortletRequest.getContentType("file"); - - KBArticleServiceUtil.addTempAttachment( - themeDisplay.getScopeGroupId(), resourcePrimKey, sourceFileName, - KnowledgeBaseConstants.TEMP_FOLDER_NAME, inputStream, mimeType); - } - finally { - StreamUtil.cleanUp(inputStream); - } - } - - public void deleteKBArticle( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - long resourcePrimKey = ParamUtil.getLong( - actionRequest, "resourcePrimKey"); - - KBArticleServiceUtil.deleteKBArticle(resourcePrimKey); - } - - public void deleteKBComment( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (!themeDisplay.isSignedIn()) { - return; - } - - long kbCommentId = ParamUtil.getLong(actionRequest, "kbCommentId"); - - KBCommentServiceUtil.deleteKBComment(kbCommentId); - - SessionMessages.add(actionRequest, "suggestionDeleted"); - } - - public void deleteTempAttachment( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long resourcePrimKey = ParamUtil.getLong( - actionRequest, "resourcePrimKey"); - String fileName = ParamUtil.getString(actionRequest, "fileName"); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - try { - KBArticleServiceUtil.deleteTempAttachment( - themeDisplay.getScopeGroupId(), resourcePrimKey, fileName, - KnowledgeBaseConstants.TEMP_FOLDER_NAME); - - jsonObject.put("deleted", Boolean.TRUE); - } - catch (Exception e) { - String errorMessage = themeDisplay.translate( - "an-unexpected-error-occurred-while-deleting-the-file"); - - jsonObject.put("deleted", Boolean.FALSE); - jsonObject.put("errorMessage", errorMessage); - } - - writeJSON(actionRequest, actionResponse, jsonObject); - } - - public void moveKBObject( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - long resourceClassNameId = ParamUtil.getLong( - actionRequest, "resourceClassNameId"); - long resourcePrimKey = ParamUtil.getLong( - actionRequest, "resourcePrimKey"); - long parentResourceClassNameId = ParamUtil.getLong( - actionRequest, "parentResourceClassNameId", - PortalUtil.getClassNameId(KBFolderConstants.getClassName())); - long parentResourcePrimKey = ParamUtil.getLong( - actionRequest, "parentResourcePrimKey", - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - double priority = ParamUtil.getDouble(actionRequest, "priority"); - - long kbArticleClassNameId = PortalUtil.getClassNameId( - KBArticleConstants.getClassName()); - - if (resourceClassNameId == kbArticleClassNameId) { - KBArticleServiceUtil.moveKBArticle( - resourcePrimKey, parentResourceClassNameId, - parentResourcePrimKey, priority); - } - else { - KBFolderServiceUtil.moveKBFolder( - resourcePrimKey, parentResourcePrimKey); - } - } - - public void serveAttachment( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - long fileEntryId = ParamUtil.getLong(resourceRequest, "fileEntryId"); - - FileEntry fileEntry = PortletFileRepositoryUtil.getPortletFileEntry( - fileEntryId); - - PortletResponseUtil.sendFile( - resourceRequest, resourceResponse, fileEntry.getTitle(), - fileEntry.getContentStream(), fileEntry.getMimeType()); - } - - public void serveKBArticleRSS( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - if (!PortalUtil.isRSSFeedsEnabled()) { - PortalUtil.sendRSSFeedsDisabledError( - resourceRequest, resourceResponse); - - return; - } - - ThemeDisplay themeDisplay = (ThemeDisplay)resourceRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long resourcePrimKey = ParamUtil.getLong( - resourceRequest, "resourcePrimKey"); - - int rssDelta = ParamUtil.getInteger(resourceRequest, "rssDelta"); - String rssDisplayStyle = ParamUtil.getString( - resourceRequest, "rssDisplayStyle"); - String rssFormat = ParamUtil.getString(resourceRequest, "rssFormat"); - - String rss = KBArticleServiceUtil.getKBArticleRSS( - resourcePrimKey, WorkflowConstants.STATUS_APPROVED, rssDelta, - rssDisplayStyle, rssFormat, themeDisplay); - - PortletResponseUtil.sendFile( - resourceRequest, resourceResponse, null, - rss.getBytes(StringPool.UTF8), ContentTypes.TEXT_XML_UTF8); - } - - @Override - public void serveResource( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws IOException, PortletException { - - try { - String resourceID = resourceRequest.getResourceID(); - - if (resourceID.equals("attachment")) { - serveAttachment(resourceRequest, resourceResponse); - } - else if (resourceID.equals("kbArticleRSS")) { - serveKBArticleRSS(resourceRequest, resourceResponse); - } - } - catch (IOException ioe) { - throw ioe; - } - catch (PortletException pe) { - throw pe; - } - catch (Exception e) { - throw new PortletException(e); - } - } - - public void subscribeKBArticle( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long resourcePrimKey = ParamUtil.getLong( - actionRequest, "resourcePrimKey"); - - KBArticleServiceUtil.subscribeKBArticle( - themeDisplay.getScopeGroupId(), resourcePrimKey); - } - - public void unsubscribeKBArticle( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - long resourcePrimKey = ParamUtil.getLong( - actionRequest, "resourcePrimKey"); - - KBArticleServiceUtil.unsubscribeKBArticle(resourcePrimKey); - } - - public void updateKBArticle( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - String portletId = PortalUtil.getPortletId(actionRequest); - - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - - long resourcePrimKey = ParamUtil.getLong( - actionRequest, "resourcePrimKey"); - long parentResourceClassNameId = ParamUtil.getLong( - actionRequest, "parentResourceClassNameId", - PortalUtil.getClassNameId(KBFolderConstants.getClassName())); - long parentResourcePrimKey = ParamUtil.getLong( - actionRequest, "parentResourcePrimKey", - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - - String title = ParamUtil.getString(actionRequest, "title"); - String urlTitle = ParamUtil.getString(actionRequest, "urlTitle"); - String content = ParamUtil.getString(actionRequest, "content"); - String description = ParamUtil.getString(actionRequest, "description"); - String sourceURL = ParamUtil.getString(actionRequest, "sourceURL"); - String[] sections = actionRequest.getParameterValues("sections"); - String[] selectedFileNames = ParamUtil.getParameterValues( - actionRequest, "selectedFileName"); - long[] removeFileEntryIds = ParamUtil.getLongValues( - actionRequest, "removeFileEntryIds"); - int workflowAction = ParamUtil.getInteger( - actionRequest, "workflowAction"); - - KBArticle kbArticle = null; - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - KBArticle.class.getName(), actionRequest); - - if (cmd.equals(Constants.ADD)) { - kbArticle = KBArticleServiceUtil.addKBArticle( - portletId, parentResourceClassNameId, parentResourcePrimKey, - title, urlTitle, content, description, sourceURL, sections, - selectedFileNames, serviceContext); - } - else if (cmd.equals(Constants.UPDATE)) { - kbArticle = KBArticleServiceUtil.updateKBArticle( - resourcePrimKey, title, content, description, sourceURL, - sections, selectedFileNames, removeFileEntryIds, - serviceContext); - } - - if (!cmd.equals(Constants.ADD) && !cmd.equals(Constants.UPDATE)) { - return; - } - - if (workflowAction == WorkflowConstants.ACTION_SAVE_DRAFT) { - String editURL = buildEditURL( - actionRequest, actionResponse, kbArticle); - - actionRequest.setAttribute(WebKeys.REDIRECT, editURL); - } - } - - public void updateKBComment( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (!themeDisplay.isSignedIn()) { - return; - } - - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - - long kbCommentId = ParamUtil.getLong(actionRequest, "kbCommentId"); - - long classNameId = ParamUtil.getLong(actionRequest, "classNameId"); - long classPK = ParamUtil.getLong(actionRequest, "classPK"); - String content = ParamUtil.getString(actionRequest, "content"); - int status = ParamUtil.getInteger( - actionRequest, "status", KBCommentConstants.STATUS_ANY); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - KBComment.class.getName(), actionRequest); - - if (cmd.equals(Constants.ADD)) { - KBCommentLocalServiceUtil.addKBComment( - themeDisplay.getUserId(), classNameId, classPK, content, - serviceContext); - } - else if (cmd.equals(Constants.UPDATE)) { - if (status == KBCommentConstants.STATUS_ANY) { - KBComment kbComment = KBCommentServiceUtil.getKBComment( - kbCommentId); - - status = kbComment.getStatus(); - } - - KBCommentServiceUtil.updateKBComment( - kbCommentId, classNameId, classPK, content, status, - serviceContext); - } - - SessionMessages.add(actionRequest, "suggestionSaved"); - } - - public void updateKBCommentStatus( - ActionRequest actionRequest, ActionResponse actionResponse) - throws PortalException, SystemException { - - long kbCommentId = ParamUtil.getLong(actionRequest, "kbCommentId"); - - int status = ParamUtil.getInteger(actionRequest, "kbCommentStatus"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - KBComment.class.getName(), actionRequest); - - KBCommentServiceUtil.updateStatus(kbCommentId, status, serviceContext); - - SessionMessages.add(actionRequest, "suggestionStatusUpdated"); - } - - protected String buildEditURL( - ActionRequest actionRequest, ActionResponse actionResponse, - KBArticle kbArticle) - throws PortalException, SystemException { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); - - String editURL = PortalUtil.getLayoutFullURL(themeDisplay); - - editURL = HttpUtil.setParameter( - editURL, "p_p_id", portletDisplay.getId()); - editURL = HttpUtil.setParameter( - editURL, actionResponse.getNamespace() + "mvcPath", - templatePath + "edit_article.jsp"); - editURL = HttpUtil.setParameter( - editURL, actionResponse.getNamespace() + "redirect", - getRedirect(actionRequest, actionResponse)); - editURL = HttpUtil.setParameter( - editURL, actionResponse.getNamespace() + "resourcePrimKey", - kbArticle.getResourcePrimKey()); - editURL = HttpUtil.setParameter( - editURL, actionResponse.getNamespace() + "status", - WorkflowConstants.STATUS_ANY); - - return editURL; - } - - protected void checkExceededSizeLimit(HttpServletRequest request) - throws PortalException { - - UploadException uploadException = (UploadException)request.getAttribute( - WebKeys.UPLOAD_EXCEPTION); - - if (uploadException != null) { - if (uploadException.isExceededSizeLimit()) { - throw new FileSizeException(uploadException.getCause()); - } - - throw new PortalException(uploadException.getCause()); - } - } - - @Override - protected boolean isSessionErrorException(Throwable cause) { - if (cause instanceof AssetCategoryException || - cause instanceof AssetTagException || - cause instanceof DuplicateFileException || - cause instanceof FileNameException || - cause instanceof FileSizeException || - cause instanceof KBArticleContentException || - cause instanceof KBArticlePriorityException || - cause instanceof KBArticleTitleException || - cause instanceof KBCommentContentException || - cause instanceof NoSuchArticleException || - cause instanceof NoSuchCommentException || - cause instanceof NoSuchFileException || - cause instanceof PrincipalException || - super.isSessionErrorException(cause)) { - - return true; - } - - return false; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/search/portlet/SearchPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/search/portlet/SearchPortlet.java deleted file mode 100644 index 190a3eba58..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/search/portlet/SearchPortlet.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.search.portlet; - -import com.liferay.knowledgebase.NoSuchArticleException; -import com.liferay.knowledgebase.NoSuchCommentException; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.portlet.BaseKBPortlet; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.WebKeys; -import com.liferay.portal.NoSuchSubscriptionException; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; - -import java.io.IOException; - -import javax.portlet.PortletException; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class SearchPortlet extends BaseKBPortlet { - - @Override - public void render( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - try { - int status = getStatus(renderRequest); - - renderRequest.setAttribute(WebKeys.KNOWLEDGE_BASE_STATUS, status); - - KBArticle kbArticle = null; - - long resourcePrimKey = ParamUtil.getLong( - renderRequest, "resourcePrimKey"); - - if (resourcePrimKey > 0) { - kbArticle = KBArticleServiceUtil.getLatestKBArticle( - resourcePrimKey, status); - } - - renderRequest.setAttribute( - WebKeys.KNOWLEDGE_BASE_KB_ARTICLE, kbArticle); - } - catch (Exception e) { - if (e instanceof NoSuchArticleException || - e instanceof PrincipalException) { - - SessionErrors.add(renderRequest, e.getClass()); - } - else { - throw new PortletException(e); - } - } - - super.render(renderRequest, renderResponse); - } - - @Override - protected void doDispatch( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - String mvcPath = ParamUtil.getString( - renderRequest, "mvcPath", viewTemplate); - - long assetCategoryId = ParamUtil.getLong(renderRequest, "categoryId"); - String assetTagName = ParamUtil.getString(renderRequest, "tag"); - - if ((mvcPath.equals(viewTemplate) && (assetCategoryId > 0)) || - (mvcPath.equals(viewTemplate) && - Validator.isNotNull(assetTagName))) { - - String path = templatePath + "view_prp_articles.jsp"; - - include(path, renderRequest, renderResponse); - } - else if (SessionErrors.contains( - renderRequest, NoSuchArticleException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchCommentException.class.getName()) || - SessionErrors.contains( - renderRequest, - NoSuchSubscriptionException.class.getName()) || - SessionErrors.contains( - renderRequest, PrincipalException.class.getName())) { - - include(templatePath + "error.jsp", renderRequest, renderResponse); - } - else { - super.doDispatch(renderRequest, renderResponse); - } - } - - protected int getStatus(RenderRequest renderRequest) throws Exception { - ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (!themeDisplay.isSignedIn()) { - return WorkflowConstants.STATUS_APPROVED; - } - - String value = renderRequest.getParameter("status"); - int status = GetterUtil.getInteger(value); - - if ((value != null) && (status == WorkflowConstants.STATUS_APPROVED)) { - return WorkflowConstants.STATUS_APPROVED; - } - - long resourcePrimKey = ParamUtil.getLong( - renderRequest, "resourcePrimKey"); - - if (resourcePrimKey == 0) { - return WorkflowConstants.STATUS_APPROVED; - } - - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - if (KBArticlePermission.contains( - permissionChecker, resourcePrimKey, ActionKeys.UPDATE)) { - - return ParamUtil.getInteger( - renderRequest, "status", WorkflowConstants.STATUS_ANY); - } - - return WorkflowConstants.STATUS_APPROVED; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/search/portlet/search-friendly-url-routes.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/search/portlet/search-friendly-url-routes.xml deleted file mode 100644 index 26e54b688b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/search/portlet/search-friendly-url-routes.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - /search/view.jsp - - - /rss - - - cacheLevelPage - 2 - rss - - - /{resourcePrimKey:\d+} - /search/view_article.jsp - normal - - - /{resourcePrimKey:\d+}/{p_p_state} - /search/view_article.jsp - - - /{resourcePrimKey:\d+}/{status:-?\d+}/history - /search/history.jsp - normal - - - /{resourcePrimKey:\d+}/{status:-?\d+}/history/{p_p_state} - /search/history.jsp - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/action/ConfigurationActionImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/action/ConfigurationActionImpl.java deleted file mode 100644 index dbab55f011..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/action/ConfigurationActionImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.section.action; - -import com.liferay.portal.kernel.portlet.DefaultConfigurationAction; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.ParamUtil; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; - -/** - * @author Peter Shin - */ -public class ConfigurationActionImpl extends DefaultConfigurationAction { - - @Override - public void processAction( - PortletConfig portletConfig, ActionRequest actionRequest, - ActionResponse actionResponse) - throws Exception { - - String tabs2 = ParamUtil.getString(actionRequest, "tabs2"); - - if (tabs2.equals("general")) { - updateGeneral(actionRequest); - } - - super.processAction(portletConfig, actionRequest, actionResponse); - } - - protected void updateGeneral(ActionRequest actionRequest) { - String[] kbArticlesSections = actionRequest.getParameterValues( - "kbArticlesSections"); - - if (ArrayUtil.isEmpty(kbArticlesSections)) { - SessionErrors.add(actionRequest, "kbArticlesSections"); - } - - if (SessionErrors.isEmpty(actionRequest)) { - setPreference( - actionRequest, "kbArticlesSections", kbArticlesSections); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/portlet/SectionPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/portlet/SectionPortlet.java deleted file mode 100644 index 3d877c4df3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/portlet/SectionPortlet.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.section.portlet; - -import com.liferay.knowledgebase.NoSuchArticleException; -import com.liferay.knowledgebase.NoSuchCommentException; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.portlet.BaseKBPortlet; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.WebKeys; -import com.liferay.portal.NoSuchSubscriptionException; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; - -import java.io.IOException; - -import javax.portlet.PortletException; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class SectionPortlet extends BaseKBPortlet { - - @Override - public void render( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - try { - int status = getStatus(renderRequest); - - renderRequest.setAttribute(WebKeys.KNOWLEDGE_BASE_STATUS, status); - - KBArticle kbArticle = getKBArticle(renderRequest, status); - - renderRequest.setAttribute( - WebKeys.KNOWLEDGE_BASE_KB_ARTICLE, kbArticle); - } - catch (Exception e) { - if (e instanceof NoSuchArticleException || - e instanceof PrincipalException) { - - SessionErrors.add(renderRequest, e.getClass()); - } - else { - throw new PortletException(e); - } - } - - super.render(renderRequest, renderResponse); - } - - @Override - protected void doDispatch( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - if (SessionErrors.contains( - renderRequest, NoSuchArticleException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchCommentException.class.getName()) || - SessionErrors.contains( - renderRequest, NoSuchSubscriptionException.class.getName()) || - SessionErrors.contains( - renderRequest, PrincipalException.class.getName())) { - - include(templatePath + "error.jsp", renderRequest, renderResponse); - } - else { - super.doDispatch(renderRequest, renderResponse); - } - } - - protected KBArticle getKBArticle(RenderRequest renderRequest, int status) - throws PortalException, SystemException { - - long resourcePrimKey = ParamUtil.getLong( - renderRequest, "resourcePrimKey"); - - if (resourcePrimKey > 0) { - return KBArticleServiceUtil.getLatestKBArticle( - resourcePrimKey, status); - } - - String urlTitle = ParamUtil.getString(renderRequest, "urlTitle"); - - if (Validator.isNull(urlTitle)) { - return null; - } - - long groupId = PortalUtil.getScopeGroupId(renderRequest); - - String kbFolderUrlTitle = ParamUtil.getString( - renderRequest, "kbFolderUrlTitle"); - - if (Validator.isNotNull(kbFolderUrlTitle)) { - return KBArticleLocalServiceUtil.getKBArticleByUrlTitle( - groupId, kbFolderUrlTitle, urlTitle); - } - - return KBArticleLocalServiceUtil.getKBArticleByUrlTitle( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, urlTitle); - } - - protected int getStatus(RenderRequest renderRequest) throws Exception { - ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (!themeDisplay.isSignedIn()) { - return WorkflowConstants.STATUS_APPROVED; - } - - String value = renderRequest.getParameter("status"); - int status = GetterUtil.getInteger(value); - - if ((value != null) && (status == WorkflowConstants.STATUS_APPROVED)) { - return WorkflowConstants.STATUS_APPROVED; - } - - long resourcePrimKey = ParamUtil.getLong( - renderRequest, "resourcePrimKey"); - - if (resourcePrimKey == 0) { - return WorkflowConstants.STATUS_APPROVED; - } - - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - if (KBArticlePermission.contains( - permissionChecker, resourcePrimKey, ActionKeys.UPDATE)) { - - return ParamUtil.getInteger( - renderRequest, "status", WorkflowConstants.STATUS_ANY); - } - - return WorkflowConstants.STATUS_APPROVED; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/portlet/section-friendly-url-routes.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/portlet/section-friendly-url-routes.xml deleted file mode 100644 index 7ce1f9cdbc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/portlet/section-friendly-url-routes.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - /section/view.jsp - - - /{instanceId}/rss - - - cacheLevelPage - 2 - rss - - - /{instanceId}/{resourcePrimKey:\d+} - /section/view_article.jsp - normal - - - /{instanceId}/{urlTitle} - /section/view_article.jsp - - - /{instanceId}/{resourcePrimKey:\d+}/{p_p_state} - /section/view_article.jsp - - - /{instanceId}/{kbFolderUrlTitle}/{urlTitle} - /section/view_article.jsp - - - /{instanceId}/{resourcePrimKey:\d+}/{status:-?\d+}/history - /section/history.jsp - normal - - - /{instanceId}/{resourcePrimKey:\d+}/{status:-?\d+}/history/{p_p_state} - /section/history.jsp - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/search/KBArticleSearch.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/search/KBArticleSearch.java deleted file mode 100644 index 788c1554c8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/section/search/KBArticleSearch.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.section.search; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.portal.kernel.dao.search.DisplayTerms; -import com.liferay.portal.kernel.dao.search.SearchContainer; -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.OrderByComparator; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portlet.PortletPreferencesFactoryUtil; - -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleSearch extends SearchContainer { - - public static final String EMPTY_RESULTS_MESSAGE = "no-articles-were-found"; - - public KBArticleSearch( - PortletRequest portletRequest, PortletURL iteratorURL) { - - super( - portletRequest, new DisplayTerms(portletRequest), - new DisplayTerms(portletRequest), DEFAULT_CUR_PARAM, DEFAULT_DELTA, - iteratorURL, null, EMPTY_RESULTS_MESSAGE); - - try { - PortletPreferences preferences = - PortletPreferencesFactoryUtil.getPortletSetup(portletRequest); - - int defaultDelta = GetterUtil.getInteger( - preferences.getValue("kbArticlesDelta", null)); - - int delta = ParamUtil.getInteger( - portletRequest, getDeltaParam(), defaultDelta); - - setDelta(delta); - - String orderByCol = preferences.getValue( - "kbArticlesOrderByCol", StringPool.BLANK); - String orderByType = preferences.getValue( - "kbArticlesOrderByType", StringPool.BLANK); - - setOrderByCol(orderByCol); - setOrderByType(orderByType); - - OrderByComparator orderByComparator = - KnowledgeBaseUtil.getKBArticleOrderByComparator( - orderByCol, orderByType); - - setOrderByComparator(orderByComparator); - } - catch (Exception e) { - _log.error(e); - } - } - - private static Log _log = LogFactoryUtil.getLog(KBArticleSearch.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleLocalServiceBaseImpl.java deleted file mode 100644 index 0203c2ed75..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleLocalServiceBaseImpl.java +++ /dev/null @@ -1,1464 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleLocalService; -import com.liferay.knowledgebase.service.persistence.KBArticleFinder; -import com.liferay.knowledgebase.service.persistence.KBArticlePersistence; -import com.liferay.knowledgebase.service.persistence.KBCommentPersistence; -import com.liferay.knowledgebase.service.persistence.KBFolderPersistence; -import com.liferay.knowledgebase.service.persistence.KBTemplatePersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.CompanyPersistence; -import com.liferay.portal.service.persistence.GroupPersistence; -import com.liferay.portal.service.persistence.LayoutPersistence; -import com.liferay.portal.service.persistence.PortletPreferencesPersistence; -import com.liferay.portal.service.persistence.SubscriptionPersistence; -import com.liferay.portal.service.persistence.TicketPersistence; -import com.liferay.portal.service.persistence.UserPersistence; -import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence; - -import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence; -import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the k b article local service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl - * @see com.liferay.knowledgebase.service.KBArticleLocalServiceUtil - * @generated - */ -public abstract class KBArticleLocalServiceBaseImpl extends BaseLocalServiceImpl - implements KBArticleLocalService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.knowledgebase.service.KBArticleLocalServiceUtil} to access the k b article local service. - */ - - /** - * Adds the k b article to the database. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public KBArticle addKBArticle(KBArticle kbArticle) - throws SystemException { - kbArticle.setNew(true); - - return kbArticlePersistence.update(kbArticle); - } - - /** - * Creates a new k b article with the primary key. Does not add the k b article to the database. - * - * @param kbArticleId the primary key for the new k b article - * @return the new k b article - */ - @Override - public KBArticle createKBArticle(long kbArticleId) { - return kbArticlePersistence.create(kbArticleId); - } - - /** - * Deletes the k b article with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article that was removed - * @throws PortalException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public KBArticle deleteKBArticle(long kbArticleId) - throws PortalException, SystemException { - return kbArticlePersistence.remove(kbArticleId); - } - - /** - * Deletes the k b article from the database. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public KBArticle deleteKBArticle(KBArticle kbArticle) - throws PortalException, SystemException { - return kbArticlePersistence.remove(kbArticle); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(KBArticle.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 kbArticlePersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @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 kbArticlePersistence.findWithDynamicQuery(dynamicQuery, start, - end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 kbArticlePersistence.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 kbArticlePersistence.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 kbArticlePersistence.countWithDynamicQuery(dynamicQuery, - projection); - } - - @Override - public KBArticle fetchKBArticle(long kbArticleId) throws SystemException { - return kbArticlePersistence.fetchByPrimaryKey(kbArticleId); - } - - /** - * Returns the k b article with the matching UUID and company. - * - * @param uuid the k b article's UUID - * @param companyId the primary key of the company - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchKBArticleByUuidAndCompanyId(String uuid, - long companyId) throws SystemException { - return kbArticlePersistence.fetchByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the k b article matching the UUID and group. - * - * @param uuid the k b article's UUID - * @param groupId the primary key of the group - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchKBArticleByUuidAndGroupId(String uuid, long groupId) - throws SystemException { - return kbArticlePersistence.fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the k b article with the primary key. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article - * @throws PortalException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle getKBArticle(long kbArticleId) - throws PortalException, SystemException { - return kbArticlePersistence.findByPrimaryKey(kbArticleId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return kbArticlePersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns the k b article with the matching UUID and company. - * - * @param uuid the k b article's UUID - * @param companyId the primary key of the company - * @return the matching k b article - * @throws PortalException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle getKBArticleByUuidAndCompanyId(String uuid, long companyId) - throws PortalException, SystemException { - return kbArticlePersistence.findByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the k b article matching the UUID and group. - * - * @param uuid the k b article's UUID - * @param groupId the primary key of the group - * @return the matching k b article - * @throws PortalException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle getKBArticleByUuidAndGroupId(String uuid, long groupId) - throws PortalException, SystemException { - return kbArticlePersistence.findByUUID_G(uuid, groupId); - } - - /** - * Returns a range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List getKBArticles(int start, int end) - throws SystemException { - return kbArticlePersistence.findAll(start, end); - } - - /** - * Returns the number of k b articles. - * - * @return the number of k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int getKBArticlesCount() throws SystemException { - return kbArticlePersistence.countAll(); - } - - /** - * Updates the k b article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbArticle the k b article - * @return the k b article that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public KBArticle updateKBArticle(KBArticle kbArticle) - throws SystemException { - return kbArticlePersistence.update(kbArticle); - } - - /** - * Returns the k b article local service. - * - * @return the k b article local service - */ - public com.liferay.knowledgebase.service.KBArticleLocalService getKBArticleLocalService() { - return kbArticleLocalService; - } - - /** - * Sets the k b article local service. - * - * @param kbArticleLocalService the k b article local service - */ - public void setKBArticleLocalService( - com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService) { - this.kbArticleLocalService = kbArticleLocalService; - } - - /** - * Returns the k b article remote service. - * - * @return the k b article remote service - */ - public com.liferay.knowledgebase.service.KBArticleService getKBArticleService() { - return kbArticleService; - } - - /** - * Sets the k b article remote service. - * - * @param kbArticleService the k b article remote service - */ - public void setKBArticleService( - com.liferay.knowledgebase.service.KBArticleService kbArticleService) { - this.kbArticleService = kbArticleService; - } - - /** - * Returns the k b article persistence. - * - * @return the k b article persistence - */ - public KBArticlePersistence getKBArticlePersistence() { - return kbArticlePersistence; - } - - /** - * Sets the k b article persistence. - * - * @param kbArticlePersistence the k b article persistence - */ - public void setKBArticlePersistence( - KBArticlePersistence kbArticlePersistence) { - this.kbArticlePersistence = kbArticlePersistence; - } - - /** - * Returns the k b article finder. - * - * @return the k b article finder - */ - public KBArticleFinder getKBArticleFinder() { - return kbArticleFinder; - } - - /** - * Sets the k b article finder. - * - * @param kbArticleFinder the k b article finder - */ - public void setKBArticleFinder(KBArticleFinder kbArticleFinder) { - this.kbArticleFinder = kbArticleFinder; - } - - /** - * Returns the k b comment local service. - * - * @return the k b comment local service - */ - public com.liferay.knowledgebase.service.KBCommentLocalService getKBCommentLocalService() { - return kbCommentLocalService; - } - - /** - * Sets the k b comment local service. - * - * @param kbCommentLocalService the k b comment local service - */ - public void setKBCommentLocalService( - com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService) { - this.kbCommentLocalService = kbCommentLocalService; - } - - /** - * Returns the k b comment remote service. - * - * @return the k b comment remote service - */ - public com.liferay.knowledgebase.service.KBCommentService getKBCommentService() { - return kbCommentService; - } - - /** - * Sets the k b comment remote service. - * - * @param kbCommentService the k b comment remote service - */ - public void setKBCommentService( - com.liferay.knowledgebase.service.KBCommentService kbCommentService) { - this.kbCommentService = kbCommentService; - } - - /** - * Returns the k b comment persistence. - * - * @return the k b comment persistence - */ - public KBCommentPersistence getKBCommentPersistence() { - return kbCommentPersistence; - } - - /** - * Sets the k b comment persistence. - * - * @param kbCommentPersistence the k b comment persistence - */ - public void setKBCommentPersistence( - KBCommentPersistence kbCommentPersistence) { - this.kbCommentPersistence = kbCommentPersistence; - } - - /** - * Returns the k b folder local service. - * - * @return the k b folder local service - */ - public com.liferay.knowledgebase.service.KBFolderLocalService getKBFolderLocalService() { - return kbFolderLocalService; - } - - /** - * Sets the k b folder local service. - * - * @param kbFolderLocalService the k b folder local service - */ - public void setKBFolderLocalService( - com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService) { - this.kbFolderLocalService = kbFolderLocalService; - } - - /** - * Returns the k b folder remote service. - * - * @return the k b folder remote service - */ - public com.liferay.knowledgebase.service.KBFolderService getKBFolderService() { - return kbFolderService; - } - - /** - * Sets the k b folder remote service. - * - * @param kbFolderService the k b folder remote service - */ - public void setKBFolderService( - com.liferay.knowledgebase.service.KBFolderService kbFolderService) { - this.kbFolderService = kbFolderService; - } - - /** - * Returns the k b folder persistence. - * - * @return the k b folder persistence - */ - public KBFolderPersistence getKBFolderPersistence() { - return kbFolderPersistence; - } - - /** - * Sets the k b folder persistence. - * - * @param kbFolderPersistence the k b folder persistence - */ - public void setKBFolderPersistence(KBFolderPersistence kbFolderPersistence) { - this.kbFolderPersistence = kbFolderPersistence; - } - - /** - * Returns the k b template local service. - * - * @return the k b template local service - */ - public com.liferay.knowledgebase.service.KBTemplateLocalService getKBTemplateLocalService() { - return kbTemplateLocalService; - } - - /** - * Sets the k b template local service. - * - * @param kbTemplateLocalService the k b template local service - */ - public void setKBTemplateLocalService( - com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService) { - this.kbTemplateLocalService = kbTemplateLocalService; - } - - /** - * Returns the k b template remote service. - * - * @return the k b template remote service - */ - public com.liferay.knowledgebase.service.KBTemplateService getKBTemplateService() { - return kbTemplateService; - } - - /** - * Sets the k b template remote service. - * - * @param kbTemplateService the k b template remote service - */ - public void setKBTemplateService( - com.liferay.knowledgebase.service.KBTemplateService kbTemplateService) { - this.kbTemplateService = kbTemplateService; - } - - /** - * Returns the k b template persistence. - * - * @return the k b template persistence - */ - public KBTemplatePersistence getKBTemplatePersistence() { - return kbTemplatePersistence; - } - - /** - * Sets the k b template persistence. - * - * @param kbTemplatePersistence the k b template persistence - */ - public void setKBTemplatePersistence( - KBTemplatePersistence kbTemplatePersistence) { - this.kbTemplatePersistence = kbTemplatePersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * Returns the company local service. - * - * @return the company local service - */ - public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { - return companyLocalService; - } - - /** - * Sets the company local service. - * - * @param companyLocalService the company local service - */ - public void setCompanyLocalService( - com.liferay.portal.service.CompanyLocalService companyLocalService) { - this.companyLocalService = companyLocalService; - } - - /** - * Returns the company remote service. - * - * @return the company remote service - */ - public com.liferay.portal.service.CompanyService getCompanyService() { - return companyService; - } - - /** - * Sets the company remote service. - * - * @param companyService the company remote service - */ - public void setCompanyService( - com.liferay.portal.service.CompanyService companyService) { - this.companyService = companyService; - } - - /** - * Returns the company persistence. - * - * @return the company persistence - */ - public CompanyPersistence getCompanyPersistence() { - return companyPersistence; - } - - /** - * Sets the company persistence. - * - * @param companyPersistence the company persistence - */ - public void setCompanyPersistence(CompanyPersistence companyPersistence) { - this.companyPersistence = companyPersistence; - } - - /** - * Returns the group local service. - * - * @return the group local service - */ - public com.liferay.portal.service.GroupLocalService getGroupLocalService() { - return groupLocalService; - } - - /** - * Sets the group local service. - * - * @param groupLocalService the group local service - */ - public void setGroupLocalService( - com.liferay.portal.service.GroupLocalService groupLocalService) { - this.groupLocalService = groupLocalService; - } - - /** - * Returns the group remote service. - * - * @return the group remote service - */ - public com.liferay.portal.service.GroupService getGroupService() { - return groupService; - } - - /** - * Sets the group remote service. - * - * @param groupService the group remote service - */ - public void setGroupService( - com.liferay.portal.service.GroupService groupService) { - this.groupService = groupService; - } - - /** - * Returns the group persistence. - * - * @return the group persistence - */ - public GroupPersistence getGroupPersistence() { - return groupPersistence; - } - - /** - * Sets the group persistence. - * - * @param groupPersistence the group persistence - */ - public void setGroupPersistence(GroupPersistence groupPersistence) { - this.groupPersistence = groupPersistence; - } - - /** - * Returns the layout local service. - * - * @return the layout local service - */ - public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() { - return layoutLocalService; - } - - /** - * Sets the layout local service. - * - * @param layoutLocalService the layout local service - */ - public void setLayoutLocalService( - com.liferay.portal.service.LayoutLocalService layoutLocalService) { - this.layoutLocalService = layoutLocalService; - } - - /** - * Returns the layout remote service. - * - * @return the layout remote service - */ - public com.liferay.portal.service.LayoutService getLayoutService() { - return layoutService; - } - - /** - * Sets the layout remote service. - * - * @param layoutService the layout remote service - */ - public void setLayoutService( - com.liferay.portal.service.LayoutService layoutService) { - this.layoutService = layoutService; - } - - /** - * Returns the layout persistence. - * - * @return the layout persistence - */ - public LayoutPersistence getLayoutPersistence() { - return layoutPersistence; - } - - /** - * Sets the layout persistence. - * - * @param layoutPersistence the layout persistence - */ - public void setLayoutPersistence(LayoutPersistence layoutPersistence) { - this.layoutPersistence = layoutPersistence; - } - - /** - * Returns the portlet preferences local service. - * - * @return the portlet preferences local service - */ - public com.liferay.portal.service.PortletPreferencesLocalService getPortletPreferencesLocalService() { - return portletPreferencesLocalService; - } - - /** - * Sets the portlet preferences local service. - * - * @param portletPreferencesLocalService the portlet preferences local service - */ - public void setPortletPreferencesLocalService( - com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService) { - this.portletPreferencesLocalService = portletPreferencesLocalService; - } - - /** - * Returns the portlet preferences remote service. - * - * @return the portlet preferences remote service - */ - public com.liferay.portal.service.PortletPreferencesService getPortletPreferencesService() { - return portletPreferencesService; - } - - /** - * Sets the portlet preferences remote service. - * - * @param portletPreferencesService the portlet preferences remote service - */ - public void setPortletPreferencesService( - com.liferay.portal.service.PortletPreferencesService portletPreferencesService) { - this.portletPreferencesService = portletPreferencesService; - } - - /** - * Returns the portlet preferences persistence. - * - * @return the portlet preferences persistence - */ - public PortletPreferencesPersistence getPortletPreferencesPersistence() { - return portletPreferencesPersistence; - } - - /** - * Sets the portlet preferences persistence. - * - * @param portletPreferencesPersistence the portlet preferences persistence - */ - public void setPortletPreferencesPersistence( - PortletPreferencesPersistence portletPreferencesPersistence) { - this.portletPreferencesPersistence = portletPreferencesPersistence; - } - - /** - * 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 subscription local service. - * - * @return the subscription local service - */ - public com.liferay.portal.service.SubscriptionLocalService getSubscriptionLocalService() { - return subscriptionLocalService; - } - - /** - * Sets the subscription local service. - * - * @param subscriptionLocalService the subscription local service - */ - public void setSubscriptionLocalService( - com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService) { - this.subscriptionLocalService = subscriptionLocalService; - } - - /** - * Returns the subscription persistence. - * - * @return the subscription persistence - */ - public SubscriptionPersistence getSubscriptionPersistence() { - return subscriptionPersistence; - } - - /** - * Sets the subscription persistence. - * - * @param subscriptionPersistence the subscription persistence - */ - public void setSubscriptionPersistence( - SubscriptionPersistence subscriptionPersistence) { - this.subscriptionPersistence = subscriptionPersistence; - } - - /** - * Returns the ticket local service. - * - * @return the ticket local service - */ - public com.liferay.portal.service.TicketLocalService getTicketLocalService() { - return ticketLocalService; - } - - /** - * Sets the ticket local service. - * - * @param ticketLocalService the ticket local service - */ - public void setTicketLocalService( - com.liferay.portal.service.TicketLocalService ticketLocalService) { - this.ticketLocalService = ticketLocalService; - } - - /** - * Returns the ticket persistence. - * - * @return the ticket persistence - */ - public TicketPersistence getTicketPersistence() { - return ticketPersistence; - } - - /** - * Sets the ticket persistence. - * - * @param ticketPersistence the ticket persistence - */ - public void setTicketPersistence(TicketPersistence ticketPersistence) { - this.ticketPersistence = ticketPersistence; - } - - /** - * 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; - } - - /** - * Returns the workflow instance link local service. - * - * @return the workflow instance link local service - */ - public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() { - return workflowInstanceLinkLocalService; - } - - /** - * Sets the workflow instance link local service. - * - * @param workflowInstanceLinkLocalService the workflow instance link local service - */ - public void setWorkflowInstanceLinkLocalService( - com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) { - this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService; - } - - /** - * Returns the workflow instance link persistence. - * - * @return the workflow instance link persistence - */ - public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() { - return workflowInstanceLinkPersistence; - } - - /** - * Sets the workflow instance link persistence. - * - * @param workflowInstanceLinkPersistence the workflow instance link persistence - */ - public void setWorkflowInstanceLinkPersistence( - WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) { - this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the asset link local service. - * - * @return the asset link local service - */ - public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() { - return assetLinkLocalService; - } - - /** - * Sets the asset link local service. - * - * @param assetLinkLocalService the asset link local service - */ - public void setAssetLinkLocalService( - com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) { - this.assetLinkLocalService = assetLinkLocalService; - } - - /** - * Returns the asset link persistence. - * - * @return the asset link persistence - */ - public AssetLinkPersistence getAssetLinkPersistence() { - return assetLinkPersistence; - } - - /** - * Sets the asset link persistence. - * - * @param assetLinkPersistence the asset link persistence - */ - public void setAssetLinkPersistence( - AssetLinkPersistence assetLinkPersistence) { - this.assetLinkPersistence = assetLinkPersistence; - } - - /** - * Returns the ratings stats local service. - * - * @return the ratings stats local service - */ - public com.liferay.portlet.ratings.service.RatingsStatsLocalService getRatingsStatsLocalService() { - return ratingsStatsLocalService; - } - - /** - * Sets the ratings stats local service. - * - * @param ratingsStatsLocalService the ratings stats local service - */ - public void setRatingsStatsLocalService( - com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService) { - this.ratingsStatsLocalService = ratingsStatsLocalService; - } - - /** - * Returns the ratings stats persistence. - * - * @return the ratings stats persistence - */ - public RatingsStatsPersistence getRatingsStatsPersistence() { - return ratingsStatsPersistence; - } - - /** - * Sets the ratings stats persistence. - * - * @param ratingsStatsPersistence the ratings stats persistence - */ - public void setRatingsStatsPersistence( - RatingsStatsPersistence ratingsStatsPersistence) { - this.ratingsStatsPersistence = ratingsStatsPersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - public void afterPropertiesSet() { - Class clazz = getClass(); - - _classLoader = clazz.getClassLoader(); - - PersistedModelLocalServiceRegistryUtil.register("com.liferay.knowledgebase.model.KBArticle", - kbArticleLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "com.liferay.knowledgebase.model.KBArticle"); - } - - /** - * 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 KBArticle.class; - } - - protected String getModelClassName() { - return KBArticle.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = kbArticlePersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleLocalService.class) - protected com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleService.class) - protected com.liferay.knowledgebase.service.KBArticleService kbArticleService; - @BeanReference(type = KBArticlePersistence.class) - protected KBArticlePersistence kbArticlePersistence; - @BeanReference(type = KBArticleFinder.class) - protected KBArticleFinder kbArticleFinder; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentLocalService.class) - protected com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentService.class) - protected com.liferay.knowledgebase.service.KBCommentService kbCommentService; - @BeanReference(type = KBCommentPersistence.class) - protected KBCommentPersistence kbCommentPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderLocalService.class) - protected com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderService.class) - protected com.liferay.knowledgebase.service.KBFolderService kbFolderService; - @BeanReference(type = KBFolderPersistence.class) - protected KBFolderPersistence kbFolderPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateLocalService.class) - protected com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateService.class) - protected com.liferay.knowledgebase.service.KBTemplateService kbTemplateService; - @BeanReference(type = KBTemplatePersistence.class) - protected KBTemplatePersistence kbTemplatePersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) - protected com.liferay.portal.service.CompanyLocalService companyLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyService.class) - protected com.liferay.portal.service.CompanyService companyService; - @BeanReference(type = CompanyPersistence.class) - protected CompanyPersistence companyPersistence; - @BeanReference(type = com.liferay.portal.service.GroupLocalService.class) - protected com.liferay.portal.service.GroupLocalService groupLocalService; - @BeanReference(type = com.liferay.portal.service.GroupService.class) - protected com.liferay.portal.service.GroupService groupService; - @BeanReference(type = GroupPersistence.class) - protected GroupPersistence groupPersistence; - @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class) - protected com.liferay.portal.service.LayoutLocalService layoutLocalService; - @BeanReference(type = com.liferay.portal.service.LayoutService.class) - protected com.liferay.portal.service.LayoutService layoutService; - @BeanReference(type = LayoutPersistence.class) - protected LayoutPersistence layoutPersistence; - @BeanReference(type = com.liferay.portal.service.PortletPreferencesLocalService.class) - protected com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService; - @BeanReference(type = com.liferay.portal.service.PortletPreferencesService.class) - protected com.liferay.portal.service.PortletPreferencesService portletPreferencesService; - @BeanReference(type = PortletPreferencesPersistence.class) - protected PortletPreferencesPersistence portletPreferencesPersistence; - @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) - protected com.liferay.portal.service.ResourceLocalService resourceLocalService; - @BeanReference(type = com.liferay.portal.service.SubscriptionLocalService.class) - protected com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService; - @BeanReference(type = SubscriptionPersistence.class) - protected SubscriptionPersistence subscriptionPersistence; - @BeanReference(type = com.liferay.portal.service.TicketLocalService.class) - protected com.liferay.portal.service.TicketLocalService ticketLocalService; - @BeanReference(type = TicketPersistence.class) - protected TicketPersistence ticketPersistence; - @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; - @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class) - protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService; - @BeanReference(type = WorkflowInstanceLinkPersistence.class) - protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class) - protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService; - @BeanReference(type = AssetLinkPersistence.class) - protected AssetLinkPersistence assetLinkPersistence; - @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class) - protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService; - @BeanReference(type = RatingsStatsPersistence.class) - protected RatingsStatsPersistence ratingsStatsPersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private KBArticleLocalServiceClpInvoker _clpInvoker = new KBArticleLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleLocalServiceClpInvoker.java deleted file mode 100644 index 19b5b19269..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleLocalServiceClpInvoker.java +++ /dev/null @@ -1,1162 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBArticleLocalServiceClpInvoker { - public KBArticleLocalServiceClpInvoker() { - _methodName0 = "addKBArticle"; - - _methodParameterTypes0 = new String[] { - "com.liferay.knowledgebase.model.KBArticle" - }; - - _methodName1 = "createKBArticle"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteKBArticle"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteKBArticle"; - - _methodParameterTypes3 = new String[] { - "com.liferay.knowledgebase.model.KBArticle" - }; - - _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 = "fetchKBArticle"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchKBArticleByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchKBArticleByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getKBArticle"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getKBArticleByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getKBArticleByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getKBArticles"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getKBArticlesCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateKBArticle"; - - _methodParameterTypes19 = new String[] { - "com.liferay.knowledgebase.model.KBArticle" - }; - - _methodName120 = "getBeanIdentifier"; - - _methodParameterTypes120 = new String[] { }; - - _methodName121 = "setBeanIdentifier"; - - _methodParameterTypes121 = new String[] { "java.lang.String" }; - - _methodName126 = "addKBArticle"; - - _methodParameterTypes126 = new String[] { - "long", "long", "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String", - "java.lang.String[][]", "java.lang.String[][]", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName127 = "addKBArticleResources"; - - _methodParameterTypes127 = new String[] { - "com.liferay.knowledgebase.model.KBArticle", "boolean", - "boolean" - }; - - _methodName128 = "addKBArticleResources"; - - _methodParameterTypes128 = new String[] { - "com.liferay.knowledgebase.model.KBArticle", - "java.lang.String[][]", "java.lang.String[][]" - }; - - _methodName129 = "addKBArticleResources"; - - _methodParameterTypes129 = new String[] { "long", "boolean", "boolean" }; - - _methodName130 = "addKBArticleResources"; - - _methodParameterTypes130 = new String[] { - "long", "java.lang.String[][]", "java.lang.String[][]" - }; - - _methodName131 = "addKBArticlesMarkdown"; - - _methodParameterTypes131 = new String[] { - "long", "long", "long", "java.lang.String", "boolean", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName132 = "addTempAttachment"; - - _methodParameterTypes132 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String" - }; - - _methodName133 = "deleteGroupKBArticles"; - - _methodParameterTypes133 = new String[] { "long" }; - - _methodName134 = "deleteKBArticle"; - - _methodParameterTypes134 = new String[] { - "com.liferay.knowledgebase.model.KBArticle" - }; - - _methodName135 = "deleteKBArticle"; - - _methodParameterTypes135 = new String[] { "long" }; - - _methodName136 = "deleteKBArticles"; - - _methodParameterTypes136 = new String[] { "long", "long" }; - - _methodName137 = "deleteKBArticles"; - - _methodParameterTypes137 = new String[] { "long[][]" }; - - _methodName138 = "deleteTempAttachment"; - - _methodParameterTypes138 = new String[] { - "long", "long", "java.lang.String", "java.lang.String" - }; - - _methodName139 = "fetchFirstChildKBArticle"; - - _methodParameterTypes139 = new String[] { "long", "long" }; - - _methodName140 = "fetchKBArticleByUrlTitle"; - - _methodParameterTypes140 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName141 = "fetchKBArticleByUrlTitle"; - - _methodParameterTypes141 = new String[] { - "long", "java.lang.String", "java.lang.String" - }; - - _methodName142 = "fetchLatestKBArticle"; - - _methodParameterTypes142 = new String[] { "long", "int" }; - - _methodName143 = "fetchLatestKBArticleByUrlTitle"; - - _methodParameterTypes143 = new String[] { - "long", "long", "java.lang.String", "int" - }; - - _methodName144 = "getAllDescendantKBArticles"; - - _methodParameterTypes144 = new String[] { - "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName145 = "getCompanyKBArticles"; - - _methodParameterTypes145 = new String[] { - "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName146 = "getCompanyKBArticlesCount"; - - _methodParameterTypes146 = new String[] { "long", "int" }; - - _methodName147 = "getGroupKBArticles"; - - _methodParameterTypes147 = new String[] { - "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName148 = "getGroupKBArticlesCount"; - - _methodParameterTypes148 = new String[] { "long", "int" }; - - _methodName149 = "getKBArticle"; - - _methodParameterTypes149 = new String[] { "long", "int" }; - - _methodName150 = "getKBArticleAndAllDescendantKBArticles"; - - _methodParameterTypes150 = new String[] { - "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName151 = "getKBArticleAndAllDescendants"; - - _methodParameterTypes151 = new String[] { - "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName152 = "getKBArticleByUrlTitle"; - - _methodParameterTypes152 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName153 = "getKBArticleByUrlTitle"; - - _methodParameterTypes153 = new String[] { - "long", "java.lang.String", "java.lang.String" - }; - - _methodName154 = "getKBArticles"; - - _methodParameterTypes154 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName155 = "getKBArticles"; - - _methodParameterTypes155 = new String[] { - "long[][]", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName156 = "getKBArticlesCount"; - - _methodParameterTypes156 = new String[] { "long", "long", "int" }; - - _methodName157 = "getKBArticleVersions"; - - _methodParameterTypes157 = new String[] { - "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName158 = "getKBArticleVersionsCount"; - - _methodParameterTypes158 = new String[] { "long", "int" }; - - _methodName159 = "getKBFolderKBArticlesCount"; - - _methodParameterTypes159 = new String[] { "long", "long", "int" }; - - _methodName160 = "getLatestKBArticle"; - - _methodParameterTypes160 = new String[] { "long", "int" }; - - _methodName161 = "getLatestKBArticleByUrlTitle"; - - _methodParameterTypes161 = new String[] { - "long", "long", "java.lang.String", "int" - }; - - _methodName162 = "getPreviousAndNextKBArticles"; - - _methodParameterTypes162 = new String[] { "long" }; - - _methodName163 = "getSectionsKBArticles"; - - _methodParameterTypes163 = new String[] { - "long", "java.lang.String[][]", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName164 = "getSectionsKBArticlesCount"; - - _methodParameterTypes164 = new String[] { - "long", "java.lang.String[][]", "int" - }; - - _methodName165 = "getSiblingKBArticles"; - - _methodParameterTypes165 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName166 = "getSiblingKBArticlesCount"; - - _methodParameterTypes166 = new String[] { "long", "long", "int" }; - - _methodName167 = "getTempAttachmentNames"; - - _methodParameterTypes167 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName168 = "moveKBArticle"; - - _methodParameterTypes168 = new String[] { - "long", "long", "long", "long", "double" - }; - - _methodName169 = "search"; - - _methodParameterTypes169 = new String[] { - "long", "java.lang.String", "java.lang.String", "int", - "java.util.Date", "java.util.Date", "boolean", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName170 = "subscribeGroupKBArticles"; - - _methodParameterTypes170 = new String[] { "long", "long" }; - - _methodName171 = "subscribeKBArticle"; - - _methodParameterTypes171 = new String[] { "long", "long", "long" }; - - _methodName172 = "unsubscribeGroupKBArticles"; - - _methodParameterTypes172 = new String[] { "long", "long" }; - - _methodName173 = "unsubscribeKBArticle"; - - _methodParameterTypes173 = new String[] { "long", "long" }; - - _methodName174 = "updateKBArticle"; - - _methodParameterTypes174 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String[][]", - "java.lang.String[][]", "long[][]", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName175 = "updateKBArticleAsset"; - - _methodParameterTypes175 = new String[] { - "long", "com.liferay.knowledgebase.model.KBArticle", "long[][]", - "java.lang.String[][]", "long[][]" - }; - - _methodName176 = "updateKBArticleResources"; - - _methodParameterTypes176 = new String[] { - "com.liferay.knowledgebase.model.KBArticle", - "java.lang.String[][]", "java.lang.String[][]" - }; - - _methodName177 = "updateKBArticlesPriorities"; - - _methodParameterTypes177 = new String[] { "java.util.Map" }; - - _methodName178 = "updatePriority"; - - _methodParameterTypes178 = new String[] { "long", "double" }; - - _methodName179 = "updateStatus"; - - _methodParameterTypes179 = new String[] { - "long", "long", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName180 = "updateViewCount"; - - _methodParameterTypes180 = new String[] { "long", "long", "int" }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return KBArticleLocalServiceUtil.addKBArticle((com.liferay.knowledgebase.model.KBArticle)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return KBArticleLocalServiceUtil.createKBArticle(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return KBArticleLocalServiceUtil.deleteKBArticle(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return KBArticleLocalServiceUtil.deleteKBArticle((com.liferay.knowledgebase.model.KBArticle)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return KBArticleLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return KBArticleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return KBArticleLocalServiceUtil.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 KBArticleLocalServiceUtil.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 KBArticleLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return KBArticleLocalServiceUtil.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 KBArticleLocalServiceUtil.fetchKBArticle(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return KBArticleLocalServiceUtil.fetchKBArticleByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return KBArticleLocalServiceUtil.fetchKBArticleByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticle(((Long)arguments[0]).longValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return KBArticleLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticleByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName16.equals(name) && - Arrays.deepEquals(_methodParameterTypes16, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticleByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName17.equals(name) && - Arrays.deepEquals(_methodParameterTypes17, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticles(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName18.equals(name) && - Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticlesCount(); - } - - if (_methodName19.equals(name) && - Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) { - return KBArticleLocalServiceUtil.updateKBArticle((com.liferay.knowledgebase.model.KBArticle)arguments[0]); - } - - if (_methodName120.equals(name) && - Arrays.deepEquals(_methodParameterTypes120, parameterTypes)) { - return KBArticleLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName121.equals(name) && - Arrays.deepEquals(_methodParameterTypes121, parameterTypes)) { - KBArticleLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName126.equals(name) && - Arrays.deepEquals(_methodParameterTypes126, parameterTypes)) { - return KBArticleLocalServiceUtil.addKBArticle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], (java.lang.String)arguments[4], - (java.lang.String)arguments[5], (java.lang.String)arguments[6], - (java.lang.String)arguments[7], - (java.lang.String[])arguments[8], - (java.lang.String[])arguments[9], - (com.liferay.portal.service.ServiceContext)arguments[10]); - } - - if (_methodName127.equals(name) && - Arrays.deepEquals(_methodParameterTypes127, parameterTypes)) { - KBArticleLocalServiceUtil.addKBArticleResources((com.liferay.knowledgebase.model.KBArticle)arguments[0], - ((Boolean)arguments[1]).booleanValue(), - ((Boolean)arguments[2]).booleanValue()); - - return null; - } - - if (_methodName128.equals(name) && - Arrays.deepEquals(_methodParameterTypes128, parameterTypes)) { - KBArticleLocalServiceUtil.addKBArticleResources((com.liferay.knowledgebase.model.KBArticle)arguments[0], - (java.lang.String[])arguments[1], - (java.lang.String[])arguments[2]); - - return null; - } - - if (_methodName129.equals(name) && - Arrays.deepEquals(_methodParameterTypes129, parameterTypes)) { - KBArticleLocalServiceUtil.addKBArticleResources(((Long)arguments[0]).longValue(), - ((Boolean)arguments[1]).booleanValue(), - ((Boolean)arguments[2]).booleanValue()); - - return null; - } - - if (_methodName130.equals(name) && - Arrays.deepEquals(_methodParameterTypes130, parameterTypes)) { - KBArticleLocalServiceUtil.addKBArticleResources(((Long)arguments[0]).longValue(), - (java.lang.String[])arguments[1], - (java.lang.String[])arguments[2]); - - return null; - } - - if (_methodName131.equals(name) && - Arrays.deepEquals(_methodParameterTypes131, parameterTypes)) { - return KBArticleLocalServiceUtil.addKBArticlesMarkdown(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], - ((Boolean)arguments[4]).booleanValue(), - (java.io.InputStream)arguments[5], - (com.liferay.portal.service.ServiceContext)arguments[6]); - } - - if (_methodName132.equals(name) && - Arrays.deepEquals(_methodParameterTypes132, parameterTypes)) { - KBArticleLocalServiceUtil.addTempAttachment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], (java.lang.String)arguments[3], - (java.io.InputStream)arguments[4], - (java.lang.String)arguments[5]); - - return null; - } - - if (_methodName133.equals(name) && - Arrays.deepEquals(_methodParameterTypes133, parameterTypes)) { - KBArticleLocalServiceUtil.deleteGroupKBArticles(((Long)arguments[0]).longValue()); - - return null; - } - - if (_methodName134.equals(name) && - Arrays.deepEquals(_methodParameterTypes134, parameterTypes)) { - return KBArticleLocalServiceUtil.deleteKBArticle((com.liferay.knowledgebase.model.KBArticle)arguments[0]); - } - - if (_methodName135.equals(name) && - Arrays.deepEquals(_methodParameterTypes135, parameterTypes)) { - return KBArticleLocalServiceUtil.deleteKBArticle(((Long)arguments[0]).longValue()); - } - - if (_methodName136.equals(name) && - Arrays.deepEquals(_methodParameterTypes136, parameterTypes)) { - KBArticleLocalServiceUtil.deleteKBArticles(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - - return null; - } - - if (_methodName137.equals(name) && - Arrays.deepEquals(_methodParameterTypes137, parameterTypes)) { - KBArticleLocalServiceUtil.deleteKBArticles((long[])arguments[0]); - - return null; - } - - if (_methodName138.equals(name) && - Arrays.deepEquals(_methodParameterTypes138, parameterTypes)) { - KBArticleLocalServiceUtil.deleteTempAttachment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], (java.lang.String)arguments[3]); - - return null; - } - - if (_methodName139.equals(name) && - Arrays.deepEquals(_methodParameterTypes139, parameterTypes)) { - return KBArticleLocalServiceUtil.fetchFirstChildKBArticle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName140.equals(name) && - Arrays.deepEquals(_methodParameterTypes140, parameterTypes)) { - return KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); - } - - if (_methodName141.equals(name) && - Arrays.deepEquals(_methodParameterTypes141, parameterTypes)) { - return KBArticleLocalServiceUtil.fetchKBArticleByUrlTitle(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2]); - } - - if (_methodName142.equals(name) && - Arrays.deepEquals(_methodParameterTypes142, parameterTypes)) { - return KBArticleLocalServiceUtil.fetchLatestKBArticle(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName143.equals(name) && - Arrays.deepEquals(_methodParameterTypes143, parameterTypes)) { - return KBArticleLocalServiceUtil.fetchLatestKBArticleByUrlTitle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], - ((Integer)arguments[3]).intValue()); - } - - if (_methodName144.equals(name) && - Arrays.deepEquals(_methodParameterTypes144, parameterTypes)) { - return KBArticleLocalServiceUtil.getAllDescendantKBArticles(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[2]); - } - - if (_methodName145.equals(name) && - Arrays.deepEquals(_methodParameterTypes145, parameterTypes)) { - return KBArticleLocalServiceUtil.getCompanyKBArticles(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[4]); - } - - if (_methodName146.equals(name) && - Arrays.deepEquals(_methodParameterTypes146, parameterTypes)) { - return KBArticleLocalServiceUtil.getCompanyKBArticlesCount(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName147.equals(name) && - Arrays.deepEquals(_methodParameterTypes147, parameterTypes)) { - return KBArticleLocalServiceUtil.getGroupKBArticles(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[4]); - } - - if (_methodName148.equals(name) && - Arrays.deepEquals(_methodParameterTypes148, parameterTypes)) { - return KBArticleLocalServiceUtil.getGroupKBArticlesCount(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName149.equals(name) && - Arrays.deepEquals(_methodParameterTypes149, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticle(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName150.equals(name) && - Arrays.deepEquals(_methodParameterTypes150, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticleAndAllDescendantKBArticles(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[2]); - } - - if (_methodName151.equals(name) && - Arrays.deepEquals(_methodParameterTypes151, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticleAndAllDescendants(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[2]); - } - - if (_methodName152.equals(name) && - Arrays.deepEquals(_methodParameterTypes152, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticleByUrlTitle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); - } - - if (_methodName153.equals(name) && - Arrays.deepEquals(_methodParameterTypes153, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticleByUrlTitle(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2]); - } - - if (_methodName154.equals(name) && - Arrays.deepEquals(_methodParameterTypes154, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticles(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); - } - - if (_methodName155.equals(name) && - Arrays.deepEquals(_methodParameterTypes155, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticles((long[])arguments[0], - ((Integer)arguments[1]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[2]); - } - - if (_methodName156.equals(name) && - Arrays.deepEquals(_methodParameterTypes156, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticlesCount(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName157.equals(name) && - Arrays.deepEquals(_methodParameterTypes157, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticleVersions(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[4]); - } - - if (_methodName158.equals(name) && - Arrays.deepEquals(_methodParameterTypes158, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBArticleVersionsCount(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName159.equals(name) && - Arrays.deepEquals(_methodParameterTypes159, parameterTypes)) { - return KBArticleLocalServiceUtil.getKBFolderKBArticlesCount(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName160.equals(name) && - Arrays.deepEquals(_methodParameterTypes160, parameterTypes)) { - return KBArticleLocalServiceUtil.getLatestKBArticle(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName161.equals(name) && - Arrays.deepEquals(_methodParameterTypes161, parameterTypes)) { - return KBArticleLocalServiceUtil.getLatestKBArticleByUrlTitle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], - ((Integer)arguments[3]).intValue()); - } - - if (_methodName162.equals(name) && - Arrays.deepEquals(_methodParameterTypes162, parameterTypes)) { - return KBArticleLocalServiceUtil.getPreviousAndNextKBArticles(((Long)arguments[0]).longValue()); - } - - if (_methodName163.equals(name) && - Arrays.deepEquals(_methodParameterTypes163, parameterTypes)) { - return KBArticleLocalServiceUtil.getSectionsKBArticles(((Long)arguments[0]).longValue(), - (java.lang.String[])arguments[1], - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); - } - - if (_methodName164.equals(name) && - Arrays.deepEquals(_methodParameterTypes164, parameterTypes)) { - return KBArticleLocalServiceUtil.getSectionsKBArticlesCount(((Long)arguments[0]).longValue(), - (java.lang.String[])arguments[1], - ((Integer)arguments[2]).intValue()); - } - - if (_methodName165.equals(name) && - Arrays.deepEquals(_methodParameterTypes165, parameterTypes)) { - return KBArticleLocalServiceUtil.getSiblingKBArticles(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); - } - - if (_methodName166.equals(name) && - Arrays.deepEquals(_methodParameterTypes166, parameterTypes)) { - return KBArticleLocalServiceUtil.getSiblingKBArticlesCount(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName167.equals(name) && - Arrays.deepEquals(_methodParameterTypes167, parameterTypes)) { - return KBArticleLocalServiceUtil.getTempAttachmentNames(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); - } - - if (_methodName168.equals(name) && - Arrays.deepEquals(_methodParameterTypes168, parameterTypes)) { - KBArticleLocalServiceUtil.moveKBArticle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - ((Long)arguments[3]).longValue(), - ((Double)arguments[4]).doubleValue()); - - return null; - } - - if (_methodName169.equals(name) && - Arrays.deepEquals(_methodParameterTypes169, parameterTypes)) { - return KBArticleLocalServiceUtil.search(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - ((Integer)arguments[3]).intValue(), - (java.util.Date)arguments[4], (java.util.Date)arguments[5], - ((Boolean)arguments[6]).booleanValue(), - ((Integer)arguments[7]).intValue(), - ((Integer)arguments[8]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[9]); - } - - if (_methodName170.equals(name) && - Arrays.deepEquals(_methodParameterTypes170, parameterTypes)) { - KBArticleLocalServiceUtil.subscribeGroupKBArticles(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - - return null; - } - - if (_methodName171.equals(name) && - Arrays.deepEquals(_methodParameterTypes171, parameterTypes)) { - KBArticleLocalServiceUtil.subscribeKBArticle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue()); - - return null; - } - - if (_methodName172.equals(name) && - Arrays.deepEquals(_methodParameterTypes172, parameterTypes)) { - KBArticleLocalServiceUtil.unsubscribeGroupKBArticles(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - - return null; - } - - if (_methodName173.equals(name) && - Arrays.deepEquals(_methodParameterTypes173, parameterTypes)) { - KBArticleLocalServiceUtil.unsubscribeKBArticle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - - return null; - } - - if (_methodName174.equals(name) && - Arrays.deepEquals(_methodParameterTypes174, parameterTypes)) { - return KBArticleLocalServiceUtil.updateKBArticle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], (java.lang.String)arguments[3], - (java.lang.String)arguments[4], (java.lang.String)arguments[5], - (java.lang.String[])arguments[6], - (java.lang.String[])arguments[7], (long[])arguments[8], - (com.liferay.portal.service.ServiceContext)arguments[9]); - } - - if (_methodName175.equals(name) && - Arrays.deepEquals(_methodParameterTypes175, parameterTypes)) { - KBArticleLocalServiceUtil.updateKBArticleAsset(((Long)arguments[0]).longValue(), - (com.liferay.knowledgebase.model.KBArticle)arguments[1], - (long[])arguments[2], (java.lang.String[])arguments[3], - (long[])arguments[4]); - - return null; - } - - if (_methodName176.equals(name) && - Arrays.deepEquals(_methodParameterTypes176, parameterTypes)) { - KBArticleLocalServiceUtil.updateKBArticleResources((com.liferay.knowledgebase.model.KBArticle)arguments[0], - (java.lang.String[])arguments[1], - (java.lang.String[])arguments[2]); - - return null; - } - - if (_methodName177.equals(name) && - Arrays.deepEquals(_methodParameterTypes177, parameterTypes)) { - KBArticleLocalServiceUtil.updateKBArticlesPriorities((java.util.Map)arguments[0]); - - return null; - } - - if (_methodName178.equals(name) && - Arrays.deepEquals(_methodParameterTypes178, parameterTypes)) { - KBArticleLocalServiceUtil.updatePriority(((Long)arguments[0]).longValue(), - ((Double)arguments[1]).doubleValue()); - - return null; - } - - if (_methodName179.equals(name) && - Arrays.deepEquals(_methodParameterTypes179, parameterTypes)) { - return KBArticleLocalServiceUtil.updateStatus(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - (com.liferay.portal.service.ServiceContext)arguments[3]); - } - - if (_methodName180.equals(name) && - Arrays.deepEquals(_methodParameterTypes180, parameterTypes)) { - KBArticleLocalServiceUtil.updateViewCount(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - - 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 _methodName16; - private String[] _methodParameterTypes16; - private String _methodName17; - private String[] _methodParameterTypes17; - private String _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName120; - private String[] _methodParameterTypes120; - private String _methodName121; - private String[] _methodParameterTypes121; - private String _methodName126; - private String[] _methodParameterTypes126; - private String _methodName127; - private String[] _methodParameterTypes127; - private String _methodName128; - private String[] _methodParameterTypes128; - private String _methodName129; - private String[] _methodParameterTypes129; - private String _methodName130; - private String[] _methodParameterTypes130; - private String _methodName131; - private String[] _methodParameterTypes131; - private String _methodName132; - private String[] _methodParameterTypes132; - private String _methodName133; - private String[] _methodParameterTypes133; - private String _methodName134; - private String[] _methodParameterTypes134; - private String _methodName135; - private String[] _methodParameterTypes135; - private String _methodName136; - private String[] _methodParameterTypes136; - private String _methodName137; - private String[] _methodParameterTypes137; - private String _methodName138; - private String[] _methodParameterTypes138; - private String _methodName139; - private String[] _methodParameterTypes139; - private String _methodName140; - private String[] _methodParameterTypes140; - private String _methodName141; - private String[] _methodParameterTypes141; - private String _methodName142; - private String[] _methodParameterTypes142; - private String _methodName143; - private String[] _methodParameterTypes143; - private String _methodName144; - private String[] _methodParameterTypes144; - private String _methodName145; - private String[] _methodParameterTypes145; - private String _methodName146; - private String[] _methodParameterTypes146; - private String _methodName147; - private String[] _methodParameterTypes147; - private String _methodName148; - private String[] _methodParameterTypes148; - private String _methodName149; - private String[] _methodParameterTypes149; - private String _methodName150; - private String[] _methodParameterTypes150; - private String _methodName151; - private String[] _methodParameterTypes151; - private String _methodName152; - private String[] _methodParameterTypes152; - private String _methodName153; - private String[] _methodParameterTypes153; - private String _methodName154; - private String[] _methodParameterTypes154; - private String _methodName155; - private String[] _methodParameterTypes155; - private String _methodName156; - private String[] _methodParameterTypes156; - private String _methodName157; - private String[] _methodParameterTypes157; - private String _methodName158; - private String[] _methodParameterTypes158; - private String _methodName159; - private String[] _methodParameterTypes159; - private String _methodName160; - private String[] _methodParameterTypes160; - private String _methodName161; - private String[] _methodParameterTypes161; - private String _methodName162; - private String[] _methodParameterTypes162; - private String _methodName163; - private String[] _methodParameterTypes163; - private String _methodName164; - private String[] _methodParameterTypes164; - private String _methodName165; - private String[] _methodParameterTypes165; - private String _methodName166; - private String[] _methodParameterTypes166; - private String _methodName167; - private String[] _methodParameterTypes167; - private String _methodName168; - private String[] _methodParameterTypes168; - private String _methodName169; - private String[] _methodParameterTypes169; - private String _methodName170; - private String[] _methodParameterTypes170; - private String _methodName171; - private String[] _methodParameterTypes171; - private String _methodName172; - private String[] _methodParameterTypes172; - private String _methodName173; - private String[] _methodParameterTypes173; - private String _methodName174; - private String[] _methodParameterTypes174; - private String _methodName175; - private String[] _methodParameterTypes175; - private String _methodName176; - private String[] _methodParameterTypes176; - private String _methodName177; - private String[] _methodParameterTypes177; - private String _methodName178; - private String[] _methodParameterTypes178; - private String _methodName179; - private String[] _methodParameterTypes179; - private String _methodName180; - private String[] _methodParameterTypes180; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleServiceBaseImpl.java deleted file mode 100644 index d0944fdd21..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleServiceBaseImpl.java +++ /dev/null @@ -1,1170 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.service.KBArticleService; -import com.liferay.knowledgebase.service.persistence.KBArticleFinder; -import com.liferay.knowledgebase.service.persistence.KBArticlePersistence; -import com.liferay.knowledgebase.service.persistence.KBCommentPersistence; -import com.liferay.knowledgebase.service.persistence.KBFolderPersistence; -import com.liferay.knowledgebase.service.persistence.KBTemplatePersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.CompanyPersistence; -import com.liferay.portal.service.persistence.GroupPersistence; -import com.liferay.portal.service.persistence.LayoutPersistence; -import com.liferay.portal.service.persistence.PortletPreferencesPersistence; -import com.liferay.portal.service.persistence.SubscriptionPersistence; -import com.liferay.portal.service.persistence.TicketPersistence; -import com.liferay.portal.service.persistence.UserPersistence; -import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence; - -import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence; -import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the k b article remote service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.knowledgebase.service.impl.KBArticleServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.impl.KBArticleServiceImpl - * @see com.liferay.knowledgebase.service.KBArticleServiceUtil - * @generated - */ -public abstract class KBArticleServiceBaseImpl extends BaseServiceImpl - implements KBArticleService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.knowledgebase.service.KBArticleServiceUtil} to access the k b article remote service. - */ - - /** - * Returns the k b article local service. - * - * @return the k b article local service - */ - public com.liferay.knowledgebase.service.KBArticleLocalService getKBArticleLocalService() { - return kbArticleLocalService; - } - - /** - * Sets the k b article local service. - * - * @param kbArticleLocalService the k b article local service - */ - public void setKBArticleLocalService( - com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService) { - this.kbArticleLocalService = kbArticleLocalService; - } - - /** - * Returns the k b article remote service. - * - * @return the k b article remote service - */ - public com.liferay.knowledgebase.service.KBArticleService getKBArticleService() { - return kbArticleService; - } - - /** - * Sets the k b article remote service. - * - * @param kbArticleService the k b article remote service - */ - public void setKBArticleService( - com.liferay.knowledgebase.service.KBArticleService kbArticleService) { - this.kbArticleService = kbArticleService; - } - - /** - * Returns the k b article persistence. - * - * @return the k b article persistence - */ - public KBArticlePersistence getKBArticlePersistence() { - return kbArticlePersistence; - } - - /** - * Sets the k b article persistence. - * - * @param kbArticlePersistence the k b article persistence - */ - public void setKBArticlePersistence( - KBArticlePersistence kbArticlePersistence) { - this.kbArticlePersistence = kbArticlePersistence; - } - - /** - * Returns the k b article finder. - * - * @return the k b article finder - */ - public KBArticleFinder getKBArticleFinder() { - return kbArticleFinder; - } - - /** - * Sets the k b article finder. - * - * @param kbArticleFinder the k b article finder - */ - public void setKBArticleFinder(KBArticleFinder kbArticleFinder) { - this.kbArticleFinder = kbArticleFinder; - } - - /** - * Returns the k b comment local service. - * - * @return the k b comment local service - */ - public com.liferay.knowledgebase.service.KBCommentLocalService getKBCommentLocalService() { - return kbCommentLocalService; - } - - /** - * Sets the k b comment local service. - * - * @param kbCommentLocalService the k b comment local service - */ - public void setKBCommentLocalService( - com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService) { - this.kbCommentLocalService = kbCommentLocalService; - } - - /** - * Returns the k b comment remote service. - * - * @return the k b comment remote service - */ - public com.liferay.knowledgebase.service.KBCommentService getKBCommentService() { - return kbCommentService; - } - - /** - * Sets the k b comment remote service. - * - * @param kbCommentService the k b comment remote service - */ - public void setKBCommentService( - com.liferay.knowledgebase.service.KBCommentService kbCommentService) { - this.kbCommentService = kbCommentService; - } - - /** - * Returns the k b comment persistence. - * - * @return the k b comment persistence - */ - public KBCommentPersistence getKBCommentPersistence() { - return kbCommentPersistence; - } - - /** - * Sets the k b comment persistence. - * - * @param kbCommentPersistence the k b comment persistence - */ - public void setKBCommentPersistence( - KBCommentPersistence kbCommentPersistence) { - this.kbCommentPersistence = kbCommentPersistence; - } - - /** - * Returns the k b folder local service. - * - * @return the k b folder local service - */ - public com.liferay.knowledgebase.service.KBFolderLocalService getKBFolderLocalService() { - return kbFolderLocalService; - } - - /** - * Sets the k b folder local service. - * - * @param kbFolderLocalService the k b folder local service - */ - public void setKBFolderLocalService( - com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService) { - this.kbFolderLocalService = kbFolderLocalService; - } - - /** - * Returns the k b folder remote service. - * - * @return the k b folder remote service - */ - public com.liferay.knowledgebase.service.KBFolderService getKBFolderService() { - return kbFolderService; - } - - /** - * Sets the k b folder remote service. - * - * @param kbFolderService the k b folder remote service - */ - public void setKBFolderService( - com.liferay.knowledgebase.service.KBFolderService kbFolderService) { - this.kbFolderService = kbFolderService; - } - - /** - * Returns the k b folder persistence. - * - * @return the k b folder persistence - */ - public KBFolderPersistence getKBFolderPersistence() { - return kbFolderPersistence; - } - - /** - * Sets the k b folder persistence. - * - * @param kbFolderPersistence the k b folder persistence - */ - public void setKBFolderPersistence(KBFolderPersistence kbFolderPersistence) { - this.kbFolderPersistence = kbFolderPersistence; - } - - /** - * Returns the k b template local service. - * - * @return the k b template local service - */ - public com.liferay.knowledgebase.service.KBTemplateLocalService getKBTemplateLocalService() { - return kbTemplateLocalService; - } - - /** - * Sets the k b template local service. - * - * @param kbTemplateLocalService the k b template local service - */ - public void setKBTemplateLocalService( - com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService) { - this.kbTemplateLocalService = kbTemplateLocalService; - } - - /** - * Returns the k b template remote service. - * - * @return the k b template remote service - */ - public com.liferay.knowledgebase.service.KBTemplateService getKBTemplateService() { - return kbTemplateService; - } - - /** - * Sets the k b template remote service. - * - * @param kbTemplateService the k b template remote service - */ - public void setKBTemplateService( - com.liferay.knowledgebase.service.KBTemplateService kbTemplateService) { - this.kbTemplateService = kbTemplateService; - } - - /** - * Returns the k b template persistence. - * - * @return the k b template persistence - */ - public KBTemplatePersistence getKBTemplatePersistence() { - return kbTemplatePersistence; - } - - /** - * Sets the k b template persistence. - * - * @param kbTemplatePersistence the k b template persistence - */ - public void setKBTemplatePersistence( - KBTemplatePersistence kbTemplatePersistence) { - this.kbTemplatePersistence = kbTemplatePersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * Returns the company local service. - * - * @return the company local service - */ - public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { - return companyLocalService; - } - - /** - * Sets the company local service. - * - * @param companyLocalService the company local service - */ - public void setCompanyLocalService( - com.liferay.portal.service.CompanyLocalService companyLocalService) { - this.companyLocalService = companyLocalService; - } - - /** - * Returns the company remote service. - * - * @return the company remote service - */ - public com.liferay.portal.service.CompanyService getCompanyService() { - return companyService; - } - - /** - * Sets the company remote service. - * - * @param companyService the company remote service - */ - public void setCompanyService( - com.liferay.portal.service.CompanyService companyService) { - this.companyService = companyService; - } - - /** - * Returns the company persistence. - * - * @return the company persistence - */ - public CompanyPersistence getCompanyPersistence() { - return companyPersistence; - } - - /** - * Sets the company persistence. - * - * @param companyPersistence the company persistence - */ - public void setCompanyPersistence(CompanyPersistence companyPersistence) { - this.companyPersistence = companyPersistence; - } - - /** - * Returns the group local service. - * - * @return the group local service - */ - public com.liferay.portal.service.GroupLocalService getGroupLocalService() { - return groupLocalService; - } - - /** - * Sets the group local service. - * - * @param groupLocalService the group local service - */ - public void setGroupLocalService( - com.liferay.portal.service.GroupLocalService groupLocalService) { - this.groupLocalService = groupLocalService; - } - - /** - * Returns the group remote service. - * - * @return the group remote service - */ - public com.liferay.portal.service.GroupService getGroupService() { - return groupService; - } - - /** - * Sets the group remote service. - * - * @param groupService the group remote service - */ - public void setGroupService( - com.liferay.portal.service.GroupService groupService) { - this.groupService = groupService; - } - - /** - * Returns the group persistence. - * - * @return the group persistence - */ - public GroupPersistence getGroupPersistence() { - return groupPersistence; - } - - /** - * Sets the group persistence. - * - * @param groupPersistence the group persistence - */ - public void setGroupPersistence(GroupPersistence groupPersistence) { - this.groupPersistence = groupPersistence; - } - - /** - * Returns the layout local service. - * - * @return the layout local service - */ - public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() { - return layoutLocalService; - } - - /** - * Sets the layout local service. - * - * @param layoutLocalService the layout local service - */ - public void setLayoutLocalService( - com.liferay.portal.service.LayoutLocalService layoutLocalService) { - this.layoutLocalService = layoutLocalService; - } - - /** - * Returns the layout remote service. - * - * @return the layout remote service - */ - public com.liferay.portal.service.LayoutService getLayoutService() { - return layoutService; - } - - /** - * Sets the layout remote service. - * - * @param layoutService the layout remote service - */ - public void setLayoutService( - com.liferay.portal.service.LayoutService layoutService) { - this.layoutService = layoutService; - } - - /** - * Returns the layout persistence. - * - * @return the layout persistence - */ - public LayoutPersistence getLayoutPersistence() { - return layoutPersistence; - } - - /** - * Sets the layout persistence. - * - * @param layoutPersistence the layout persistence - */ - public void setLayoutPersistence(LayoutPersistence layoutPersistence) { - this.layoutPersistence = layoutPersistence; - } - - /** - * Returns the portlet preferences local service. - * - * @return the portlet preferences local service - */ - public com.liferay.portal.service.PortletPreferencesLocalService getPortletPreferencesLocalService() { - return portletPreferencesLocalService; - } - - /** - * Sets the portlet preferences local service. - * - * @param portletPreferencesLocalService the portlet preferences local service - */ - public void setPortletPreferencesLocalService( - com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService) { - this.portletPreferencesLocalService = portletPreferencesLocalService; - } - - /** - * Returns the portlet preferences remote service. - * - * @return the portlet preferences remote service - */ - public com.liferay.portal.service.PortletPreferencesService getPortletPreferencesService() { - return portletPreferencesService; - } - - /** - * Sets the portlet preferences remote service. - * - * @param portletPreferencesService the portlet preferences remote service - */ - public void setPortletPreferencesService( - com.liferay.portal.service.PortletPreferencesService portletPreferencesService) { - this.portletPreferencesService = portletPreferencesService; - } - - /** - * Returns the portlet preferences persistence. - * - * @return the portlet preferences persistence - */ - public PortletPreferencesPersistence getPortletPreferencesPersistence() { - return portletPreferencesPersistence; - } - - /** - * Sets the portlet preferences persistence. - * - * @param portletPreferencesPersistence the portlet preferences persistence - */ - public void setPortletPreferencesPersistence( - PortletPreferencesPersistence portletPreferencesPersistence) { - this.portletPreferencesPersistence = portletPreferencesPersistence; - } - - /** - * 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 subscription local service. - * - * @return the subscription local service - */ - public com.liferay.portal.service.SubscriptionLocalService getSubscriptionLocalService() { - return subscriptionLocalService; - } - - /** - * Sets the subscription local service. - * - * @param subscriptionLocalService the subscription local service - */ - public void setSubscriptionLocalService( - com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService) { - this.subscriptionLocalService = subscriptionLocalService; - } - - /** - * Returns the subscription persistence. - * - * @return the subscription persistence - */ - public SubscriptionPersistence getSubscriptionPersistence() { - return subscriptionPersistence; - } - - /** - * Sets the subscription persistence. - * - * @param subscriptionPersistence the subscription persistence - */ - public void setSubscriptionPersistence( - SubscriptionPersistence subscriptionPersistence) { - this.subscriptionPersistence = subscriptionPersistence; - } - - /** - * Returns the ticket local service. - * - * @return the ticket local service - */ - public com.liferay.portal.service.TicketLocalService getTicketLocalService() { - return ticketLocalService; - } - - /** - * Sets the ticket local service. - * - * @param ticketLocalService the ticket local service - */ - public void setTicketLocalService( - com.liferay.portal.service.TicketLocalService ticketLocalService) { - this.ticketLocalService = ticketLocalService; - } - - /** - * Returns the ticket persistence. - * - * @return the ticket persistence - */ - public TicketPersistence getTicketPersistence() { - return ticketPersistence; - } - - /** - * Sets the ticket persistence. - * - * @param ticketPersistence the ticket persistence - */ - public void setTicketPersistence(TicketPersistence ticketPersistence) { - this.ticketPersistence = ticketPersistence; - } - - /** - * 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; - } - - /** - * Returns the workflow instance link local service. - * - * @return the workflow instance link local service - */ - public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() { - return workflowInstanceLinkLocalService; - } - - /** - * Sets the workflow instance link local service. - * - * @param workflowInstanceLinkLocalService the workflow instance link local service - */ - public void setWorkflowInstanceLinkLocalService( - com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) { - this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService; - } - - /** - * Returns the workflow instance link persistence. - * - * @return the workflow instance link persistence - */ - public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() { - return workflowInstanceLinkPersistence; - } - - /** - * Sets the workflow instance link persistence. - * - * @param workflowInstanceLinkPersistence the workflow instance link persistence - */ - public void setWorkflowInstanceLinkPersistence( - WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) { - this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the asset link local service. - * - * @return the asset link local service - */ - public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() { - return assetLinkLocalService; - } - - /** - * Sets the asset link local service. - * - * @param assetLinkLocalService the asset link local service - */ - public void setAssetLinkLocalService( - com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) { - this.assetLinkLocalService = assetLinkLocalService; - } - - /** - * Returns the asset link persistence. - * - * @return the asset link persistence - */ - public AssetLinkPersistence getAssetLinkPersistence() { - return assetLinkPersistence; - } - - /** - * Sets the asset link persistence. - * - * @param assetLinkPersistence the asset link persistence - */ - public void setAssetLinkPersistence( - AssetLinkPersistence assetLinkPersistence) { - this.assetLinkPersistence = assetLinkPersistence; - } - - /** - * Returns the ratings stats local service. - * - * @return the ratings stats local service - */ - public com.liferay.portlet.ratings.service.RatingsStatsLocalService getRatingsStatsLocalService() { - return ratingsStatsLocalService; - } - - /** - * Sets the ratings stats local service. - * - * @param ratingsStatsLocalService the ratings stats local service - */ - public void setRatingsStatsLocalService( - com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService) { - this.ratingsStatsLocalService = ratingsStatsLocalService; - } - - /** - * Returns the ratings stats persistence. - * - * @return the ratings stats persistence - */ - public RatingsStatsPersistence getRatingsStatsPersistence() { - return ratingsStatsPersistence; - } - - /** - * Sets the ratings stats persistence. - * - * @param ratingsStatsPersistence the ratings stats persistence - */ - public void setRatingsStatsPersistence( - RatingsStatsPersistence ratingsStatsPersistence) { - this.ratingsStatsPersistence = ratingsStatsPersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - 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 KBArticle.class; - } - - protected String getModelClassName() { - return KBArticle.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = kbArticlePersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleLocalService.class) - protected com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleService.class) - protected com.liferay.knowledgebase.service.KBArticleService kbArticleService; - @BeanReference(type = KBArticlePersistence.class) - protected KBArticlePersistence kbArticlePersistence; - @BeanReference(type = KBArticleFinder.class) - protected KBArticleFinder kbArticleFinder; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentLocalService.class) - protected com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentService.class) - protected com.liferay.knowledgebase.service.KBCommentService kbCommentService; - @BeanReference(type = KBCommentPersistence.class) - protected KBCommentPersistence kbCommentPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderLocalService.class) - protected com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderService.class) - protected com.liferay.knowledgebase.service.KBFolderService kbFolderService; - @BeanReference(type = KBFolderPersistence.class) - protected KBFolderPersistence kbFolderPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateLocalService.class) - protected com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateService.class) - protected com.liferay.knowledgebase.service.KBTemplateService kbTemplateService; - @BeanReference(type = KBTemplatePersistence.class) - protected KBTemplatePersistence kbTemplatePersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) - protected com.liferay.portal.service.CompanyLocalService companyLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyService.class) - protected com.liferay.portal.service.CompanyService companyService; - @BeanReference(type = CompanyPersistence.class) - protected CompanyPersistence companyPersistence; - @BeanReference(type = com.liferay.portal.service.GroupLocalService.class) - protected com.liferay.portal.service.GroupLocalService groupLocalService; - @BeanReference(type = com.liferay.portal.service.GroupService.class) - protected com.liferay.portal.service.GroupService groupService; - @BeanReference(type = GroupPersistence.class) - protected GroupPersistence groupPersistence; - @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class) - protected com.liferay.portal.service.LayoutLocalService layoutLocalService; - @BeanReference(type = com.liferay.portal.service.LayoutService.class) - protected com.liferay.portal.service.LayoutService layoutService; - @BeanReference(type = LayoutPersistence.class) - protected LayoutPersistence layoutPersistence; - @BeanReference(type = com.liferay.portal.service.PortletPreferencesLocalService.class) - protected com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService; - @BeanReference(type = com.liferay.portal.service.PortletPreferencesService.class) - protected com.liferay.portal.service.PortletPreferencesService portletPreferencesService; - @BeanReference(type = PortletPreferencesPersistence.class) - protected PortletPreferencesPersistence portletPreferencesPersistence; - @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) - protected com.liferay.portal.service.ResourceLocalService resourceLocalService; - @BeanReference(type = com.liferay.portal.service.SubscriptionLocalService.class) - protected com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService; - @BeanReference(type = SubscriptionPersistence.class) - protected SubscriptionPersistence subscriptionPersistence; - @BeanReference(type = com.liferay.portal.service.TicketLocalService.class) - protected com.liferay.portal.service.TicketLocalService ticketLocalService; - @BeanReference(type = TicketPersistence.class) - protected TicketPersistence ticketPersistence; - @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; - @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class) - protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService; - @BeanReference(type = WorkflowInstanceLinkPersistence.class) - protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class) - protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService; - @BeanReference(type = AssetLinkPersistence.class) - protected AssetLinkPersistence assetLinkPersistence; - @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class) - protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService; - @BeanReference(type = RatingsStatsPersistence.class) - protected RatingsStatsPersistence ratingsStatsPersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private KBArticleServiceClpInvoker _clpInvoker = new KBArticleServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleServiceClpInvoker.java deleted file mode 100644 index 485443b7c8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBArticleServiceClpInvoker.java +++ /dev/null @@ -1,615 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.service.KBArticleServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBArticleServiceClpInvoker { - public KBArticleServiceClpInvoker() { - _methodName100 = "getBeanIdentifier"; - - _methodParameterTypes100 = new String[] { }; - - _methodName101 = "setBeanIdentifier"; - - _methodParameterTypes101 = new String[] { "java.lang.String" }; - - _methodName106 = "addKBArticle"; - - _methodParameterTypes106 = new String[] { - "java.lang.String", "long", "long", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String[][]", - "java.lang.String[][]", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName107 = "addKBArticlesMarkdown"; - - _methodParameterTypes107 = new String[] { - "long", "long", "java.lang.String", "boolean", - "java.io.InputStream", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName108 = "addTempAttachment"; - - _methodParameterTypes108 = new String[] { - "long", "long", "java.lang.String", "java.lang.String", - "java.io.InputStream", "java.lang.String" - }; - - _methodName109 = "deleteKBArticle"; - - _methodParameterTypes109 = new String[] { "long" }; - - _methodName110 = "deleteKBArticles"; - - _methodParameterTypes110 = new String[] { "long", "long[][]" }; - - _methodName111 = "deleteTempAttachment"; - - _methodParameterTypes111 = new String[] { - "long", "long", "java.lang.String", "java.lang.String" - }; - - _methodName112 = "fetchLatestKBArticle"; - - _methodParameterTypes112 = new String[] { "long", "int" }; - - _methodName113 = "getGroupKBArticles"; - - _methodParameterTypes113 = new String[] { - "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName114 = "getGroupKBArticlesCount"; - - _methodParameterTypes114 = new String[] { "long", "int" }; - - _methodName115 = "getGroupKBArticlesRSS"; - - _methodParameterTypes115 = new String[] { - "int", "int", "java.lang.String", "java.lang.String", - "com.liferay.portal.theme.ThemeDisplay" - }; - - _methodName116 = "getKBArticle"; - - _methodParameterTypes116 = new String[] { "long", "int" }; - - _methodName117 = "getKBArticleAndAllDescendantKBArticles"; - - _methodParameterTypes117 = new String[] { - "long", "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName118 = "getKBArticleAndAllDescendants"; - - _methodParameterTypes118 = new String[] { - "long", "long", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName119 = "getKBArticleRSS"; - - _methodParameterTypes119 = new String[] { - "long", "int", "int", "java.lang.String", "java.lang.String", - "com.liferay.portal.theme.ThemeDisplay" - }; - - _methodName120 = "getKBArticles"; - - _methodParameterTypes120 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName121 = "getKBArticles"; - - _methodParameterTypes121 = new String[] { - "long", "long[][]", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName122 = "getKBArticles"; - - _methodParameterTypes122 = new String[] { - "long", "long[][]", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName123 = "getKBArticlesCount"; - - _methodParameterTypes123 = new String[] { "long", "long", "int" }; - - _methodName124 = "getKBArticlesCount"; - - _methodParameterTypes124 = new String[] { "long", "long[][]", "int" }; - - _methodName125 = "getKBArticleSearchDisplay"; - - _methodParameterTypes125 = new String[] { - "long", "java.lang.String", "java.lang.String", "int", - "java.util.Date", "java.util.Date", "boolean", "int[][]", "int", - "int", "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName126 = "getKBArticleVersions"; - - _methodParameterTypes126 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName127 = "getKBArticleVersionsCount"; - - _methodParameterTypes127 = new String[] { "long", "long", "int" }; - - _methodName128 = "getLatestKBArticle"; - - _methodParameterTypes128 = new String[] { "long", "int" }; - - _methodName129 = "getSectionsKBArticles"; - - _methodParameterTypes129 = new String[] { - "long", "java.lang.String[][]", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName130 = "getSectionsKBArticlesCount"; - - _methodParameterTypes130 = new String[] { - "long", "java.lang.String[][]", "int" - }; - - _methodName131 = "getSiblingKBArticles"; - - _methodParameterTypes131 = new String[] { - "long", "long", "int", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName132 = "getSiblingKBArticlesCount"; - - _methodParameterTypes132 = new String[] { "long", "long", "int" }; - - _methodName133 = "getTempAttachmentNames"; - - _methodParameterTypes133 = new String[] { "long", "java.lang.String" }; - - _methodName134 = "moveKBArticle"; - - _methodParameterTypes134 = new String[] { "long", "long", "long", "double" }; - - _methodName135 = "subscribeGroupKBArticles"; - - _methodParameterTypes135 = new String[] { "long", "java.lang.String" }; - - _methodName136 = "subscribeKBArticle"; - - _methodParameterTypes136 = new String[] { "long", "long" }; - - _methodName137 = "unsubscribeGroupKBArticles"; - - _methodParameterTypes137 = new String[] { "long", "java.lang.String" }; - - _methodName138 = "unsubscribeKBArticle"; - - _methodParameterTypes138 = new String[] { "long" }; - - _methodName139 = "updateKBArticle"; - - _methodParameterTypes139 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String[][]", - "java.lang.String[][]", "long[][]", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName140 = "updateKBArticlesPriorities"; - - _methodParameterTypes140 = new String[] { "long", "java.util.Map" }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName100.equals(name) && - Arrays.deepEquals(_methodParameterTypes100, parameterTypes)) { - return KBArticleServiceUtil.getBeanIdentifier(); - } - - if (_methodName101.equals(name) && - Arrays.deepEquals(_methodParameterTypes101, parameterTypes)) { - KBArticleServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName106.equals(name) && - Arrays.deepEquals(_methodParameterTypes106, parameterTypes)) { - return KBArticleServiceUtil.addKBArticle((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], (java.lang.String)arguments[4], - (java.lang.String)arguments[5], (java.lang.String)arguments[6], - (java.lang.String)arguments[7], - (java.lang.String[])arguments[8], - (java.lang.String[])arguments[9], - (com.liferay.portal.service.ServiceContext)arguments[10]); - } - - if (_methodName107.equals(name) && - Arrays.deepEquals(_methodParameterTypes107, parameterTypes)) { - return KBArticleServiceUtil.addKBArticlesMarkdown(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], - ((Boolean)arguments[3]).booleanValue(), - (java.io.InputStream)arguments[4], - (com.liferay.portal.service.ServiceContext)arguments[5]); - } - - if (_methodName108.equals(name) && - Arrays.deepEquals(_methodParameterTypes108, parameterTypes)) { - KBArticleServiceUtil.addTempAttachment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], (java.lang.String)arguments[3], - (java.io.InputStream)arguments[4], - (java.lang.String)arguments[5]); - - return null; - } - - if (_methodName109.equals(name) && - Arrays.deepEquals(_methodParameterTypes109, parameterTypes)) { - return KBArticleServiceUtil.deleteKBArticle(((Long)arguments[0]).longValue()); - } - - if (_methodName110.equals(name) && - Arrays.deepEquals(_methodParameterTypes110, parameterTypes)) { - KBArticleServiceUtil.deleteKBArticles(((Long)arguments[0]).longValue(), - (long[])arguments[1]); - - return null; - } - - if (_methodName111.equals(name) && - Arrays.deepEquals(_methodParameterTypes111, parameterTypes)) { - KBArticleServiceUtil.deleteTempAttachment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - (java.lang.String)arguments[2], (java.lang.String)arguments[3]); - - return null; - } - - if (_methodName112.equals(name) && - Arrays.deepEquals(_methodParameterTypes112, parameterTypes)) { - return KBArticleServiceUtil.fetchLatestKBArticle(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName113.equals(name) && - Arrays.deepEquals(_methodParameterTypes113, parameterTypes)) { - return KBArticleServiceUtil.getGroupKBArticles(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[4]); - } - - if (_methodName114.equals(name) && - Arrays.deepEquals(_methodParameterTypes114, parameterTypes)) { - return KBArticleServiceUtil.getGroupKBArticlesCount(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName115.equals(name) && - Arrays.deepEquals(_methodParameterTypes115, parameterTypes)) { - return KBArticleServiceUtil.getGroupKBArticlesRSS(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue(), - (java.lang.String)arguments[2], (java.lang.String)arguments[3], - (com.liferay.portal.theme.ThemeDisplay)arguments[4]); - } - - if (_methodName116.equals(name) && - Arrays.deepEquals(_methodParameterTypes116, parameterTypes)) { - return KBArticleServiceUtil.getKBArticle(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName117.equals(name) && - Arrays.deepEquals(_methodParameterTypes117, parameterTypes)) { - return KBArticleServiceUtil.getKBArticleAndAllDescendantKBArticles(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); - } - - if (_methodName118.equals(name) && - Arrays.deepEquals(_methodParameterTypes118, parameterTypes)) { - return KBArticleServiceUtil.getKBArticleAndAllDescendants(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); - } - - if (_methodName119.equals(name) && - Arrays.deepEquals(_methodParameterTypes119, parameterTypes)) { - return KBArticleServiceUtil.getKBArticleRSS(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - (java.lang.String)arguments[3], (java.lang.String)arguments[4], - (com.liferay.portal.theme.ThemeDisplay)arguments[5]); - } - - if (_methodName120.equals(name) && - Arrays.deepEquals(_methodParameterTypes120, parameterTypes)) { - return KBArticleServiceUtil.getKBArticles(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); - } - - if (_methodName121.equals(name) && - Arrays.deepEquals(_methodParameterTypes121, parameterTypes)) { - return KBArticleServiceUtil.getKBArticles(((Long)arguments[0]).longValue(), - (long[])arguments[1], ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); - } - - if (_methodName122.equals(name) && - Arrays.deepEquals(_methodParameterTypes122, parameterTypes)) { - return KBArticleServiceUtil.getKBArticles(((Long)arguments[0]).longValue(), - (long[])arguments[1], ((Integer)arguments[2]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); - } - - if (_methodName123.equals(name) && - Arrays.deepEquals(_methodParameterTypes123, parameterTypes)) { - return KBArticleServiceUtil.getKBArticlesCount(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName124.equals(name) && - Arrays.deepEquals(_methodParameterTypes124, parameterTypes)) { - return KBArticleServiceUtil.getKBArticlesCount(((Long)arguments[0]).longValue(), - (long[])arguments[1], ((Integer)arguments[2]).intValue()); - } - - if (_methodName125.equals(name) && - Arrays.deepEquals(_methodParameterTypes125, parameterTypes)) { - return KBArticleServiceUtil.getKBArticleSearchDisplay(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - ((Integer)arguments[3]).intValue(), - (java.util.Date)arguments[4], (java.util.Date)arguments[5], - ((Boolean)arguments[6]).booleanValue(), (int[])arguments[7], - ((Integer)arguments[8]).intValue(), - ((Integer)arguments[9]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[10]); - } - - if (_methodName126.equals(name) && - Arrays.deepEquals(_methodParameterTypes126, parameterTypes)) { - return KBArticleServiceUtil.getKBArticleVersions(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); - } - - if (_methodName127.equals(name) && - Arrays.deepEquals(_methodParameterTypes127, parameterTypes)) { - return KBArticleServiceUtil.getKBArticleVersionsCount(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName128.equals(name) && - Arrays.deepEquals(_methodParameterTypes128, parameterTypes)) { - return KBArticleServiceUtil.getLatestKBArticle(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName129.equals(name) && - Arrays.deepEquals(_methodParameterTypes129, parameterTypes)) { - return KBArticleServiceUtil.getSectionsKBArticles(((Long)arguments[0]).longValue(), - (java.lang.String[])arguments[1], - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); - } - - if (_methodName130.equals(name) && - Arrays.deepEquals(_methodParameterTypes130, parameterTypes)) { - return KBArticleServiceUtil.getSectionsKBArticlesCount(((Long)arguments[0]).longValue(), - (java.lang.String[])arguments[1], - ((Integer)arguments[2]).intValue()); - } - - if (_methodName131.equals(name) && - Arrays.deepEquals(_methodParameterTypes131, parameterTypes)) { - return KBArticleServiceUtil.getSiblingKBArticles(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); - } - - if (_methodName132.equals(name) && - Arrays.deepEquals(_methodParameterTypes132, parameterTypes)) { - return KBArticleServiceUtil.getSiblingKBArticlesCount(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName133.equals(name) && - Arrays.deepEquals(_methodParameterTypes133, parameterTypes)) { - return KBArticleServiceUtil.getTempAttachmentNames(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - if (_methodName134.equals(name) && - Arrays.deepEquals(_methodParameterTypes134, parameterTypes)) { - KBArticleServiceUtil.moveKBArticle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - ((Double)arguments[3]).doubleValue()); - - return null; - } - - if (_methodName135.equals(name) && - Arrays.deepEquals(_methodParameterTypes135, parameterTypes)) { - KBArticleServiceUtil.subscribeGroupKBArticles(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - - return null; - } - - if (_methodName136.equals(name) && - Arrays.deepEquals(_methodParameterTypes136, parameterTypes)) { - KBArticleServiceUtil.subscribeKBArticle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - - return null; - } - - if (_methodName137.equals(name) && - Arrays.deepEquals(_methodParameterTypes137, parameterTypes)) { - KBArticleServiceUtil.unsubscribeGroupKBArticles(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - - return null; - } - - if (_methodName138.equals(name) && - Arrays.deepEquals(_methodParameterTypes138, parameterTypes)) { - KBArticleServiceUtil.unsubscribeKBArticle(((Long)arguments[0]).longValue()); - - return null; - } - - if (_methodName139.equals(name) && - Arrays.deepEquals(_methodParameterTypes139, parameterTypes)) { - return KBArticleServiceUtil.updateKBArticle(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (java.lang.String)arguments[3], (java.lang.String)arguments[4], - (java.lang.String[])arguments[5], - (java.lang.String[])arguments[6], (long[])arguments[7], - (com.liferay.portal.service.ServiceContext)arguments[8]); - } - - if (_methodName140.equals(name) && - Arrays.deepEquals(_methodParameterTypes140, parameterTypes)) { - KBArticleServiceUtil.updateKBArticlesPriorities(((Long)arguments[0]).longValue(), - (java.util.Map)arguments[1]); - - return null; - } - - throw new UnsupportedOperationException(); - } - - private String _methodName100; - private String[] _methodParameterTypes100; - private String _methodName101; - private String[] _methodParameterTypes101; - private String _methodName106; - private String[] _methodParameterTypes106; - private String _methodName107; - private String[] _methodParameterTypes107; - private String _methodName108; - private String[] _methodParameterTypes108; - private String _methodName109; - private String[] _methodParameterTypes109; - private String _methodName110; - private String[] _methodParameterTypes110; - private String _methodName111; - private String[] _methodParameterTypes111; - private String _methodName112; - private String[] _methodParameterTypes112; - private String _methodName113; - private String[] _methodParameterTypes113; - private String _methodName114; - private String[] _methodParameterTypes114; - private String _methodName115; - private String[] _methodParameterTypes115; - private String _methodName116; - private String[] _methodParameterTypes116; - private String _methodName117; - private String[] _methodParameterTypes117; - private String _methodName118; - private String[] _methodParameterTypes118; - private String _methodName119; - private String[] _methodParameterTypes119; - private String _methodName120; - private String[] _methodParameterTypes120; - private String _methodName121; - private String[] _methodParameterTypes121; - private String _methodName122; - private String[] _methodParameterTypes122; - private String _methodName123; - private String[] _methodParameterTypes123; - private String _methodName124; - private String[] _methodParameterTypes124; - private String _methodName125; - private String[] _methodParameterTypes125; - private String _methodName126; - private String[] _methodParameterTypes126; - private String _methodName127; - private String[] _methodParameterTypes127; - private String _methodName128; - private String[] _methodParameterTypes128; - private String _methodName129; - private String[] _methodParameterTypes129; - private String _methodName130; - private String[] _methodParameterTypes130; - private String _methodName131; - private String[] _methodParameterTypes131; - private String _methodName132; - private String[] _methodParameterTypes132; - private String _methodName133; - private String[] _methodParameterTypes133; - private String _methodName134; - private String[] _methodParameterTypes134; - private String _methodName135; - private String[] _methodParameterTypes135; - private String _methodName136; - private String[] _methodParameterTypes136; - private String _methodName137; - private String[] _methodParameterTypes137; - private String _methodName138; - private String[] _methodParameterTypes138; - private String _methodName139; - private String[] _methodParameterTypes139; - private String _methodName140; - private String[] _methodParameterTypes140; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentLocalServiceBaseImpl.java deleted file mode 100644 index 09caba4e36..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentLocalServiceBaseImpl.java +++ /dev/null @@ -1,1061 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.service.KBCommentLocalService; -import com.liferay.knowledgebase.service.persistence.KBArticleFinder; -import com.liferay.knowledgebase.service.persistence.KBArticlePersistence; -import com.liferay.knowledgebase.service.persistence.KBCommentPersistence; -import com.liferay.knowledgebase.service.persistence.KBFolderPersistence; -import com.liferay.knowledgebase.service.persistence.KBTemplatePersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.PortletPreferencesPersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the k b comment local service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.knowledgebase.service.impl.KBCommentLocalServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.impl.KBCommentLocalServiceImpl - * @see com.liferay.knowledgebase.service.KBCommentLocalServiceUtil - * @generated - */ -public abstract class KBCommentLocalServiceBaseImpl extends BaseLocalServiceImpl - implements KBCommentLocalService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.knowledgebase.service.KBCommentLocalServiceUtil} to access the k b comment local service. - */ - - /** - * Adds the k b comment to the database. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public KBComment addKBComment(KBComment kbComment) - throws SystemException { - kbComment.setNew(true); - - return kbCommentPersistence.update(kbComment); - } - - /** - * Creates a new k b comment with the primary key. Does not add the k b comment to the database. - * - * @param kbCommentId the primary key for the new k b comment - * @return the new k b comment - */ - @Override - public KBComment createKBComment(long kbCommentId) { - return kbCommentPersistence.create(kbCommentId); - } - - /** - * Deletes the k b comment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment that was removed - * @throws PortalException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public KBComment deleteKBComment(long kbCommentId) - throws PortalException, SystemException { - return kbCommentPersistence.remove(kbCommentId); - } - - /** - * Deletes the k b comment from the database. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public KBComment deleteKBComment(KBComment kbComment) - throws PortalException, SystemException { - return kbCommentPersistence.remove(kbComment); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(KBComment.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 kbCommentPersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @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 kbCommentPersistence.findWithDynamicQuery(dynamicQuery, start, - end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 kbCommentPersistence.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 kbCommentPersistence.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 kbCommentPersistence.countWithDynamicQuery(dynamicQuery, - projection); - } - - @Override - public KBComment fetchKBComment(long kbCommentId) throws SystemException { - return kbCommentPersistence.fetchByPrimaryKey(kbCommentId); - } - - /** - * Returns the k b comment with the matching UUID and company. - * - * @param uuid the k b comment's UUID - * @param companyId the primary key of the company - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchKBCommentByUuidAndCompanyId(String uuid, - long companyId) throws SystemException { - return kbCommentPersistence.fetchByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the k b comment matching the UUID and group. - * - * @param uuid the k b comment's UUID - * @param groupId the primary key of the group - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchKBCommentByUuidAndGroupId(String uuid, long groupId) - throws SystemException { - return kbCommentPersistence.fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the k b comment with the primary key. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment - * @throws PortalException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment getKBComment(long kbCommentId) - throws PortalException, SystemException { - return kbCommentPersistence.findByPrimaryKey(kbCommentId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return kbCommentPersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns the k b comment with the matching UUID and company. - * - * @param uuid the k b comment's UUID - * @param companyId the primary key of the company - * @return the matching k b comment - * @throws PortalException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment getKBCommentByUuidAndCompanyId(String uuid, long companyId) - throws PortalException, SystemException { - return kbCommentPersistence.findByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the k b comment matching the UUID and group. - * - * @param uuid the k b comment's UUID - * @param groupId the primary key of the group - * @return the matching k b comment - * @throws PortalException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment getKBCommentByUuidAndGroupId(String uuid, long groupId) - throws PortalException, SystemException { - return kbCommentPersistence.findByUUID_G(uuid, groupId); - } - - /** - * Returns a range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List getKBComments(int start, int end) - throws SystemException { - return kbCommentPersistence.findAll(start, end); - } - - /** - * Returns the number of k b comments. - * - * @return the number of k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int getKBCommentsCount() throws SystemException { - return kbCommentPersistence.countAll(); - } - - /** - * Updates the k b comment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbComment the k b comment - * @return the k b comment that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public KBComment updateKBComment(KBComment kbComment) - throws SystemException { - return kbCommentPersistence.update(kbComment); - } - - /** - * Returns the k b article local service. - * - * @return the k b article local service - */ - public com.liferay.knowledgebase.service.KBArticleLocalService getKBArticleLocalService() { - return kbArticleLocalService; - } - - /** - * Sets the k b article local service. - * - * @param kbArticleLocalService the k b article local service - */ - public void setKBArticleLocalService( - com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService) { - this.kbArticleLocalService = kbArticleLocalService; - } - - /** - * Returns the k b article remote service. - * - * @return the k b article remote service - */ - public com.liferay.knowledgebase.service.KBArticleService getKBArticleService() { - return kbArticleService; - } - - /** - * Sets the k b article remote service. - * - * @param kbArticleService the k b article remote service - */ - public void setKBArticleService( - com.liferay.knowledgebase.service.KBArticleService kbArticleService) { - this.kbArticleService = kbArticleService; - } - - /** - * Returns the k b article persistence. - * - * @return the k b article persistence - */ - public KBArticlePersistence getKBArticlePersistence() { - return kbArticlePersistence; - } - - /** - * Sets the k b article persistence. - * - * @param kbArticlePersistence the k b article persistence - */ - public void setKBArticlePersistence( - KBArticlePersistence kbArticlePersistence) { - this.kbArticlePersistence = kbArticlePersistence; - } - - /** - * Returns the k b article finder. - * - * @return the k b article finder - */ - public KBArticleFinder getKBArticleFinder() { - return kbArticleFinder; - } - - /** - * Sets the k b article finder. - * - * @param kbArticleFinder the k b article finder - */ - public void setKBArticleFinder(KBArticleFinder kbArticleFinder) { - this.kbArticleFinder = kbArticleFinder; - } - - /** - * Returns the k b comment local service. - * - * @return the k b comment local service - */ - public com.liferay.knowledgebase.service.KBCommentLocalService getKBCommentLocalService() { - return kbCommentLocalService; - } - - /** - * Sets the k b comment local service. - * - * @param kbCommentLocalService the k b comment local service - */ - public void setKBCommentLocalService( - com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService) { - this.kbCommentLocalService = kbCommentLocalService; - } - - /** - * Returns the k b comment remote service. - * - * @return the k b comment remote service - */ - public com.liferay.knowledgebase.service.KBCommentService getKBCommentService() { - return kbCommentService; - } - - /** - * Sets the k b comment remote service. - * - * @param kbCommentService the k b comment remote service - */ - public void setKBCommentService( - com.liferay.knowledgebase.service.KBCommentService kbCommentService) { - this.kbCommentService = kbCommentService; - } - - /** - * Returns the k b comment persistence. - * - * @return the k b comment persistence - */ - public KBCommentPersistence getKBCommentPersistence() { - return kbCommentPersistence; - } - - /** - * Sets the k b comment persistence. - * - * @param kbCommentPersistence the k b comment persistence - */ - public void setKBCommentPersistence( - KBCommentPersistence kbCommentPersistence) { - this.kbCommentPersistence = kbCommentPersistence; - } - - /** - * Returns the k b folder local service. - * - * @return the k b folder local service - */ - public com.liferay.knowledgebase.service.KBFolderLocalService getKBFolderLocalService() { - return kbFolderLocalService; - } - - /** - * Sets the k b folder local service. - * - * @param kbFolderLocalService the k b folder local service - */ - public void setKBFolderLocalService( - com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService) { - this.kbFolderLocalService = kbFolderLocalService; - } - - /** - * Returns the k b folder remote service. - * - * @return the k b folder remote service - */ - public com.liferay.knowledgebase.service.KBFolderService getKBFolderService() { - return kbFolderService; - } - - /** - * Sets the k b folder remote service. - * - * @param kbFolderService the k b folder remote service - */ - public void setKBFolderService( - com.liferay.knowledgebase.service.KBFolderService kbFolderService) { - this.kbFolderService = kbFolderService; - } - - /** - * Returns the k b folder persistence. - * - * @return the k b folder persistence - */ - public KBFolderPersistence getKBFolderPersistence() { - return kbFolderPersistence; - } - - /** - * Sets the k b folder persistence. - * - * @param kbFolderPersistence the k b folder persistence - */ - public void setKBFolderPersistence(KBFolderPersistence kbFolderPersistence) { - this.kbFolderPersistence = kbFolderPersistence; - } - - /** - * Returns the k b template local service. - * - * @return the k b template local service - */ - public com.liferay.knowledgebase.service.KBTemplateLocalService getKBTemplateLocalService() { - return kbTemplateLocalService; - } - - /** - * Sets the k b template local service. - * - * @param kbTemplateLocalService the k b template local service - */ - public void setKBTemplateLocalService( - com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService) { - this.kbTemplateLocalService = kbTemplateLocalService; - } - - /** - * Returns the k b template remote service. - * - * @return the k b template remote service - */ - public com.liferay.knowledgebase.service.KBTemplateService getKBTemplateService() { - return kbTemplateService; - } - - /** - * Sets the k b template remote service. - * - * @param kbTemplateService the k b template remote service - */ - public void setKBTemplateService( - com.liferay.knowledgebase.service.KBTemplateService kbTemplateService) { - this.kbTemplateService = kbTemplateService; - } - - /** - * Returns the k b template persistence. - * - * @return the k b template persistence - */ - public KBTemplatePersistence getKBTemplatePersistence() { - return kbTemplatePersistence; - } - - /** - * Sets the k b template persistence. - * - * @param kbTemplatePersistence the k b template persistence - */ - public void setKBTemplatePersistence( - KBTemplatePersistence kbTemplatePersistence) { - this.kbTemplatePersistence = kbTemplatePersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * Returns the portlet preferences local service. - * - * @return the portlet preferences local service - */ - public com.liferay.portal.service.PortletPreferencesLocalService getPortletPreferencesLocalService() { - return portletPreferencesLocalService; - } - - /** - * Sets the portlet preferences local service. - * - * @param portletPreferencesLocalService the portlet preferences local service - */ - public void setPortletPreferencesLocalService( - com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService) { - this.portletPreferencesLocalService = portletPreferencesLocalService; - } - - /** - * Returns the portlet preferences remote service. - * - * @return the portlet preferences remote service - */ - public com.liferay.portal.service.PortletPreferencesService getPortletPreferencesService() { - return portletPreferencesService; - } - - /** - * Sets the portlet preferences remote service. - * - * @param portletPreferencesService the portlet preferences remote service - */ - public void setPortletPreferencesService( - com.liferay.portal.service.PortletPreferencesService portletPreferencesService) { - this.portletPreferencesService = portletPreferencesService; - } - - /** - * Returns the portlet preferences persistence. - * - * @return the portlet preferences persistence - */ - public PortletPreferencesPersistence getPortletPreferencesPersistence() { - return portletPreferencesPersistence; - } - - /** - * Sets the portlet preferences persistence. - * - * @param portletPreferencesPersistence the portlet preferences persistence - */ - public void setPortletPreferencesPersistence( - PortletPreferencesPersistence portletPreferencesPersistence) { - this.portletPreferencesPersistence = portletPreferencesPersistence; - } - - /** - * 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; - } - - /** - * Returns the ratings entry local service. - * - * @return the ratings entry local service - */ - public com.liferay.portlet.ratings.service.RatingsEntryLocalService getRatingsEntryLocalService() { - return ratingsEntryLocalService; - } - - /** - * Sets the ratings entry local service. - * - * @param ratingsEntryLocalService the ratings entry local service - */ - public void setRatingsEntryLocalService( - com.liferay.portlet.ratings.service.RatingsEntryLocalService ratingsEntryLocalService) { - this.ratingsEntryLocalService = ratingsEntryLocalService; - } - - /** - * Returns the ratings entry remote service. - * - * @return the ratings entry remote service - */ - public com.liferay.portlet.ratings.service.RatingsEntryService getRatingsEntryService() { - return ratingsEntryService; - } - - /** - * Sets the ratings entry remote service. - * - * @param ratingsEntryService the ratings entry remote service - */ - public void setRatingsEntryService( - com.liferay.portlet.ratings.service.RatingsEntryService ratingsEntryService) { - this.ratingsEntryService = ratingsEntryService; - } - - /** - * Returns the ratings entry persistence. - * - * @return the ratings entry persistence - */ - public RatingsEntryPersistence getRatingsEntryPersistence() { - return ratingsEntryPersistence; - } - - /** - * Sets the ratings entry persistence. - * - * @param ratingsEntryPersistence the ratings entry persistence - */ - public void setRatingsEntryPersistence( - RatingsEntryPersistence ratingsEntryPersistence) { - this.ratingsEntryPersistence = ratingsEntryPersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - public void afterPropertiesSet() { - Class clazz = getClass(); - - _classLoader = clazz.getClassLoader(); - - PersistedModelLocalServiceRegistryUtil.register("com.liferay.knowledgebase.model.KBComment", - kbCommentLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "com.liferay.knowledgebase.model.KBComment"); - } - - /** - * 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 KBComment.class; - } - - protected String getModelClassName() { - return KBComment.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = kbCommentPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleLocalService.class) - protected com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleService.class) - protected com.liferay.knowledgebase.service.KBArticleService kbArticleService; - @BeanReference(type = KBArticlePersistence.class) - protected KBArticlePersistence kbArticlePersistence; - @BeanReference(type = KBArticleFinder.class) - protected KBArticleFinder kbArticleFinder; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentLocalService.class) - protected com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentService.class) - protected com.liferay.knowledgebase.service.KBCommentService kbCommentService; - @BeanReference(type = KBCommentPersistence.class) - protected KBCommentPersistence kbCommentPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderLocalService.class) - protected com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderService.class) - protected com.liferay.knowledgebase.service.KBFolderService kbFolderService; - @BeanReference(type = KBFolderPersistence.class) - protected KBFolderPersistence kbFolderPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateLocalService.class) - protected com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateService.class) - protected com.liferay.knowledgebase.service.KBTemplateService kbTemplateService; - @BeanReference(type = KBTemplatePersistence.class) - protected KBTemplatePersistence kbTemplatePersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @BeanReference(type = com.liferay.portal.service.PortletPreferencesLocalService.class) - protected com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService; - @BeanReference(type = com.liferay.portal.service.PortletPreferencesService.class) - protected com.liferay.portal.service.PortletPreferencesService portletPreferencesService; - @BeanReference(type = PortletPreferencesPersistence.class) - protected PortletPreferencesPersistence portletPreferencesPersistence; - @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; - @BeanReference(type = com.liferay.portlet.ratings.service.RatingsEntryLocalService.class) - protected com.liferay.portlet.ratings.service.RatingsEntryLocalService ratingsEntryLocalService; - @BeanReference(type = com.liferay.portlet.ratings.service.RatingsEntryService.class) - protected com.liferay.portlet.ratings.service.RatingsEntryService ratingsEntryService; - @BeanReference(type = RatingsEntryPersistence.class) - protected RatingsEntryPersistence ratingsEntryPersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private KBCommentLocalServiceClpInvoker _clpInvoker = new KBCommentLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentLocalServiceClpInvoker.java deleted file mode 100644 index f10d38a0f3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentLocalServiceClpInvoker.java +++ /dev/null @@ -1,600 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.service.KBCommentLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBCommentLocalServiceClpInvoker { - public KBCommentLocalServiceClpInvoker() { - _methodName0 = "addKBComment"; - - _methodParameterTypes0 = new String[] { - "com.liferay.knowledgebase.model.KBComment" - }; - - _methodName1 = "createKBComment"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteKBComment"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteKBComment"; - - _methodParameterTypes3 = new String[] { - "com.liferay.knowledgebase.model.KBComment" - }; - - _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 = "fetchKBComment"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchKBCommentByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchKBCommentByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getKBComment"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getKBCommentByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getKBCommentByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getKBComments"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getKBCommentsCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateKBComment"; - - _methodParameterTypes19 = new String[] { - "com.liferay.knowledgebase.model.KBComment" - }; - - _methodName82 = "getBeanIdentifier"; - - _methodParameterTypes82 = new String[] { }; - - _methodName83 = "setBeanIdentifier"; - - _methodParameterTypes83 = new String[] { "java.lang.String" }; - - _methodName88 = "addKBComment"; - - _methodParameterTypes88 = new String[] { - "long", "long", "long", "java.lang.String", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName89 = "addKBComment"; - - _methodParameterTypes89 = new String[] { - "long", "long", "long", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName90 = "deleteKBComment"; - - _methodParameterTypes90 = new String[] { - "com.liferay.knowledgebase.model.KBComment" - }; - - _methodName91 = "deleteKBComment"; - - _methodParameterTypes91 = new String[] { "long" }; - - _methodName92 = "deleteKBComments"; - - _methodParameterTypes92 = new String[] { "java.lang.String", "long" }; - - _methodName93 = "getKBComment"; - - _methodParameterTypes93 = new String[] { - "long", "java.lang.String", "long" - }; - - _methodName94 = "getKBComments"; - - _methodParameterTypes94 = new String[] { "long", "int", "int", "int" }; - - _methodName95 = "getKBComments"; - - _methodParameterTypes95 = new String[] { - "long", "java.lang.String", "long", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName96 = "getKBComments"; - - _methodParameterTypes96 = new String[] { - "java.lang.String", "long", "int", "int", "int" - }; - - _methodName97 = "getKBComments"; - - _methodParameterTypes97 = new String[] { - "java.lang.String", "long", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName98 = "getKBComments"; - - _methodParameterTypes98 = new String[] { - "java.lang.String", "long", "int[][]", "int", "int" - }; - - _methodName99 = "getKBCommentsCount"; - - _methodParameterTypes99 = new String[] { "long", "int" }; - - _methodName100 = "getKBCommentsCount"; - - _methodParameterTypes100 = new String[] { - "long", "java.lang.String", "long" - }; - - _methodName101 = "getKBCommentsCount"; - - _methodParameterTypes101 = new String[] { "java.lang.String", "long" }; - - _methodName102 = "getKBCommentsCount"; - - _methodParameterTypes102 = new String[] { - "java.lang.String", "long", "int" - }; - - _methodName103 = "getKBCommentsCount"; - - _methodParameterTypes103 = new String[] { - "java.lang.String", "long", "int[][]" - }; - - _methodName104 = "updateKBComment"; - - _methodParameterTypes104 = new String[] { - "long", "long", "long", "java.lang.String", "int", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName105 = "updateKBComment"; - - _methodParameterTypes105 = new String[] { - "long", "long", "long", "java.lang.String", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName106 = "updateStatus"; - - _methodParameterTypes106 = new String[] { - "long", "int", "com.liferay.portal.service.ServiceContext" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return KBCommentLocalServiceUtil.addKBComment((com.liferay.knowledgebase.model.KBComment)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return KBCommentLocalServiceUtil.createKBComment(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return KBCommentLocalServiceUtil.deleteKBComment(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return KBCommentLocalServiceUtil.deleteKBComment((com.liferay.knowledgebase.model.KBComment)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return KBCommentLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return KBCommentLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return KBCommentLocalServiceUtil.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 KBCommentLocalServiceUtil.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 KBCommentLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return KBCommentLocalServiceUtil.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 KBCommentLocalServiceUtil.fetchKBComment(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return KBCommentLocalServiceUtil.fetchKBCommentByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return KBCommentLocalServiceUtil.fetchKBCommentByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBComment(((Long)arguments[0]).longValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return KBCommentLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBCommentByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName16.equals(name) && - Arrays.deepEquals(_methodParameterTypes16, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBCommentByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName17.equals(name) && - Arrays.deepEquals(_methodParameterTypes17, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBComments(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName18.equals(name) && - Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBCommentsCount(); - } - - if (_methodName19.equals(name) && - Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) { - return KBCommentLocalServiceUtil.updateKBComment((com.liferay.knowledgebase.model.KBComment)arguments[0]); - } - - if (_methodName82.equals(name) && - Arrays.deepEquals(_methodParameterTypes82, parameterTypes)) { - return KBCommentLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName83.equals(name) && - Arrays.deepEquals(_methodParameterTypes83, parameterTypes)) { - KBCommentLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName88.equals(name) && - Arrays.deepEquals(_methodParameterTypes88, parameterTypes)) { - return KBCommentLocalServiceUtil.addKBComment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.service.ServiceContext)arguments[5]); - } - - if (_methodName89.equals(name) && - Arrays.deepEquals(_methodParameterTypes89, parameterTypes)) { - return KBCommentLocalServiceUtil.addKBComment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], - (com.liferay.portal.service.ServiceContext)arguments[4]); - } - - if (_methodName90.equals(name) && - Arrays.deepEquals(_methodParameterTypes90, parameterTypes)) { - return KBCommentLocalServiceUtil.deleteKBComment((com.liferay.knowledgebase.model.KBComment)arguments[0]); - } - - if (_methodName91.equals(name) && - Arrays.deepEquals(_methodParameterTypes91, parameterTypes)) { - return KBCommentLocalServiceUtil.deleteKBComment(((Long)arguments[0]).longValue()); - } - - if (_methodName92.equals(name) && - Arrays.deepEquals(_methodParameterTypes92, parameterTypes)) { - KBCommentLocalServiceUtil.deleteKBComments((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - - return null; - } - - if (_methodName93.equals(name) && - Arrays.deepEquals(_methodParameterTypes93, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBComment(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], ((Long)arguments[2]).longValue()); - } - - if (_methodName94.equals(name) && - Arrays.deepEquals(_methodParameterTypes94, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBComments(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue()); - } - - if (_methodName95.equals(name) && - Arrays.deepEquals(_methodParameterTypes95, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBComments(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], - ((Long)arguments[2]).longValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); - } - - if (_methodName96.equals(name) && - Arrays.deepEquals(_methodParameterTypes96, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBComments((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue()); - } - - if (_methodName97.equals(name) && - Arrays.deepEquals(_methodParameterTypes97, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBComments((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[4]); - } - - if (_methodName98.equals(name) && - Arrays.deepEquals(_methodParameterTypes98, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBComments((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue(), (int[])arguments[2], - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue()); - } - - if (_methodName99.equals(name) && - Arrays.deepEquals(_methodParameterTypes99, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBCommentsCount(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName100.equals(name) && - Arrays.deepEquals(_methodParameterTypes100, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBCommentsCount(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], ((Long)arguments[2]).longValue()); - } - - if (_methodName101.equals(name) && - Arrays.deepEquals(_methodParameterTypes101, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBCommentsCount((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName102.equals(name) && - Arrays.deepEquals(_methodParameterTypes102, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBCommentsCount((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName103.equals(name) && - Arrays.deepEquals(_methodParameterTypes103, parameterTypes)) { - return KBCommentLocalServiceUtil.getKBCommentsCount((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue(), (int[])arguments[2]); - } - - if (_methodName104.equals(name) && - Arrays.deepEquals(_methodParameterTypes104, parameterTypes)) { - return KBCommentLocalServiceUtil.updateKBComment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], - ((Integer)arguments[4]).intValue(), - ((Integer)arguments[5]).intValue(), - (com.liferay.portal.service.ServiceContext)arguments[6]); - } - - if (_methodName105.equals(name) && - Arrays.deepEquals(_methodParameterTypes105, parameterTypes)) { - return KBCommentLocalServiceUtil.updateKBComment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.service.ServiceContext)arguments[5]); - } - - if (_methodName106.equals(name) && - Arrays.deepEquals(_methodParameterTypes106, parameterTypes)) { - return KBCommentLocalServiceUtil.updateStatus(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - (com.liferay.portal.service.ServiceContext)arguments[2]); - } - - 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 _methodName16; - private String[] _methodParameterTypes16; - private String _methodName17; - private String[] _methodParameterTypes17; - private String _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName82; - private String[] _methodParameterTypes82; - private String _methodName83; - private String[] _methodParameterTypes83; - private String _methodName88; - private String[] _methodParameterTypes88; - private String _methodName89; - private String[] _methodParameterTypes89; - private String _methodName90; - private String[] _methodParameterTypes90; - private String _methodName91; - private String[] _methodParameterTypes91; - private String _methodName92; - private String[] _methodParameterTypes92; - private String _methodName93; - private String[] _methodParameterTypes93; - private String _methodName94; - private String[] _methodParameterTypes94; - private String _methodName95; - private String[] _methodParameterTypes95; - private String _methodName96; - private String[] _methodParameterTypes96; - private String _methodName97; - private String[] _methodParameterTypes97; - private String _methodName98; - private String[] _methodParameterTypes98; - private String _methodName99; - private String[] _methodParameterTypes99; - private String _methodName100; - private String[] _methodParameterTypes100; - private String _methodName101; - private String[] _methodParameterTypes101; - private String _methodName102; - private String[] _methodParameterTypes102; - private String _methodName103; - private String[] _methodParameterTypes103; - private String _methodName104; - private String[] _methodParameterTypes104; - private String _methodName105; - private String[] _methodParameterTypes105; - private String _methodName106; - private String[] _methodParameterTypes106; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentServiceBaseImpl.java deleted file mode 100644 index a6f2e89c4a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentServiceBaseImpl.java +++ /dev/null @@ -1,767 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.service.KBCommentService; -import com.liferay.knowledgebase.service.persistence.KBArticleFinder; -import com.liferay.knowledgebase.service.persistence.KBArticlePersistence; -import com.liferay.knowledgebase.service.persistence.KBCommentPersistence; -import com.liferay.knowledgebase.service.persistence.KBFolderPersistence; -import com.liferay.knowledgebase.service.persistence.KBTemplatePersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.PortletPreferencesPersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the k b comment remote service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.knowledgebase.service.impl.KBCommentServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.impl.KBCommentServiceImpl - * @see com.liferay.knowledgebase.service.KBCommentServiceUtil - * @generated - */ -public abstract class KBCommentServiceBaseImpl extends BaseServiceImpl - implements KBCommentService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.knowledgebase.service.KBCommentServiceUtil} to access the k b comment remote service. - */ - - /** - * Returns the k b article local service. - * - * @return the k b article local service - */ - public com.liferay.knowledgebase.service.KBArticleLocalService getKBArticleLocalService() { - return kbArticleLocalService; - } - - /** - * Sets the k b article local service. - * - * @param kbArticleLocalService the k b article local service - */ - public void setKBArticleLocalService( - com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService) { - this.kbArticleLocalService = kbArticleLocalService; - } - - /** - * Returns the k b article remote service. - * - * @return the k b article remote service - */ - public com.liferay.knowledgebase.service.KBArticleService getKBArticleService() { - return kbArticleService; - } - - /** - * Sets the k b article remote service. - * - * @param kbArticleService the k b article remote service - */ - public void setKBArticleService( - com.liferay.knowledgebase.service.KBArticleService kbArticleService) { - this.kbArticleService = kbArticleService; - } - - /** - * Returns the k b article persistence. - * - * @return the k b article persistence - */ - public KBArticlePersistence getKBArticlePersistence() { - return kbArticlePersistence; - } - - /** - * Sets the k b article persistence. - * - * @param kbArticlePersistence the k b article persistence - */ - public void setKBArticlePersistence( - KBArticlePersistence kbArticlePersistence) { - this.kbArticlePersistence = kbArticlePersistence; - } - - /** - * Returns the k b article finder. - * - * @return the k b article finder - */ - public KBArticleFinder getKBArticleFinder() { - return kbArticleFinder; - } - - /** - * Sets the k b article finder. - * - * @param kbArticleFinder the k b article finder - */ - public void setKBArticleFinder(KBArticleFinder kbArticleFinder) { - this.kbArticleFinder = kbArticleFinder; - } - - /** - * Returns the k b comment local service. - * - * @return the k b comment local service - */ - public com.liferay.knowledgebase.service.KBCommentLocalService getKBCommentLocalService() { - return kbCommentLocalService; - } - - /** - * Sets the k b comment local service. - * - * @param kbCommentLocalService the k b comment local service - */ - public void setKBCommentLocalService( - com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService) { - this.kbCommentLocalService = kbCommentLocalService; - } - - /** - * Returns the k b comment remote service. - * - * @return the k b comment remote service - */ - public com.liferay.knowledgebase.service.KBCommentService getKBCommentService() { - return kbCommentService; - } - - /** - * Sets the k b comment remote service. - * - * @param kbCommentService the k b comment remote service - */ - public void setKBCommentService( - com.liferay.knowledgebase.service.KBCommentService kbCommentService) { - this.kbCommentService = kbCommentService; - } - - /** - * Returns the k b comment persistence. - * - * @return the k b comment persistence - */ - public KBCommentPersistence getKBCommentPersistence() { - return kbCommentPersistence; - } - - /** - * Sets the k b comment persistence. - * - * @param kbCommentPersistence the k b comment persistence - */ - public void setKBCommentPersistence( - KBCommentPersistence kbCommentPersistence) { - this.kbCommentPersistence = kbCommentPersistence; - } - - /** - * Returns the k b folder local service. - * - * @return the k b folder local service - */ - public com.liferay.knowledgebase.service.KBFolderLocalService getKBFolderLocalService() { - return kbFolderLocalService; - } - - /** - * Sets the k b folder local service. - * - * @param kbFolderLocalService the k b folder local service - */ - public void setKBFolderLocalService( - com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService) { - this.kbFolderLocalService = kbFolderLocalService; - } - - /** - * Returns the k b folder remote service. - * - * @return the k b folder remote service - */ - public com.liferay.knowledgebase.service.KBFolderService getKBFolderService() { - return kbFolderService; - } - - /** - * Sets the k b folder remote service. - * - * @param kbFolderService the k b folder remote service - */ - public void setKBFolderService( - com.liferay.knowledgebase.service.KBFolderService kbFolderService) { - this.kbFolderService = kbFolderService; - } - - /** - * Returns the k b folder persistence. - * - * @return the k b folder persistence - */ - public KBFolderPersistence getKBFolderPersistence() { - return kbFolderPersistence; - } - - /** - * Sets the k b folder persistence. - * - * @param kbFolderPersistence the k b folder persistence - */ - public void setKBFolderPersistence(KBFolderPersistence kbFolderPersistence) { - this.kbFolderPersistence = kbFolderPersistence; - } - - /** - * Returns the k b template local service. - * - * @return the k b template local service - */ - public com.liferay.knowledgebase.service.KBTemplateLocalService getKBTemplateLocalService() { - return kbTemplateLocalService; - } - - /** - * Sets the k b template local service. - * - * @param kbTemplateLocalService the k b template local service - */ - public void setKBTemplateLocalService( - com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService) { - this.kbTemplateLocalService = kbTemplateLocalService; - } - - /** - * Returns the k b template remote service. - * - * @return the k b template remote service - */ - public com.liferay.knowledgebase.service.KBTemplateService getKBTemplateService() { - return kbTemplateService; - } - - /** - * Sets the k b template remote service. - * - * @param kbTemplateService the k b template remote service - */ - public void setKBTemplateService( - com.liferay.knowledgebase.service.KBTemplateService kbTemplateService) { - this.kbTemplateService = kbTemplateService; - } - - /** - * Returns the k b template persistence. - * - * @return the k b template persistence - */ - public KBTemplatePersistence getKBTemplatePersistence() { - return kbTemplatePersistence; - } - - /** - * Sets the k b template persistence. - * - * @param kbTemplatePersistence the k b template persistence - */ - public void setKBTemplatePersistence( - KBTemplatePersistence kbTemplatePersistence) { - this.kbTemplatePersistence = kbTemplatePersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * Returns the portlet preferences local service. - * - * @return the portlet preferences local service - */ - public com.liferay.portal.service.PortletPreferencesLocalService getPortletPreferencesLocalService() { - return portletPreferencesLocalService; - } - - /** - * Sets the portlet preferences local service. - * - * @param portletPreferencesLocalService the portlet preferences local service - */ - public void setPortletPreferencesLocalService( - com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService) { - this.portletPreferencesLocalService = portletPreferencesLocalService; - } - - /** - * Returns the portlet preferences remote service. - * - * @return the portlet preferences remote service - */ - public com.liferay.portal.service.PortletPreferencesService getPortletPreferencesService() { - return portletPreferencesService; - } - - /** - * Sets the portlet preferences remote service. - * - * @param portletPreferencesService the portlet preferences remote service - */ - public void setPortletPreferencesService( - com.liferay.portal.service.PortletPreferencesService portletPreferencesService) { - this.portletPreferencesService = portletPreferencesService; - } - - /** - * Returns the portlet preferences persistence. - * - * @return the portlet preferences persistence - */ - public PortletPreferencesPersistence getPortletPreferencesPersistence() { - return portletPreferencesPersistence; - } - - /** - * Sets the portlet preferences persistence. - * - * @param portletPreferencesPersistence the portlet preferences persistence - */ - public void setPortletPreferencesPersistence( - PortletPreferencesPersistence portletPreferencesPersistence) { - this.portletPreferencesPersistence = portletPreferencesPersistence; - } - - /** - * 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; - } - - /** - * Returns the ratings entry local service. - * - * @return the ratings entry local service - */ - public com.liferay.portlet.ratings.service.RatingsEntryLocalService getRatingsEntryLocalService() { - return ratingsEntryLocalService; - } - - /** - * Sets the ratings entry local service. - * - * @param ratingsEntryLocalService the ratings entry local service - */ - public void setRatingsEntryLocalService( - com.liferay.portlet.ratings.service.RatingsEntryLocalService ratingsEntryLocalService) { - this.ratingsEntryLocalService = ratingsEntryLocalService; - } - - /** - * Returns the ratings entry remote service. - * - * @return the ratings entry remote service - */ - public com.liferay.portlet.ratings.service.RatingsEntryService getRatingsEntryService() { - return ratingsEntryService; - } - - /** - * Sets the ratings entry remote service. - * - * @param ratingsEntryService the ratings entry remote service - */ - public void setRatingsEntryService( - com.liferay.portlet.ratings.service.RatingsEntryService ratingsEntryService) { - this.ratingsEntryService = ratingsEntryService; - } - - /** - * Returns the ratings entry persistence. - * - * @return the ratings entry persistence - */ - public RatingsEntryPersistence getRatingsEntryPersistence() { - return ratingsEntryPersistence; - } - - /** - * Sets the ratings entry persistence. - * - * @param ratingsEntryPersistence the ratings entry persistence - */ - public void setRatingsEntryPersistence( - RatingsEntryPersistence ratingsEntryPersistence) { - this.ratingsEntryPersistence = ratingsEntryPersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - 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 KBComment.class; - } - - protected String getModelClassName() { - return KBComment.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = kbCommentPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleLocalService.class) - protected com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleService.class) - protected com.liferay.knowledgebase.service.KBArticleService kbArticleService; - @BeanReference(type = KBArticlePersistence.class) - protected KBArticlePersistence kbArticlePersistence; - @BeanReference(type = KBArticleFinder.class) - protected KBArticleFinder kbArticleFinder; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentLocalService.class) - protected com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentService.class) - protected com.liferay.knowledgebase.service.KBCommentService kbCommentService; - @BeanReference(type = KBCommentPersistence.class) - protected KBCommentPersistence kbCommentPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderLocalService.class) - protected com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderService.class) - protected com.liferay.knowledgebase.service.KBFolderService kbFolderService; - @BeanReference(type = KBFolderPersistence.class) - protected KBFolderPersistence kbFolderPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateLocalService.class) - protected com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateService.class) - protected com.liferay.knowledgebase.service.KBTemplateService kbTemplateService; - @BeanReference(type = KBTemplatePersistence.class) - protected KBTemplatePersistence kbTemplatePersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @BeanReference(type = com.liferay.portal.service.PortletPreferencesLocalService.class) - protected com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService; - @BeanReference(type = com.liferay.portal.service.PortletPreferencesService.class) - protected com.liferay.portal.service.PortletPreferencesService portletPreferencesService; - @BeanReference(type = PortletPreferencesPersistence.class) - protected PortletPreferencesPersistence portletPreferencesPersistence; - @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; - @BeanReference(type = com.liferay.portlet.ratings.service.RatingsEntryLocalService.class) - protected com.liferay.portlet.ratings.service.RatingsEntryLocalService ratingsEntryLocalService; - @BeanReference(type = com.liferay.portlet.ratings.service.RatingsEntryService.class) - protected com.liferay.portlet.ratings.service.RatingsEntryService ratingsEntryService; - @BeanReference(type = RatingsEntryPersistence.class) - protected RatingsEntryPersistence ratingsEntryPersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private KBCommentServiceClpInvoker _clpInvoker = new KBCommentServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentServiceClpInvoker.java deleted file mode 100644 index c7c3ed48c1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBCommentServiceClpInvoker.java +++ /dev/null @@ -1,204 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.service.KBCommentServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBCommentServiceClpInvoker { - public KBCommentServiceClpInvoker() { - _methodName62 = "getBeanIdentifier"; - - _methodParameterTypes62 = new String[] { }; - - _methodName63 = "setBeanIdentifier"; - - _methodParameterTypes63 = new String[] { "java.lang.String" }; - - _methodName68 = "deleteKBComment"; - - _methodParameterTypes68 = new String[] { - "com.liferay.knowledgebase.model.KBComment" - }; - - _methodName69 = "deleteKBComment"; - - _methodParameterTypes69 = new String[] { "long" }; - - _methodName70 = "getKBComment"; - - _methodParameterTypes70 = new String[] { "long" }; - - _methodName71 = "getKBComments"; - - _methodParameterTypes71 = new String[] { "long", "int", "int", "int" }; - - _methodName72 = "getKBComments"; - - _methodParameterTypes72 = new String[] { - "long", "java.lang.String", "long", "int", "int", "int" - }; - - _methodName73 = "getKBCommentsCount"; - - _methodParameterTypes73 = new String[] { "long", "int" }; - - _methodName74 = "getKBCommentsCount"; - - _methodParameterTypes74 = new String[] { - "long", "java.lang.String", "long", "int" - }; - - _methodName75 = "updateKBComment"; - - _methodParameterTypes75 = new String[] { - "long", "long", "long", "java.lang.String", "int", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName76 = "updateKBComment"; - - _methodParameterTypes76 = new String[] { - "long", "long", "long", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName77 = "updateStatus"; - - _methodParameterTypes77 = new String[] { - "long", "int", "com.liferay.portal.service.ServiceContext" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName62.equals(name) && - Arrays.deepEquals(_methodParameterTypes62, parameterTypes)) { - return KBCommentServiceUtil.getBeanIdentifier(); - } - - if (_methodName63.equals(name) && - Arrays.deepEquals(_methodParameterTypes63, parameterTypes)) { - KBCommentServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName68.equals(name) && - Arrays.deepEquals(_methodParameterTypes68, parameterTypes)) { - return KBCommentServiceUtil.deleteKBComment((com.liferay.knowledgebase.model.KBComment)arguments[0]); - } - - if (_methodName69.equals(name) && - Arrays.deepEquals(_methodParameterTypes69, parameterTypes)) { - return KBCommentServiceUtil.deleteKBComment(((Long)arguments[0]).longValue()); - } - - if (_methodName70.equals(name) && - Arrays.deepEquals(_methodParameterTypes70, parameterTypes)) { - return KBCommentServiceUtil.getKBComment(((Long)arguments[0]).longValue()); - } - - if (_methodName71.equals(name) && - Arrays.deepEquals(_methodParameterTypes71, parameterTypes)) { - return KBCommentServiceUtil.getKBComments(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue()); - } - - if (_methodName72.equals(name) && - Arrays.deepEquals(_methodParameterTypes72, parameterTypes)) { - return KBCommentServiceUtil.getKBComments(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], - ((Long)arguments[2]).longValue(), - ((Integer)arguments[3]).intValue(), - ((Integer)arguments[4]).intValue(), - ((Integer)arguments[5]).intValue()); - } - - if (_methodName73.equals(name) && - Arrays.deepEquals(_methodParameterTypes73, parameterTypes)) { - return KBCommentServiceUtil.getKBCommentsCount(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName74.equals(name) && - Arrays.deepEquals(_methodParameterTypes74, parameterTypes)) { - return KBCommentServiceUtil.getKBCommentsCount(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], - ((Long)arguments[2]).longValue(), - ((Integer)arguments[3]).intValue()); - } - - if (_methodName75.equals(name) && - Arrays.deepEquals(_methodParameterTypes75, parameterTypes)) { - return KBCommentServiceUtil.updateKBComment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], - ((Integer)arguments[4]).intValue(), - (com.liferay.portal.service.ServiceContext)arguments[5]); - } - - if (_methodName76.equals(name) && - Arrays.deepEquals(_methodParameterTypes76, parameterTypes)) { - return KBCommentServiceUtil.updateKBComment(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], - (com.liferay.portal.service.ServiceContext)arguments[4]); - } - - if (_methodName77.equals(name) && - Arrays.deepEquals(_methodParameterTypes77, parameterTypes)) { - return KBCommentServiceUtil.updateStatus(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - (com.liferay.portal.service.ServiceContext)arguments[2]); - } - - throw new UnsupportedOperationException(); - } - - private String _methodName62; - private String[] _methodParameterTypes62; - private String _methodName63; - private String[] _methodParameterTypes63; - private String _methodName68; - private String[] _methodParameterTypes68; - private String _methodName69; - private String[] _methodParameterTypes69; - private String _methodName70; - private String[] _methodParameterTypes70; - private String _methodName71; - private String[] _methodParameterTypes71; - private String _methodName72; - private String[] _methodParameterTypes72; - private String _methodName73; - private String[] _methodParameterTypes73; - private String _methodName74; - private String[] _methodParameterTypes74; - private String _methodName75; - private String[] _methodParameterTypes75; - private String _methodName76; - private String[] _methodParameterTypes76; - private String _methodName77; - private String[] _methodParameterTypes77; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderLocalServiceBaseImpl.java deleted file mode 100644 index 9fcf27b365..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderLocalServiceBaseImpl.java +++ /dev/null @@ -1,863 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.service.KBFolderLocalService; -import com.liferay.knowledgebase.service.persistence.KBArticleFinder; -import com.liferay.knowledgebase.service.persistence.KBArticlePersistence; -import com.liferay.knowledgebase.service.persistence.KBCommentPersistence; -import com.liferay.knowledgebase.service.persistence.KBFolderPersistence; -import com.liferay.knowledgebase.service.persistence.KBTemplatePersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the k b folder local service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.knowledgebase.service.impl.KBFolderLocalServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.impl.KBFolderLocalServiceImpl - * @see com.liferay.knowledgebase.service.KBFolderLocalServiceUtil - * @generated - */ -public abstract class KBFolderLocalServiceBaseImpl extends BaseLocalServiceImpl - implements KBFolderLocalService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.knowledgebase.service.KBFolderLocalServiceUtil} to access the k b folder local service. - */ - - /** - * Adds the k b folder to the database. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public KBFolder addKBFolder(KBFolder kbFolder) throws SystemException { - kbFolder.setNew(true); - - return kbFolderPersistence.update(kbFolder); - } - - /** - * Creates a new k b folder with the primary key. Does not add the k b folder to the database. - * - * @param kbFolderId the primary key for the new k b folder - * @return the new k b folder - */ - @Override - public KBFolder createKBFolder(long kbFolderId) { - return kbFolderPersistence.create(kbFolderId); - } - - /** - * Deletes the k b folder with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder that was removed - * @throws PortalException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public KBFolder deleteKBFolder(long kbFolderId) - throws PortalException, SystemException { - return kbFolderPersistence.remove(kbFolderId); - } - - /** - * Deletes the k b folder from the database. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public KBFolder deleteKBFolder(KBFolder kbFolder) throws SystemException { - return kbFolderPersistence.remove(kbFolder); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(KBFolder.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 kbFolderPersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @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 kbFolderPersistence.findWithDynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 kbFolderPersistence.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 kbFolderPersistence.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 kbFolderPersistence.countWithDynamicQuery(dynamicQuery, - projection); - } - - @Override - public KBFolder fetchKBFolder(long kbFolderId) throws SystemException { - return kbFolderPersistence.fetchByPrimaryKey(kbFolderId); - } - - /** - * Returns the k b folder with the matching UUID and company. - * - * @param uuid the k b folder's UUID - * @param companyId the primary key of the company - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchKBFolderByUuidAndCompanyId(String uuid, long companyId) - throws SystemException { - return kbFolderPersistence.fetchByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the k b folder matching the UUID and group. - * - * @param uuid the k b folder's UUID - * @param groupId the primary key of the group - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchKBFolderByUuidAndGroupId(String uuid, long groupId) - throws SystemException { - return kbFolderPersistence.fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the k b folder with the primary key. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder - * @throws PortalException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder getKBFolder(long kbFolderId) - throws PortalException, SystemException { - return kbFolderPersistence.findByPrimaryKey(kbFolderId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return kbFolderPersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns the k b folder with the matching UUID and company. - * - * @param uuid the k b folder's UUID - * @param companyId the primary key of the company - * @return the matching k b folder - * @throws PortalException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder getKBFolderByUuidAndCompanyId(String uuid, long companyId) - throws PortalException, SystemException { - return kbFolderPersistence.findByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the k b folder matching the UUID and group. - * - * @param uuid the k b folder's UUID - * @param groupId the primary key of the group - * @return the matching k b folder - * @throws PortalException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder getKBFolderByUuidAndGroupId(String uuid, long groupId) - throws PortalException, SystemException { - return kbFolderPersistence.findByUUID_G(uuid, groupId); - } - - /** - * Returns a range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List getKBFolders(int start, int end) - throws SystemException { - return kbFolderPersistence.findAll(start, end); - } - - /** - * Returns the number of k b folders. - * - * @return the number of k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public int getKBFoldersCount() throws SystemException { - return kbFolderPersistence.countAll(); - } - - /** - * Updates the k b folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbFolder the k b folder - * @return the k b folder that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public KBFolder updateKBFolder(KBFolder kbFolder) throws SystemException { - return kbFolderPersistence.update(kbFolder); - } - - /** - * Returns the k b article local service. - * - * @return the k b article local service - */ - public com.liferay.knowledgebase.service.KBArticleLocalService getKBArticleLocalService() { - return kbArticleLocalService; - } - - /** - * Sets the k b article local service. - * - * @param kbArticleLocalService the k b article local service - */ - public void setKBArticleLocalService( - com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService) { - this.kbArticleLocalService = kbArticleLocalService; - } - - /** - * Returns the k b article remote service. - * - * @return the k b article remote service - */ - public com.liferay.knowledgebase.service.KBArticleService getKBArticleService() { - return kbArticleService; - } - - /** - * Sets the k b article remote service. - * - * @param kbArticleService the k b article remote service - */ - public void setKBArticleService( - com.liferay.knowledgebase.service.KBArticleService kbArticleService) { - this.kbArticleService = kbArticleService; - } - - /** - * Returns the k b article persistence. - * - * @return the k b article persistence - */ - public KBArticlePersistence getKBArticlePersistence() { - return kbArticlePersistence; - } - - /** - * Sets the k b article persistence. - * - * @param kbArticlePersistence the k b article persistence - */ - public void setKBArticlePersistence( - KBArticlePersistence kbArticlePersistence) { - this.kbArticlePersistence = kbArticlePersistence; - } - - /** - * Returns the k b article finder. - * - * @return the k b article finder - */ - public KBArticleFinder getKBArticleFinder() { - return kbArticleFinder; - } - - /** - * Sets the k b article finder. - * - * @param kbArticleFinder the k b article finder - */ - public void setKBArticleFinder(KBArticleFinder kbArticleFinder) { - this.kbArticleFinder = kbArticleFinder; - } - - /** - * Returns the k b comment local service. - * - * @return the k b comment local service - */ - public com.liferay.knowledgebase.service.KBCommentLocalService getKBCommentLocalService() { - return kbCommentLocalService; - } - - /** - * Sets the k b comment local service. - * - * @param kbCommentLocalService the k b comment local service - */ - public void setKBCommentLocalService( - com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService) { - this.kbCommentLocalService = kbCommentLocalService; - } - - /** - * Returns the k b comment remote service. - * - * @return the k b comment remote service - */ - public com.liferay.knowledgebase.service.KBCommentService getKBCommentService() { - return kbCommentService; - } - - /** - * Sets the k b comment remote service. - * - * @param kbCommentService the k b comment remote service - */ - public void setKBCommentService( - com.liferay.knowledgebase.service.KBCommentService kbCommentService) { - this.kbCommentService = kbCommentService; - } - - /** - * Returns the k b comment persistence. - * - * @return the k b comment persistence - */ - public KBCommentPersistence getKBCommentPersistence() { - return kbCommentPersistence; - } - - /** - * Sets the k b comment persistence. - * - * @param kbCommentPersistence the k b comment persistence - */ - public void setKBCommentPersistence( - KBCommentPersistence kbCommentPersistence) { - this.kbCommentPersistence = kbCommentPersistence; - } - - /** - * Returns the k b folder local service. - * - * @return the k b folder local service - */ - public com.liferay.knowledgebase.service.KBFolderLocalService getKBFolderLocalService() { - return kbFolderLocalService; - } - - /** - * Sets the k b folder local service. - * - * @param kbFolderLocalService the k b folder local service - */ - public void setKBFolderLocalService( - com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService) { - this.kbFolderLocalService = kbFolderLocalService; - } - - /** - * Returns the k b folder remote service. - * - * @return the k b folder remote service - */ - public com.liferay.knowledgebase.service.KBFolderService getKBFolderService() { - return kbFolderService; - } - - /** - * Sets the k b folder remote service. - * - * @param kbFolderService the k b folder remote service - */ - public void setKBFolderService( - com.liferay.knowledgebase.service.KBFolderService kbFolderService) { - this.kbFolderService = kbFolderService; - } - - /** - * Returns the k b folder persistence. - * - * @return the k b folder persistence - */ - public KBFolderPersistence getKBFolderPersistence() { - return kbFolderPersistence; - } - - /** - * Sets the k b folder persistence. - * - * @param kbFolderPersistence the k b folder persistence - */ - public void setKBFolderPersistence(KBFolderPersistence kbFolderPersistence) { - this.kbFolderPersistence = kbFolderPersistence; - } - - /** - * Returns the k b template local service. - * - * @return the k b template local service - */ - public com.liferay.knowledgebase.service.KBTemplateLocalService getKBTemplateLocalService() { - return kbTemplateLocalService; - } - - /** - * Sets the k b template local service. - * - * @param kbTemplateLocalService the k b template local service - */ - public void setKBTemplateLocalService( - com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService) { - this.kbTemplateLocalService = kbTemplateLocalService; - } - - /** - * Returns the k b template remote service. - * - * @return the k b template remote service - */ - public com.liferay.knowledgebase.service.KBTemplateService getKBTemplateService() { - return kbTemplateService; - } - - /** - * Sets the k b template remote service. - * - * @param kbTemplateService the k b template remote service - */ - public void setKBTemplateService( - com.liferay.knowledgebase.service.KBTemplateService kbTemplateService) { - this.kbTemplateService = kbTemplateService; - } - - /** - * Returns the k b template persistence. - * - * @return the k b template persistence - */ - public KBTemplatePersistence getKBTemplatePersistence() { - return kbTemplatePersistence; - } - - /** - * Sets the k b template persistence. - * - * @param kbTemplatePersistence the k b template persistence - */ - public void setKBTemplatePersistence( - KBTemplatePersistence kbTemplatePersistence) { - this.kbTemplatePersistence = kbTemplatePersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * 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("com.liferay.knowledgebase.model.KBFolder", - kbFolderLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "com.liferay.knowledgebase.model.KBFolder"); - } - - /** - * 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 KBFolder.class; - } - - protected String getModelClassName() { - return KBFolder.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = kbFolderPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleLocalService.class) - protected com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleService.class) - protected com.liferay.knowledgebase.service.KBArticleService kbArticleService; - @BeanReference(type = KBArticlePersistence.class) - protected KBArticlePersistence kbArticlePersistence; - @BeanReference(type = KBArticleFinder.class) - protected KBArticleFinder kbArticleFinder; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentLocalService.class) - protected com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentService.class) - protected com.liferay.knowledgebase.service.KBCommentService kbCommentService; - @BeanReference(type = KBCommentPersistence.class) - protected KBCommentPersistence kbCommentPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderLocalService.class) - protected com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderService.class) - protected com.liferay.knowledgebase.service.KBFolderService kbFolderService; - @BeanReference(type = KBFolderPersistence.class) - protected KBFolderPersistence kbFolderPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateLocalService.class) - protected com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateService.class) - protected com.liferay.knowledgebase.service.KBTemplateService kbTemplateService; - @BeanReference(type = KBTemplatePersistence.class) - protected KBTemplatePersistence kbTemplatePersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @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 KBFolderLocalServiceClpInvoker _clpInvoker = new KBFolderLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderLocalServiceClpInvoker.java deleted file mode 100644 index 89bb91b833..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderLocalServiceClpInvoker.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBFolderLocalServiceClpInvoker { - public KBFolderLocalServiceClpInvoker() { - _methodName0 = "addKBFolder"; - - _methodParameterTypes0 = new String[] { - "com.liferay.knowledgebase.model.KBFolder" - }; - - _methodName1 = "createKBFolder"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteKBFolder"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteKBFolder"; - - _methodParameterTypes3 = new String[] { - "com.liferay.knowledgebase.model.KBFolder" - }; - - _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 = "fetchKBFolder"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchKBFolderByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchKBFolderByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getKBFolder"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getKBFolderByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getKBFolderByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getKBFolders"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getKBFoldersCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateKBFolder"; - - _methodParameterTypes19 = new String[] { - "com.liferay.knowledgebase.model.KBFolder" - }; - - _methodName64 = "getBeanIdentifier"; - - _methodParameterTypes64 = new String[] { }; - - _methodName65 = "setBeanIdentifier"; - - _methodParameterTypes65 = new String[] { "java.lang.String" }; - - _methodName70 = "addKBFolder"; - - _methodParameterTypes70 = new String[] { - "long", "long", "long", "long", "java.lang.String", - "java.lang.String", "com.liferay.portal.service.ServiceContext" - }; - - _methodName71 = "deleteKBFolder"; - - _methodParameterTypes71 = new String[] { "long" }; - - _methodName72 = "fetchFirstChildKBFolder"; - - _methodParameterTypes72 = new String[] { "long", "long" }; - - _methodName73 = "fetchKBFolder"; - - _methodParameterTypes73 = new String[] { "long" }; - - _methodName74 = "fetchKBFolderByUrlTitle"; - - _methodParameterTypes74 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName75 = "getKBFolderByUrlTitle"; - - _methodParameterTypes75 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName76 = "getKBFolders"; - - _methodParameterTypes76 = new String[] { "long", "long", "int", "int" }; - - _methodName77 = "getKBFoldersCount"; - - _methodParameterTypes77 = new String[] { "long", "long" }; - - _methodName78 = "moveKBFolder"; - - _methodParameterTypes78 = new String[] { "long", "long" }; - - _methodName79 = "updateKBFolder"; - - _methodParameterTypes79 = new String[] { - "long", "long", "long", "java.lang.String", "java.lang.String" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return KBFolderLocalServiceUtil.addKBFolder((com.liferay.knowledgebase.model.KBFolder)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return KBFolderLocalServiceUtil.createKBFolder(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return KBFolderLocalServiceUtil.deleteKBFolder(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return KBFolderLocalServiceUtil.deleteKBFolder((com.liferay.knowledgebase.model.KBFolder)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return KBFolderLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return KBFolderLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return KBFolderLocalServiceUtil.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 KBFolderLocalServiceUtil.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 KBFolderLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return KBFolderLocalServiceUtil.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 KBFolderLocalServiceUtil.fetchKBFolder(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return KBFolderLocalServiceUtil.fetchKBFolderByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return KBFolderLocalServiceUtil.fetchKBFolderByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return KBFolderLocalServiceUtil.getKBFolder(((Long)arguments[0]).longValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return KBFolderLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return KBFolderLocalServiceUtil.getKBFolderByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName16.equals(name) && - Arrays.deepEquals(_methodParameterTypes16, parameterTypes)) { - return KBFolderLocalServiceUtil.getKBFolderByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName17.equals(name) && - Arrays.deepEquals(_methodParameterTypes17, parameterTypes)) { - return KBFolderLocalServiceUtil.getKBFolders(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName18.equals(name) && - Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) { - return KBFolderLocalServiceUtil.getKBFoldersCount(); - } - - if (_methodName19.equals(name) && - Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) { - return KBFolderLocalServiceUtil.updateKBFolder((com.liferay.knowledgebase.model.KBFolder)arguments[0]); - } - - if (_methodName64.equals(name) && - Arrays.deepEquals(_methodParameterTypes64, parameterTypes)) { - return KBFolderLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName65.equals(name) && - Arrays.deepEquals(_methodParameterTypes65, parameterTypes)) { - KBFolderLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName70.equals(name) && - Arrays.deepEquals(_methodParameterTypes70, parameterTypes)) { - return KBFolderLocalServiceUtil.addKBFolder(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - ((Long)arguments[3]).longValue(), - (java.lang.String)arguments[4], (java.lang.String)arguments[5], - (com.liferay.portal.service.ServiceContext)arguments[6]); - } - - if (_methodName71.equals(name) && - Arrays.deepEquals(_methodParameterTypes71, parameterTypes)) { - return KBFolderLocalServiceUtil.deleteKBFolder(((Long)arguments[0]).longValue()); - } - - if (_methodName72.equals(name) && - Arrays.deepEquals(_methodParameterTypes72, parameterTypes)) { - return KBFolderLocalServiceUtil.fetchFirstChildKBFolder(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName73.equals(name) && - Arrays.deepEquals(_methodParameterTypes73, parameterTypes)) { - return KBFolderLocalServiceUtil.fetchKBFolder(((Long)arguments[0]).longValue()); - } - - if (_methodName74.equals(name) && - Arrays.deepEquals(_methodParameterTypes74, parameterTypes)) { - return KBFolderLocalServiceUtil.fetchKBFolderByUrlTitle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); - } - - if (_methodName75.equals(name) && - Arrays.deepEquals(_methodParameterTypes75, parameterTypes)) { - return KBFolderLocalServiceUtil.getKBFolderByUrlTitle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); - } - - if (_methodName76.equals(name) && - Arrays.deepEquals(_methodParameterTypes76, parameterTypes)) { - return KBFolderLocalServiceUtil.getKBFolders(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue()); - } - - if (_methodName77.equals(name) && - Arrays.deepEquals(_methodParameterTypes77, parameterTypes)) { - return KBFolderLocalServiceUtil.getKBFoldersCount(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName78.equals(name) && - Arrays.deepEquals(_methodParameterTypes78, parameterTypes)) { - KBFolderLocalServiceUtil.moveKBFolder(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - - return null; - } - - if (_methodName79.equals(name) && - Arrays.deepEquals(_methodParameterTypes79, parameterTypes)) { - return KBFolderLocalServiceUtil.updateKBFolder(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], (java.lang.String)arguments[4]); - } - - 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 _methodName16; - private String[] _methodParameterTypes16; - private String _methodName17; - private String[] _methodParameterTypes17; - private String _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName64; - private String[] _methodParameterTypes64; - private String _methodName65; - private String[] _methodParameterTypes65; - private String _methodName70; - private String[] _methodParameterTypes70; - private String _methodName71; - private String[] _methodParameterTypes71; - private String _methodName72; - private String[] _methodParameterTypes72; - private String _methodName73; - private String[] _methodParameterTypes73; - private String _methodName74; - private String[] _methodParameterTypes74; - private String _methodName75; - private String[] _methodParameterTypes75; - private String _methodName76; - private String[] _methodParameterTypes76; - private String _methodName77; - private String[] _methodParameterTypes77; - private String _methodName78; - private String[] _methodParameterTypes78; - private String _methodName79; - private String[] _methodParameterTypes79; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderServiceBaseImpl.java deleted file mode 100644 index f29d9490d8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderServiceBaseImpl.java +++ /dev/null @@ -1,574 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.service.KBFolderService; -import com.liferay.knowledgebase.service.persistence.KBArticleFinder; -import com.liferay.knowledgebase.service.persistence.KBArticlePersistence; -import com.liferay.knowledgebase.service.persistence.KBCommentPersistence; -import com.liferay.knowledgebase.service.persistence.KBFolderPersistence; -import com.liferay.knowledgebase.service.persistence.KBTemplatePersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the k b folder remote service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.knowledgebase.service.impl.KBFolderServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.impl.KBFolderServiceImpl - * @see com.liferay.knowledgebase.service.KBFolderServiceUtil - * @generated - */ -public abstract class KBFolderServiceBaseImpl extends BaseServiceImpl - implements KBFolderService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.knowledgebase.service.KBFolderServiceUtil} to access the k b folder remote service. - */ - - /** - * Returns the k b article local service. - * - * @return the k b article local service - */ - public com.liferay.knowledgebase.service.KBArticleLocalService getKBArticleLocalService() { - return kbArticleLocalService; - } - - /** - * Sets the k b article local service. - * - * @param kbArticleLocalService the k b article local service - */ - public void setKBArticleLocalService( - com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService) { - this.kbArticleLocalService = kbArticleLocalService; - } - - /** - * Returns the k b article remote service. - * - * @return the k b article remote service - */ - public com.liferay.knowledgebase.service.KBArticleService getKBArticleService() { - return kbArticleService; - } - - /** - * Sets the k b article remote service. - * - * @param kbArticleService the k b article remote service - */ - public void setKBArticleService( - com.liferay.knowledgebase.service.KBArticleService kbArticleService) { - this.kbArticleService = kbArticleService; - } - - /** - * Returns the k b article persistence. - * - * @return the k b article persistence - */ - public KBArticlePersistence getKBArticlePersistence() { - return kbArticlePersistence; - } - - /** - * Sets the k b article persistence. - * - * @param kbArticlePersistence the k b article persistence - */ - public void setKBArticlePersistence( - KBArticlePersistence kbArticlePersistence) { - this.kbArticlePersistence = kbArticlePersistence; - } - - /** - * Returns the k b article finder. - * - * @return the k b article finder - */ - public KBArticleFinder getKBArticleFinder() { - return kbArticleFinder; - } - - /** - * Sets the k b article finder. - * - * @param kbArticleFinder the k b article finder - */ - public void setKBArticleFinder(KBArticleFinder kbArticleFinder) { - this.kbArticleFinder = kbArticleFinder; - } - - /** - * Returns the k b comment local service. - * - * @return the k b comment local service - */ - public com.liferay.knowledgebase.service.KBCommentLocalService getKBCommentLocalService() { - return kbCommentLocalService; - } - - /** - * Sets the k b comment local service. - * - * @param kbCommentLocalService the k b comment local service - */ - public void setKBCommentLocalService( - com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService) { - this.kbCommentLocalService = kbCommentLocalService; - } - - /** - * Returns the k b comment remote service. - * - * @return the k b comment remote service - */ - public com.liferay.knowledgebase.service.KBCommentService getKBCommentService() { - return kbCommentService; - } - - /** - * Sets the k b comment remote service. - * - * @param kbCommentService the k b comment remote service - */ - public void setKBCommentService( - com.liferay.knowledgebase.service.KBCommentService kbCommentService) { - this.kbCommentService = kbCommentService; - } - - /** - * Returns the k b comment persistence. - * - * @return the k b comment persistence - */ - public KBCommentPersistence getKBCommentPersistence() { - return kbCommentPersistence; - } - - /** - * Sets the k b comment persistence. - * - * @param kbCommentPersistence the k b comment persistence - */ - public void setKBCommentPersistence( - KBCommentPersistence kbCommentPersistence) { - this.kbCommentPersistence = kbCommentPersistence; - } - - /** - * Returns the k b folder local service. - * - * @return the k b folder local service - */ - public com.liferay.knowledgebase.service.KBFolderLocalService getKBFolderLocalService() { - return kbFolderLocalService; - } - - /** - * Sets the k b folder local service. - * - * @param kbFolderLocalService the k b folder local service - */ - public void setKBFolderLocalService( - com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService) { - this.kbFolderLocalService = kbFolderLocalService; - } - - /** - * Returns the k b folder remote service. - * - * @return the k b folder remote service - */ - public com.liferay.knowledgebase.service.KBFolderService getKBFolderService() { - return kbFolderService; - } - - /** - * Sets the k b folder remote service. - * - * @param kbFolderService the k b folder remote service - */ - public void setKBFolderService( - com.liferay.knowledgebase.service.KBFolderService kbFolderService) { - this.kbFolderService = kbFolderService; - } - - /** - * Returns the k b folder persistence. - * - * @return the k b folder persistence - */ - public KBFolderPersistence getKBFolderPersistence() { - return kbFolderPersistence; - } - - /** - * Sets the k b folder persistence. - * - * @param kbFolderPersistence the k b folder persistence - */ - public void setKBFolderPersistence(KBFolderPersistence kbFolderPersistence) { - this.kbFolderPersistence = kbFolderPersistence; - } - - /** - * Returns the k b template local service. - * - * @return the k b template local service - */ - public com.liferay.knowledgebase.service.KBTemplateLocalService getKBTemplateLocalService() { - return kbTemplateLocalService; - } - - /** - * Sets the k b template local service. - * - * @param kbTemplateLocalService the k b template local service - */ - public void setKBTemplateLocalService( - com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService) { - this.kbTemplateLocalService = kbTemplateLocalService; - } - - /** - * Returns the k b template remote service. - * - * @return the k b template remote service - */ - public com.liferay.knowledgebase.service.KBTemplateService getKBTemplateService() { - return kbTemplateService; - } - - /** - * Sets the k b template remote service. - * - * @param kbTemplateService the k b template remote service - */ - public void setKBTemplateService( - com.liferay.knowledgebase.service.KBTemplateService kbTemplateService) { - this.kbTemplateService = kbTemplateService; - } - - /** - * Returns the k b template persistence. - * - * @return the k b template persistence - */ - public KBTemplatePersistence getKBTemplatePersistence() { - return kbTemplatePersistence; - } - - /** - * Sets the k b template persistence. - * - * @param kbTemplatePersistence the k b template persistence - */ - public void setKBTemplatePersistence( - KBTemplatePersistence kbTemplatePersistence) { - this.kbTemplatePersistence = kbTemplatePersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * 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 KBFolder.class; - } - - protected String getModelClassName() { - return KBFolder.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = kbFolderPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleLocalService.class) - protected com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleService.class) - protected com.liferay.knowledgebase.service.KBArticleService kbArticleService; - @BeanReference(type = KBArticlePersistence.class) - protected KBArticlePersistence kbArticlePersistence; - @BeanReference(type = KBArticleFinder.class) - protected KBArticleFinder kbArticleFinder; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentLocalService.class) - protected com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentService.class) - protected com.liferay.knowledgebase.service.KBCommentService kbCommentService; - @BeanReference(type = KBCommentPersistence.class) - protected KBCommentPersistence kbCommentPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderLocalService.class) - protected com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderService.class) - protected com.liferay.knowledgebase.service.KBFolderService kbFolderService; - @BeanReference(type = KBFolderPersistence.class) - protected KBFolderPersistence kbFolderPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateLocalService.class) - protected com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateService.class) - protected com.liferay.knowledgebase.service.KBTemplateService kbTemplateService; - @BeanReference(type = KBTemplatePersistence.class) - protected KBTemplatePersistence kbTemplatePersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @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 KBFolderServiceClpInvoker _clpInvoker = new KBFolderServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderServiceClpInvoker.java deleted file mode 100644 index 344ab2f486..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBFolderServiceClpInvoker.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.service.KBFolderServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBFolderServiceClpInvoker { - public KBFolderServiceClpInvoker() { - _methodName44 = "getBeanIdentifier"; - - _methodParameterTypes44 = new String[] { }; - - _methodName45 = "setBeanIdentifier"; - - _methodParameterTypes45 = new String[] { "java.lang.String" }; - - _methodName50 = "addKBFolder"; - - _methodParameterTypes50 = new String[] { - "long", "long", "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName51 = "deleteKBFolder"; - - _methodParameterTypes51 = new String[] { "long" }; - - _methodName52 = "fetchKBFolderByUrlTitle"; - - _methodParameterTypes52 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName53 = "getKBFolder"; - - _methodParameterTypes53 = new String[] { "long" }; - - _methodName54 = "getKBFolderByUrlTitle"; - - _methodParameterTypes54 = new String[] { - "long", "long", "java.lang.String" - }; - - _methodName55 = "getKBFolders"; - - _methodParameterTypes55 = new String[] { "long", "long", "int", "int" }; - - _methodName56 = "getKBFoldersCount"; - - _methodParameterTypes56 = new String[] { "long", "long" }; - - _methodName57 = "moveKBFolder"; - - _methodParameterTypes57 = new String[] { "long", "long" }; - - _methodName58 = "updateKBFolder"; - - _methodParameterTypes58 = new String[] { - "long", "long", "long", "java.lang.String", "java.lang.String" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName44.equals(name) && - Arrays.deepEquals(_methodParameterTypes44, parameterTypes)) { - return KBFolderServiceUtil.getBeanIdentifier(); - } - - if (_methodName45.equals(name) && - Arrays.deepEquals(_methodParameterTypes45, parameterTypes)) { - KBFolderServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName50.equals(name) && - Arrays.deepEquals(_methodParameterTypes50, parameterTypes)) { - return KBFolderServiceUtil.addKBFolder(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], (java.lang.String)arguments[4], - (com.liferay.portal.service.ServiceContext)arguments[5]); - } - - if (_methodName51.equals(name) && - Arrays.deepEquals(_methodParameterTypes51, parameterTypes)) { - return KBFolderServiceUtil.deleteKBFolder(((Long)arguments[0]).longValue()); - } - - if (_methodName52.equals(name) && - Arrays.deepEquals(_methodParameterTypes52, parameterTypes)) { - return KBFolderServiceUtil.fetchKBFolderByUrlTitle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); - } - - if (_methodName53.equals(name) && - Arrays.deepEquals(_methodParameterTypes53, parameterTypes)) { - return KBFolderServiceUtil.getKBFolder(((Long)arguments[0]).longValue()); - } - - if (_methodName54.equals(name) && - Arrays.deepEquals(_methodParameterTypes54, parameterTypes)) { - return KBFolderServiceUtil.getKBFolderByUrlTitle(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); - } - - if (_methodName55.equals(name) && - Arrays.deepEquals(_methodParameterTypes55, parameterTypes)) { - return KBFolderServiceUtil.getKBFolders(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Integer)arguments[2]).intValue(), - ((Integer)arguments[3]).intValue()); - } - - if (_methodName56.equals(name) && - Arrays.deepEquals(_methodParameterTypes56, parameterTypes)) { - return KBFolderServiceUtil.getKBFoldersCount(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - } - - if (_methodName57.equals(name) && - Arrays.deepEquals(_methodParameterTypes57, parameterTypes)) { - KBFolderServiceUtil.moveKBFolder(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue()); - - return null; - } - - if (_methodName58.equals(name) && - Arrays.deepEquals(_methodParameterTypes58, parameterTypes)) { - return KBFolderServiceUtil.updateKBFolder(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], (java.lang.String)arguments[4]); - } - - throw new UnsupportedOperationException(); - } - - private String _methodName44; - private String[] _methodParameterTypes44; - private String _methodName45; - private String[] _methodParameterTypes45; - private String _methodName50; - private String[] _methodParameterTypes50; - private String _methodName51; - private String[] _methodParameterTypes51; - 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; - private String _methodName57; - private String[] _methodParameterTypes57; - private String _methodName58; - private String[] _methodParameterTypes58; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateLocalServiceBaseImpl.java deleted file mode 100644 index dd7f87c68e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateLocalServiceBaseImpl.java +++ /dev/null @@ -1,935 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBTemplateLocalService; -import com.liferay.knowledgebase.service.persistence.KBArticleFinder; -import com.liferay.knowledgebase.service.persistence.KBArticlePersistence; -import com.liferay.knowledgebase.service.persistence.KBCommentPersistence; -import com.liferay.knowledgebase.service.persistence.KBFolderPersistence; -import com.liferay.knowledgebase.service.persistence.KBTemplatePersistence; - -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 com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the k b template local service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.knowledgebase.service.impl.KBTemplateLocalServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.impl.KBTemplateLocalServiceImpl - * @see com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil - * @generated - */ -public abstract class KBTemplateLocalServiceBaseImpl - extends BaseLocalServiceImpl implements KBTemplateLocalService, - IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil} to access the k b template local service. - */ - - /** - * Adds the k b template to the database. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public KBTemplate addKBTemplate(KBTemplate kbTemplate) - throws SystemException { - kbTemplate.setNew(true); - - return kbTemplatePersistence.update(kbTemplate); - } - - /** - * Creates a new k b template with the primary key. Does not add the k b template to the database. - * - * @param kbTemplateId the primary key for the new k b template - * @return the new k b template - */ - @Override - public KBTemplate createKBTemplate(long kbTemplateId) { - return kbTemplatePersistence.create(kbTemplateId); - } - - /** - * Deletes the k b template with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template that was removed - * @throws PortalException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public KBTemplate deleteKBTemplate(long kbTemplateId) - throws PortalException, SystemException { - return kbTemplatePersistence.remove(kbTemplateId); - } - - /** - * Deletes the k b template from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was removed - * @throws PortalException - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public KBTemplate deleteKBTemplate(KBTemplate kbTemplate) - throws PortalException, SystemException { - return kbTemplatePersistence.remove(kbTemplate); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(KBTemplate.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 kbTemplatePersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @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 kbTemplatePersistence.findWithDynamicQuery(dynamicQuery, start, - end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 kbTemplatePersistence.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 kbTemplatePersistence.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 kbTemplatePersistence.countWithDynamicQuery(dynamicQuery, - projection); - } - - @Override - public KBTemplate fetchKBTemplate(long kbTemplateId) - throws SystemException { - return kbTemplatePersistence.fetchByPrimaryKey(kbTemplateId); - } - - /** - * Returns the k b template with the matching UUID and company. - * - * @param uuid the k b template's UUID - * @param companyId the primary key of the company - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchKBTemplateByUuidAndCompanyId(String uuid, - long companyId) throws SystemException { - return kbTemplatePersistence.fetchByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the k b template matching the UUID and group. - * - * @param uuid the k b template's UUID - * @param groupId the primary key of the group - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchKBTemplateByUuidAndGroupId(String uuid, long groupId) - throws SystemException { - return kbTemplatePersistence.fetchByUUID_G(uuid, groupId); - } - - /** - * Returns the k b template with the primary key. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template - * @throws PortalException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate getKBTemplate(long kbTemplateId) - throws PortalException, SystemException { - return kbTemplatePersistence.findByPrimaryKey(kbTemplateId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return kbTemplatePersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns the k b template with the matching UUID and company. - * - * @param uuid the k b template's UUID - * @param companyId the primary key of the company - * @return the matching k b template - * @throws PortalException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate getKBTemplateByUuidAndCompanyId(String uuid, - long companyId) throws PortalException, SystemException { - return kbTemplatePersistence.findByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the k b template matching the UUID and group. - * - * @param uuid the k b template's UUID - * @param groupId the primary key of the group - * @return the matching k b template - * @throws PortalException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate getKBTemplateByUuidAndGroupId(String uuid, long groupId) - throws PortalException, SystemException { - return kbTemplatePersistence.findByUUID_G(uuid, groupId); - } - - /** - * Returns a range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List getKBTemplates(int start, int end) - throws SystemException { - return kbTemplatePersistence.findAll(start, end); - } - - /** - * Returns the number of k b templates. - * - * @return the number of k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public int getKBTemplatesCount() throws SystemException { - return kbTemplatePersistence.countAll(); - } - - /** - * Updates the k b template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param kbTemplate the k b template - * @return the k b template that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public KBTemplate updateKBTemplate(KBTemplate kbTemplate) - throws SystemException { - return kbTemplatePersistence.update(kbTemplate); - } - - /** - * Returns the k b article local service. - * - * @return the k b article local service - */ - public com.liferay.knowledgebase.service.KBArticleLocalService getKBArticleLocalService() { - return kbArticleLocalService; - } - - /** - * Sets the k b article local service. - * - * @param kbArticleLocalService the k b article local service - */ - public void setKBArticleLocalService( - com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService) { - this.kbArticleLocalService = kbArticleLocalService; - } - - /** - * Returns the k b article remote service. - * - * @return the k b article remote service - */ - public com.liferay.knowledgebase.service.KBArticleService getKBArticleService() { - return kbArticleService; - } - - /** - * Sets the k b article remote service. - * - * @param kbArticleService the k b article remote service - */ - public void setKBArticleService( - com.liferay.knowledgebase.service.KBArticleService kbArticleService) { - this.kbArticleService = kbArticleService; - } - - /** - * Returns the k b article persistence. - * - * @return the k b article persistence - */ - public KBArticlePersistence getKBArticlePersistence() { - return kbArticlePersistence; - } - - /** - * Sets the k b article persistence. - * - * @param kbArticlePersistence the k b article persistence - */ - public void setKBArticlePersistence( - KBArticlePersistence kbArticlePersistence) { - this.kbArticlePersistence = kbArticlePersistence; - } - - /** - * Returns the k b article finder. - * - * @return the k b article finder - */ - public KBArticleFinder getKBArticleFinder() { - return kbArticleFinder; - } - - /** - * Sets the k b article finder. - * - * @param kbArticleFinder the k b article finder - */ - public void setKBArticleFinder(KBArticleFinder kbArticleFinder) { - this.kbArticleFinder = kbArticleFinder; - } - - /** - * Returns the k b comment local service. - * - * @return the k b comment local service - */ - public com.liferay.knowledgebase.service.KBCommentLocalService getKBCommentLocalService() { - return kbCommentLocalService; - } - - /** - * Sets the k b comment local service. - * - * @param kbCommentLocalService the k b comment local service - */ - public void setKBCommentLocalService( - com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService) { - this.kbCommentLocalService = kbCommentLocalService; - } - - /** - * Returns the k b comment remote service. - * - * @return the k b comment remote service - */ - public com.liferay.knowledgebase.service.KBCommentService getKBCommentService() { - return kbCommentService; - } - - /** - * Sets the k b comment remote service. - * - * @param kbCommentService the k b comment remote service - */ - public void setKBCommentService( - com.liferay.knowledgebase.service.KBCommentService kbCommentService) { - this.kbCommentService = kbCommentService; - } - - /** - * Returns the k b comment persistence. - * - * @return the k b comment persistence - */ - public KBCommentPersistence getKBCommentPersistence() { - return kbCommentPersistence; - } - - /** - * Sets the k b comment persistence. - * - * @param kbCommentPersistence the k b comment persistence - */ - public void setKBCommentPersistence( - KBCommentPersistence kbCommentPersistence) { - this.kbCommentPersistence = kbCommentPersistence; - } - - /** - * Returns the k b folder local service. - * - * @return the k b folder local service - */ - public com.liferay.knowledgebase.service.KBFolderLocalService getKBFolderLocalService() { - return kbFolderLocalService; - } - - /** - * Sets the k b folder local service. - * - * @param kbFolderLocalService the k b folder local service - */ - public void setKBFolderLocalService( - com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService) { - this.kbFolderLocalService = kbFolderLocalService; - } - - /** - * Returns the k b folder remote service. - * - * @return the k b folder remote service - */ - public com.liferay.knowledgebase.service.KBFolderService getKBFolderService() { - return kbFolderService; - } - - /** - * Sets the k b folder remote service. - * - * @param kbFolderService the k b folder remote service - */ - public void setKBFolderService( - com.liferay.knowledgebase.service.KBFolderService kbFolderService) { - this.kbFolderService = kbFolderService; - } - - /** - * Returns the k b folder persistence. - * - * @return the k b folder persistence - */ - public KBFolderPersistence getKBFolderPersistence() { - return kbFolderPersistence; - } - - /** - * Sets the k b folder persistence. - * - * @param kbFolderPersistence the k b folder persistence - */ - public void setKBFolderPersistence(KBFolderPersistence kbFolderPersistence) { - this.kbFolderPersistence = kbFolderPersistence; - } - - /** - * Returns the k b template local service. - * - * @return the k b template local service - */ - public com.liferay.knowledgebase.service.KBTemplateLocalService getKBTemplateLocalService() { - return kbTemplateLocalService; - } - - /** - * Sets the k b template local service. - * - * @param kbTemplateLocalService the k b template local service - */ - public void setKBTemplateLocalService( - com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService) { - this.kbTemplateLocalService = kbTemplateLocalService; - } - - /** - * Returns the k b template remote service. - * - * @return the k b template remote service - */ - public com.liferay.knowledgebase.service.KBTemplateService getKBTemplateService() { - return kbTemplateService; - } - - /** - * Sets the k b template remote service. - * - * @param kbTemplateService the k b template remote service - */ - public void setKBTemplateService( - com.liferay.knowledgebase.service.KBTemplateService kbTemplateService) { - this.kbTemplateService = kbTemplateService; - } - - /** - * Returns the k b template persistence. - * - * @return the k b template persistence - */ - public KBTemplatePersistence getKBTemplatePersistence() { - return kbTemplatePersistence; - } - - /** - * Sets the k b template persistence. - * - * @param kbTemplatePersistence the k b template persistence - */ - public void setKBTemplatePersistence( - KBTemplatePersistence kbTemplatePersistence) { - this.kbTemplatePersistence = kbTemplatePersistence; - } - - /** - * 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; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - public void afterPropertiesSet() { - Class clazz = getClass(); - - _classLoader = clazz.getClassLoader(); - - PersistedModelLocalServiceRegistryUtil.register("com.liferay.knowledgebase.model.KBTemplate", - kbTemplateLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "com.liferay.knowledgebase.model.KBTemplate"); - } - - /** - * 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 KBTemplate.class; - } - - protected String getModelClassName() { - return KBTemplate.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = kbTemplatePersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleLocalService.class) - protected com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleService.class) - protected com.liferay.knowledgebase.service.KBArticleService kbArticleService; - @BeanReference(type = KBArticlePersistence.class) - protected KBArticlePersistence kbArticlePersistence; - @BeanReference(type = KBArticleFinder.class) - protected KBArticleFinder kbArticleFinder; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentLocalService.class) - protected com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentService.class) - protected com.liferay.knowledgebase.service.KBCommentService kbCommentService; - @BeanReference(type = KBCommentPersistence.class) - protected KBCommentPersistence kbCommentPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderLocalService.class) - protected com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderService.class) - protected com.liferay.knowledgebase.service.KBFolderService kbFolderService; - @BeanReference(type = KBFolderPersistence.class) - protected KBFolderPersistence kbFolderPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateLocalService.class) - protected com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateService.class) - protected com.liferay.knowledgebase.service.KBTemplateService kbTemplateService; - @BeanReference(type = KBTemplatePersistence.class) - protected KBTemplatePersistence kbTemplatePersistence; - @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; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private KBTemplateLocalServiceClpInvoker _clpInvoker = new KBTemplateLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateLocalServiceClpInvoker.java deleted file mode 100644 index 371e20beb2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateLocalServiceClpInvoker.java +++ /dev/null @@ -1,455 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBTemplateLocalServiceClpInvoker { - public KBTemplateLocalServiceClpInvoker() { - _methodName0 = "addKBTemplate"; - - _methodParameterTypes0 = new String[] { - "com.liferay.knowledgebase.model.KBTemplate" - }; - - _methodName1 = "createKBTemplate"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteKBTemplate"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteKBTemplate"; - - _methodParameterTypes3 = new String[] { - "com.liferay.knowledgebase.model.KBTemplate" - }; - - _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 = "fetchKBTemplate"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchKBTemplateByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "fetchKBTemplateByUuidAndGroupId"; - - _methodParameterTypes12 = new String[] { "java.lang.String", "long" }; - - _methodName13 = "getKBTemplate"; - - _methodParameterTypes13 = new String[] { "long" }; - - _methodName14 = "getPersistedModel"; - - _methodParameterTypes14 = new String[] { "java.io.Serializable" }; - - _methodName15 = "getKBTemplateByUuidAndCompanyId"; - - _methodParameterTypes15 = new String[] { "java.lang.String", "long" }; - - _methodName16 = "getKBTemplateByUuidAndGroupId"; - - _methodParameterTypes16 = new String[] { "java.lang.String", "long" }; - - _methodName17 = "getKBTemplates"; - - _methodParameterTypes17 = new String[] { "int", "int" }; - - _methodName18 = "getKBTemplatesCount"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "updateKBTemplate"; - - _methodParameterTypes19 = new String[] { - "com.liferay.knowledgebase.model.KBTemplate" - }; - - _methodName70 = "getBeanIdentifier"; - - _methodParameterTypes70 = new String[] { }; - - _methodName71 = "setBeanIdentifier"; - - _methodParameterTypes71 = new String[] { "java.lang.String" }; - - _methodName76 = "addKBTemplate"; - - _methodParameterTypes76 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName77 = "deleteGroupKBTemplates"; - - _methodParameterTypes77 = new String[] { "long" }; - - _methodName78 = "deleteKBTemplate"; - - _methodParameterTypes78 = new String[] { - "com.liferay.knowledgebase.model.KBTemplate" - }; - - _methodName79 = "deleteKBTemplate"; - - _methodParameterTypes79 = new String[] { "long" }; - - _methodName80 = "deleteKBTemplates"; - - _methodParameterTypes80 = new String[] { "long[][]" }; - - _methodName81 = "getGroupKBTemplates"; - - _methodParameterTypes81 = new String[] { - "long", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName82 = "getGroupKBTemplatesCount"; - - _methodParameterTypes82 = new String[] { "long" }; - - _methodName83 = "search"; - - _methodParameterTypes83 = new String[] { - "long", "java.lang.String", "java.lang.String", "java.util.Date", - "java.util.Date", "boolean", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName84 = "updateKBTemplate"; - - _methodParameterTypes84 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName85 = "updateKBTemplateResources"; - - _methodParameterTypes85 = new String[] { - "com.liferay.knowledgebase.model.KBTemplate", - "java.lang.String[][]", "java.lang.String[][]" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return KBTemplateLocalServiceUtil.addKBTemplate((com.liferay.knowledgebase.model.KBTemplate)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return KBTemplateLocalServiceUtil.createKBTemplate(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return KBTemplateLocalServiceUtil.deleteKBTemplate(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return KBTemplateLocalServiceUtil.deleteKBTemplate((com.liferay.knowledgebase.model.KBTemplate)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return KBTemplateLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return KBTemplateLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return KBTemplateLocalServiceUtil.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 KBTemplateLocalServiceUtil.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 KBTemplateLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return KBTemplateLocalServiceUtil.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 KBTemplateLocalServiceUtil.fetchKBTemplate(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return KBTemplateLocalServiceUtil.fetchKBTemplateByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return KBTemplateLocalServiceUtil.fetchKBTemplateByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return KBTemplateLocalServiceUtil.getKBTemplate(((Long)arguments[0]).longValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return KBTemplateLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return KBTemplateLocalServiceUtil.getKBTemplateByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName16.equals(name) && - Arrays.deepEquals(_methodParameterTypes16, parameterTypes)) { - return KBTemplateLocalServiceUtil.getKBTemplateByUuidAndGroupId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName17.equals(name) && - Arrays.deepEquals(_methodParameterTypes17, parameterTypes)) { - return KBTemplateLocalServiceUtil.getKBTemplates(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName18.equals(name) && - Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) { - return KBTemplateLocalServiceUtil.getKBTemplatesCount(); - } - - if (_methodName19.equals(name) && - Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) { - return KBTemplateLocalServiceUtil.updateKBTemplate((com.liferay.knowledgebase.model.KBTemplate)arguments[0]); - } - - if (_methodName70.equals(name) && - Arrays.deepEquals(_methodParameterTypes70, parameterTypes)) { - return KBTemplateLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName71.equals(name) && - Arrays.deepEquals(_methodParameterTypes71, parameterTypes)) { - KBTemplateLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName76.equals(name) && - Arrays.deepEquals(_methodParameterTypes76, parameterTypes)) { - return KBTemplateLocalServiceUtil.addKBTemplate(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (com.liferay.portal.service.ServiceContext)arguments[3]); - } - - if (_methodName77.equals(name) && - Arrays.deepEquals(_methodParameterTypes77, parameterTypes)) { - KBTemplateLocalServiceUtil.deleteGroupKBTemplates(((Long)arguments[0]).longValue()); - - return null; - } - - if (_methodName78.equals(name) && - Arrays.deepEquals(_methodParameterTypes78, parameterTypes)) { - return KBTemplateLocalServiceUtil.deleteKBTemplate((com.liferay.knowledgebase.model.KBTemplate)arguments[0]); - } - - if (_methodName79.equals(name) && - Arrays.deepEquals(_methodParameterTypes79, parameterTypes)) { - return KBTemplateLocalServiceUtil.deleteKBTemplate(((Long)arguments[0]).longValue()); - } - - if (_methodName80.equals(name) && - Arrays.deepEquals(_methodParameterTypes80, parameterTypes)) { - KBTemplateLocalServiceUtil.deleteKBTemplates((long[])arguments[0]); - - return null; - } - - if (_methodName81.equals(name) && - Arrays.deepEquals(_methodParameterTypes81, parameterTypes)) { - return KBTemplateLocalServiceUtil.getGroupKBTemplates(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); - } - - if (_methodName82.equals(name) && - Arrays.deepEquals(_methodParameterTypes82, parameterTypes)) { - return KBTemplateLocalServiceUtil.getGroupKBTemplatesCount(((Long)arguments[0]).longValue()); - } - - if (_methodName83.equals(name) && - Arrays.deepEquals(_methodParameterTypes83, parameterTypes)) { - return KBTemplateLocalServiceUtil.search(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (java.util.Date)arguments[3], (java.util.Date)arguments[4], - ((Boolean)arguments[5]).booleanValue(), - ((Integer)arguments[6]).intValue(), - ((Integer)arguments[7]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[8]); - } - - if (_methodName84.equals(name) && - Arrays.deepEquals(_methodParameterTypes84, parameterTypes)) { - return KBTemplateLocalServiceUtil.updateKBTemplate(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (com.liferay.portal.service.ServiceContext)arguments[3]); - } - - if (_methodName85.equals(name) && - Arrays.deepEquals(_methodParameterTypes85, parameterTypes)) { - KBTemplateLocalServiceUtil.updateKBTemplateResources((com.liferay.knowledgebase.model.KBTemplate)arguments[0], - (java.lang.String[])arguments[1], - (java.lang.String[])arguments[2]); - - 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 _methodName16; - private String[] _methodParameterTypes16; - private String _methodName17; - private String[] _methodParameterTypes17; - private String _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName70; - private String[] _methodParameterTypes70; - private String _methodName71; - private String[] _methodParameterTypes71; - private String _methodName76; - private String[] _methodParameterTypes76; - private String _methodName77; - private String[] _methodParameterTypes77; - private String _methodName78; - private String[] _methodParameterTypes78; - private String _methodName79; - private String[] _methodParameterTypes79; - private String _methodName80; - private String[] _methodParameterTypes80; - private String _methodName81; - private String[] _methodParameterTypes81; - private String _methodName82; - private String[] _methodParameterTypes82; - private String _methodName83; - private String[] _methodParameterTypes83; - private String _methodName84; - private String[] _methodParameterTypes84; - private String _methodName85; - private String[] _methodParameterTypes85; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateServiceBaseImpl.java deleted file mode 100644 index 96ab858860..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateServiceBaseImpl.java +++ /dev/null @@ -1,639 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBTemplateService; -import com.liferay.knowledgebase.service.persistence.KBArticleFinder; -import com.liferay.knowledgebase.service.persistence.KBArticlePersistence; -import com.liferay.knowledgebase.service.persistence.KBCommentPersistence; -import com.liferay.knowledgebase.service.persistence.KBFolderPersistence; -import com.liferay.knowledgebase.service.persistence.KBTemplatePersistence; - -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 com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; -import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the k b template remote service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.knowledgebase.service.impl.KBTemplateServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.knowledgebase.service.impl.KBTemplateServiceImpl - * @see com.liferay.knowledgebase.service.KBTemplateServiceUtil - * @generated - */ -public abstract class KBTemplateServiceBaseImpl extends BaseServiceImpl - implements KBTemplateService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.knowledgebase.service.KBTemplateServiceUtil} to access the k b template remote service. - */ - - /** - * Returns the k b article local service. - * - * @return the k b article local service - */ - public com.liferay.knowledgebase.service.KBArticleLocalService getKBArticleLocalService() { - return kbArticleLocalService; - } - - /** - * Sets the k b article local service. - * - * @param kbArticleLocalService the k b article local service - */ - public void setKBArticleLocalService( - com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService) { - this.kbArticleLocalService = kbArticleLocalService; - } - - /** - * Returns the k b article remote service. - * - * @return the k b article remote service - */ - public com.liferay.knowledgebase.service.KBArticleService getKBArticleService() { - return kbArticleService; - } - - /** - * Sets the k b article remote service. - * - * @param kbArticleService the k b article remote service - */ - public void setKBArticleService( - com.liferay.knowledgebase.service.KBArticleService kbArticleService) { - this.kbArticleService = kbArticleService; - } - - /** - * Returns the k b article persistence. - * - * @return the k b article persistence - */ - public KBArticlePersistence getKBArticlePersistence() { - return kbArticlePersistence; - } - - /** - * Sets the k b article persistence. - * - * @param kbArticlePersistence the k b article persistence - */ - public void setKBArticlePersistence( - KBArticlePersistence kbArticlePersistence) { - this.kbArticlePersistence = kbArticlePersistence; - } - - /** - * Returns the k b article finder. - * - * @return the k b article finder - */ - public KBArticleFinder getKBArticleFinder() { - return kbArticleFinder; - } - - /** - * Sets the k b article finder. - * - * @param kbArticleFinder the k b article finder - */ - public void setKBArticleFinder(KBArticleFinder kbArticleFinder) { - this.kbArticleFinder = kbArticleFinder; - } - - /** - * Returns the k b comment local service. - * - * @return the k b comment local service - */ - public com.liferay.knowledgebase.service.KBCommentLocalService getKBCommentLocalService() { - return kbCommentLocalService; - } - - /** - * Sets the k b comment local service. - * - * @param kbCommentLocalService the k b comment local service - */ - public void setKBCommentLocalService( - com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService) { - this.kbCommentLocalService = kbCommentLocalService; - } - - /** - * Returns the k b comment remote service. - * - * @return the k b comment remote service - */ - public com.liferay.knowledgebase.service.KBCommentService getKBCommentService() { - return kbCommentService; - } - - /** - * Sets the k b comment remote service. - * - * @param kbCommentService the k b comment remote service - */ - public void setKBCommentService( - com.liferay.knowledgebase.service.KBCommentService kbCommentService) { - this.kbCommentService = kbCommentService; - } - - /** - * Returns the k b comment persistence. - * - * @return the k b comment persistence - */ - public KBCommentPersistence getKBCommentPersistence() { - return kbCommentPersistence; - } - - /** - * Sets the k b comment persistence. - * - * @param kbCommentPersistence the k b comment persistence - */ - public void setKBCommentPersistence( - KBCommentPersistence kbCommentPersistence) { - this.kbCommentPersistence = kbCommentPersistence; - } - - /** - * Returns the k b folder local service. - * - * @return the k b folder local service - */ - public com.liferay.knowledgebase.service.KBFolderLocalService getKBFolderLocalService() { - return kbFolderLocalService; - } - - /** - * Sets the k b folder local service. - * - * @param kbFolderLocalService the k b folder local service - */ - public void setKBFolderLocalService( - com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService) { - this.kbFolderLocalService = kbFolderLocalService; - } - - /** - * Returns the k b folder remote service. - * - * @return the k b folder remote service - */ - public com.liferay.knowledgebase.service.KBFolderService getKBFolderService() { - return kbFolderService; - } - - /** - * Sets the k b folder remote service. - * - * @param kbFolderService the k b folder remote service - */ - public void setKBFolderService( - com.liferay.knowledgebase.service.KBFolderService kbFolderService) { - this.kbFolderService = kbFolderService; - } - - /** - * Returns the k b folder persistence. - * - * @return the k b folder persistence - */ - public KBFolderPersistence getKBFolderPersistence() { - return kbFolderPersistence; - } - - /** - * Sets the k b folder persistence. - * - * @param kbFolderPersistence the k b folder persistence - */ - public void setKBFolderPersistence(KBFolderPersistence kbFolderPersistence) { - this.kbFolderPersistence = kbFolderPersistence; - } - - /** - * Returns the k b template local service. - * - * @return the k b template local service - */ - public com.liferay.knowledgebase.service.KBTemplateLocalService getKBTemplateLocalService() { - return kbTemplateLocalService; - } - - /** - * Sets the k b template local service. - * - * @param kbTemplateLocalService the k b template local service - */ - public void setKBTemplateLocalService( - com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService) { - this.kbTemplateLocalService = kbTemplateLocalService; - } - - /** - * Returns the k b template remote service. - * - * @return the k b template remote service - */ - public com.liferay.knowledgebase.service.KBTemplateService getKBTemplateService() { - return kbTemplateService; - } - - /** - * Sets the k b template remote service. - * - * @param kbTemplateService the k b template remote service - */ - public void setKBTemplateService( - com.liferay.knowledgebase.service.KBTemplateService kbTemplateService) { - this.kbTemplateService = kbTemplateService; - } - - /** - * Returns the k b template persistence. - * - * @return the k b template persistence - */ - public KBTemplatePersistence getKBTemplatePersistence() { - return kbTemplatePersistence; - } - - /** - * Sets the k b template persistence. - * - * @param kbTemplatePersistence the k b template persistence - */ - public void setKBTemplatePersistence( - KBTemplatePersistence kbTemplatePersistence) { - this.kbTemplatePersistence = kbTemplatePersistence; - } - - /** - * 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; - } - - /** - * Returns the asset entry local service. - * - * @return the asset entry local service - */ - public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { - return assetEntryLocalService; - } - - /** - * Sets the asset entry local service. - * - * @param assetEntryLocalService the asset entry local service - */ - public void setAssetEntryLocalService( - com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { - this.assetEntryLocalService = assetEntryLocalService; - } - - /** - * Returns the asset entry remote service. - * - * @return the asset entry remote service - */ - public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { - return assetEntryService; - } - - /** - * Sets the asset entry remote service. - * - * @param assetEntryService the asset entry remote service - */ - public void setAssetEntryService( - com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { - this.assetEntryService = assetEntryService; - } - - /** - * Returns the asset entry persistence. - * - * @return the asset entry persistence - */ - public AssetEntryPersistence getAssetEntryPersistence() { - return assetEntryPersistence; - } - - /** - * Sets the asset entry persistence. - * - * @param assetEntryPersistence the asset entry persistence - */ - public void setAssetEntryPersistence( - AssetEntryPersistence assetEntryPersistence) { - this.assetEntryPersistence = assetEntryPersistence; - } - - /** - * Returns the social activity local service. - * - * @return the social activity local service - */ - public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { - return socialActivityLocalService; - } - - /** - * Sets the social activity local service. - * - * @param socialActivityLocalService the social activity local service - */ - public void setSocialActivityLocalService( - com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { - this.socialActivityLocalService = socialActivityLocalService; - } - - /** - * Returns the social activity remote service. - * - * @return the social activity remote service - */ - public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { - return socialActivityService; - } - - /** - * Sets the social activity remote service. - * - * @param socialActivityService the social activity remote service - */ - public void setSocialActivityService( - com.liferay.portlet.social.service.SocialActivityService socialActivityService) { - this.socialActivityService = socialActivityService; - } - - /** - * Returns the social activity persistence. - * - * @return the social activity persistence - */ - public SocialActivityPersistence getSocialActivityPersistence() { - return socialActivityPersistence; - } - - /** - * Sets the social activity persistence. - * - * @param socialActivityPersistence the social activity persistence - */ - public void setSocialActivityPersistence( - SocialActivityPersistence socialActivityPersistence) { - this.socialActivityPersistence = socialActivityPersistence; - } - - 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 KBTemplate.class; - } - - protected String getModelClassName() { - return KBTemplate.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = kbTemplatePersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleLocalService.class) - protected com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBArticleService.class) - protected com.liferay.knowledgebase.service.KBArticleService kbArticleService; - @BeanReference(type = KBArticlePersistence.class) - protected KBArticlePersistence kbArticlePersistence; - @BeanReference(type = KBArticleFinder.class) - protected KBArticleFinder kbArticleFinder; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentLocalService.class) - protected com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBCommentService.class) - protected com.liferay.knowledgebase.service.KBCommentService kbCommentService; - @BeanReference(type = KBCommentPersistence.class) - protected KBCommentPersistence kbCommentPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderLocalService.class) - protected com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBFolderService.class) - protected com.liferay.knowledgebase.service.KBFolderService kbFolderService; - @BeanReference(type = KBFolderPersistence.class) - protected KBFolderPersistence kbFolderPersistence; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateLocalService.class) - protected com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService; - @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateService.class) - protected com.liferay.knowledgebase.service.KBTemplateService kbTemplateService; - @BeanReference(type = KBTemplatePersistence.class) - protected KBTemplatePersistence kbTemplatePersistence; - @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; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) - protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; - @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) - protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; - @BeanReference(type = AssetEntryPersistence.class) - protected AssetEntryPersistence assetEntryPersistence; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) - protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; - @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) - protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; - @BeanReference(type = SocialActivityPersistence.class) - protected SocialActivityPersistence socialActivityPersistence; - private String _beanIdentifier; - private ClassLoader _classLoader; - private KBTemplateServiceClpInvoker _clpInvoker = new KBTemplateServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateServiceClpInvoker.java deleted file mode 100644 index 4ec4c9ee1f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/base/KBTemplateServiceClpInvoker.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.base; - -import com.liferay.knowledgebase.service.KBTemplateServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class KBTemplateServiceClpInvoker { - public KBTemplateServiceClpInvoker() { - _methodName50 = "getBeanIdentifier"; - - _methodParameterTypes50 = new String[] { }; - - _methodName51 = "setBeanIdentifier"; - - _methodParameterTypes51 = new String[] { "java.lang.String" }; - - _methodName56 = "addKBTemplate"; - - _methodParameterTypes56 = new String[] { - "java.lang.String", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName57 = "deleteKBTemplate"; - - _methodParameterTypes57 = new String[] { "long" }; - - _methodName58 = "deleteKBTemplates"; - - _methodParameterTypes58 = new String[] { "long", "long[][]" }; - - _methodName59 = "getGroupKBTemplates"; - - _methodParameterTypes59 = new String[] { - "long", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName60 = "getGroupKBTemplatesCount"; - - _methodParameterTypes60 = new String[] { "long" }; - - _methodName61 = "getKBTemplate"; - - _methodParameterTypes61 = new String[] { "long" }; - - _methodName62 = "getKBTemplateSearchDisplay"; - - _methodParameterTypes62 = new String[] { - "long", "java.lang.String", "java.lang.String", "java.util.Date", - "java.util.Date", "boolean", "int[][]", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName63 = "updateKBTemplate"; - - _methodParameterTypes63 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName50.equals(name) && - Arrays.deepEquals(_methodParameterTypes50, parameterTypes)) { - return KBTemplateServiceUtil.getBeanIdentifier(); - } - - if (_methodName51.equals(name) && - Arrays.deepEquals(_methodParameterTypes51, parameterTypes)) { - KBTemplateServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName56.equals(name) && - Arrays.deepEquals(_methodParameterTypes56, parameterTypes)) { - return KBTemplateServiceUtil.addKBTemplate((java.lang.String)arguments[0], - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (com.liferay.portal.service.ServiceContext)arguments[3]); - } - - if (_methodName57.equals(name) && - Arrays.deepEquals(_methodParameterTypes57, parameterTypes)) { - return KBTemplateServiceUtil.deleteKBTemplate(((Long)arguments[0]).longValue()); - } - - if (_methodName58.equals(name) && - Arrays.deepEquals(_methodParameterTypes58, parameterTypes)) { - KBTemplateServiceUtil.deleteKBTemplates(((Long)arguments[0]).longValue(), - (long[])arguments[1]); - - return null; - } - - if (_methodName59.equals(name) && - Arrays.deepEquals(_methodParameterTypes59, parameterTypes)) { - return KBTemplateServiceUtil.getGroupKBTemplates(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); - } - - if (_methodName60.equals(name) && - Arrays.deepEquals(_methodParameterTypes60, parameterTypes)) { - return KBTemplateServiceUtil.getGroupKBTemplatesCount(((Long)arguments[0]).longValue()); - } - - if (_methodName61.equals(name) && - Arrays.deepEquals(_methodParameterTypes61, parameterTypes)) { - return KBTemplateServiceUtil.getKBTemplate(((Long)arguments[0]).longValue()); - } - - if (_methodName62.equals(name) && - Arrays.deepEquals(_methodParameterTypes62, parameterTypes)) { - return KBTemplateServiceUtil.getKBTemplateSearchDisplay(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (java.util.Date)arguments[3], (java.util.Date)arguments[4], - ((Boolean)arguments[5]).booleanValue(), (int[])arguments[6], - ((Integer)arguments[7]).intValue(), - ((Integer)arguments[8]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[9]); - } - - if (_methodName63.equals(name) && - Arrays.deepEquals(_methodParameterTypes63, parameterTypes)) { - return KBTemplateServiceUtil.updateKBTemplate(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (com.liferay.portal.service.ServiceContext)arguments[3]); - } - - throw new UnsupportedOperationException(); - } - - private String _methodName50; - private String[] _methodParameterTypes50; - private String _methodName51; - private String[] _methodParameterTypes51; - private String _methodName56; - private String[] _methodParameterTypes56; - private String _methodName57; - private String[] _methodParameterTypes57; - private String _methodName58; - private String[] _methodParameterTypes58; - private String _methodName59; - private String[] _methodParameterTypes59; - private String _methodName60; - private String[] _methodParameterTypes60; - private String _methodName61; - private String[] _methodParameterTypes61; - private String _methodName62; - private String[] _methodParameterTypes62; - private String _methodName63; - private String[] _methodParameterTypes63; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBArticleServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBArticleServiceSoap.java deleted file mode 100644 index d27c832bca..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBArticleServiceSoap.java +++ /dev/null @@ -1,561 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.http; - -import com.liferay.knowledgebase.service.KBArticleServiceUtil; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.rmi.RemoteException; - -/** - * Provides the SOAP utility for the - * {@link com.liferay.knowledgebase.service.KBArticleServiceUtil} 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. - * - *

    - * 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 com.liferay.knowledgebase.model.KBArticleSoap}. - * If the method in the service utility returns a - * {@link com.liferay.knowledgebase.model.KBArticle}, that is translated to a - * {@link com.liferay.knowledgebase.model.KBArticleSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

    - * - *

    - * 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). - *

    - * - *

    - * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

    - * - *

    - * The SOAP utility is only generated for remote services. - *

    - * - * @author Brian Wing Shun Chan - * @see KBArticleServiceHttp - * @see com.liferay.knowledgebase.model.KBArticleSoap - * @see com.liferay.knowledgebase.service.KBArticleServiceUtil - * @generated - */ -public class KBArticleServiceSoap { - public static com.liferay.knowledgebase.model.KBArticleSoap addKBArticle( - java.lang.String portletId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String title, - java.lang.String urlTitle, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBArticle returnValue = KBArticleServiceUtil.addKBArticle(portletId, - parentResourceClassNameId, parentResourcePrimKey, title, - urlTitle, content, description, sourceURL, sections, - selectedFileNames, serviceContext); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap deleteKBArticle( - long resourcePrimKey) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBArticle returnValue = KBArticleServiceUtil.deleteKBArticle(resourcePrimKey); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void deleteKBArticles(long groupId, long[] resourcePrimKeys) - throws RemoteException { - try { - KBArticleServiceUtil.deleteKBArticles(groupId, resourcePrimKeys); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void deleteTempAttachment(long groupId, long resourcePrimKey, - java.lang.String fileName, java.lang.String tempFolderName) - throws RemoteException { - try { - KBArticleServiceUtil.deleteTempAttachment(groupId, resourcePrimKey, - fileName, tempFolderName); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap fetchLatestKBArticle( - long resourcePrimKey, int status) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBArticle returnValue = KBArticleServiceUtil.fetchLatestKBArticle(resourcePrimKey, - status); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap[] getGroupKBArticles( - long groupId, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBArticleServiceUtil.getGroupKBArticles(groupId, status, start, - end, orderByComparator); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getGroupKBArticlesCount(long groupId, int status) - throws RemoteException { - try { - int returnValue = KBArticleServiceUtil.getGroupKBArticlesCount(groupId, - status); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap getKBArticle( - long resourcePrimKey, int version) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBArticle returnValue = KBArticleServiceUtil.getKBArticle(resourcePrimKey, - version); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap[] getKBArticleAndAllDescendantKBArticles( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBArticleServiceUtil.getKBArticleAndAllDescendantKBArticles(groupId, - resourcePrimKey, status, orderByComparator); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * @deprecated As of 7.0.0, replaced by - {@link #getKBArticleAndAllDescendantKBArticles(long, long, - int, com.liferay.portal.kernel.util.OrderByComparator)} - */ - public static com.liferay.knowledgebase.model.KBArticleSoap[] getKBArticleAndAllDescendants( - long groupId, long resourcePrimKey, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBArticleServiceUtil.getKBArticleAndAllDescendants(groupId, - resourcePrimKey, status, orderByComparator); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap[] getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBArticleServiceUtil.getKBArticles(groupId, - parentResourcePrimKey, status, start, end, orderByComparator); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap[] getKBArticles( - long groupId, long[] resourcePrimKeys, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBArticleServiceUtil.getKBArticles(groupId, resourcePrimKeys, - status, start, end, orderByComparator); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap[] getKBArticles( - long groupId, long[] resourcePrimKeys, int status, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBArticleServiceUtil.getKBArticles(groupId, resourcePrimKeys, - status, orderByComparator); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) throws RemoteException { - try { - int returnValue = KBArticleServiceUtil.getKBArticlesCount(groupId, - parentResourcePrimKey, status); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getKBArticlesCount(long groupId, long[] resourcePrimKeys, - int status) throws RemoteException { - try { - int returnValue = KBArticleServiceUtil.getKBArticlesCount(groupId, - resourcePrimKeys, status); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSearchDisplay getKBArticleSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - int status, java.util.Date startDate, java.util.Date endDate, - boolean andOperator, int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBArticleSearchDisplay returnValue = KBArticleServiceUtil.getKBArticleSearchDisplay(groupId, - title, content, status, startDate, endDate, andOperator, - curStartValues, cur, delta, orderByComparator); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap[] getKBArticleVersions( - long groupId, long resourcePrimKey, int status, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBArticleServiceUtil.getKBArticleVersions(groupId, - resourcePrimKey, status, start, end, orderByComparator); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getKBArticleVersionsCount(long groupId, - long resourcePrimKey, int status) throws RemoteException { - try { - int returnValue = KBArticleServiceUtil.getKBArticleVersionsCount(groupId, - resourcePrimKey, status); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap getLatestKBArticle( - long resourcePrimKey, int status) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBArticle returnValue = KBArticleServiceUtil.getLatestKBArticle(resourcePrimKey, - status); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap[] getSectionsKBArticles( - long groupId, java.lang.String[] sections, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBArticleServiceUtil.getSectionsKBArticles(groupId, sections, - status, start, end, orderByComparator); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getSectionsKBArticlesCount(long groupId, - java.lang.String[] sections, int status) throws RemoteException { - try { - int returnValue = KBArticleServiceUtil.getSectionsKBArticlesCount(groupId, - sections, status); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, - int, int, int, - com.liferay.portal.kernel.util.OrderByComparator)} - */ - public static com.liferay.knowledgebase.model.KBArticleSoap[] getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBArticleServiceUtil.getSiblingKBArticles(groupId, - parentResourcePrimKey, status, start, end, orderByComparator); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, - long, int)} - */ - public static int getSiblingKBArticlesCount(long groupId, - long parentResourcePrimKey, int status) throws RemoteException { - try { - int returnValue = KBArticleServiceUtil.getSiblingKBArticlesCount(groupId, - parentResourcePrimKey, status); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static java.lang.String[] getTempAttachmentNames(long groupId, - java.lang.String tempFolderName) throws RemoteException { - try { - java.lang.String[] returnValue = KBArticleServiceUtil.getTempAttachmentNames(groupId, - tempFolderName); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void moveKBArticle(long resourcePrimKey, - long parentResourceClassNameId, long parentResourcePrimKey, - double priority) throws RemoteException { - try { - KBArticleServiceUtil.moveKBArticle(resourcePrimKey, - parentResourceClassNameId, parentResourcePrimKey, priority); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void subscribeGroupKBArticles(long groupId, - java.lang.String portletId) throws RemoteException { - try { - KBArticleServiceUtil.subscribeGroupKBArticles(groupId, portletId); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void subscribeKBArticle(long groupId, long resourcePrimKey) - throws RemoteException { - try { - KBArticleServiceUtil.subscribeKBArticle(groupId, resourcePrimKey); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void unsubscribeGroupKBArticles(long groupId, - java.lang.String portletId) throws RemoteException { - try { - KBArticleServiceUtil.unsubscribeGroupKBArticles(groupId, portletId); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void unsubscribeKBArticle(long resourcePrimKey) - throws RemoteException { - try { - KBArticleServiceUtil.unsubscribeKBArticle(resourcePrimKey); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBArticleSoap updateKBArticle( - long resourcePrimKey, java.lang.String title, java.lang.String content, - java.lang.String description, java.lang.String sourceURL, - java.lang.String[] sections, java.lang.String[] selectedFileNames, - long[] removeFileEntryIds, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBArticle returnValue = KBArticleServiceUtil.updateKBArticle(resourcePrimKey, - title, content, description, sourceURL, sections, - selectedFileNames, removeFileEntryIds, serviceContext); - - return com.liferay.knowledgebase.model.KBArticleSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(KBArticleServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBArticleService_deploy.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBArticleService_deploy.wsdd deleted file mode 100644 index 6babcdb19a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBArticleService_deploy.wsdd +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBArticleService_undeploy.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBArticleService_undeploy.wsdd deleted file mode 100644 index 3183cc4beb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBArticleService_undeploy.wsdd +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBCommentServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBCommentServiceSoap.java deleted file mode 100644 index 5641d51162..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBCommentServiceSoap.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.http; - -import com.liferay.knowledgebase.service.KBCommentServiceUtil; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.rmi.RemoteException; - -/** - * Provides the SOAP utility for the - * {@link com.liferay.knowledgebase.service.KBCommentServiceUtil} 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. - * - *

    - * 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 com.liferay.knowledgebase.model.KBCommentSoap}. - * If the method in the service utility returns a - * {@link com.liferay.knowledgebase.model.KBComment}, that is translated to a - * {@link com.liferay.knowledgebase.model.KBCommentSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

    - * - *

    - * 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). - *

    - * - *

    - * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

    - * - *

    - * The SOAP utility is only generated for remote services. - *

    - * - * @author Brian Wing Shun Chan - * @see KBCommentServiceHttp - * @see com.liferay.knowledgebase.model.KBCommentSoap - * @see com.liferay.knowledgebase.service.KBCommentServiceUtil - * @generated - */ -public class KBCommentServiceSoap { - public static com.liferay.knowledgebase.model.KBCommentSoap deleteKBComment( - com.liferay.knowledgebase.model.KBCommentSoap kbComment) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBComment returnValue = KBCommentServiceUtil.deleteKBComment(com.liferay.knowledgebase.model.impl.KBCommentModelImpl.toModel( - kbComment)); - - return com.liferay.knowledgebase.model.KBCommentSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBCommentSoap deleteKBComment( - long kbCommentId) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBComment returnValue = KBCommentServiceUtil.deleteKBComment(kbCommentId); - - return com.liferay.knowledgebase.model.KBCommentSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBCommentSoap getKBComment( - long kbCommentId) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBComment returnValue = KBCommentServiceUtil.getKBComment(kbCommentId); - - return com.liferay.knowledgebase.model.KBCommentSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBCommentSoap[] getKBComments( - long groupId, int status, int start, int end) throws RemoteException { - try { - java.util.List returnValue = - KBCommentServiceUtil.getKBComments(groupId, status, start, end); - - return com.liferay.knowledgebase.model.KBCommentSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBCommentSoap[] getKBComments( - long groupId, java.lang.String className, long classPK, int status, - int start, int end) throws RemoteException { - try { - java.util.List returnValue = - KBCommentServiceUtil.getKBComments(groupId, className, classPK, - status, start, end); - - return com.liferay.knowledgebase.model.KBCommentSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getKBCommentsCount(long groupId, int status) - throws RemoteException { - try { - int returnValue = KBCommentServiceUtil.getKBCommentsCount(groupId, - status); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getKBCommentsCount(long groupId, - java.lang.String className, long classPK, int status) - throws RemoteException { - try { - int returnValue = KBCommentServiceUtil.getKBCommentsCount(groupId, - className, classPK, status); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBCommentSoap updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBComment returnValue = KBCommentServiceUtil.updateKBComment(kbCommentId, - classNameId, classPK, content, status, serviceContext); - - return com.liferay.knowledgebase.model.KBCommentSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBCommentSoap updateKBComment( - long kbCommentId, long classNameId, long classPK, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBComment returnValue = KBCommentServiceUtil.updateKBComment(kbCommentId, - classNameId, classPK, content, serviceContext); - - return com.liferay.knowledgebase.model.KBCommentSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBCommentSoap updateStatus( - long kbCommentId, int status, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBComment returnValue = KBCommentServiceUtil.updateStatus(kbCommentId, - status, serviceContext); - - return com.liferay.knowledgebase.model.KBCommentSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(KBCommentServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBCommentService_deploy.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBCommentService_deploy.wsdd deleted file mode 100644 index 8abd3596ce..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBCommentService_deploy.wsdd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBCommentService_undeploy.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBCommentService_undeploy.wsdd deleted file mode 100644 index 08f459376f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBCommentService_undeploy.wsdd +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBFolderServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBFolderServiceSoap.java deleted file mode 100644 index 9a7ea18f0b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBFolderServiceSoap.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.http; - -import com.liferay.knowledgebase.service.KBFolderServiceUtil; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.rmi.RemoteException; - -/** - * Provides the SOAP utility for the - * {@link com.liferay.knowledgebase.service.KBFolderServiceUtil} 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. - * - *

    - * 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 com.liferay.knowledgebase.model.KBFolderSoap}. - * If the method in the service utility returns a - * {@link com.liferay.knowledgebase.model.KBFolder}, that is translated to a - * {@link com.liferay.knowledgebase.model.KBFolderSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

    - * - *

    - * 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). - *

    - * - *

    - * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

    - * - *

    - * The SOAP utility is only generated for remote services. - *

    - * - * @author Brian Wing Shun Chan - * @see KBFolderServiceHttp - * @see com.liferay.knowledgebase.model.KBFolderSoap - * @see com.liferay.knowledgebase.service.KBFolderServiceUtil - * @generated - */ -public class KBFolderServiceSoap { - public static com.liferay.knowledgebase.model.KBFolderSoap addKBFolder( - long groupId, long parentResourceClassNameId, - long parentResourcePrimKey, java.lang.String name, - java.lang.String description, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBFolder returnValue = KBFolderServiceUtil.addKBFolder(groupId, - parentResourceClassNameId, parentResourcePrimKey, name, - description, serviceContext); - - return com.liferay.knowledgebase.model.KBFolderSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBFolderSoap deleteKBFolder( - long kbFolderId) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBFolder returnValue = KBFolderServiceUtil.deleteKBFolder(kbFolderId); - - return com.liferay.knowledgebase.model.KBFolderSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBFolderSoap fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBFolder returnValue = KBFolderServiceUtil.fetchKBFolderByUrlTitle(groupId, - parentKbFolderId, urlTitle); - - return com.liferay.knowledgebase.model.KBFolderSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBFolderSoap getKBFolder( - long kbFolderId) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBFolder returnValue = KBFolderServiceUtil.getKBFolder(kbFolderId); - - return com.liferay.knowledgebase.model.KBFolderSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBFolderSoap getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, java.lang.String urlTitle) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBFolder returnValue = KBFolderServiceUtil.getKBFolderByUrlTitle(groupId, - parentKbFolderId, urlTitle); - - return com.liferay.knowledgebase.model.KBFolderSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBFolderSoap[] getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws RemoteException { - try { - java.util.List returnValue = - KBFolderServiceUtil.getKBFolders(groupId, parentKBFolderId, - start, end); - - return com.liferay.knowledgebase.model.KBFolderSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getKBFoldersCount(long groupId, long parentKBFolderId) - throws RemoteException { - try { - int returnValue = KBFolderServiceUtil.getKBFoldersCount(groupId, - parentKBFolderId); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws RemoteException { - try { - KBFolderServiceUtil.moveKBFolder(kbFolderId, parentKBFolderId); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBFolderSoap updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, java.lang.String name, java.lang.String description) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBFolder returnValue = KBFolderServiceUtil.updateKBFolder(parentResourceClassNameId, - parentResourcePrimKey, kbFolderId, name, description); - - return com.liferay.knowledgebase.model.KBFolderSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(KBFolderServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBTemplateServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBTemplateServiceSoap.java deleted file mode 100644 index 03ecba5294..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBTemplateServiceSoap.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.http; - -import com.liferay.knowledgebase.service.KBTemplateServiceUtil; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.rmi.RemoteException; - -/** - * Provides the SOAP utility for the - * {@link com.liferay.knowledgebase.service.KBTemplateServiceUtil} 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. - * - *

    - * 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 com.liferay.knowledgebase.model.KBTemplateSoap}. - * If the method in the service utility returns a - * {@link com.liferay.knowledgebase.model.KBTemplate}, that is translated to a - * {@link com.liferay.knowledgebase.model.KBTemplateSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

    - * - *

    - * 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). - *

    - * - *

    - * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

    - * - *

    - * The SOAP utility is only generated for remote services. - *

    - * - * @author Brian Wing Shun Chan - * @see KBTemplateServiceHttp - * @see com.liferay.knowledgebase.model.KBTemplateSoap - * @see com.liferay.knowledgebase.service.KBTemplateServiceUtil - * @generated - */ -public class KBTemplateServiceSoap { - public static com.liferay.knowledgebase.model.KBTemplateSoap addKBTemplate( - java.lang.String portletId, java.lang.String title, - java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBTemplate returnValue = KBTemplateServiceUtil.addKBTemplate(portletId, - title, content, serviceContext); - - return com.liferay.knowledgebase.model.KBTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBTemplateSoap deleteKBTemplate( - long kbTemplateId) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBTemplate returnValue = KBTemplateServiceUtil.deleteKBTemplate(kbTemplateId); - - return com.liferay.knowledgebase.model.KBTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void deleteKBTemplates(long groupId, long[] kbTemplateIds) - throws RemoteException { - try { - KBTemplateServiceUtil.deleteKBTemplates(groupId, kbTemplateIds); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBTemplateSoap[] getGroupKBTemplates( - long groupId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - java.util.List returnValue = - KBTemplateServiceUtil.getGroupKBTemplates(groupId, start, end, - orderByComparator); - - return com.liferay.knowledgebase.model.KBTemplateSoap.toSoapModels(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static int getGroupKBTemplatesCount(long groupId) - throws RemoteException { - try { - int returnValue = KBTemplateServiceUtil.getGroupKBTemplatesCount(groupId); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBTemplateSoap getKBTemplate( - long kbTemplateId) throws RemoteException { - try { - com.liferay.knowledgebase.model.KBTemplate returnValue = KBTemplateServiceUtil.getKBTemplate(kbTemplateId); - - return com.liferay.knowledgebase.model.KBTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBTemplateSearchDisplay getKBTemplateSearchDisplay( - long groupId, java.lang.String title, java.lang.String content, - java.util.Date startDate, java.util.Date endDate, boolean andOperator, - int[] curStartValues, int cur, int delta, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBTemplateSearchDisplay returnValue = KBTemplateServiceUtil.getKBTemplateSearchDisplay(groupId, - title, content, startDate, endDate, andOperator, - curStartValues, cur, delta, orderByComparator); - - return returnValue; - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static com.liferay.knowledgebase.model.KBTemplateSoap updateKBTemplate( - long kbTemplateId, java.lang.String title, java.lang.String content, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.knowledgebase.model.KBTemplate returnValue = KBTemplateServiceUtil.updateKBTemplate(kbTemplateId, - title, content, serviceContext); - - return com.liferay.knowledgebase.model.KBTemplateSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(KBTemplateServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBTemplateService_deploy.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBTemplateService_deploy.wsdd deleted file mode 100644 index 7e53db3181..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBTemplateService_deploy.wsdd +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBTemplateService_undeploy.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBTemplateService_undeploy.wsdd deleted file mode 100644 index b14bf440c2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/http/KBTemplateService_undeploy.wsdd +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBArticleLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBArticleLocalServiceImpl.java deleted file mode 100644 index 3daf0f7438..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBArticleLocalServiceImpl.java +++ /dev/null @@ -1,2010 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.impl; - -import com.liferay.compat.portal.kernel.util.StringUtil; -import com.liferay.knowledgebase.DuplicateKBArticleUrlTitleException; -import com.liferay.knowledgebase.InvalidKBArticleUrlTitleException; -import com.liferay.knowledgebase.KBArticleContentException; -import com.liferay.knowledgebase.KBArticleParentException; -import com.liferay.knowledgebase.KBArticlePriorityException; -import com.liferay.knowledgebase.KBArticleSourceURLException; -import com.liferay.knowledgebase.KBArticleTitleException; -import com.liferay.knowledgebase.NoSuchArticleException; -import com.liferay.knowledgebase.admin.importer.KBArticleImporter; -import com.liferay.knowledgebase.admin.social.AdminActivityKeys; -import com.liferay.knowledgebase.admin.util.AdminSubscriptionSender; -import com.liferay.knowledgebase.admin.util.AdminUtil; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.base.KBArticleLocalServiceBaseImpl; -import com.liferay.knowledgebase.util.KnowledgeBaseConstants; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.knowledgebase.util.PortletPropsValues; -import com.liferay.knowledgebase.util.comparator.KBArticlePriorityComparator; -import com.liferay.knowledgebase.util.comparator.KBArticleVersionComparator; -import com.liferay.portal.kernel.bean.BeanPropertiesUtil; -import com.liferay.portal.kernel.dao.orm.Conjunction; -import com.liferay.portal.kernel.dao.orm.Criterion; -import com.liferay.portal.kernel.dao.orm.Disjunction; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; -import com.liferay.portal.kernel.dao.orm.Junction; -import com.liferay.portal.kernel.dao.orm.Property; -import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.search.Indexer; -import com.liferay.portal.kernel.search.IndexerRegistryUtil; -import com.liferay.portal.kernel.search.SearchEngineUtil; -import com.liferay.portal.kernel.systemevent.SystemEventHierarchyEntryThreadLocal; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.ContentTypes; -import com.liferay.portal.kernel.util.ListUtil; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.TempFileUtil; -import com.liferay.portal.kernel.util.Time; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.ResourceConstants; -import com.liferay.portal.model.Subscription; -import com.liferay.portal.model.User; -import com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.util.SubscriptionSender; -import com.liferay.portlet.asset.model.AssetEntry; -import com.liferay.portlet.asset.model.AssetLink; -import com.liferay.portlet.asset.model.AssetLinkConstants; - -import java.io.InputStream; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.portlet.PortletPreferences; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - * @author Edward Han - */ -public class KBArticleLocalServiceImpl extends KBArticleLocalServiceBaseImpl { - - @Override - public KBArticle addKBArticle( - long userId, long parentResourceClassNameId, - long parentResourcePrimKey, String title, String urlTitle, - String content, String description, String sourceURL, - String[] sections, String[] selectedFileNames, - ServiceContext serviceContext) - throws PortalException, SystemException { - - // KB article - - User user = userPersistence.findByPrimaryKey(userId); - long groupId = serviceContext.getScopeGroupId(); - double priority = getPriority(groupId, parentResourcePrimKey); - Date now = new Date(); - - validate(title, content, sourceURL); - validateParent(parentResourceClassNameId, parentResourcePrimKey); - - long kbFolderId = KnowledgeBaseUtil.getKBFolderId( - parentResourceClassNameId, parentResourcePrimKey); - - validateUrlTitle(groupId, kbFolderId, urlTitle); - - long kbArticleId = counterLocalService.increment(); - - long resourcePrimKey = counterLocalService.increment(); - - long rootResourcePrimKey = getRootResourcePrimKey( - resourcePrimKey, parentResourceClassNameId, parentResourcePrimKey); - - KBArticle kbArticle = kbArticlePersistence.create(kbArticleId); - - kbArticle.setUuid(serviceContext.getUuid()); - kbArticle.setResourcePrimKey(resourcePrimKey); - kbArticle.setGroupId(groupId); - kbArticle.setCompanyId(user.getCompanyId()); - kbArticle.setUserId(user.getUserId()); - kbArticle.setUserName(user.getFullName()); - kbArticle.setCreateDate(serviceContext.getCreateDate(now)); - kbArticle.setModifiedDate(serviceContext.getModifiedDate(now)); - kbArticle.setRootResourcePrimKey(rootResourcePrimKey); - kbArticle.setParentResourceClassNameId(parentResourceClassNameId); - kbArticle.setParentResourcePrimKey(parentResourcePrimKey); - kbArticle.setKbFolderId(kbFolderId); - kbArticle.setVersion(KBArticleConstants.DEFAULT_VERSION); - kbArticle.setTitle(title); - kbArticle.setUrlTitle( - getUniqueUrlTitle( - groupId, kbFolderId, kbArticleId, title, urlTitle)); - kbArticle.setContent(content); - kbArticle.setDescription(description); - kbArticle.setPriority(priority); - kbArticle.setSections( - StringUtil.merge(AdminUtil.escapeSections(sections))); - kbArticle.setViewCount(0); - kbArticle.setLatest(true); - kbArticle.setMain(false); - kbArticle.setStatus(WorkflowConstants.STATUS_DRAFT); - kbArticle.setSourceURL(sourceURL); - - kbArticlePersistence.update(kbArticle); - - // Resources - - if (serviceContext.isAddGroupPermissions() || - serviceContext.isAddGuestPermissions()) { - - addKBArticleResources( - kbArticle, serviceContext.isAddGroupPermissions(), - serviceContext.isAddGuestPermissions()); - } - else { - addKBArticleResources( - kbArticle, serviceContext.getGroupPermissions(), - serviceContext.getGuestPermissions()); - } - - // Asset - - updateKBArticleAsset( - userId, kbArticle, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames(), - serviceContext.getAssetLinkEntryIds()); - - // Attachments - - addKBArticleAttachments(userId, kbArticle, selectedFileNames); - - // Workflow - - WorkflowHandlerRegistryUtil.startWorkflowInstance( - user.getCompanyId(), groupId, userId, KBArticle.class.getName(), - resourcePrimKey, kbArticle, serviceContext); - - return kbArticle; - } - - @Override - public void addKBArticleResources( - KBArticle kbArticle, boolean addGroupPermissions, - boolean addGuestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addResources( - kbArticle.getCompanyId(), kbArticle.getGroupId(), - kbArticle.getUserId(), KBArticle.class.getName(), - kbArticle.getResourcePrimKey(), false, addGroupPermissions, - addGuestPermissions); - } - - @Override - public void addKBArticleResources( - KBArticle kbArticle, String[] groupPermissions, - String[] guestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addModelResources( - kbArticle.getCompanyId(), kbArticle.getGroupId(), - kbArticle.getUserId(), KBArticle.class.getName(), - kbArticle.getResourcePrimKey(), groupPermissions, guestPermissions); - } - - @Override - public void addKBArticleResources( - long kbArticleId, boolean addGroupPermissions, - boolean addGuestPermissions) - throws PortalException, SystemException { - - KBArticle kbArticle = kbArticlePersistence.findByPrimaryKey( - kbArticleId); - - addKBArticleResources( - kbArticle, addGroupPermissions, addGuestPermissions); - } - - @Override - public void addKBArticleResources( - long kbArticleId, String[] groupPermissions, - String[] guestPermissions) - throws PortalException, SystemException { - - KBArticle kbArticle = kbArticlePersistence.findByPrimaryKey( - kbArticleId); - - addKBArticleResources(kbArticle, groupPermissions, guestPermissions); - } - - @Override - public int addKBArticlesMarkdown( - long userId, long groupId, long parentKbFolderId, String fileName, - boolean prioritizeByNumericalPrefix, InputStream inputStream, - ServiceContext serviceContext) - throws PortalException, SystemException { - - KBArticleImporter kbArticleImporter = new KBArticleImporter(); - - return kbArticleImporter.processZipFile( - userId, groupId, parentKbFolderId, prioritizeByNumericalPrefix, - inputStream, serviceContext); - } - - @Override - public void addTempAttachment( - long groupId, long userId, String fileName, String tempFolderName, - InputStream inputStream, String mimeType) - throws PortalException, SystemException { - - TempFileUtil.addTempFile( - groupId, userId, fileName, tempFolderName, inputStream, mimeType); - } - - @Override - public void deleteGroupKBArticles(long groupId) - throws PortalException, SystemException { - - // KB articles - - deleteKBArticles(groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - - // Subscriptions - - Group group = groupLocalService.getGroup(groupId); - - List subscriptions = - subscriptionLocalService.getSubscriptions( - group.getCompanyId(), KBArticle.class.getName(), groupId); - - for (Subscription subscription : subscriptions) { - unsubscribeGroupKBArticles(subscription.getUserId(), groupId); - } - } - - @Override - public KBArticle deleteKBArticle(KBArticle kbArticle) - throws PortalException, SystemException { - - // Child KB articles - - deleteKBArticles( - kbArticle.getGroupId(), kbArticle.getResourcePrimKey()); - - // Resources - - resourceLocalService.deleteResource( - kbArticle.getCompanyId(), KBArticle.class.getName(), - ResourceConstants.SCOPE_INDIVIDUAL, kbArticle.getResourcePrimKey()); - - // KB articles - - kbArticlePersistence.removeByResourcePrimKey( - kbArticle.getResourcePrimKey()); - - // KB comments - - kbCommentLocalService.deleteKBComments( - KBArticle.class.getName(), kbArticle.getResourcePrimKey()); - - // Asset - - deleteAssets(kbArticle); - - // Ratings - - ratingsStatsLocalService.deleteStats( - KBArticle.class.getName(), kbArticle.getResourcePrimKey()); - - // Social - - socialActivityLocalService.deleteActivities( - KBArticle.class.getName(), kbArticle.getResourcePrimKey()); - - // Indexer - - Indexer indexer = IndexerRegistryUtil.getIndexer(KBArticle.class); - - indexer.delete(kbArticle); - - // Attachments - - PortletFileRepositoryUtil.deleteFolder( - kbArticle.getAttachmentsFolderId()); - - // Subscriptions - - deleteSubscriptions(kbArticle); - - // Workflow - - workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks( - kbArticle.getCompanyId(), kbArticle.getGroupId(), - KBArticle.class.getName(), kbArticle.getResourcePrimKey()); - - return kbArticle; - } - - @Override - public KBArticle deleteKBArticle(long resourcePrimKey) - throws PortalException, SystemException { - - KBArticle kbArticle = getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - return kbArticleLocalService.deleteKBArticle(kbArticle); - } - - @Override - public void deleteKBArticles(long groupId, long parentResourcePrimKey) - throws PortalException, SystemException { - - List childKBArticles = getKBArticles( - groupId, parentResourcePrimKey, WorkflowConstants.STATUS_ANY, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - - for (KBArticle childKBArticle : childKBArticles) { - kbArticleLocalService.deleteKBArticle(childKBArticle); - } - } - - @Override - public void deleteKBArticles(long[] resourcePrimKeys) - throws PortalException, SystemException { - - List kbArticles = getKBArticles( - resourcePrimKeys, WorkflowConstants.STATUS_ANY, null); - - for (KBArticle kbArticle : kbArticles) { - kbArticleLocalService.deleteKBArticle(kbArticle); - } - } - - @Override - public void deleteTempAttachment( - long groupId, long userId, String fileName, String tempFolderName) - throws PortalException, SystemException { - - TempFileUtil.deleteTempFile(groupId, userId, fileName, tempFolderName); - } - - @Override - public KBArticle fetchFirstChildKBArticle( - long groupId, long parentResourcePrimKey) - throws SystemException { - - return kbArticlePersistence.fetchByG_P_L_First( - groupId, parentResourcePrimKey, true, - new KBArticlePriorityComparator(true)); - } - - @Override - public KBArticle fetchKBArticleByUrlTitle( - long groupId, long kbFolderId, String urlTitle) - throws SystemException { - - urlTitle = StringUtil.replaceFirst( - urlTitle, StringPool.SLASH, StringPool.BLANK); - - KBArticle kbArticle = fetchLatestKBArticleByUrlTitle( - groupId, kbFolderId, urlTitle, WorkflowConstants.STATUS_APPROVED); - - if (kbArticle == null) { - kbArticle = fetchLatestKBArticleByUrlTitle( - groupId, kbFolderId, urlTitle, - WorkflowConstants.STATUS_PENDING); - } - - return kbArticle; - } - - @Override - public KBArticle fetchKBArticleByUrlTitle( - long groupId, String kbFolderUrlTitle, String urlTitle) - throws PortalException { - - urlTitle = StringUtil.replaceFirst( - urlTitle, StringPool.SLASH, StringPool.BLANK); - - List kbArticles = kbArticleFinder.findByUrlTitle( - groupId, kbFolderUrlTitle, urlTitle, _STATUSES, 0, 1); - - if (kbArticles.isEmpty()) { - return null; - } - - return kbArticles.get(0); - } - - @Override - public KBArticle fetchLatestKBArticle(long resourcePrimKey, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.fetchByResourcePrimKey_First( - resourcePrimKey, new KBArticleVersionComparator()); - } - - return kbArticlePersistence.fetchByR_S_First( - resourcePrimKey, status, new KBArticleVersionComparator()); - } - - @Override - public KBArticle fetchLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, String urlTitle, int status) - throws SystemException { - - urlTitle = StringUtil.replaceFirst( - urlTitle, StringPool.SLASH, StringPool.BLANK); - - List kbArticles = null; - - OrderByComparator orderByComparator = new KBArticleVersionComparator(); - - if (status == WorkflowConstants.STATUS_ANY) { - kbArticles = kbArticlePersistence.findByG_KBFI_UT( - groupId, kbFolderId, urlTitle, 0, 1, orderByComparator); - } - else { - kbArticles = kbArticlePersistence.findByG_KBFI_UT_ST( - groupId, kbFolderId, urlTitle, status, 0, 1, orderByComparator); - } - - if (kbArticles.isEmpty()) { - return null; - } - - return kbArticles.get(0); - } - - @Override - public List getAllDescendantKBArticles( - long resourcePrimKey, int status, - OrderByComparator orderByComparator) - throws SystemException { - - return getAllDescendantKBArticles( - resourcePrimKey, status, orderByComparator, false); - } - - @Override - public List getCompanyKBArticles( - long companyId, int status, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.findByC_L( - companyId, true, start, end, orderByComparator); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.findByC_M( - companyId, true, start, end, orderByComparator); - } - - return kbArticlePersistence.findByC_S( - companyId, status, start, end, orderByComparator); - } - - @Override - public int getCompanyKBArticlesCount(long companyId, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.countByC_L(companyId, true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.countByC_M(companyId, true); - } - - return kbArticlePersistence.countByC_S(companyId, status); - } - - @Override - public List getGroupKBArticles( - long groupId, int status, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.findByG_L( - groupId, true, start, end, orderByComparator); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.findByG_M( - groupId, true, start, end, orderByComparator); - } - - return kbArticlePersistence.findByG_S( - groupId, status, start, end, orderByComparator); - } - - @Override - public int getGroupKBArticlesCount(long groupId, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.countByG_L(groupId, true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.countByG_M(groupId, true); - } - - return kbArticlePersistence.countByG_S(groupId, status); - } - - @Override - public KBArticle getKBArticle(long resourcePrimKey, int version) - throws PortalException, SystemException { - - return kbArticlePersistence.findByR_V(resourcePrimKey, version); - } - - @Override - public List getKBArticleAndAllDescendantKBArticles( - long resourcePrimKey, int status, - OrderByComparator orderByComparator) - throws SystemException { - - return getAllDescendantKBArticles( - resourcePrimKey, status, orderByComparator, true); - } - - /** - * @deprecated As of 7.0.0, replaced by - * {@link #getKBArticleAndAllDescendantKBArticles(long, int, - * com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Override - public List getKBArticleAndAllDescendants( - long resourcePrimKey, int status, - OrderByComparator orderByComparator) - throws SystemException { - - return getKBArticleAndAllDescendantKBArticles( - resourcePrimKey, status, orderByComparator); - } - - @Override - public KBArticle getKBArticleByUrlTitle( - long groupId, long kbFolderId, String urlTitle) - throws PortalException, SystemException { - - urlTitle = StringUtil.replaceFirst( - urlTitle, StringPool.SLASH, StringPool.BLANK); - - // Get the latest KB article that is approved, if none are approved, get - // the latest unapproved KB article - - KBArticle kbArticle = fetchKBArticleByUrlTitle( - groupId, kbFolderId, urlTitle); - - if (kbArticle == null) { - throw new NoSuchArticleException( - "No KBArticle exists with the key {groupId=" + groupId + - ", kbFolderId=" + kbFolderId + ", urlTitle=" + urlTitle + - "}"); - } - - return kbArticle; - } - - @Override - public KBArticle getKBArticleByUrlTitle( - long groupId, String kbFolderUrlTitle, String urlTitle) - throws PortalException { - - urlTitle = StringUtil.replaceFirst( - urlTitle, StringPool.SLASH, StringPool.BLANK); - - KBArticle kbArticle = fetchKBArticleByUrlTitle( - groupId, kbFolderUrlTitle, urlTitle); - - if (kbArticle == null) { - throw new NoSuchArticleException( - "No KBArticle with the key {groupId=" + groupId + - ", urlTitle=" + urlTitle + "} found in a folder with URL " + - "title " + kbFolderUrlTitle); - } - - return kbArticle; - } - - @Override - public List getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, OrderByComparator orderByComparator) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.findByG_P_L( - groupId, parentResourcePrimKey, true, start, end, - orderByComparator); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.findByG_P_M( - groupId, parentResourcePrimKey, true, start, end, - orderByComparator); - } - - return kbArticlePersistence.findByG_P_S( - groupId, parentResourcePrimKey, status, start, end, - orderByComparator); - } - - @Override - public List getKBArticles( - long[] resourcePrimKeys, int status, - OrderByComparator orderByComparator) - throws SystemException { - - List kbArticles = new ArrayList(); - - Long[][] params = new Long[][] {ArrayUtil.toArray(resourcePrimKeys)}; - - while ((params = KnowledgeBaseUtil.getParams(params[0])) != null) { - List curKBArticles = null; - - if (status == WorkflowConstants.STATUS_ANY) { - curKBArticles = kbArticlePersistence.findByR_L( - ArrayUtil.toArray(params[1]), true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - curKBArticles = kbArticlePersistence.findByR_M( - ArrayUtil.toArray(params[1]), true); - } - else { - curKBArticles = kbArticlePersistence.findByR_S( - ArrayUtil.toArray(params[1]), status); - } - - kbArticles.addAll(curKBArticles); - } - - if (orderByComparator != null) { - kbArticles = ListUtil.sort(kbArticles, orderByComparator); - } - else { - kbArticles = KnowledgeBaseUtil.sort(resourcePrimKeys, kbArticles); - } - - return Collections.unmodifiableList(kbArticles); - } - - @Override - public int getKBArticlesCount( - long groupId, long parentResourcePrimKey, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.countByG_P_L( - groupId, parentResourcePrimKey, true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.countByG_P_M( - groupId, parentResourcePrimKey, true); - } - - return kbArticlePersistence.countByG_P_S( - groupId, parentResourcePrimKey, status); - } - - @Override - public List getKBArticleVersions( - long resourcePrimKey, int status, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.findByResourcePrimKey( - resourcePrimKey, start, end, orderByComparator); - } - - return kbArticlePersistence.findByR_S( - resourcePrimKey, status, start, end, orderByComparator); - } - - @Override - public int getKBArticleVersionsCount(long resourcePrimKey, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.countByResourcePrimKey(resourcePrimKey); - } - - return kbArticlePersistence.countByR_S(resourcePrimKey, status); - } - - @Override - public int getKBFolderKBArticlesCount( - long groupId, long kbFolderId, int status) - throws SystemException { - - return kbArticlePersistence.countByG_KBFI_S( - groupId, kbFolderId, status); - } - - @Override - public KBArticle getLatestKBArticle(long resourcePrimKey, int status) - throws PortalException, SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.findByResourcePrimKey_First( - resourcePrimKey, new KBArticleVersionComparator()); - } - - return kbArticlePersistence.findByR_S_First( - resourcePrimKey, status, new KBArticleVersionComparator()); - } - - @Override - public KBArticle getLatestKBArticleByUrlTitle( - long groupId, long kbFolderId, String urlTitle, int status) - throws PortalException, SystemException { - - urlTitle = StringUtil.replaceFirst( - urlTitle, StringPool.SLASH, StringPool.BLANK); - - KBArticle latestKBArticle = fetchLatestKBArticleByUrlTitle( - groupId, kbFolderId, urlTitle, status); - - if (latestKBArticle == null) { - throw new NoSuchArticleException( - "No KBArticle exists with the key {groupId=" + groupId + - ", kbFolderId=" + kbFolderId + ", urlTitle=" + urlTitle + - ", status=" + status + "}"); - } - - return latestKBArticle; - } - - @Override - public KBArticle[] getPreviousAndNextKBArticles(long kbArticleId) - throws PortalException, SystemException { - - KBArticle kbArticle = kbArticlePersistence.findByPrimaryKey( - kbArticleId); - - KBArticle[] previousAndNextKBArticles = getPreviousAndNextKBArticles( - kbArticle); - - KBArticle previousKBArticle = getPreviousKBArticle( - kbArticle, previousAndNextKBArticles[0]); - KBArticle nextKBArticle = getNextKBArticle( - kbArticle, previousAndNextKBArticles[2]); - - return new KBArticle[] {previousKBArticle, kbArticle, nextKBArticle}; - } - - @Override - public List getSectionsKBArticles( - long groupId, String[] sections, int status, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - String[] array = AdminUtil.escapeSections(sections); - - for (int i = 0; i < array.length; i++) { - array[i] = StringUtil.quote(array[i], StringPool.PERCENT); - } - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.findByG_P_S_L( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, - true, start, end, orderByComparator); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.findByG_P_S_M( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, - true, start, end, orderByComparator); - } - - return kbArticlePersistence.findByG_P_S_S( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, status, - start, end, orderByComparator); - } - - @Override - public int getSectionsKBArticlesCount( - long groupId, String[] sections, int status) - throws SystemException { - - String[] array = AdminUtil.escapeSections(sections); - - for (int i = 0; i < array.length; i++) { - array[i] = StringUtil.quote(array[i], StringPool.PERCENT); - } - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.countByG_P_S_L( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, - true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.countByG_P_S_M( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, - true); - } - - return kbArticlePersistence.countByG_P_S_S( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, status); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, - * int, int, int, - * com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Override - public List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, OrderByComparator orderByComparator) - throws SystemException { - - return getKBArticles( - groupId, parentResourcePrimKey, status, start, end, - orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, - * long, int)} - */ - @Override - public int getSiblingKBArticlesCount( - long groupId, long parentResourcePrimKey, int status) - throws SystemException { - - return getKBArticlesCount(groupId, parentResourcePrimKey, status); - } - - @Override - public String[] getTempAttachmentNames( - long groupId, long userId, String tempFolderName) - throws PortalException, SystemException { - - return TempFileUtil.getTempFileEntryNames( - groupId, userId, tempFolderName); - } - - @Override - public void moveKBArticle( - long userId, long resourcePrimKey, long parentResourceClassNameId, - long parentResourcePrimKey, double priority) - throws PortalException, SystemException { - - // KB article - - validate(priority); - - updatePermissionFields( - resourcePrimKey, parentResourceClassNameId, parentResourcePrimKey); - - long kbFolderClassNameId = classNameLocalService.getClassNameId( - KBFolderConstants.getClassName()); - - long kbFolderId = KBFolderConstants.DEFAULT_PARENT_FOLDER_ID; - - if (parentResourceClassNameId == kbFolderClassNameId) { - kbFolderId = parentResourcePrimKey; - } - else { - KBArticle latestKBArticle = getLatestKBArticle( - parentResourcePrimKey, WorkflowConstants.STATUS_ANY); - - kbFolderId = latestKBArticle.getKbFolderId(); - } - - List kbArticles = getKBArticleVersions( - resourcePrimKey, WorkflowConstants.STATUS_ANY, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, new KBArticleVersionComparator()); - - for (KBArticle curKBArticle : kbArticles) { - curKBArticle.setParentResourceClassNameId( - parentResourceClassNameId); - curKBArticle.setParentResourcePrimKey(parentResourcePrimKey); - - curKBArticle.setKbFolderId(kbFolderId); - curKBArticle.setPriority(priority); - - kbArticlePersistence.update(curKBArticle); - } - - KBArticle kbArticle = getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - if (kbArticle.getKbFolderId() != kbFolderId) { - List descendantKBArticles = getAllDescendantKBArticles( - resourcePrimKey, WorkflowConstants.STATUS_ANY, null); - - for (KBArticle curKBArticle : descendantKBArticles) { - List kbArticleVersions = getKBArticleVersions( - curKBArticle.getResourcePrimKey(), - WorkflowConstants.STATUS_ANY, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, new KBArticleVersionComparator()); - - for (KBArticle kbArticleVersion : kbArticleVersions) { - kbArticleVersion.setKbFolderId(kbFolderId); - - kbArticlePersistence.update(kbArticleVersion); - } - } - } - - // Social - - KBArticle latestKBArticle = getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(); - - extraDataJSONObject.put("title", latestKBArticle.getTitle()); - - if (latestKBArticle.isApproved() || !latestKBArticle.isFirstVersion()) { - socialActivityLocalService.addActivity( - userId, latestKBArticle.getGroupId(), KBArticle.class.getName(), - resourcePrimKey, AdminActivityKeys.MOVE_KB_ARTICLE, - extraDataJSONObject.toString(), 0); - } - } - - @Override - public List search( - long groupId, String title, String content, int status, - Date startDate, Date endDate, boolean andOperator, int start, - int end, OrderByComparator orderByComparator) - throws SystemException { - - DynamicQuery dynamicQuery = buildDynamicQuery( - groupId, title, content, status, startDate, endDate, andOperator); - - return dynamicQuery(dynamicQuery, start, end, orderByComparator); - } - - @Override - public void subscribeGroupKBArticles(long userId, long groupId) - throws PortalException, SystemException { - - subscriptionLocalService.addSubscription( - userId, groupId, KBArticle.class.getName(), groupId); - } - - @Override - public void subscribeKBArticle( - long userId, long groupId, long resourcePrimKey) - throws PortalException, SystemException { - - subscriptionLocalService.addSubscription( - userId, groupId, KBArticle.class.getName(), resourcePrimKey); - } - - @Override - public void unsubscribeGroupKBArticles(long userId, long groupId) - throws PortalException, SystemException { - - subscriptionLocalService.deleteSubscription( - userId, KBArticle.class.getName(), groupId); - } - - @Override - public void unsubscribeKBArticle(long userId, long resourcePrimKey) - throws PortalException, SystemException { - - subscriptionLocalService.deleteSubscription( - userId, KBArticle.class.getName(), resourcePrimKey); - } - - @Override - public KBArticle updateKBArticle( - long userId, long resourcePrimKey, String title, String content, - String description, String sourceURL, String[] sections, - String[] selectedFileNames, long[] removeFileEntryIds, - ServiceContext serviceContext) - throws PortalException, SystemException { - - // KB article - - User user = userPersistence.findByPrimaryKey(userId); - - validate(title, content, sourceURL); - - KBArticle oldKBArticle = getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - int oldVersion = oldKBArticle.getVersion(); - - KBArticle kbArticle = null; - - if (oldKBArticle.isApproved()) { - long kbArticleId = counterLocalService.increment(); - - kbArticle = kbArticlePersistence.create(kbArticleId); - - kbArticle.setUuid(serviceContext.getUuid()); - kbArticle.setResourcePrimKey(oldKBArticle.getResourcePrimKey()); - kbArticle.setGroupId(oldKBArticle.getGroupId()); - kbArticle.setCompanyId(user.getCompanyId()); - kbArticle.setUserId(user.getUserId()); - kbArticle.setUserName(user.getFullName()); - kbArticle.setCreateDate(oldKBArticle.getCreateDate()); - kbArticle.setRootResourcePrimKey( - oldKBArticle.getRootResourcePrimKey()); - kbArticle.setParentResourceClassNameId( - oldKBArticle.getParentResourceClassNameId()); - kbArticle.setParentResourcePrimKey( - oldKBArticle.getParentResourcePrimKey()); - kbArticle.setKbFolderId(oldKBArticle.getKbFolderId()); - kbArticle.setVersion(oldVersion + 1); - kbArticle.setUrlTitle(oldKBArticle.getUrlTitle()); - kbArticle.setPriority(oldKBArticle.getPriority()); - kbArticle.setViewCount(oldKBArticle.getViewCount()); - } - else { - kbArticle = oldKBArticle; - } - - if (oldKBArticle.isPending()) { - kbArticle.setStatus(WorkflowConstants.STATUS_PENDING); - } - else { - kbArticle.setStatus(WorkflowConstants.STATUS_DRAFT); - } - - kbArticle.setModifiedDate(serviceContext.getModifiedDate(null)); - kbArticle.setTitle(title); - kbArticle.setContent(content); - kbArticle.setDescription(description); - kbArticle.setSourceURL(sourceURL); - kbArticle.setSections( - StringUtil.merge(AdminUtil.escapeSections(sections))); - kbArticle.setLatest(true); - kbArticle.setMain(false); - - kbArticlePersistence.update(kbArticle); - - if (oldKBArticle.isApproved()) { - oldKBArticle.setLatest(false); - - kbArticlePersistence.update(oldKBArticle); - } - - // Resources - - if ((serviceContext.getGroupPermissions() != null) || - (serviceContext.getGuestPermissions() != null)) { - - updateKBArticleResources( - kbArticle, serviceContext.getGroupPermissions(), - serviceContext.getGuestPermissions()); - } - - // Asset - - updateKBArticleAsset( - userId, kbArticle, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames(), - serviceContext.getAssetLinkEntryIds()); - - // Attachments - - addKBArticleAttachments(userId, kbArticle, selectedFileNames); - - removeKBArticleAttachments(removeFileEntryIds); - - // Workflow - - WorkflowHandlerRegistryUtil.startWorkflowInstance( - user.getCompanyId(), kbArticle.getGroupId(), userId, - KBArticle.class.getName(), resourcePrimKey, kbArticle, - serviceContext); - - return kbArticle; - } - - @Override - public void updateKBArticleAsset( - long userId, KBArticle kbArticle, long[] assetCategoryIds, - String[] assetTagNames, long[] assetLinkEntryIds) - throws PortalException, SystemException { - - // TODO - - long classTypeId = 0; - - AssetEntry assetEntry = assetEntryLocalService.updateEntry( - userId, kbArticle.getGroupId(), kbArticle.getCreateDate(), - kbArticle.getModifiedDate(), KBArticle.class.getName(), - kbArticle.getClassPK(), kbArticle.getUuid(), classTypeId, - assetCategoryIds, assetTagNames, false, null, null, null, - ContentTypes.TEXT_HTML, kbArticle.getTitle(), - kbArticle.getDescription(), null, null, null, 0, 0, null, false); - - assetLinkLocalService.updateLinks( - userId, assetEntry.getEntryId(), assetLinkEntryIds, - AssetLinkConstants.TYPE_RELATED); - } - - @Override - public void updateKBArticleResources( - KBArticle kbArticle, String[] groupPermissions, - String[] guestPermissions) - throws PortalException, SystemException { - - resourceLocalService.updateResources( - kbArticle.getCompanyId(), kbArticle.getGroupId(), - KBArticle.class.getName(), kbArticle.getResourcePrimKey(), - groupPermissions, guestPermissions); - } - - @Override - public void updateKBArticlesPriorities( - Map resourcePrimKeyToPriorityMap) - throws PortalException, SystemException { - - for (double priority : resourcePrimKeyToPriorityMap.values()) { - validate(priority); - } - - long[] resourcePrimKeys = StringUtil.split( - StringUtil.merge(resourcePrimKeyToPriorityMap.keySet()), 0L); - - List kbArticles = getKBArticles( - resourcePrimKeys, WorkflowConstants.STATUS_ANY, null); - - for (KBArticle kbArticle : kbArticles) { - double priority = resourcePrimKeyToPriorityMap.get( - kbArticle.getResourcePrimKey()); - - updatePriority(kbArticle.getResourcePrimKey(), priority); - } - } - - @Override - public void updatePriority(long resourcePrimKey, double priority) - throws SystemException { - - List kbArticleVersions = getKBArticleVersions( - resourcePrimKey, WorkflowConstants.STATUS_ANY, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - - for (KBArticle kbArticle : kbArticleVersions) { - kbArticle.setPriority(priority); - - kbArticlePersistence.update(kbArticle); - } - } - - @Override - public KBArticle updateStatus( - long userId, long resourcePrimKey, int status, - ServiceContext serviceContext) - throws PortalException, SystemException { - - // KB article - - User user = userPersistence.findByPrimaryKey(userId); - boolean main = false; - Date now = new Date(); - - if (status == WorkflowConstants.STATUS_APPROVED) { - main = true; - } - - KBArticle kbArticle = getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - kbArticle.setModifiedDate(serviceContext.getModifiedDate(now)); - kbArticle.setMain(main); - kbArticle.setStatus(status); - kbArticle.setStatusByUserId(user.getUserId()); - kbArticle.setStatusByUserName(user.getFullName()); - kbArticle.setStatusDate(serviceContext.getModifiedDate(now)); - - kbArticlePersistence.update(kbArticle); - - if (status != WorkflowConstants.STATUS_APPROVED) { - return kbArticle; - } - - if (!kbArticle.isFirstVersion()) { - KBArticle oldKBArticle = kbArticlePersistence.findByR_V( - resourcePrimKey, kbArticle.getVersion() - 1); - - oldKBArticle.setMain(false); - - kbArticlePersistence.update(oldKBArticle); - } - - // Asset - - AssetEntry assetEntry = assetEntryLocalService.getEntry( - KBArticle.class.getName(), kbArticle.getKbArticleId()); - - List assetLinks = assetLinkLocalService.getDirectLinks( - assetEntry.getEntryId(), AssetLinkConstants.TYPE_RELATED); - - long[] assetLinkEntryIds = StringUtil.split( - ListUtil.toString(assetLinks, AssetLink.ENTRY_ID2_ACCESSOR), 0L); - - updateKBArticleAsset( - userId, kbArticle, assetEntry.getCategoryIds(), - assetEntry.getTagNames(), assetLinkEntryIds); - - SystemEventHierarchyEntryThreadLocal.push(KBArticle.class); - - try { - assetEntryLocalService.deleteEntry( - KBArticle.class.getName(), kbArticle.getKbArticleId()); - } - finally { - SystemEventHierarchyEntryThreadLocal.pop(KBArticle.class); - } - - assetEntryLocalService.updateVisible( - KBArticle.class.getName(), kbArticle.getResourcePrimKey(), true); - - // Social - - JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(); - - extraDataJSONObject.put("title", kbArticle.getTitle()); - - if (!kbArticle.isFirstVersion()) { - socialActivityLocalService.addActivity( - userId, kbArticle.getGroupId(), KBArticle.class.getName(), - resourcePrimKey, AdminActivityKeys.UPDATE_KB_ARTICLE, - extraDataJSONObject.toString(), 0); - } - else { - socialActivityLocalService.addActivity( - userId, kbArticle.getGroupId(), KBArticle.class.getName(), - resourcePrimKey, AdminActivityKeys.ADD_KB_ARTICLE, - extraDataJSONObject.toString(), 0); - } - - // Indexer - - Indexer indexer = IndexerRegistryUtil.getIndexer(KBArticle.class); - - indexer.reindex(kbArticle); - - // Subscriptions - - notifySubscribers(kbArticle, serviceContext); - - return kbArticle; - } - - @Override - public void updateViewCount( - long userId, long resourcePrimKey, int viewCount) - throws PortalException, SystemException { - - KBArticle kbArticle = getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - kbArticle.setViewCount(viewCount); - - kbArticlePersistence.update(kbArticle); - - if (kbArticle.isApproved() || kbArticle.isFirstVersion()) { - return; - } - - kbArticle = getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_APPROVED); - - kbArticle.setViewCount(viewCount); - - kbArticlePersistence.update(kbArticle); - } - - protected void addAttachment( - long userId, long resourcePrimKey, String fileName, - InputStream inputStream, String mimeType) - throws PortalException, SystemException { - - KBArticle kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - PortletFileRepositoryUtil.addPortletFileEntry( - kbArticle.getGroupId(), userId, KBArticle.class.getName(), - kbArticle.getClassPK(), PortletKeys.KNOWLEDGE_BASE_ARTICLE, - kbArticle.getAttachmentsFolderId(), inputStream, fileName, mimeType, - false); - } - - protected void addKBArticleAttachment( - long userId, long groupId, long resourcePrimKey, - String selectedFileName) - throws PortalException, SystemException { - - FileEntry tempFileEntry = TempFileUtil.getTempFile( - groupId, userId, selectedFileName, - KnowledgeBaseConstants.TEMP_FOLDER_NAME); - - InputStream inputStream = tempFileEntry.getContentStream(); - String mimeType = tempFileEntry.getMimeType(); - - addAttachment( - userId, resourcePrimKey, selectedFileName, inputStream, mimeType); - - if (tempFileEntry != null) { - TempFileUtil.deleteTempFile(tempFileEntry.getFileEntryId()); - } - } - - protected void addKBArticleAttachments( - long userId, KBArticle kbArticle, String[] selectedFileNames) - throws PortalException, SystemException { - - if (ArrayUtil.isEmpty(selectedFileNames)) { - return; - } - - for (String selectedFileName : selectedFileNames) { - addKBArticleAttachment( - userId, kbArticle.getGroupId(), kbArticle.getResourcePrimKey(), - selectedFileName); - } - } - - protected DynamicQuery buildDynamicQuery( - long groupId, String title, String content, int status, Date startDate, - Date endDate, boolean andOperator) { - - Junction junction = null; - - if (andOperator) { - junction = RestrictionsFactoryUtil.conjunction(); - } - else { - junction = RestrictionsFactoryUtil.disjunction(); - } - - Map terms = new HashMap(); - - if (Validator.isNotNull(title)) { - terms.put("title", title); - } - - if (Validator.isNotNull(content)) { - terms.put("content", content); - } - - for (Map.Entry entry : terms.entrySet()) { - String key = entry.getKey(); - String value = entry.getValue(); - - Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); - - for (String keyword : KnowledgeBaseUtil.splitKeywords(value)) { - Criterion criterion = RestrictionsFactoryUtil.ilike( - key, StringUtil.quote(keyword, StringPool.PERCENT)); - - disjunction.add(criterion); - } - - junction.add(disjunction); - } - - if (status != WorkflowConstants.STATUS_ANY) { - Property property = PropertyFactoryUtil.forName("status"); - - junction.add(property.eq(status)); - } - - if ((endDate != null) && (startDate != null)) { - Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); - - String[] propertyNames = {"createDate", "modifiedDate"}; - - for (String propertyName : propertyNames) { - Property property = PropertyFactoryUtil.forName(propertyName); - - Conjunction conjunction = RestrictionsFactoryUtil.conjunction(); - - conjunction.add(property.gt(startDate)); - conjunction.add(property.lt(endDate)); - - disjunction.add(conjunction); - } - - junction.add(disjunction); - } - - DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass( - KBArticle.class, getClassLoader()); - - if (status == WorkflowConstants.STATUS_ANY) { - Property property = PropertyFactoryUtil.forName("latest"); - - dynamicQuery.add(property.eq(Boolean.TRUE)); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - Property property = PropertyFactoryUtil.forName("main"); - - dynamicQuery.add(property.eq(Boolean.TRUE)); - } - - if (groupId > 0) { - Property property = PropertyFactoryUtil.forName("groupId"); - - dynamicQuery.add(property.eq(groupId)); - } - - return dynamicQuery.add(junction); - } - - protected void deleteAssets(KBArticle kbArticle) - throws PortalException, SystemException { - - assetEntryLocalService.deleteEntry( - KBArticle.class.getName(), kbArticle.getClassPK()); - - if (!kbArticle.isApproved() && !kbArticle.isFirstVersion()) { - assetEntryLocalService.deleteEntry( - KBArticle.class.getName(), kbArticle.getResourcePrimKey()); - } - } - - protected void deleteSubscriptions(KBArticle kbArticle) - throws PortalException, SystemException { - - List subscriptions = - subscriptionLocalService.getSubscriptions( - kbArticle.getCompanyId(), KBArticle.class.getName(), - kbArticle.getResourcePrimKey()); - - for (Subscription subscription : subscriptions) { - unsubscribeKBArticle( - subscription.getUserId(), subscription.getClassPK()); - } - } - - protected List getAllDescendantKBArticles( - long resourcePrimKey, int status, - OrderByComparator orderByComparator, boolean includeParentArticle) - throws SystemException { - - List kbArticles = null; - - if (includeParentArticle) { - kbArticles = getKBArticles( - new long[] {resourcePrimKey}, status, null); - - kbArticles = ListUtil.copy(kbArticles); - } - else { - kbArticles = new ArrayList(); - } - - Long[][] params = new Long[][] {new Long[] {resourcePrimKey}}; - - while ((params = KnowledgeBaseUtil.getParams(params[0])) != null) { - List curKBArticles = null; - - if (status == WorkflowConstants.STATUS_ANY) { - curKBArticles = kbArticlePersistence.findByP_L( - ArrayUtil.toArray(params[1]), true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - curKBArticles = kbArticlePersistence.findByP_M( - ArrayUtil.toArray(params[1]), true); - } - else { - curKBArticles = kbArticlePersistence.findByP_S( - ArrayUtil.toArray(params[1]), status); - } - - kbArticles.addAll(curKBArticles); - - long[] resourcePrimKeys = StringUtil.split( - ListUtil.toString(curKBArticles, "resourcePrimKey"), 0L); - - params[0] = ArrayUtil.append( - params[0], ArrayUtil.toArray(resourcePrimKeys)); - } - - if (orderByComparator != null) { - kbArticles = ListUtil.sort(kbArticles, orderByComparator); - } - - return Collections.unmodifiableList(kbArticles); - } - - protected Map getEmailKBArticleDiffs(KBArticle kbArticle) { - Map emailKBArticleDiffs = new HashMap(); - - for (String param : new String[] {"content", "title"}) { - String value = BeanPropertiesUtil.getString(kbArticle, param); - - try { - value = AdminUtil.getKBArticleDiff( - kbArticle.getResourcePrimKey(), kbArticle.getVersion() - 1, - kbArticle.getVersion(), param); - } - catch (Exception e) { - _log.error(e, e); - } - - emailKBArticleDiffs.put(param, value); - } - - return emailKBArticleDiffs; - } - - protected KBArticle getNextAncestorKBArticle( - long kbArticleId, KBArticle nextKBArticle) - throws PortalException, SystemException { - - if (nextKBArticle != null) { - return nextKBArticle; - } - - KBArticle kbArticle = kbArticlePersistence.findByPrimaryKey( - kbArticleId); - - KBArticle parentKBArticle = kbArticle.getParentKBArticle(); - - if (parentKBArticle == null) { - return null; - } - - KBArticle[] previousAndNextKBArticles = getPreviousAndNextKBArticles( - parentKBArticle); - - return getNextAncestorKBArticle( - parentKBArticle.getKbArticleId(), previousAndNextKBArticles[2]); - } - - protected KBArticle getNextKBArticle( - KBArticle kbArticle, KBArticle nextKBArticle) - throws PortalException, SystemException { - - KBArticle firstChildKBArticle = kbArticlePersistence.fetchByG_P_L_First( - kbArticle.getGroupId(), kbArticle.getResourcePrimKey(), true, - new KBArticlePriorityComparator(true)); - - if (firstChildKBArticle != null) { - return firstChildKBArticle; - } - - return getNextAncestorKBArticle( - kbArticle.getKbArticleId(), nextKBArticle); - } - - protected KBArticle[] getPreviousAndNextKBArticles(KBArticle kbArticle) - throws SystemException { - - List kbArticles = kbArticlePersistence.findByG_P_L( - kbArticle.getGroupId(), kbArticle.getParentResourcePrimKey(), true, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, - new KBArticlePriorityComparator(true)); - - int index = kbArticles.indexOf(kbArticle); - - KBArticle[] previousAndNextKBArticles = {null, kbArticle, null}; - - if (index > 0) { - previousAndNextKBArticles[0] = kbArticles.get(index - 1); - } - - if (index < (kbArticles.size() - 1)) { - previousAndNextKBArticles[2] = kbArticles.get(index + 1); - } - - return previousAndNextKBArticles; - } - - protected KBArticle getPreviousKBArticle( - KBArticle kbArticle, KBArticle previousKBArticle) - throws PortalException, SystemException { - - if (previousKBArticle == null) { - return kbArticle.getParentKBArticle(); - } - - KBArticle lastSiblingChildKBArticle = - kbArticlePersistence.fetchByG_P_L_Last( - kbArticle.getGroupId(), previousKBArticle.getResourcePrimKey(), - true, new KBArticlePriorityComparator(true)); - - if (lastSiblingChildKBArticle == null) { - return previousKBArticle; - } - - return lastSiblingChildKBArticle; - } - - protected double getPriority(long groupId, long parentResourcePrimKey) - throws SystemException { - - if (!PortletPropsValues.ADMIN_KB_ARTICLE_INCREMENT_PRIORITY_ENABLED) { - return KBArticleConstants.DEFAULT_VERSION; - } - - List kbArticles = getKBArticles( - groupId, parentResourcePrimKey, WorkflowConstants.STATUS_ANY, 0, 1, - new KBArticlePriorityComparator()); - - if (kbArticles.isEmpty()) { - return KBArticleConstants.DEFAULT_PRIORITY; - } - - KBArticle kbArticle = kbArticles.get(0); - - return Math.floor(kbArticle.getPriority()) + 1; - } - - protected long getRootResourcePrimKey( - long resourcePrimKey, long parentResourceClassNameId, - long parentResourcePrimKey) - throws PortalException, SystemException { - - if (parentResourcePrimKey == - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - return resourcePrimKey; - } - - long classNameId = classNameLocalService.getClassNameId( - KBArticleConstants.getClassName()); - - if (parentResourceClassNameId == classNameId) { - KBArticle kbArticle = getLatestKBArticle( - parentResourcePrimKey, WorkflowConstants.STATUS_ANY); - - return kbArticle.getRootResourcePrimKey(); - } - - return resourcePrimKey; - } - - protected Date getTicketExpirationDate() { - return new Date(System.currentTimeMillis() + _TICKET_EXPIRATION); - } - - protected String getUniqueUrlTitle( - long groupId, long kbFolderId, long kbArticleId, String title) - throws PortalException, SystemException { - - String urlTitle = KnowledgeBaseUtil.getUrlTitle(kbArticleId, title); - - String uniqueUrlTitle = urlTitle; - - if (kbFolderId == KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - int kbArticlesCount = kbArticlePersistence.countByG_KBFI_UT_ST( - groupId, kbFolderId, uniqueUrlTitle, _STATUSES); - - for (int i = 1; kbArticlesCount > 0; i++) { - uniqueUrlTitle = urlTitle + StringPool.DASH + i; - - kbArticlesCount = kbArticlePersistence.countByG_KBFI_UT_ST( - groupId, kbFolderId, uniqueUrlTitle, _STATUSES); - } - - return uniqueUrlTitle; - } - - KBFolder kbFolder = kbFolderPersistence.findByPrimaryKey(kbFolderId); - - int kbArticlesCount = kbArticleFinder.countByUrlTitle( - groupId, kbFolder.getUrlTitle(), uniqueUrlTitle, _STATUSES); - - for (int i = 1; kbArticlesCount > 0; i++) { - uniqueUrlTitle = urlTitle + StringPool.DASH + i; - - kbArticlesCount = kbArticleFinder.countByUrlTitle( - groupId, kbFolder.getUrlTitle(), uniqueUrlTitle, _STATUSES); - } - - return uniqueUrlTitle; - } - - protected String getUniqueUrlTitle( - long groupId, long kbFolderId, long kbArticleId, String title, - String urlTitle) - throws PortalException, SystemException { - - if (Validator.isNull(urlTitle)) { - return getUniqueUrlTitle(groupId, kbFolderId, kbArticleId, title); - } - - return urlTitle.substring(1); - } - - protected boolean isValidFileName(String name) { - if ((name == null) || name.contains(StringPool.BACK_SLASH) || - name.contains(StringPool.SLASH)) { - - return false; - } - - return true; - } - - protected void notifySubscribers( - KBArticle kbArticle, ServiceContext serviceContext) - throws PortalException, SystemException { - - if (Validator.isNull(serviceContext.getLayoutFullURL())) { - return; - } - - PortletPreferences preferences = - portletPreferencesLocalService.getPreferences( - kbArticle.getCompanyId(), kbArticle.getGroupId(), - PortletKeys.PREFS_OWNER_TYPE_GROUP, - PortletKeys.PREFS_PLID_SHARED, PortletKeys.KNOWLEDGE_BASE_ADMIN, - null); - - if (serviceContext.isCommandAdd() && - !AdminUtil.getEmailKBArticleAddedEnabled(preferences)) { - - return; - } - - if (serviceContext.isCommandUpdate() && - !AdminUtil.getEmailKBArticleUpdatedEnabled(preferences)) { - - return; - } - - String fromName = AdminUtil.getEmailFromName( - preferences, kbArticle.getCompanyId()); - String fromAddress = AdminUtil.getEmailFromAddress( - preferences, kbArticle.getCompanyId()); - - String kbArticleContent = StringUtil.replace( - kbArticle.getContent(), - new String[] { - "href=\"/", "src=\"/" - }, - new String[] { - "href=\"" + serviceContext.getPortalURL() + "/", - "src=\"" + serviceContext.getPortalURL() + "/" - }); - - Map kbArticleDiffs = getEmailKBArticleDiffs(kbArticle); - - for (String key : kbArticleDiffs.keySet()) { - String value = StringUtil.replace( - kbArticleDiffs.get(key), - new String[] { - "href=\"/", "src=\"/" - }, - new String[] { - "href=\"" + serviceContext.getPortalURL() + "/", - "src=\"" + serviceContext.getPortalURL() + "/" - }); - - kbArticleDiffs.put(key, value); - } - - String subject = null; - String body = null; - - if (serviceContext.isCommandAdd()) { - subject = AdminUtil.getEmailKBArticleAddedSubject(preferences); - body = AdminUtil.getEmailKBArticleAddedBody(preferences); - } - else { - subject = AdminUtil.getEmailKBArticleUpdatedSubject(preferences); - body = AdminUtil.getEmailKBArticleUpdatedBody(preferences); - } - - SubscriptionSender subscriptionSender = new AdminSubscriptionSender( - kbArticle, serviceContext); - - subscriptionSender.setBody(body); - subscriptionSender.setCompanyId(kbArticle.getCompanyId()); - subscriptionSender.setContextAttribute( - "[$ARTICLE_CONTENT$]", kbArticleContent, false); - subscriptionSender.setContextAttribute( - "[$ARTICLE_CONTENT_DIFF$]", kbArticleDiffs.get("content"), false); - subscriptionSender.setContextAttribute( - "[$ARTICLE_TITLE$]", kbArticle.getTitle(), false); - subscriptionSender.setContextAttribute( - "[$ARTICLE_TITLE_DIFF$]", kbArticleDiffs.get("title"), false); - subscriptionSender.setContextUserPrefix("ARTICLE"); - subscriptionSender.setFrom(fromAddress, fromName); - subscriptionSender.setHtmlFormat(true); - subscriptionSender.setMailId("kb_article", kbArticle.getKbArticleId()); - subscriptionSender.setPortletId(serviceContext.getPortletId()); - subscriptionSender.setReplyToAddress(fromAddress); - subscriptionSender.setScopeGroupId(kbArticle.getGroupId()); - subscriptionSender.setSubject(subject); - subscriptionSender.setUserId(kbArticle.getUserId()); - - subscriptionSender.addPersistedSubscribers( - KBArticle.class.getName(), kbArticle.getGroupId()); - subscriptionSender.addPersistedSubscribers( - KBArticle.class.getName(), kbArticle.getResourcePrimKey()); - - while (!kbArticle.isRoot() && - (kbArticle.getClassNameId() == - kbArticle.getParentResourceClassNameId())) { - - kbArticle = getLatestKBArticle( - kbArticle.getParentResourcePrimKey(), - WorkflowConstants.STATUS_APPROVED); - - subscriptionSender.addPersistedSubscribers( - KBArticle.class.getName(), kbArticle.getResourcePrimKey()); - } - - subscriptionSender.flushNotificationsAsync(); - } - - protected void removeKBArticleAttachments(long[] removeFileEntryIds) - throws PortalException, SystemException { - - if (ArrayUtil.isEmpty(removeFileEntryIds)) { - return; - } - - for (long removeFileEntryId : removeFileEntryIds) { - PortletFileRepositoryUtil.deletePortletFileEntry(removeFileEntryId); - } - } - - protected void updatePermissionFields( - long resourcePrimKey, long parentResourceClassNameId, - long parentResourcePrimKey) - throws PortalException, SystemException { - - // See KBArticlePermission#contains - - KBArticle kbArticle = getLatestKBArticle( - resourcePrimKey, WorkflowConstants.STATUS_ANY); - - if (kbArticle.getParentResourcePrimKey() == parentResourcePrimKey) { - return; - } - - long rootResourcePrimKey = getRootResourcePrimKey( - resourcePrimKey, parentResourceClassNameId, parentResourcePrimKey); - - if (kbArticle.getRootResourcePrimKey() == rootResourcePrimKey) { - return; - } - - // Sync database - - List kbArticles1 = getKBArticleAndAllDescendantKBArticles( - resourcePrimKey, WorkflowConstants.STATUS_ANY, null); - - for (KBArticle kbArticle1 : kbArticles1) { - List kbArticles2 = getKBArticleVersions( - kbArticle1.getResourcePrimKey(), WorkflowConstants.STATUS_ANY, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - - for (KBArticle kbArticle2 : kbArticles2) { - kbArticle2.setRootResourcePrimKey(rootResourcePrimKey); - - kbArticlePersistence.update(kbArticle2); - } - } - - // Sync indexed permission fields - - SearchEngineUtil.updatePermissionFields( - KBArticle.class.getName(), String.valueOf(resourcePrimKey)); - } - - protected void validate(double priority) throws PortalException { - if (priority <= 0) { - throw new KBArticlePriorityException(); - } - } - - protected void validate(String title, String content, String sourceURL) - throws PortalException { - - if (Validator.isNull(title)) { - throw new KBArticleTitleException(); - } - - if (Validator.isNull(content)) { - throw new KBArticleContentException(); - } - - validateSourceURL(sourceURL); - } - - protected void validateParent( - long resourceClassNameId, long resourcePrimKey) - throws PortalException { - - long kbArticleClassNameId = classNameLocalService.getClassNameId( - KBArticleConstants.getClassName()); - long kbFolderClassNameId = classNameLocalService.getClassNameId( - KBFolderConstants.getClassName()); - - if ((resourceClassNameId != kbArticleClassNameId) && - (resourceClassNameId != kbFolderClassNameId)) { - - throw new KBArticleParentException( - String.format( - "Invalid parent with resource class name ID %s and " + - "resource primary key %s", - resourceClassNameId, resourcePrimKey)); - } - } - - protected void validateSourceURL(String sourceURL) throws PortalException { - if (Validator.isNull(sourceURL)) { - return; - } - - if (!Validator.isUrl(sourceURL)) { - throw new KBArticleSourceURLException(sourceURL); - } - } - - protected void validateUrlTitle( - long groupId, long kbFolderId, String urlTitle) - throws PortalException, SystemException { - - if (Validator.isNull(urlTitle)) { - return; - } - - if (!KnowledgeBaseUtil.isValidUrlTitle(urlTitle)) { - throw new InvalidKBArticleUrlTitleException( - "URL title must start with a '/' and contain only " + - "alphanumeric characters, dashes, and underscores"); - } - - Collection kbArticles = kbArticlePersistence.findByG_KBFI_UT( - groupId, kbFolderId, urlTitle.substring(1)); - - if (!kbArticles.isEmpty()) { - throw new DuplicateKBArticleUrlTitleException( - "Duplicate URL title " + urlTitle); - } - } - - private static final int[] _STATUSES = { - WorkflowConstants.STATUS_APPROVED, WorkflowConstants.STATUS_PENDING - }; - - private static final long _TICKET_EXPIRATION = Time.HOUR; - - private static Log _log = LogFactoryUtil.getLog( - KBArticleLocalServiceImpl.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBArticleServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBArticleServiceImpl.java deleted file mode 100644 index 4e1dd0171a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBArticleServiceImpl.java +++ /dev/null @@ -1,870 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.impl; - -import com.liferay.knowledgebase.admin.util.AdminUtil; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleSearchDisplay; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.model.impl.KBArticleSearchDisplayImpl; -import com.liferay.knowledgebase.service.base.KBArticleServiceBaseImpl; -import com.liferay.knowledgebase.service.permission.AdminPermission; -import com.liferay.knowledgebase.service.permission.DisplayPermission; -import com.liferay.knowledgebase.service.permission.KBArticlePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.knowledgebase.util.comparator.KBArticleModifiedDateComparator; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.dao.search.SearchContainer; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.HtmlUtil; -import com.liferay.portal.kernel.util.ListUtil; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.Group; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.util.RSSUtil; - -import com.sun.syndication.feed.synd.SyndContent; -import com.sun.syndication.feed.synd.SyndContentImpl; -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndEntryImpl; -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.feed.synd.SyndFeedImpl; -import com.sun.syndication.feed.synd.SyndLink; -import com.sun.syndication.feed.synd.SyndLinkImpl; -import com.sun.syndication.io.FeedException; - -import java.io.InputStream; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBArticleServiceImpl extends KBArticleServiceBaseImpl { - - @Override - public KBArticle addKBArticle( - String portletId, long parentResourceClassNameId, - long parentResourcePrimKey, String title, String urlTitle, - String content, String description, String sourceURL, - String[] sections, String[] selectedFileNames, - ServiceContext serviceContext) - throws PortalException, SystemException { - - if (portletId.equals(PortletKeys.KNOWLEDGE_BASE_ADMIN)) { - AdminPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), - ActionKeys.ADD_KB_ARTICLE); - } - else if (portletId.equals(PortletKeys.KNOWLEDGE_BASE_DISPLAY)) { - DisplayPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), - ActionKeys.ADD_KB_ARTICLE); - } - - return kbArticleLocalService.addKBArticle( - getUserId(), parentResourceClassNameId, parentResourcePrimKey, - title, urlTitle, content, description, sourceURL, sections, - selectedFileNames, serviceContext); - } - - @Override - public int addKBArticlesMarkdown( - long groupId, long parentKBFolderId, String fileName, - boolean prioritizeByNumericalPrefix, InputStream inputStream, - ServiceContext serviceContext) - throws PortalException, SystemException { - - AdminPermission.check( - getPermissionChecker(), groupId, ActionKeys.ADD_KB_ARTICLE); - - return kbArticleLocalService.addKBArticlesMarkdown( - getUserId(), groupId, parentKBFolderId, fileName, - prioritizeByNumericalPrefix, inputStream, serviceContext); - } - - @Override - public void addTempAttachment( - long groupId, long resourcePrimKey, String fileName, - String tempFolderName, InputStream inputStream, String mimeType) - throws PortalException, SystemException { - - checkAttachmentPermissions( - groupId, PortletKeys.KNOWLEDGE_BASE_ADMIN, resourcePrimKey); - - kbArticleLocalService.addTempAttachment( - groupId, getUserId(), fileName, tempFolderName, inputStream, - mimeType); - } - - @Override - public KBArticle deleteKBArticle(long resourcePrimKey) - throws PortalException, SystemException { - - KBArticlePermission.check( - getPermissionChecker(), resourcePrimKey, ActionKeys.DELETE); - - return kbArticleLocalService.deleteKBArticle(resourcePrimKey); - } - - @Override - public void deleteKBArticles(long groupId, long[] resourcePrimKeys) - throws PortalException, SystemException { - - AdminPermission.check( - getPermissionChecker(), groupId, ActionKeys.DELETE_KB_ARTICLES); - - kbArticleLocalService.deleteKBArticles(resourcePrimKeys); - } - - @Override - public void deleteTempAttachment( - long groupId, long resourcePrimKey, String fileName, - String tempFolderName) - throws PortalException, SystemException { - - checkAttachmentPermissions( - groupId, PortletKeys.KNOWLEDGE_BASE_ADMIN, resourcePrimKey); - - kbArticleLocalService.deleteTempAttachment( - groupId, getUserId(), fileName, tempFolderName); - } - - @Override - public KBArticle fetchLatestKBArticle(long resourcePrimKey, int status) - throws PortalException, SystemException { - - KBArticle kbArticle = kbArticleLocalService.fetchLatestKBArticle( - resourcePrimKey, status); - - if (kbArticle == null) { - return null; - } - - KBArticlePermission.check( - getPermissionChecker(), kbArticle, ActionKeys.VIEW); - - return kbArticle; - } - - @Override - public List getGroupKBArticles( - long groupId, int status, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.filterFindByG_L( - groupId, true, start, end, orderByComparator); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.filterFindByG_M( - groupId, true, start, end, orderByComparator); - } - - return kbArticlePersistence.filterFindByG_S( - groupId, status, start, end, orderByComparator); - } - - @Override - public int getGroupKBArticlesCount(long groupId, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.filterCountByG_L(groupId, true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.filterCountByG_M(groupId, true); - } - - return kbArticlePersistence.filterCountByG_S(groupId, status); - } - - @Override - public String getGroupKBArticlesRSS( - int status, int rssDelta, String rssDisplayStyle, String rssFormat, - ThemeDisplay themeDisplay) - throws PortalException, SystemException { - - Group group = themeDisplay.getScopeGroup(); - - String descriptiveName = HtmlUtil.escape( - group.getDescriptiveName(themeDisplay.getLocale())); - - String name = descriptiveName; - String description = descriptiveName; - - String feedURL = PortalUtil.getLayoutFullURL(themeDisplay); - - List kbArticles = getGroupKBArticles( - group.getGroupId(), status, 0, rssDelta, - new KBArticleModifiedDateComparator()); - - return exportToRSS( - rssDisplayStyle, rssFormat, name, description, feedURL, kbArticles, - themeDisplay); - } - - @Override - public KBArticle getKBArticle(long resourcePrimKey, int version) - throws PortalException, SystemException { - - KBArticlePermission.check( - getPermissionChecker(), resourcePrimKey, ActionKeys.VIEW); - - return kbArticleLocalService.getKBArticle(resourcePrimKey, version); - } - - @Override - public List getKBArticleAndAllDescendantKBArticles( - long groupId, long resourcePrimKey, int status, - OrderByComparator orderByComparator) - throws SystemException { - - List kbArticles = getKBArticles( - groupId, new long[] {resourcePrimKey}, status, null); - - kbArticles = ListUtil.copy(kbArticles); - - Long[][] params = new Long[][] {new Long[] {resourcePrimKey}}; - - while ((params = KnowledgeBaseUtil.getParams(params[0])) != null) { - List curKBArticles = null; - - if (status == WorkflowConstants.STATUS_ANY) { - curKBArticles = kbArticlePersistence.filterFindByG_P_L( - groupId, ArrayUtil.toArray(params[1]), true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - curKBArticles = kbArticlePersistence.filterFindByG_P_M( - groupId, ArrayUtil.toArray(params[1]), true); - } - else { - curKBArticles = kbArticlePersistence.filterFindByG_P_S( - groupId, ArrayUtil.toArray(params[1]), status); - } - - kbArticles.addAll(curKBArticles); - - long[] resourcePrimKeys = StringUtil.split( - ListUtil.toString(curKBArticles, "resourcePrimKey"), 0L); - - params[0] = ArrayUtil.append( - params[0], ArrayUtil.toArray(resourcePrimKeys)); - } - - if (orderByComparator != null) { - kbArticles = ListUtil.sort(kbArticles, orderByComparator); - } - - return Collections.unmodifiableList(kbArticles); - } - - /** - * @deprecated As of 7.0.0, replaced by - * {@link #getKBArticleAndAllDescendantKBArticles(long, long, - * int, com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Override - public List getKBArticleAndAllDescendants( - long groupId, long resourcePrimKey, int status, - OrderByComparator orderByComparator) - throws SystemException { - - return getKBArticleAndAllDescendantKBArticles( - groupId, resourcePrimKey, status, orderByComparator); - } - - @Override - public String getKBArticleRSS( - long resourcePrimKey, int status, int rssDelta, - String rssDisplayStyle, String rssFormat, ThemeDisplay themeDisplay) - throws PortalException, SystemException { - - KBArticle kbArticle = kbArticleLocalService.getLatestKBArticle( - resourcePrimKey, status); - - String name = kbArticle.getTitle(); - String description = kbArticle.getTitle(); - - String feedURL = KnowledgeBaseUtil.getKBArticleURL( - themeDisplay.getPlid(), resourcePrimKey, status, - themeDisplay.getPortalURL(), false); - - List kbArticles = getKBArticleAndAllDescendantKBArticles( - kbArticle.getGroupId(), resourcePrimKey, status, - new KBArticleModifiedDateComparator()); - - return exportToRSS( - rssDisplayStyle, rssFormat, name, description, feedURL, - ListUtil.subList(kbArticles, 0, rssDelta), themeDisplay); - } - - @Override - public List getKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, OrderByComparator orderByComparator) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.filterFindByG_P_L( - groupId, parentResourcePrimKey, true, start, end, - orderByComparator); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.filterFindByG_P_M( - groupId, parentResourcePrimKey, true, start, end, - orderByComparator); - } - - return kbArticlePersistence.filterFindByG_P_S( - groupId, parentResourcePrimKey, status, start, end, - orderByComparator); - } - - @Override - public List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, int start, - int end, OrderByComparator orderByComparator) - throws SystemException { - - List kbArticles = new ArrayList(); - - Long[][] params = new Long[][] {ArrayUtil.toArray(resourcePrimKeys)}; - - while ((params = KnowledgeBaseUtil.getParams(params[0])) != null) { - List curKBArticles = null; - - if (status == WorkflowConstants.STATUS_ANY) { - curKBArticles = kbArticlePersistence.filterFindByR_G_L( - ArrayUtil.toArray(params[1]), groupId, true, start, end); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - curKBArticles = kbArticlePersistence.filterFindByR_G_M( - ArrayUtil.toArray(params[1]), groupId, true, start, end); - } - else { - curKBArticles = kbArticlePersistence.filterFindByR_G_S( - ArrayUtil.toArray(params[1]), groupId, status, start, end); - } - - kbArticles.addAll(curKBArticles); - } - - if (orderByComparator != null) { - kbArticles = ListUtil.sort(kbArticles, orderByComparator); - } - else { - kbArticles = KnowledgeBaseUtil.sort(resourcePrimKeys, kbArticles); - } - - return Collections.unmodifiableList(kbArticles); - } - - @Override - public List getKBArticles( - long groupId, long[] resourcePrimKeys, int status, - OrderByComparator orderByComparator) - throws SystemException { - - return getKBArticles( - groupId, resourcePrimKeys, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, orderByComparator); - } - - @Override - public int getKBArticlesCount( - long groupId, long parentResourcePrimKey, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.filterCountByG_P_L( - groupId, parentResourcePrimKey, true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.filterCountByG_P_M( - groupId, parentResourcePrimKey, true); - } - - return kbArticlePersistence.filterCountByG_P_S( - groupId, parentResourcePrimKey, status); - } - - @Override - public int getKBArticlesCount( - long groupId, long[] resourcePrimKeys, int status) - throws SystemException { - - int count = 0; - - Long[][] params = new Long[][] {ArrayUtil.toArray(resourcePrimKeys)}; - - while ((params = KnowledgeBaseUtil.getParams(params[0])) != null) { - if (status == WorkflowConstants.STATUS_ANY) { - count += kbArticlePersistence.filterCountByR_G_L( - ArrayUtil.toArray(params[1]), groupId, true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - count += kbArticlePersistence.filterCountByR_G_M( - ArrayUtil.toArray(params[1]), groupId, true); - } - else { - count += kbArticlePersistence.filterCountByR_G_S( - ArrayUtil.toArray(params[1]), groupId, status); - } - } - - return count; - } - - @Override - public KBArticleSearchDisplay getKBArticleSearchDisplay( - long groupId, String title, String content, int status, - Date startDate, Date endDate, boolean andOperator, - int[] curStartValues, int cur, int delta, - OrderByComparator orderByComparator) - throws PortalException, SystemException { - - // See LPS-9546 - - int start = 0; - - if (curStartValues.length > (cur - SearchContainer.DEFAULT_CUR)) { - start = curStartValues[cur - SearchContainer.DEFAULT_CUR]; - - curStartValues = ArrayUtil.subset( - curStartValues, 0, cur - SearchContainer.DEFAULT_CUR + 1); - } - else { - cur = SearchContainer.DEFAULT_CUR; - - curStartValues = new int[] {0}; - } - - int end = start + _INTERVAL; - - List kbArticles = new ArrayList(); - - int curStartValue = 0; - - while (curStartValue == 0) { - List curKBArticles = kbArticleLocalService.search( - groupId, title, content, status, startDate, endDate, - andOperator, start, end, orderByComparator); - - if (curKBArticles.isEmpty()) { - break; - } - - for (int i = 0; i < curKBArticles.size(); i++) { - KBArticle curKBArticle = curKBArticles.get(i); - - if (!KBArticlePermission.contains( - getPermissionChecker(), curKBArticle, - ActionKeys.VIEW)) { - - continue; - } - - if (kbArticles.size() == delta) { - curStartValue = start + i; - - break; - } - - kbArticles.add(curKBArticle); - } - - start = start + _INTERVAL; - end = start + _INTERVAL; - } - - int total = ((cur - 1) * delta) + kbArticles.size(); - - if (curStartValue > 0) { - curStartValues = ArrayUtil.append(curStartValues, curStartValue); - - total = total + 1; - } - - return new KBArticleSearchDisplayImpl( - kbArticles, total, curStartValues); - } - - @Override - public List getKBArticleVersions( - long groupId, long resourcePrimKey, int status, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.filterFindByR_G( - resourcePrimKey, groupId, start, end, orderByComparator); - } - - return kbArticlePersistence.filterFindByR_G_S( - resourcePrimKey, groupId, status, start, end, orderByComparator); - } - - @Override - public int getKBArticleVersionsCount( - long groupId, long resourcePrimKey, int status) - throws SystemException { - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.filterCountByR_G( - resourcePrimKey, groupId); - } - - return kbArticlePersistence.filterCountByR_G_S( - resourcePrimKey, groupId, status); - } - - @Override - public KBArticle getLatestKBArticle(long resourcePrimKey, int status) - throws PortalException, SystemException { - - KBArticlePermission.check( - getPermissionChecker(), resourcePrimKey, ActionKeys.VIEW); - - return kbArticleLocalService.getLatestKBArticle( - resourcePrimKey, status); - } - - @Override - public List getSectionsKBArticles( - long groupId, String[] sections, int status, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - String[] array = AdminUtil.escapeSections(sections); - - for (int i = 0; i < array.length; i++) { - array[i] = StringUtil.quote(array[i], StringPool.PERCENT); - } - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.filterFindByG_P_S_L( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, - true, start, end, orderByComparator); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.filterFindByG_P_S_M( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, - true, start, end, orderByComparator); - } - - return kbArticlePersistence.filterFindByG_P_S_S( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, status, - start, end, orderByComparator); - } - - @Override - public int getSectionsKBArticlesCount( - long groupId, String[] sections, int status) - throws SystemException { - - String[] array = AdminUtil.escapeSections(sections); - - for (int i = 0; i < array.length; i++) { - array[i] = StringUtil.quote(array[i], StringPool.PERCENT); - } - - if (status == WorkflowConstants.STATUS_ANY) { - return kbArticlePersistence.filterCountByG_P_S_L( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, - true); - } - else if (status == WorkflowConstants.STATUS_APPROVED) { - return kbArticlePersistence.filterCountByG_P_S_M( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, - true); - } - - return kbArticlePersistence.filterCountByG_P_S_S( - groupId, KBFolderConstants.DEFAULT_PARENT_FOLDER_ID, array, status); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, - * int, int, int, - * com.liferay.portal.kernel.util.OrderByComparator)} - */ - @Override - public List getSiblingKBArticles( - long groupId, long parentResourcePrimKey, int status, int start, - int end, OrderByComparator orderByComparator) - throws SystemException { - - return getKBArticles( - groupId, parentResourcePrimKey, status, start, end, - orderByComparator); - } - - /** - * @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, - * long, int)} - */ - @Override - public int getSiblingKBArticlesCount( - long groupId, long parentResourcePrimKey, int status) - throws SystemException { - - return getKBArticlesCount(groupId, parentResourcePrimKey, status); - } - - @Override - public String[] getTempAttachmentNames(long groupId, String tempFolderName) - throws PortalException, SystemException { - - return kbArticleLocalService.getTempAttachmentNames( - groupId, getUserId(), tempFolderName); - } - - @Override - public void moveKBArticle( - long resourcePrimKey, long parentResourceClassNameId, - long parentResourcePrimKey, double priority) - throws PortalException, SystemException { - - KBArticlePermission.check( - getPermissionChecker(), resourcePrimKey, - ActionKeys.MOVE_KB_ARTICLE); - - kbArticleLocalService.moveKBArticle( - getUserId(), resourcePrimKey, parentResourceClassNameId, - parentResourcePrimKey, priority); - } - - @Override - public void subscribeGroupKBArticles(long groupId, String portletId) - throws PortalException, SystemException { - - if (portletId.equals(PortletKeys.KNOWLEDGE_BASE_ADMIN)) { - AdminPermission.check( - getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE); - } - else if (portletId.equals(PortletKeys.KNOWLEDGE_BASE_DISPLAY)) { - DisplayPermission.check( - getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE); - } - - kbArticleLocalService.subscribeGroupKBArticles(getUserId(), groupId); - } - - @Override - public void subscribeKBArticle(long groupId, long resourcePrimKey) - throws PortalException, SystemException { - - KBArticlePermission.check( - getPermissionChecker(), resourcePrimKey, ActionKeys.SUBSCRIBE); - - kbArticleLocalService.subscribeKBArticle( - getUserId(), groupId, resourcePrimKey); - } - - @Override - public void unsubscribeGroupKBArticles(long groupId, String portletId) - throws PortalException, SystemException { - - if (portletId.equals(PortletKeys.KNOWLEDGE_BASE_ADMIN)) { - AdminPermission.check( - getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE); - } - else if (portletId.equals(PortletKeys.KNOWLEDGE_BASE_DISPLAY)) { - DisplayPermission.check( - getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE); - } - - kbArticleLocalService.unsubscribeGroupKBArticles(getUserId(), groupId); - } - - @Override - public void unsubscribeKBArticle(long resourcePrimKey) - throws PortalException, SystemException { - - KBArticlePermission.check( - getPermissionChecker(), resourcePrimKey, ActionKeys.SUBSCRIBE); - - kbArticleLocalService.unsubscribeKBArticle( - getUserId(), resourcePrimKey); - } - - @Override - public KBArticle updateKBArticle( - long resourcePrimKey, String title, String content, - String description, String sourceURL, String[] sections, - String[] selectedFileNames, long[] removeFileEntryIds, - ServiceContext serviceContext) - throws PortalException, SystemException { - - KBArticlePermission.check( - getPermissionChecker(), resourcePrimKey, ActionKeys.UPDATE); - - return kbArticleLocalService.updateKBArticle( - getUserId(), resourcePrimKey, title, content, description, - sourceURL, sections, selectedFileNames, removeFileEntryIds, - serviceContext); - } - - @Override - public void updateKBArticlesPriorities( - long groupId, Map resourcePrimKeyToPriorityMap) - throws PortalException, SystemException { - - AdminPermission.check( - getPermissionChecker(), groupId, - ActionKeys.UPDATE_KB_ARTICLES_PRIORITIES); - - kbArticleLocalService.updateKBArticlesPriorities( - resourcePrimKeyToPriorityMap); - } - - protected String exportToRSS( - String rssDisplayStyle, String rssFormat, String name, - String description, String feedURL, List kbArticles, - ThemeDisplay themeDisplay) - throws SystemException { - - SyndFeed syndFeed = new SyndFeedImpl(); - - syndFeed.setDescription(description); - - List syndEntries = new ArrayList(); - - syndFeed.setEntries(syndEntries); - - for (KBArticle kbArticle : kbArticles) { - SyndEntry syndEntry = new SyndEntryImpl(); - - String author = PortalUtil.getUserName(kbArticle); - - syndEntry.setAuthor(author); - - SyndContent syndContent = new SyndContentImpl(); - - syndContent.setType(RSSUtil.ENTRY_TYPE_DEFAULT); - - String value = null; - - if (rssDisplayStyle.equals(RSSUtil.DISPLAY_STYLE_ABSTRACT)) { - value = HtmlUtil.extractText(kbArticle.getDescription()); - - if (Validator.isNull(value)) { - value = StringUtil.shorten( - HtmlUtil.extractText(kbArticle.getContent()), 200); - } - } - else if (rssDisplayStyle.equals(RSSUtil.DISPLAY_STYLE_TITLE)) { - value = StringPool.BLANK; - } - else { - value = StringUtil.replace( - kbArticle.getContent(), - new String[] { - "href=\"/", "src=\"/" - }, - new String[] { - "href=\"" + themeDisplay.getURLPortal() + "/", - "src=\"" + themeDisplay.getURLPortal() + "/" - }); - } - - syndContent.setValue(value); - - syndEntry.setDescription(syndContent); - - String link = KnowledgeBaseUtil.getKBArticleURL( - themeDisplay.getPlid(), kbArticle.getResourcePrimKey(), - kbArticle.getStatus(), themeDisplay.getPortalURL(), false); - - syndEntry.setLink(link); - syndEntry.setPublishedDate(kbArticle.getCreateDate()); - syndEntry.setTitle(kbArticle.getTitle()); - syndEntry.setUpdatedDate(kbArticle.getModifiedDate()); - syndEntry.setUri(syndEntry.getLink()); - - syndEntries.add(syndEntry); - } - - String feedType = RSSUtil.getFeedType( - RSSUtil.getFormatType(rssFormat), - RSSUtil.getFormatVersion(rssFormat)); - - syndFeed.setFeedType(feedType); - - List syndLinks = new ArrayList(); - - syndFeed.setLinks(syndLinks); - - SyndLink selfSyndLink = new SyndLinkImpl(); - - syndLinks.add(selfSyndLink); - - selfSyndLink.setHref(feedURL); - selfSyndLink.setRel("self"); - - syndFeed.setPublishedDate(new Date()); - syndFeed.setTitle(name); - syndFeed.setUri(feedURL); - - try { - return RSSUtil.export(syndFeed); - } - catch (FeedException fe) { - throw new SystemException(fe); - } - } - - private void checkAttachmentPermissions( - long groupId, String portletId, long resourcePrimKey) - throws PortalException, SystemException { - - if ((resourcePrimKey <= 0) && - portletId.equals(PortletKeys.KNOWLEDGE_BASE_ADMIN)) { - - AdminPermission.check( - getPermissionChecker(), groupId, ActionKeys.ADD_KB_ARTICLE); - } - else if ((resourcePrimKey <= 0) && - portletId.equals(PortletKeys.KNOWLEDGE_BASE_DISPLAY)) { - - DisplayPermission.check( - getPermissionChecker(), groupId, ActionKeys.ADD_KB_ARTICLE); - } - else { - KBArticlePermission.check( - getPermissionChecker(), resourcePrimKey, ActionKeys.UPDATE); - } - } - - private static final int _INTERVAL = 200; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBCommentLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBCommentLocalServiceImpl.java deleted file mode 100644 index 91a2d86c5c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBCommentLocalServiceImpl.java +++ /dev/null @@ -1,474 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.impl; - -import com.liferay.knowledgebase.KBCommentContentException; -import com.liferay.knowledgebase.admin.social.AdminActivityKeys; -import com.liferay.knowledgebase.admin.util.AdminSubscriptionSender; -import com.liferay.knowledgebase.admin.util.AdminUtil; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.model.KBCommentConstants; -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBTemplateLocalServiceUtil; -import com.liferay.knowledgebase.service.base.KBCommentLocalServiceBaseImpl; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.knowledgebase.util.comparator.KBCommentCreateDateComparator; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.systemevent.SystemEvent; -import com.liferay.portal.kernel.util.DateFormatFactoryUtil; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.ClassName; -import com.liferay.portal.model.SystemEventConstants; -import com.liferay.portal.model.User; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.util.SubscriptionSender; -import com.liferay.portlet.ratings.model.RatingsEntry; - -import java.text.DateFormat; - -import java.util.Date; -import java.util.List; - -import javax.portlet.PortletPreferences; - -/** - * @author Peter Shin - */ -public class KBCommentLocalServiceImpl extends KBCommentLocalServiceBaseImpl { - - @Override - public KBComment addKBComment( - long userId, long classNameId, long classPK, String content, - int userRating, ServiceContext serviceContext) - throws PortalException, SystemException { - - // KB comment - - User user = userPersistence.findByPrimaryKey(userId); - long groupId = serviceContext.getScopeGroupId(); - Date now = new Date(); - - validate(content); - - long kbCommentId = counterLocalService.increment(); - - KBComment kbComment = kbCommentPersistence.create(kbCommentId); - - kbComment.setUuid(serviceContext.getUuid()); - kbComment.setGroupId(groupId); - kbComment.setCompanyId(user.getCompanyId()); - kbComment.setUserId(user.getUserId()); - kbComment.setUserName(user.getFullName()); - kbComment.setCreateDate(serviceContext.getCreateDate(now)); - kbComment.setModifiedDate(serviceContext.getModifiedDate(now)); - kbComment.setClassNameId(classNameId); - kbComment.setClassPK(classPK); - kbComment.setContent(content); - kbComment.setUserRating(userRating); - kbComment.setStatus(KBCommentConstants.STATUS_NEW); - - kbCommentPersistence.update(kbComment); - - // Social - - JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(); - - putTitle(extraDataJSONObject, kbComment); - - socialActivityLocalService.addActivity( - userId, kbComment.getGroupId(), KBComment.class.getName(), - kbCommentId, AdminActivityKeys.ADD_KB_COMMENT, - extraDataJSONObject.toString(), 0); - - // Subscriptions - - notifySubscribers(kbComment, serviceContext); - - return kbComment; - } - - @Override - public KBComment addKBComment( - long userId, long classNameId, long classPK, String content, - ServiceContext serviceContext) - throws PortalException, SystemException { - - int userRating = getUserRating(userId, classNameId, classPK); - - return addKBComment( - userId, classNameId, classPK, content, userRating, serviceContext); - } - - @Override - @SystemEvent(type = SystemEventConstants.TYPE_DELETE) - public KBComment deleteKBComment(KBComment kbComment) - throws PortalException, SystemException { - - // KB comment - - kbCommentPersistence.remove(kbComment); - - // Social - - socialActivityLocalService.deleteActivities( - KBComment.class.getName(), kbComment.getKbCommentId()); - - return kbComment; - } - - @Override - public KBComment deleteKBComment(long kbCommentId) - throws PortalException, SystemException { - - KBComment kbComment = kbCommentPersistence.findByPrimaryKey( - kbCommentId); - - return kbCommentLocalService.deleteKBComment(kbComment); - } - - @Override - public void deleteKBComments(String className, long classPK) - throws PortalException, SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - List kbComments = kbCommentPersistence.findByC_C( - classNameId, classPK); - - for (KBComment kbComment : kbComments) { - kbCommentLocalService.deleteKBComment(kbComment); - } - } - - @Override - public KBComment getKBComment(long userId, String className, long classPK) - throws PortalException, SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - return kbCommentPersistence.findByU_C_C_Last( - userId, classNameId, classPK, new KBCommentCreateDateComparator()); - } - - @Override - public List getKBComments( - long groupId, int status, int start, int end) - throws SystemException { - - return kbCommentPersistence.findByG_S(groupId, status, start, end); - } - - @Override - public List getKBComments( - long userId, String className, long classPK, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - return kbCommentPersistence.findByU_C_C( - userId, classNameId, classPK, start, end, orderByComparator); - } - - @Override - public List getKBComments( - String className, long classPK, int status, int start, int end) - throws SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - return kbCommentPersistence.findByC_C_S( - classNameId, classPK, status, start, end, - new KBCommentCreateDateComparator()); - } - - @Override - public List getKBComments( - String className, long classPK, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - return kbCommentPersistence.findByC_C( - classNameId, classPK, start, end, orderByComparator); - } - - @Override - public List getKBComments( - String className, long classPK, int[] status, int start, int end) - throws SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - return kbCommentPersistence.findByC_C_S( - classNameId, classPK, status, start, end, - new KBCommentCreateDateComparator()); - } - - @Override - public int getKBCommentsCount(long groupId, int status) - throws SystemException { - - return kbCommentPersistence.countByG_S(groupId, status); - } - - @Override - public int getKBCommentsCount(long userId, String className, long classPK) - throws SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - return kbCommentPersistence.countByU_C_C(userId, classNameId, classPK); - } - - @Override - public int getKBCommentsCount(String className, long classPK) - throws SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - return kbCommentPersistence.countByC_C(classNameId, classPK); - } - - @Override - public int getKBCommentsCount(String className, long classPK, int status) - throws SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - return kbCommentPersistence.countByC_C_S(classNameId, classPK, status); - } - - @Override - public int getKBCommentsCount(String className, long classPK, int[] status) - throws SystemException { - - long classNameId = classNameLocalService.getClassNameId(className); - - return kbCommentPersistence.countByC_C_S(classNameId, classPK, status); - } - - @Override - public KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, String content, - int userRating, int status, ServiceContext serviceContext) - throws PortalException, SystemException { - - // KB comment - - validate(content); - - KBComment kbComment = kbCommentPersistence.findByPrimaryKey( - kbCommentId); - - kbComment.setModifiedDate(serviceContext.getModifiedDate(null)); - kbComment.setClassNameId(classNameId); - kbComment.setClassPK(classPK); - kbComment.setContent(content); - kbComment.setUserRating(userRating); - kbComment.setStatus(status); - - kbCommentPersistence.update(kbComment); - - // Social - - JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(); - - putTitle(extraDataJSONObject, kbComment); - - socialActivityLocalService.addActivity( - kbComment.getUserId(), kbComment.getGroupId(), - KBComment.class.getName(), kbCommentId, - AdminActivityKeys.UPDATE_KB_COMMENT, extraDataJSONObject.toString(), - 0); - - return kbComment; - } - - @Override - public KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, String content, - int status, ServiceContext serviceContext) - throws PortalException, SystemException { - - KBComment kbComment = kbCommentPersistence.findByPrimaryKey( - kbCommentId); - - return updateKBComment( - kbCommentId, classNameId, classPK, content, - kbComment.getUserRating(), status, serviceContext); - } - - public KBComment updateStatus( - long kbCommentId, int status, ServiceContext serviceContext) - throws PortalException, SystemException { - - KBComment kbComment = kbCommentPersistence.findByPrimaryKey( - kbCommentId); - - kbComment.setStatus(status); - - kbCommentPersistence.update(kbComment); - - notifySubscribers(kbComment, serviceContext); - - return kbComment; - } - - protected int getUserRating(long userId, long classNameId, long classPK) - throws PortalException, SystemException { - - ClassName className = classNameLocalService.getClassName(classNameId); - - RatingsEntry ratingsEntry = ratingsEntryLocalService.fetchEntry( - userId, className.getValue(), classPK); - - if (ratingsEntry == null) { - return KBCommentConstants.USER_RATING_NONE; - } - - if (ratingsEntry.getScore() > 0) { - return KBCommentConstants.USER_RATING_LIKE; - } - - return KBCommentConstants.USER_RATING_DISLIKE; - } - - protected void notifySubscribers( - KBComment kbComment, ServiceContext serviceContext) - throws PortalException, SystemException { - - PortletPreferences preferences = - portletPreferencesLocalService.getPreferences( - kbComment.getCompanyId(), kbComment.getGroupId(), - PortletKeys.PREFS_OWNER_TYPE_GROUP, - PortletKeys.PREFS_PLID_SHARED, PortletKeys.KNOWLEDGE_BASE_ADMIN, - null); - - if (!AdminUtil.isSuggestionStatusChangeNotificationEnabled( - kbComment.getStatus(), preferences)) { - - return; - } - - String fromName = AdminUtil.getEmailFromName( - preferences, serviceContext.getCompanyId()); - String fromAddress = AdminUtil.getEmailFromAddress( - preferences, kbComment.getCompanyId()); - - String subject = - AdminUtil.getEmailKBArticleSuggestionNotificationSubject( - kbComment.getStatus(), preferences); - String body = AdminUtil.getEmailKBArticleSuggestionNotificationBody( - kbComment.getStatus(), preferences); - - KBArticle kbArticle = kbArticleLocalService.getLatestKBArticle( - kbComment.getClassPK(), WorkflowConstants.STATUS_APPROVED); - - String kbArticleContent = StringUtil.replace( - kbArticle.getContent(), - new String[] { - "href=\"/", "src=\"/" - }, - new String[] { - "href=\"" + serviceContext.getPortalURL() + "/", - "src=\"" + serviceContext.getPortalURL() + "/" - }); - - SubscriptionSender subscriptionSender = new AdminSubscriptionSender( - kbArticle, serviceContext); - - subscriptionSender.setBody(body); - subscriptionSender.setCompanyId(kbArticle.getCompanyId()); - subscriptionSender.setContextAttribute( - "[$ARTICLE_CONTENT$]", kbArticleContent, false); - subscriptionSender.setContextAttribute( - "[$COMMENT_CONTENT$]", kbComment.getContent(), false); - subscriptionSender.setContextAttribute( - "[$COMMENT_CREATE_DATE$]", - getFormattedKBCommentCreateDate(kbComment, serviceContext), false); - subscriptionSender.setContextUserPrefix("ARTICLE"); - subscriptionSender.setFrom(fromAddress, fromName); - subscriptionSender.setHtmlFormat(true); - subscriptionSender.setMailId("kb_article", kbArticle.getKbArticleId()); - subscriptionSender.setPortletId(serviceContext.getPortletId()); - subscriptionSender.setReplyToAddress(fromAddress); - subscriptionSender.setScopeGroupId(kbArticle.getGroupId()); - subscriptionSender.setSubject(subject); - subscriptionSender.setUserId(kbArticle.getUserId()); - - User user = userLocalService.getUser(kbComment.getUserId()); - - subscriptionSender.addRuntimeSubscribers( - user.getEmailAddress(), user.getFullName()); - - subscriptionSender.flushNotificationsAsync(); - } - - protected void putTitle(JSONObject jsonObject, KBComment kbComment) { - KBArticle kbArticle = null; - KBTemplate kbTemplate = null; - - String className = kbComment.getClassName(); - - try { - if (className.equals(KBArticle.class.getName())) { - kbArticle = KBArticleLocalServiceUtil.getLatestKBArticle( - kbComment.getClassPK(), WorkflowConstants.STATUS_APPROVED); - - jsonObject.put("title", kbArticle.getTitle()); - } - else if (className.equals(KBTemplate.class.getName())) { - kbTemplate = KBTemplateLocalServiceUtil.getKBTemplate( - kbComment.getClassPK()); - - jsonObject.put("title", kbTemplate.getTitle()); - } - } - catch (Exception e) { - _log.error(e); - } - } - - protected void validate(String content) throws PortalException { - if (Validator.isNull(content)) { - throw new KBCommentContentException(); - } - } - - private String getFormattedKBCommentCreateDate( - KBComment kbComment, ServiceContext serviceContext) { - - DateFormat dateFormat = DateFormatFactoryUtil.getDate( - serviceContext.getLocale()); - - return dateFormat.format(kbComment.getCreateDate()); - } - - private static Log _log = LogFactoryUtil.getLog( - KBCommentLocalServiceImpl.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBCommentServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBCommentServiceImpl.java deleted file mode 100644 index 8386e98e01..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBCommentServiceImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.impl; - -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.service.base.KBCommentServiceBaseImpl; -import com.liferay.knowledgebase.service.permission.AdminPermission; -import com.liferay.knowledgebase.service.permission.KBCommentPermission; -import com.liferay.knowledgebase.service.permission.SuggestionPermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.service.ServiceContext; - -import java.util.Collections; -import java.util.List; - -/** - * @author Brian Wing Shun Chan - */ -public class KBCommentServiceImpl extends KBCommentServiceBaseImpl { - - @Override - public KBComment deleteKBComment(KBComment kbComment) - throws PortalException, SystemException { - - KBCommentPermission.check( - getPermissionChecker(), kbComment, ActionKeys.DELETE); - - return kbCommentLocalService.deleteKBComment(kbComment); - } - - @Override - public KBComment deleteKBComment(long kbCommentId) - throws PortalException, SystemException { - - KBComment kbComment = kbCommentPersistence.findByPrimaryKey( - kbCommentId); - - return deleteKBComment(kbComment); - } - - @Override - public KBComment getKBComment(long kbCommentId) - throws PortalException, SystemException { - - KBCommentPermission.check( - getPermissionChecker(), kbCommentId, ActionKeys.VIEW); - - return kbCommentLocalService.getKBComment(kbCommentId); - } - - public List getKBComments( - long groupId, int status, int start, int end) - throws PortalException, SystemException { - - if (AdminPermission.contains( - getPermissionChecker(), groupId, ActionKeys.VIEW_SUGGESTIONS)) { - - return kbCommentPersistence.findByG_S(groupId, status, start, end); - } - - return Collections.emptyList(); - } - - @Override - public List getKBComments( - long groupId, String className, long classPK, int status, int start, - int end) - throws PortalException, SystemException { - - if (SuggestionPermission.contains( - getPermissionChecker(), groupId, className, classPK, - ActionKeys.VIEW_SUGGESTIONS)) { - - return kbCommentLocalService.getKBComments( - className, classPK, status, start, end); - } - - return Collections.emptyList(); - } - - public int getKBCommentsCount(long groupId, int status) - throws PortalException, SystemException { - - if (AdminPermission.contains( - getPermissionChecker(), groupId, ActionKeys.VIEW_SUGGESTIONS)) { - - return kbCommentPersistence.countByG_S(groupId, status); - } - - return 0; - } - - @Override - public int getKBCommentsCount( - long groupId, String className, long classPK, int status) - throws PortalException, SystemException { - - if (SuggestionPermission.contains( - getPermissionChecker(), groupId, className, classPK, - ActionKeys.VIEW_SUGGESTIONS)) { - - return kbCommentLocalService.getKBCommentsCount( - className, classPK, status); - } - - return 0; - } - - public KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, String content, - int status, ServiceContext serviceContext) - throws PortalException, SystemException { - - KBCommentPermission.check( - getPermissionChecker(), kbCommentId, ActionKeys.UPDATE); - - return kbCommentLocalService.updateKBComment( - kbCommentId, classNameId, classPK, content, status, serviceContext); - } - - public KBComment updateKBComment( - long kbCommentId, long classNameId, long classPK, String content, - ServiceContext serviceContext) - throws PortalException, SystemException { - - KBComment kbComment = kbCommentPersistence.findByPrimaryKey( - kbCommentId); - - return updateKBComment( - kbCommentId, classNameId, classPK, content, kbComment.getStatus(), - serviceContext); - } - - public KBComment updateStatus( - long kbCommentId, int status, ServiceContext serviceContext) - throws PortalException, SystemException { - - KBCommentPermission.check( - getPermissionChecker(), kbCommentId, ActionKeys.UPDATE); - - return kbCommentLocalService.updateStatus( - kbCommentId, status, serviceContext); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBFolderLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBFolderLocalServiceImpl.java deleted file mode 100644 index c5fc00ba8a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBFolderLocalServiceImpl.java +++ /dev/null @@ -1,322 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.impl; - -import com.liferay.knowledgebase.DuplicateKBFolderNameException; -import com.liferay.knowledgebase.InvalidKBFolderNameException; -import com.liferay.knowledgebase.NoSuchFolderException; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.base.KBFolderLocalServiceBaseImpl; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.User; -import com.liferay.portal.service.ServiceContext; - -import java.util.Collection; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * @author Brian Wing Shun Chan - */ -public class KBFolderLocalServiceImpl extends KBFolderLocalServiceBaseImpl { - - @Override - public KBFolder addKBFolder( - long userId, long groupId, long parentResourceClassNameId, - long parentResourcePrimKey, String name, String description, - ServiceContext serviceContext) - throws PortalException, SystemException { - - // KB folder - - User user = userPersistence.findByPrimaryKey(userId); - Date now = new Date(); - - validateName(groupId, parentResourcePrimKey, name); - validateParent(parentResourceClassNameId, parentResourcePrimKey); - - long kbFolderId = counterLocalService.increment(); - - KBFolder kbFolder = kbFolderPersistence.create(kbFolderId); - - kbFolder.setUuid(serviceContext.getUuid()); - kbFolder.setGroupId(groupId); - kbFolder.setCompanyId(user.getCompanyId()); - kbFolder.setUserId(userId); - kbFolder.setUserName(user.getFullName()); - kbFolder.setCreateDate(now); - kbFolder.setModifiedDate(now); - kbFolder.setParentKBFolderId(parentResourcePrimKey); - kbFolder.setName(name); - kbFolder.setUrlTitle( - getUniqueUrlTitle( - groupId, parentResourcePrimKey, kbFolderId, name)); - kbFolder.setDescription(description); - - kbFolderPersistence.update(kbFolder); - - // Resources - - if (serviceContext.isAddGroupPermissions() || - serviceContext.isAddGuestPermissions()) { - - addKBFolderResources( - kbFolder, serviceContext.isAddGroupPermissions(), - serviceContext.isAddGuestPermissions()); - } - else { - addKBFolderResources( - kbFolder, serviceContext.getGroupPermissions(), - serviceContext.getGuestPermissions()); - } - - return kbFolder; - } - - @Override - public KBFolder deleteKBFolder(long kbFolderId) - throws PortalException, SystemException { - - KBFolder kbFolder = kbFolderPersistence.findByPrimaryKey(kbFolderId); - - kbArticleLocalService.deleteKBArticles( - kbFolder.getGroupId(), kbFolder.getKbFolderId()); - - List childKBFolders = kbFolderPersistence.findByG_P( - kbFolder.getGroupId(), kbFolder.getKbFolderId()); - - for (KBFolder childKBFolder : childKBFolders) { - deleteKBFolder(childKBFolder.getKbFolderId()); - } - - return kbFolderPersistence.remove(kbFolder); - } - - @Override - public KBFolder fetchFirstChildKBFolder(long groupId, long kbFolderId) - throws PortalException, SystemException { - - return kbFolderPersistence.fetchByG_P_First(groupId, kbFolderId, null); - } - - @Override - public KBFolder fetchKBFolder(long kbFolderId) throws SystemException { - return kbFolderPersistence.fetchByPrimaryKey(kbFolderId); - } - - @Override - public KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, String urlTitle) - throws PortalException, SystemException { - - return kbFolderPersistence.fetchByG_P_UT( - groupId, parentKbFolderId, urlTitle); - } - - @Override - public KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, String urlTitle) - throws PortalException, SystemException { - - return kbFolderPersistence.findByG_P_UT( - groupId, parentKbFolderId, urlTitle); - } - - @Override - public List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws PortalException, SystemException { - - return kbFolderPersistence.findByG_P( - groupId, parentKBFolderId, start, end); - } - - @Override - public int getKBFoldersCount(long groupId, long parentKBFolderId) - throws PortalException, SystemException { - - return kbFolderPersistence.countByG_P(groupId, parentKBFolderId); - } - - @Override - public void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws PortalException, SystemException { - - KBFolder kbFolder = kbFolderPersistence.findByPrimaryKey(kbFolderId); - - if (parentKBFolderId != KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - KBFolder parentKBFolder = kbFolderPersistence.findByPrimaryKey( - parentKBFolderId); - - validateParent(kbFolder, parentKBFolder); - - parentKBFolderId = parentKBFolder.getKbFolderId(); - } - - kbFolder.setParentKBFolderId(parentKBFolderId); - - kbFolderPersistence.update(kbFolder); - } - - @Override - public KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, String name, String description) - throws PortalException, SystemException { - - validateParent(parentResourceClassNameId, parentResourcePrimKey); - - KBFolder kbFolder = kbFolderPersistence.findByPrimaryKey(kbFolderId); - - kbFolder.setModifiedDate(new Date()); - kbFolder.setParentKBFolderId(parentResourcePrimKey); - kbFolder.setName(name); - kbFolder.setDescription(description); - - return kbFolderPersistence.update(kbFolder); - } - - protected void addKBFolderResources( - KBFolder kbFolder, boolean addGroupPermissions, - boolean addGuestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addResources( - kbFolder.getCompanyId(), kbFolder.getGroupId(), - kbFolder.getUserId(), KBFolder.class.getName(), - kbFolder.getKbFolderId(), false, addGroupPermissions, - addGuestPermissions); - } - - protected void addKBFolderResources( - KBFolder kbFolder, String[] groupPermissions, - String[] guestPermissions) - throws PortalException, SystemException { - - resourceLocalService.addModelResources( - kbFolder.getCompanyId(), kbFolder.getGroupId(), - kbFolder.getUserId(), KBFolder.class.getName(), - kbFolder.getKbFolderId(), groupPermissions, guestPermissions); - } - - protected void getSubfolderIds( - KBFolder parentKBFolder, Collection kbFolderIds) - throws SystemException { - - Collection kbFolders = kbFolderPersistence.findByG_P( - parentKBFolder.getGroupId(), parentKBFolder.getKbFolderId()); - - for (KBFolder kbFolder : kbFolders) { - getSubfolderIds(kbFolder, kbFolderIds); - } - - kbFolderIds.add(parentKBFolder.getKbFolderId()); - } - - protected String getUniqueUrlTitle( - long groupId, long parentKbFolderId, long kbFolderId, String name) - throws SystemException { - - String urlTitle = KnowledgeBaseUtil.getUrlTitle(kbFolderId, name); - - String uniqueUrlTitle = urlTitle; - - KBFolder kbFolder = null; - - for (int i = 1; kbFolder != null; i++) { - uniqueUrlTitle = urlTitle + StringPool.DASH + i; - - kbFolder = kbFolderPersistence.fetchByG_P_UT( - groupId, parentKbFolderId, uniqueUrlTitle); - } - - return uniqueUrlTitle; - } - - protected void validateName( - long groupId, long parentKBFolderId, String name) - throws PortalException, SystemException { - - if (Validator.isNull(name)) { - throw new InvalidKBFolderNameException("KB folder name is null"); - } - - KBFolder kbFolder = kbFolderPersistence.fetchByG_P_N( - groupId, parentKBFolderId, name); - - if (kbFolder != null) { - throw new DuplicateKBFolderNameException( - String.format("A KB folder with name %s already exists", name)); - } - } - - protected void validateParent(KBFolder kbFolder, KBFolder parentKBFolder) - throws PortalException, SystemException { - - if (kbFolder.getGroupId() != parentKBFolder.getGroupId()) { - throw new NoSuchFolderException( - String.format( - "No KB folder with KB folder ID %s found in group %s", - parentKBFolder.getKbFolderId(), kbFolder.getGroupId())); - } - - Set subfolderIds = new HashSet(); - - getSubfolderIds(kbFolder, subfolderIds); - - if (subfolderIds.contains(parentKBFolder.getKbFolderId())) { - throw new InvalidKBFolderNameException( - String.format( - "Cannot move KBFolder %s inside its descendant KBFolder %s", - kbFolder.getKbFolderId(), parentKBFolder.getKbFolderId())); - } - } - - protected void validateParent( - long parentResourceClassNameId, long parentResourcePrimKey) - throws PortalException, SystemException { - - long kbFolderClassNameId = classNameLocalService.getClassNameId( - KBFolderConstants.getClassName()); - - KBFolder parentKBFolder = null; - - if (parentResourceClassNameId == kbFolderClassNameId) { - if (parentResourcePrimKey == - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - return; - } - - parentKBFolder = kbFolderPersistence.fetchByPrimaryKey( - parentResourcePrimKey); - } - - if (parentKBFolder == null) { - throw new NoSuchFolderException( - String.format( - "No KB folder found with KB folder ID %", - parentResourcePrimKey)); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBFolderServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBFolderServiceImpl.java deleted file mode 100644 index 467e473110..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBFolderServiceImpl.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.impl; - -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.service.base.KBFolderServiceBaseImpl; -import com.liferay.knowledgebase.service.permission.KBFolderPermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.service.ServiceContext; - -import java.util.List; - -/** - * @author Brian Wing Shun Chan - */ -public class KBFolderServiceImpl extends KBFolderServiceBaseImpl { - - @Override - public KBFolder addKBFolder( - long groupId, long parentResourceClassNameId, - long parentResourcePrimKey, String name, String description, - ServiceContext serviceContext) - throws PortalException, SystemException { - - KBFolderPermission.check( - getPermissionChecker(), groupId, parentResourcePrimKey, - ActionKeys.ADD_KB_FOLDER); - - return kbFolderLocalService.addKBFolder( - getUserId(), groupId, parentResourceClassNameId, - parentResourcePrimKey, name, description, serviceContext); - } - - public KBFolder deleteKBFolder(long kbFolderId) - throws PortalException, SystemException { - - KBFolderPermission.check( - getPermissionChecker(), kbFolderId, ActionKeys.DELETE); - - return kbFolderLocalService.deleteKBFolder(kbFolderId); - } - - public KBFolder fetchKBFolderByUrlTitle( - long groupId, long parentKbFolderId, String urlTitle) - throws PortalException, SystemException { - - KBFolder kbFolder = kbFolderLocalService.fetchKBFolderByUrlTitle( - groupId, parentKbFolderId, urlTitle); - - if (kbFolder == null) { - return null; - } - - KBFolderPermission.check( - getPermissionChecker(), kbFolder, ActionKeys.VIEW); - - return kbFolder; - } - - @Override - public KBFolder getKBFolder(long kbFolderId) - throws PortalException, SystemException { - - KBFolderPermission.check( - getPermissionChecker(), kbFolderId, ActionKeys.VIEW); - - return kbFolderLocalService.getKBFolder(kbFolderId); - } - - public KBFolder getKBFolderByUrlTitle( - long groupId, long parentKbFolderId, String urlTitle) - throws PortalException, SystemException { - - KBFolder kbFolder = kbFolderLocalService.getKBFolderByUrlTitle( - groupId, parentKbFolderId, urlTitle); - - KBFolderPermission.check( - getPermissionChecker(), kbFolder, ActionKeys.VIEW); - - return kbFolder; - } - - @Override - public List getKBFolders( - long groupId, long parentKBFolderId, int start, int end) - throws PortalException, SystemException { - - return kbFolderPersistence.filterFindByG_P( - groupId, parentKBFolderId, start, end); - } - - @Override - public int getKBFoldersCount(long groupId, long parentKBFolderId) - throws PortalException, SystemException { - - return kbFolderPersistence.filterCountByG_P(groupId, parentKBFolderId); - } - - @Override - public void moveKBFolder(long kbFolderId, long parentKBFolderId) - throws PortalException, SystemException { - - KBFolderPermission.check( - getPermissionChecker(), kbFolderId, ActionKeys.MOVE_KB_FOLDER); - - kbFolderLocalService.moveKBFolder(kbFolderId, parentKBFolderId); - } - - @Override - public KBFolder updateKBFolder( - long parentResourceClassNameId, long parentResourcePrimKey, - long kbFolderId, String name, String description) - throws PortalException, SystemException { - - KBFolderPermission.check( - getPermissionChecker(), kbFolderId, ActionKeys.UPDATE); - - return kbFolderLocalService.updateKBFolder( - parentResourceClassNameId, parentResourcePrimKey, kbFolderId, name, - description); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBTemplateLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBTemplateLocalServiceImpl.java deleted file mode 100644 index 33ffda8662..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBTemplateLocalServiceImpl.java +++ /dev/null @@ -1,343 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.impl; - -import com.liferay.knowledgebase.KBTemplateContentException; -import com.liferay.knowledgebase.KBTemplateTitleException; -import com.liferay.knowledgebase.NoSuchTemplateException; -import com.liferay.knowledgebase.admin.social.AdminActivityKeys; -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.service.base.KBTemplateLocalServiceBaseImpl; -import com.liferay.knowledgebase.util.KnowledgeBaseUtil; -import com.liferay.portal.kernel.dao.orm.Conjunction; -import com.liferay.portal.kernel.dao.orm.Criterion; -import com.liferay.portal.kernel.dao.orm.Disjunction; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; -import com.liferay.portal.kernel.dao.orm.Junction; -import com.liferay.portal.kernel.dao.orm.Property; -import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; -import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.systemevent.SystemEvent; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.ResourceConstants; -import com.liferay.portal.model.SystemEventConstants; -import com.liferay.portal.model.User; -import com.liferay.portal.service.ServiceContext; - -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBTemplateLocalServiceImpl extends KBTemplateLocalServiceBaseImpl { - - @Override - public KBTemplate addKBTemplate( - long userId, String title, String content, - ServiceContext serviceContext) - throws PortalException, SystemException { - - // KB template - - User user = userPersistence.findByPrimaryKey(userId); - long groupId = serviceContext.getScopeGroupId(); - Date now = new Date(); - - validate(title, content); - - long kbTemplateId = counterLocalService.increment(); - - KBTemplate kbTemplate = kbTemplatePersistence.create(kbTemplateId); - - kbTemplate.setUuid(serviceContext.getUuid()); - kbTemplate.setGroupId(groupId); - kbTemplate.setCompanyId(user.getCompanyId()); - kbTemplate.setUserId(user.getUserId()); - kbTemplate.setUserName(user.getFullName()); - kbTemplate.setCreateDate(serviceContext.getCreateDate(now)); - kbTemplate.setModifiedDate(serviceContext.getModifiedDate(now)); - kbTemplate.setTitle(title); - kbTemplate.setContent(content); - - kbTemplatePersistence.update(kbTemplate); - - // Resources - - resourceLocalService.addModelResources(kbTemplate, serviceContext); - - // Social - - JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(); - - extraDataJSONObject.put("title", kbTemplate.getTitle()); - - socialActivityLocalService.addActivity( - userId, groupId, KBTemplate.class.getName(), kbTemplateId, - AdminActivityKeys.ADD_KB_TEMPLATE, extraDataJSONObject.toString(), - 0); - - return kbTemplate; - } - - @Override - public void deleteGroupKBTemplates(long groupId) - throws PortalException, SystemException { - - List kbTemplates = kbTemplatePersistence.findByGroupId( - groupId); - - for (KBTemplate kbTemplate : kbTemplates) { - kbTemplateLocalService.deleteKBTemplate(kbTemplate); - } - } - - @Override - @SystemEvent( - action = SystemEventConstants.ACTION_SKIP, - type = SystemEventConstants.TYPE_DELETE) - public KBTemplate deleteKBTemplate(KBTemplate kbTemplate) - throws PortalException, SystemException { - - // KB template - - kbTemplatePersistence.remove(kbTemplate); - - // Resources - - resourceLocalService.deleteResource( - kbTemplate.getCompanyId(), KBTemplate.class.getName(), - ResourceConstants.SCOPE_INDIVIDUAL, kbTemplate.getKbTemplateId()); - - // KB Comments - - kbCommentLocalService.deleteKBComments( - KBTemplate.class.getName(), kbTemplate.getKbTemplateId()); - - // Social - - socialActivityLocalService.deleteActivities( - KBTemplate.class.getName(), kbTemplate.getKbTemplateId()); - - return kbTemplate; - } - - @Override - public KBTemplate deleteKBTemplate(long kbTemplateId) - throws PortalException, SystemException { - - KBTemplate kbTemplate = kbTemplatePersistence.findByPrimaryKey( - kbTemplateId); - - return kbTemplateLocalService.deleteKBTemplate(kbTemplate); - } - - @Override - public void deleteKBTemplates(long[] kbTemplateIds) - throws PortalException, SystemException { - - for (long kbTemplateId : kbTemplateIds) { - KBTemplate kbTemplate = null; - - try { - kbTemplate = kbTemplatePersistence.findByPrimaryKey( - kbTemplateId); - } - catch (NoSuchTemplateException nste) { - continue; - } - - kbTemplateLocalService.deleteKBTemplate(kbTemplate); - } - } - - @Override - public List getGroupKBTemplates( - long groupId, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - return kbTemplatePersistence.findByGroupId( - groupId, start, end, orderByComparator); - } - - @Override - public int getGroupKBTemplatesCount(long groupId) throws SystemException { - return kbTemplatePersistence.countByGroupId(groupId); - } - - @Override - public List search( - long groupId, String title, String content, Date startDate, - Date endDate, boolean andOperator, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - DynamicQuery dynamicQuery = buildDynamicQuery( - groupId, title, content, startDate, endDate, andOperator); - - return dynamicQuery(dynamicQuery, start, end, orderByComparator); - } - - @Override - public KBTemplate updateKBTemplate( - long kbTemplateId, String title, String content, - ServiceContext serviceContext) - throws PortalException, SystemException { - - // KB template - - validate(title, content); - - KBTemplate kbTemplate = kbTemplatePersistence.findByPrimaryKey( - kbTemplateId); - - kbTemplate.setModifiedDate(serviceContext.getModifiedDate(null)); - kbTemplate.setTitle(title); - kbTemplate.setContent(content); - - kbTemplatePersistence.update(kbTemplate); - - // Resources - - if ((serviceContext.getGroupPermissions() != null) || - (serviceContext.getGuestPermissions() != null)) { - - updateKBTemplateResources( - kbTemplate, serviceContext.getGroupPermissions(), - serviceContext.getGuestPermissions()); - } - - // Social - - JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(); - - extraDataJSONObject.put("title", kbTemplate.getTitle()); - - socialActivityLocalService.addActivity( - kbTemplate.getUserId(), kbTemplate.getGroupId(), - KBTemplate.class.getName(), kbTemplateId, - AdminActivityKeys.UPDATE_KB_TEMPLATE, - extraDataJSONObject.toString(), 0); - - return kbTemplate; - } - - @Override - public void updateKBTemplateResources( - KBTemplate kbTemplate, String[] groupPermissions, - String[] guestPermissions) - throws PortalException, SystemException { - - resourceLocalService.updateResources( - kbTemplate.getCompanyId(), kbTemplate.getGroupId(), - KBTemplate.class.getName(), kbTemplate.getKbTemplateId(), - groupPermissions, guestPermissions); - } - - protected DynamicQuery buildDynamicQuery( - long groupId, String title, String content, Date startDate, - Date endDate, boolean andOperator) { - - Junction junction = null; - - if (andOperator) { - junction = RestrictionsFactoryUtil.conjunction(); - } - else { - junction = RestrictionsFactoryUtil.disjunction(); - } - - Map terms = new HashMap(); - - if (Validator.isNotNull(title)) { - terms.put("title", title); - } - - if (Validator.isNotNull(content)) { - terms.put("content", content); - } - - for (Map.Entry entry : terms.entrySet()) { - String key = entry.getKey(); - String value = entry.getValue(); - - Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); - - for (String keyword : KnowledgeBaseUtil.splitKeywords(value)) { - Criterion criterion = RestrictionsFactoryUtil.ilike( - key, StringUtil.quote(keyword, StringPool.PERCENT)); - - disjunction.add(criterion); - } - - junction.add(disjunction); - } - - if ((endDate != null) && (startDate != null)) { - Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); - - String[] propertyNames = {"createDate", "modifiedDate"}; - - for (String propertyName : propertyNames) { - Property property = PropertyFactoryUtil.forName(propertyName); - - Conjunction conjunction = RestrictionsFactoryUtil.conjunction(); - - conjunction.add(property.gt(startDate)); - conjunction.add(property.lt(endDate)); - - disjunction.add(conjunction); - } - - junction.add(disjunction); - } - - DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass( - KBTemplate.class, getClassLoader()); - - if (groupId > 0) { - Property property = PropertyFactoryUtil.forName("groupId"); - - dynamicQuery.add(property.eq(groupId)); - } - - return dynamicQuery.add(junction); - } - - protected void validate(String title, String content) - throws PortalException { - - if (Validator.isNull(title)) { - throw new KBTemplateTitleException(); - } - - if (Validator.isNull(content)) { - throw new KBTemplateContentException(); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBTemplateServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBTemplateServiceImpl.java deleted file mode 100644 index 5bed178df5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/impl/KBTemplateServiceImpl.java +++ /dev/null @@ -1,197 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.impl; - -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.model.KBTemplateSearchDisplay; -import com.liferay.knowledgebase.model.impl.KBTemplateSearchDisplayImpl; -import com.liferay.knowledgebase.service.base.KBTemplateServiceBaseImpl; -import com.liferay.knowledgebase.service.permission.AdminPermission; -import com.liferay.knowledgebase.service.permission.DisplayPermission; -import com.liferay.knowledgebase.service.permission.KBTemplatePermission; -import com.liferay.knowledgebase.util.ActionKeys; -import com.liferay.knowledgebase.util.PortletKeys; -import com.liferay.portal.kernel.dao.search.SearchContainer; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.service.ServiceContext; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KBTemplateServiceImpl extends KBTemplateServiceBaseImpl { - - @Override - public KBTemplate addKBTemplate( - String portletId, String title, String content, - ServiceContext serviceContext) - throws PortalException, SystemException { - - if (portletId.equals(PortletKeys.KNOWLEDGE_BASE_ADMIN)) { - AdminPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), - ActionKeys.ADD_KB_TEMPLATE); - } - else if (portletId.equals(PortletKeys.KNOWLEDGE_BASE_DISPLAY)) { - DisplayPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), - ActionKeys.ADD_KB_TEMPLATE); - } - - return kbTemplateLocalService.addKBTemplate( - getUserId(), title, content, serviceContext); - } - - @Override - public KBTemplate deleteKBTemplate(long kbTemplateId) - throws PortalException, SystemException { - - KBTemplatePermission.check( - getPermissionChecker(), kbTemplateId, ActionKeys.DELETE); - - return kbTemplateLocalService.deleteKBTemplate(kbTemplateId); - } - - @Override - public void deleteKBTemplates(long groupId, long[] kbTemplateIds) - throws PortalException, SystemException { - - AdminPermission.check( - getPermissionChecker(), groupId, ActionKeys.DELETE_KB_TEMPLATES); - - kbTemplateLocalService.deleteKBTemplates(kbTemplateIds); - } - - @Override - public List getGroupKBTemplates( - long groupId, int start, int end, - OrderByComparator orderByComparator) - throws SystemException { - - return kbTemplatePersistence.filterFindByGroupId( - groupId, start, end, orderByComparator); - } - - @Override - public int getGroupKBTemplatesCount(long groupId) throws SystemException { - return kbTemplatePersistence.filterCountByGroupId(groupId); - } - - @Override - public KBTemplate getKBTemplate(long kbTemplateId) - throws PortalException, SystemException { - - KBTemplatePermission.check( - getPermissionChecker(), kbTemplateId, ActionKeys.VIEW); - - return kbTemplateLocalService.getKBTemplate(kbTemplateId); - } - - @Override - public KBTemplateSearchDisplay getKBTemplateSearchDisplay( - long groupId, String title, String content, Date startDate, - Date endDate, boolean andOperator, int[] curStartValues, int cur, - int delta, OrderByComparator orderByComparator) - throws PortalException, SystemException { - - // See LPS-9546 - - int start = 0; - - if (curStartValues.length > (cur - SearchContainer.DEFAULT_CUR)) { - start = curStartValues[cur - SearchContainer.DEFAULT_CUR]; - - curStartValues = ArrayUtil.subset( - curStartValues, 0, cur - SearchContainer.DEFAULT_CUR + 1); - } - else { - cur = SearchContainer.DEFAULT_CUR; - - curStartValues = new int[] {0}; - } - - int end = start + _INTERVAL; - - List kbTemplates = new ArrayList(); - - int curStartValue = 0; - - while (curStartValue == 0) { - List curKBTemplates = kbTemplateLocalService.search( - groupId, title, content, startDate, endDate, andOperator, start, - end, orderByComparator); - - if (curKBTemplates.isEmpty()) { - break; - } - - for (int i = 0; i < curKBTemplates.size(); i++) { - KBTemplate curKBTemplate = curKBTemplates.get(i); - - if (!KBTemplatePermission.contains( - getPermissionChecker(), curKBTemplate, - ActionKeys.VIEW)) { - - continue; - } - - if (kbTemplates.size() == delta) { - curStartValue = start + i; - - break; - } - - kbTemplates.add(curKBTemplate); - } - - start = start + _INTERVAL; - end = start + _INTERVAL; - } - - int total = ((cur - 1) * delta) + kbTemplates.size(); - - if (curStartValue > 0) { - curStartValues = ArrayUtil.append(curStartValues, curStartValue); - - total = total + 1; - } - - return new KBTemplateSearchDisplayImpl( - kbTemplates, total, curStartValues); - } - - @Override - public KBTemplate updateKBTemplate( - long kbTemplateId, String title, String content, - ServiceContext serviceContext) - throws PortalException, SystemException { - - KBTemplatePermission.check( - getPermissionChecker(), kbTemplateId, ActionKeys.UPDATE); - - return kbTemplateLocalService.updateKBTemplate( - kbTemplateId, title, content, serviceContext); - } - - private static final int _INTERVAL = 200; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBArticleFinderImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBArticleFinderImpl.java deleted file mode 100644 index 2529b27719..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBArticleFinderImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.compat.portal.kernel.util.StringUtil; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.impl.KBArticleImpl; -import com.liferay.portal.kernel.dao.orm.QueryPos; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.dao.orm.SQLQuery; -import com.liferay.portal.kernel.dao.orm.Session; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; -import com.liferay.util.dao.orm.CustomSQLUtil; - -import java.math.BigInteger; - -import java.util.Iterator; -import java.util.List; - -/** - * @author Adolfo Pérez - */ -public class KBArticleFinderImpl - extends BasePersistenceImpl implements KBArticleFinder { - - @Override - public int countByUrlTitle( - long groupId, String kbFolderUrlTitle, String kbArticleUrlTitle, - int[] status) { - - Session session = null; - - try { - session = openSession(); - - String sql = CustomSQLUtil.get(_COUNT_BY_URL_TITLE); - - sql = replaceWorkflowStatus(sql, status); - - SQLQuery query = session.createSQLQuery(sql); - - QueryPos qPos = QueryPos.getInstance(query); - - qPos.add(groupId); - qPos.add(kbArticleUrlTitle); - qPos.add(kbFolderUrlTitle); - - Iterator itr = query.iterate(); - - if (itr.hasNext()) { - BigInteger count = itr.next(); - - if (count != null) { - return count.intValue(); - } - } - - return 0; - } - finally { - closeSession(session); - } - } - - @Override - public List findByUrlTitle( - long groupId, String kbFolderUrlTitle, String kbArticleUrlTitle, - int[] status, int start, int end) { - - Session session = null; - - try { - session = openSession(); - - String sql = CustomSQLUtil.get(_FIND_BY_URL_TITLE); - - sql = replaceWorkflowStatus(sql, status); - - SQLQuery query = session.createSQLQuery(sql); - - query.addEntity(KBArticleImpl.TABLE_NAME, KBArticleImpl.class); - - QueryPos qPos = QueryPos.getInstance(query); - - qPos.add(groupId); - qPos.add(kbArticleUrlTitle); - qPos.add(kbFolderUrlTitle); - - return (List)QueryUtil.list(query, getDialect(), start, end); - } - finally { - closeSession(session); - } - } - - protected String replaceWorkflowStatus(String sql, int[] status) { - StringBundler sb = new StringBundler(status.length); - - for (int i = 0; i < status.length; i++) { - sb.append(status[i]); - - if (i != (status.length - 1)) { - sb.append(", "); - } - } - - return StringUtil.replace(sql, "[$WORKFLOW_STATUS$]", sb.toString()); - } - - private static final String _COUNT_BY_URL_TITLE = - KBArticleFinder.class.getName() + ".countByUrlTitle"; - - private static final String _FIND_BY_URL_TITLE = - KBArticleFinder.class.getName() + ".findByUrlTitle"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBArticlePersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBArticlePersistenceImpl.java deleted file mode 100644 index fe35b3e36f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBArticlePersistenceImpl.java +++ /dev/null @@ -1,32159 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.NoSuchArticleException; -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.impl.KBArticleImpl; -import com.liferay.knowledgebase.model.impl.KBArticleModelImpl; - -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.SQLQuery; -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.ArrayUtil; -import com.liferay.portal.kernel.util.CharPool; -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.SetUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.security.permission.InlineSQLHelperUtil; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * The persistence implementation for the k b article service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBArticlePersistence - * @see KBArticleUtil - * @generated - */ -public class KBArticlePersistenceImpl extends BasePersistenceImpl - implements KBArticlePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link KBArticleUtil} to access the k b article persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = KBArticleImpl.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(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.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_UUID = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", - new String[] { String.class.getName() }, - KBArticleModelImpl.UUID_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", - new String[] { String.class.getName() }); - - /** - * Returns all the k b articles where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid) throws SystemException { - return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, int start, int end) - throws SystemException { - return findByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, 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_UUID; - finderArgs = new Object[] { uuid }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; - finderArgs = new Object[] { uuid, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!Validator.equals(uuid, kbArticle.getUuid())) { - 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_KBARTICLE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByUuid_First(String uuid, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByUuid_First(uuid, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByUuid_First(String uuid, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid(uuid, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByUuid_Last(String uuid, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByUuid_Last(uuid, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByUuid_Last(String uuid, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid(uuid); - - if (count == 0) { - return null; - } - - List list = findByUuid(uuid, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where uuid = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByUuid_PrevAndNext(long kbArticleId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByUuid_PrevAndNext(session, kbArticle, uuid, - orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByUuid_PrevAndNext(session, kbArticle, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByUuid_PrevAndNext(Session session, - KBArticle kbArticle, String uuid, 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_KBARTICLE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_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(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid(String uuid) throws SystemException { - for (KBArticle kbArticle : findByUuid(uuid, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid(String uuid) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; - - Object[] finderArgs = new Object[] { uuid }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_UUID_1 = "kbArticle.uuid IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2 = "kbArticle.uuid = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3 = "(kbArticle.uuid IS NULL OR kbArticle.uuid = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }, - KBArticleModelImpl.UUID_COLUMN_BITMASK | - KBArticleModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns the k b article where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchArticleException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByUUID_G(String uuid, long groupId) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByUUID_G(uuid, groupId); - - if (kbArticle == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchArticleException(msg.toString()); - } - - return kbArticle; - } - - /** - * Returns the k b article where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByUUID_G(String uuid, long groupId) - throws SystemException { - return fetchByUUID_G(uuid, groupId, true); - } - - /** - * Returns the k b article where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByUUID_G(String uuid, long groupId, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { uuid, groupId }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, this); - } - - if (result instanceof KBArticle) { - KBArticle kbArticle = (KBArticle)result; - - if (!Validator.equals(uuid, kbArticle.getUuid()) || - (groupId != kbArticle.getGroupId())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, list); - } - else { - KBArticle kbArticle = list.get(0); - - result = kbArticle; - - cacheResult(kbArticle); - - if ((kbArticle.getUuid() == null) || - !kbArticle.getUuid().equals(uuid) || - (kbArticle.getGroupId() != groupId)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, kbArticle); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (KBArticle)result; - } - } - - /** - * Removes the k b article where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b article that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle removeByUUID_G(String uuid, long groupId) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByUUID_G(uuid, groupId); - - return remove(kbArticle); - } - - /** - * Returns the number of k b articles where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUUID_G(String uuid, long groupId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; - - Object[] finderArgs = new Object[] { uuid, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - 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_UUID_G_UUID_1 = "kbArticle.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "kbArticle.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(kbArticle.uuid IS NULL OR kbArticle.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "kbArticle.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", - new String[] { - String.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = - new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }, - KBArticleModelImpl.UUID_COLUMN_BITMASK | - KBArticleModelImpl.COMPANYID_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns all the k b articles where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId) - throws SystemException { - return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId, int start, - int end) throws SystemException { - return findByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, 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_UUID_C; - finderArgs = new Object[] { uuid, companyId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; - finderArgs = new Object[] { - uuid, companyId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!Validator.equals(uuid, kbArticle.getUuid()) || - (companyId != kbArticle.getCompanyId())) { - 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_KBARTICLE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByUuid_C_First(uuid, companyId, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid_C(uuid, companyId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByUuid_C_Last(uuid, companyId, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid_C(uuid, companyId); - - if (count == 0) { - return null; - } - - List list = findByUuid_C(uuid, companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where uuid = ? and companyId = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByUuid_C_PrevAndNext(long kbArticleId, String uuid, - long companyId, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByUuid_C_PrevAndNext(session, kbArticle, uuid, - companyId, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByUuid_C_PrevAndNext(session, kbArticle, uuid, - companyId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByUuid_C_PrevAndNext(Session session, - KBArticle kbArticle, String uuid, 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_KBARTICLE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_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(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid_C(String uuid, long companyId) - throws SystemException { - for (KBArticle kbArticle : findByUuid_C(uuid, companyId, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid_C(String uuid, long companyId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; - - Object[] finderArgs = new Object[] { uuid, companyId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_C_UUID_1 = "kbArticle.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "kbArticle.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(kbArticle.uuid IS NULL OR kbArticle.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "kbArticle.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_RESOURCEPRIMKEY = - new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByResourcePrimKey", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_RESOURCEPRIMKEY = - new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByResourcePrimKey", - new String[] { Long.class.getName() }, - KBArticleModelImpl.RESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_RESOURCEPRIMKEY = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, - "countByResourcePrimKey", new String[] { Long.class.getName() }); - - /** - * Returns all the k b articles where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByResourcePrimKey(long resourcePrimKey) - throws SystemException { - return findByResourcePrimKey(resourcePrimKey, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByResourcePrimKey(long resourcePrimKey, - int start, int end) throws SystemException { - return findByResourcePrimKey(resourcePrimKey, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByResourcePrimKey(long resourcePrimKey, - 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_RESOURCEPRIMKEY; - finderArgs = new Object[] { resourcePrimKey }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_RESOURCEPRIMKEY; - finderArgs = new Object[] { - resourcePrimKey, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((resourcePrimKey != kbArticle.getResourcePrimKey())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_RESOURCEPRIMKEY_RESOURCEPRIMKEY_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(resourcePrimKey); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByResourcePrimKey_First(long resourcePrimKey, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByResourcePrimKey_First(resourcePrimKey, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByResourcePrimKey_First(long resourcePrimKey, - OrderByComparator orderByComparator) throws SystemException { - List list = findByResourcePrimKey(resourcePrimKey, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByResourcePrimKey_Last(long resourcePrimKey, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByResourcePrimKey_Last(resourcePrimKey, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByResourcePrimKey_Last(long resourcePrimKey, - OrderByComparator orderByComparator) throws SystemException { - int count = countByResourcePrimKey(resourcePrimKey); - - if (count == 0) { - return null; - } - - List list = findByResourcePrimKey(resourcePrimKey, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByResourcePrimKey_PrevAndNext(long kbArticleId, - long resourcePrimKey, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByResourcePrimKey_PrevAndNext(session, kbArticle, - resourcePrimKey, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByResourcePrimKey_PrevAndNext(session, kbArticle, - resourcePrimKey, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByResourcePrimKey_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_RESOURCEPRIMKEY_RESOURCEPRIMKEY_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(KBArticleModelImpl.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(resourcePrimKey); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where resourcePrimKey = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByResourcePrimKey(long resourcePrimKey) - throws SystemException { - for (KBArticle kbArticle : findByResourcePrimKey(resourcePrimKey, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where resourcePrimKey = ?. - * - * @param resourcePrimKey the resource prim key - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByResourcePrimKey(long resourcePrimKey) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_RESOURCEPRIMKEY; - - Object[] finderArgs = new Object[] { resourcePrimKey }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_RESOURCEPRIMKEY_RESOURCEPRIMKEY_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - 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_RESOURCEPRIMKEY_RESOURCEPRIMKEY_2 = - "kbArticle.resourcePrimKey = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByR_G", - new String[] { - Long.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByR_G", - new String[] { Long.class.getName(), Long.class.getName() }, - KBArticleModelImpl.RESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_R_G = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByR_G", - new String[] { Long.class.getName(), Long.class.getName() }); - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G(long resourcePrimKey, long groupId) - throws SystemException { - return findByR_G(resourcePrimKey, groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G(long resourcePrimKey, long groupId, - int start, int end) throws SystemException { - return findByR_G(resourcePrimKey, groupId, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G(long resourcePrimKey, long groupId, - 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_R_G; - finderArgs = new Object[] { resourcePrimKey, groupId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G; - finderArgs = new Object[] { - resourcePrimKey, groupId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((resourcePrimKey != kbArticle.getResourcePrimKey()) || - (groupId != kbArticle.getGroupId())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_GROUPID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(groupId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_G_First(long resourcePrimKey, long groupId, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_G_First(resourcePrimKey, groupId, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_G_First(long resourcePrimKey, long groupId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByR_G(resourcePrimKey, groupId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_G_Last(long resourcePrimKey, long groupId, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_G_Last(resourcePrimKey, groupId, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_G_Last(long resourcePrimKey, long groupId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByR_G(resourcePrimKey, groupId); - - if (count == 0) { - return null; - } - - List list = findByR_G(resourcePrimKey, groupId, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByR_G_PrevAndNext(long kbArticleId, - long resourcePrimKey, long groupId, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByR_G_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByR_G_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByR_G_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, long groupId, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_GROUPID_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(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G(long resourcePrimKey, long groupId) - throws SystemException { - return filterFindByR_G(resourcePrimKey, groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G(long resourcePrimKey, long groupId, - int start, int end) throws SystemException { - return filterFindByR_G(resourcePrimKey, groupId, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G(long resourcePrimKey, long groupId, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G(resourcePrimKey, groupId, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_R_G_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByR_G_PrevAndNext(long kbArticleId, - long resourcePrimKey, long groupId, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_PrevAndNext(kbArticleId, resourcePrimKey, groupId, - orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByR_G_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByR_G_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByR_G_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, long groupId, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_R_G_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByR_G(long resourcePrimKey, long groupId) - throws SystemException { - for (KBArticle kbArticle : findByR_G(resourcePrimKey, groupId, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_G(long resourcePrimKey, long groupId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_R_G; - - Object[] finderArgs = new Object[] { resourcePrimKey, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - 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(); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByR_G(long resourcePrimKey, long groupId) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByR_G(resourcePrimKey, groupId); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_GROUPID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_R_G_RESOURCEPRIMKEY_2 = "kbArticle.resourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_R_G_GROUPID_2 = "kbArticle.groupId = ?"; - public static final FinderPath FINDER_PATH_FETCH_BY_R_V = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByR_V", - new String[] { Long.class.getName(), Integer.class.getName() }, - KBArticleModelImpl.RESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.VERSION_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_R_V = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByR_V", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns the k b article where resourcePrimKey = ? and version = ? or throws a {@link com.liferay.knowledgebase.NoSuchArticleException} if it could not be found. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_V(long resourcePrimKey, int version) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_V(resourcePrimKey, version); - - if (kbArticle == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", version="); - msg.append(version); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchArticleException(msg.toString()); - } - - return kbArticle; - } - - /** - * Returns the k b article where resourcePrimKey = ? and version = ? or returns null if it could not be found. Uses the finder cache. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_V(long resourcePrimKey, int version) - throws SystemException { - return fetchByR_V(resourcePrimKey, version, true); - } - - /** - * Returns the k b article where resourcePrimKey = ? and version = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_V(long resourcePrimKey, int version, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { resourcePrimKey, version }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_R_V, - finderArgs, this); - } - - if (result instanceof KBArticle) { - KBArticle kbArticle = (KBArticle)result; - - if ((resourcePrimKey != kbArticle.getResourcePrimKey()) || - (version != kbArticle.getVersion())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_V_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_V_VERSION_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(version); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_R_V, - finderArgs, list); - } - else { - KBArticle kbArticle = list.get(0); - - result = kbArticle; - - cacheResult(kbArticle); - - if ((kbArticle.getResourcePrimKey() != resourcePrimKey) || - (kbArticle.getVersion() != version)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_R_V, - finderArgs, kbArticle); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_R_V, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (KBArticle)result; - } - } - - /** - * Removes the k b article where resourcePrimKey = ? and version = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the k b article that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle removeByR_V(long resourcePrimKey, int version) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByR_V(resourcePrimKey, version); - - return remove(kbArticle); - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and version = ?. - * - * @param resourcePrimKey the resource prim key - * @param version the version - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_V(long resourcePrimKey, int version) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_R_V; - - Object[] finderArgs = new Object[] { resourcePrimKey, version }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_V_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_V_VERSION_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(version); - - 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_R_V_RESOURCEPRIMKEY_2 = "kbArticle.resourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_R_V_VERSION_2 = "kbArticle.version = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_R_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByR_L", - 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_R_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByR_L", - new String[] { Long.class.getName(), Boolean.class.getName() }, - KBArticleModelImpl.RESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.LATEST_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_R_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByR_L", - new String[] { Long.class.getName(), Boolean.class.getName() }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByR_L", - new String[] { Long.class.getName(), Boolean.class.getName() }); - - /** - * Returns all the k b articles where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_L(long resourcePrimKey, boolean latest) - throws SystemException { - return findByR_L(resourcePrimKey, latest, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_L(long resourcePrimKey, boolean latest, - int start, int end) throws SystemException { - return findByR_L(resourcePrimKey, latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_L(long resourcePrimKey, boolean latest, - 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_R_L; - finderArgs = new Object[] { resourcePrimKey, latest }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_R_L; - finderArgs = new Object[] { - resourcePrimKey, latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((resourcePrimKey != kbArticle.getResourcePrimKey()) || - (latest != kbArticle.getLatest())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_L_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_L_LATEST_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_L_First(long resourcePrimKey, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_L_First(resourcePrimKey, latest, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_L_First(long resourcePrimKey, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - List list = findByR_L(resourcePrimKey, latest, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_L_Last(long resourcePrimKey, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_L_Last(resourcePrimKey, latest, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_L_Last(long resourcePrimKey, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - int count = countByR_L(resourcePrimKey, latest); - - if (count == 0) { - return null; - } - - List list = findByR_L(resourcePrimKey, latest, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByR_L_PrevAndNext(long kbArticleId, - long resourcePrimKey, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByR_L_PrevAndNext(session, kbArticle, - resourcePrimKey, latest, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByR_L_PrevAndNext(session, kbArticle, - resourcePrimKey, latest, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByR_L_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, boolean latest, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_L_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_L_LATEST_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(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_L(long[] resourcePrimKeies, boolean latest) - throws SystemException { - return findByR_L(resourcePrimKeies, latest, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_L(long[] resourcePrimKeies, boolean latest, - int start, int end) throws SystemException { - return findByR_L(resourcePrimKeies, latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_L(long[] resourcePrimKeies, boolean latest, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((resourcePrimKeies != null) && (resourcePrimKeies.length == 1)) { - return findByR_L(resourcePrimKeies[0], latest, start, end, - orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), latest - }; - } - else { - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_L, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!ArrayUtil.contains(resourcePrimKeies, - kbArticle.getResourcePrimKey()) || - (latest != kbArticle.getLatest())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_L_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_L_LATEST_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_L, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and latest = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByR_L(long resourcePrimKey, boolean latest) - throws SystemException { - for (KBArticle kbArticle : findByR_L(resourcePrimKey, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_L(long resourcePrimKey, boolean latest) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_R_L; - - Object[] finderArgs = new Object[] { resourcePrimKey, latest }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_L_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_L_LATEST_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(latest); - - 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(); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_L(long[] resourcePrimKeies, boolean latest) - throws SystemException { - Object[] finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), latest - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_L, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_L_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_L_LATEST_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(latest); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_L, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - private static final String _FINDER_COLUMN_R_L_RESOURCEPRIMKEY_2 = "kbArticle.resourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_R_L_RESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_L_RESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_R_L_LATEST_2 = "kbArticle.latest = ?"; - private static final String _FINDER_COLUMN_R_L_LATEST_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_L_LATEST_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_R_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByR_M", - 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_R_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByR_M", - new String[] { Long.class.getName(), Boolean.class.getName() }, - KBArticleModelImpl.RESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.MAIN_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_R_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByR_M", - new String[] { Long.class.getName(), Boolean.class.getName() }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByR_M", - new String[] { Long.class.getName(), Boolean.class.getName() }); - - /** - * Returns all the k b articles where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_M(long resourcePrimKey, boolean main) - throws SystemException { - return findByR_M(resourcePrimKey, main, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_M(long resourcePrimKey, boolean main, - int start, int end) throws SystemException { - return findByR_M(resourcePrimKey, main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_M(long resourcePrimKey, boolean main, - 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_R_M; - finderArgs = new Object[] { resourcePrimKey, main }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_R_M; - finderArgs = new Object[] { - resourcePrimKey, main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((resourcePrimKey != kbArticle.getResourcePrimKey()) || - (main != kbArticle.getMain())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_M_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_M_MAIN_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_M_First(long resourcePrimKey, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_M_First(resourcePrimKey, main, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_M_First(long resourcePrimKey, boolean main, - OrderByComparator orderByComparator) throws SystemException { - List list = findByR_M(resourcePrimKey, main, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_M_Last(long resourcePrimKey, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_M_Last(resourcePrimKey, main, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_M_Last(long resourcePrimKey, boolean main, - OrderByComparator orderByComparator) throws SystemException { - int count = countByR_M(resourcePrimKey, main); - - if (count == 0) { - return null; - } - - List list = findByR_M(resourcePrimKey, main, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByR_M_PrevAndNext(long kbArticleId, - long resourcePrimKey, boolean main, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByR_M_PrevAndNext(session, kbArticle, - resourcePrimKey, main, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByR_M_PrevAndNext(session, kbArticle, - resourcePrimKey, main, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByR_M_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, boolean main, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_M_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_M_MAIN_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(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_M(long[] resourcePrimKeies, boolean main) - throws SystemException { - return findByR_M(resourcePrimKeies, main, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_M(long[] resourcePrimKeies, boolean main, - int start, int end) throws SystemException { - return findByR_M(resourcePrimKeies, main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_M(long[] resourcePrimKeies, boolean main, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((resourcePrimKeies != null) && (resourcePrimKeies.length == 1)) { - return findByR_M(resourcePrimKeies[0], main, start, end, - orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { StringUtil.merge(resourcePrimKeies), main }; - } - else { - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_M, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!ArrayUtil.contains(resourcePrimKeies, - kbArticle.getResourcePrimKey()) || - (main != kbArticle.getMain())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_M_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_M_MAIN_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_M, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and main = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByR_M(long resourcePrimKey, boolean main) - throws SystemException { - for (KBArticle kbArticle : findByR_M(resourcePrimKey, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_M(long resourcePrimKey, boolean main) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_R_M; - - Object[] finderArgs = new Object[] { resourcePrimKey, main }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_M_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_M_MAIN_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(main); - - 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(); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_M(long[] resourcePrimKeies, boolean main) - throws SystemException { - Object[] finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), main - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_M, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_M_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_M_MAIN_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(main); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_M, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - private static final String _FINDER_COLUMN_R_M_RESOURCEPRIMKEY_2 = "kbArticle.resourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_R_M_RESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_M_RESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_R_M_MAIN_2 = "kbArticle.main = ?"; - private static final String _FINDER_COLUMN_R_M_MAIN_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_M_MAIN_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_R_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByR_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByR_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - KBArticleModelImpl.RESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.STATUS_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_R_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByR_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByR_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the k b articles where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_S(long resourcePrimKey, int status) - throws SystemException { - return findByR_S(resourcePrimKey, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_S(long resourcePrimKey, int status, - int start, int end) throws SystemException { - return findByR_S(resourcePrimKey, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_S(long resourcePrimKey, int status, - 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_R_S; - finderArgs = new Object[] { resourcePrimKey, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_R_S; - finderArgs = new Object[] { - resourcePrimKey, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((resourcePrimKey != kbArticle.getResourcePrimKey()) || - (status != kbArticle.getStatus())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_S_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_S_First(long resourcePrimKey, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_S_First(resourcePrimKey, status, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_S_First(long resourcePrimKey, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByR_S(resourcePrimKey, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_S_Last(long resourcePrimKey, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_S_Last(resourcePrimKey, status, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_S_Last(long resourcePrimKey, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByR_S(resourcePrimKey, status); - - if (count == 0) { - return null; - } - - List list = findByR_S(resourcePrimKey, status, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByR_S_PrevAndNext(long kbArticleId, - long resourcePrimKey, int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByR_S_PrevAndNext(session, kbArticle, - resourcePrimKey, status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByR_S_PrevAndNext(session, kbArticle, - resourcePrimKey, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByR_S_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, int status, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_S_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_S_STATUS_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(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_S(long[] resourcePrimKeies, int status) - throws SystemException { - return findByR_S(resourcePrimKeies, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_S(long[] resourcePrimKeies, int status, - int start, int end) throws SystemException { - return findByR_S(resourcePrimKeies, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_S(long[] resourcePrimKeies, int status, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((resourcePrimKeies != null) && (resourcePrimKeies.length == 1)) { - return findByR_S(resourcePrimKeies[0], status, start, end, - orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), status - }; - } - else { - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_S, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!ArrayUtil.contains(resourcePrimKeies, - kbArticle.getResourcePrimKey()) || - (status != kbArticle.getStatus())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_S_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_S_STATUS_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_S, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and status = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByR_S(long resourcePrimKey, int status) - throws SystemException { - for (KBArticle kbArticle : findByR_S(resourcePrimKey, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_S(long resourcePrimKey, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_R_S; - - Object[] finderArgs = new Object[] { resourcePrimKey, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_S_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_S(long[] resourcePrimKeies, int status) - throws SystemException { - Object[] finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), status - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_S, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_S_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_S_STATUS_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(status); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_S, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - private static final String _FINDER_COLUMN_R_S_RESOURCEPRIMKEY_2 = "kbArticle.resourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_R_S_RESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_S_RESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_R_S_STATUS_2 = "kbArticle.status = ?"; - private static final String _FINDER_COLUMN_R_S_STATUS_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_S_STATUS_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_L", - 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_G_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_L", - new String[] { Long.class.getName(), Boolean.class.getName() }, - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.LATEST_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_L", - new String[] { Long.class.getName(), Boolean.class.getName() }); - - /** - * Returns all the k b articles where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_L(long groupId, boolean latest) - throws SystemException { - return findByG_L(groupId, latest, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_L(long groupId, boolean latest, int start, - int end) throws SystemException { - return findByG_L(groupId, latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_L(long groupId, boolean latest, 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_G_L; - finderArgs = new Object[] { groupId, latest }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_L; - finderArgs = new Object[] { - groupId, latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (latest != kbArticle.getLatest())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_L_LATEST_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_L_First(long groupId, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_L_First(groupId, latest, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_L_First(long groupId, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_L(groupId, latest, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_L_Last(long groupId, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_L_Last(groupId, latest, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_L_Last(long groupId, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_L(groupId, latest); - - if (count == 0) { - return null; - } - - List list = findByG_L(groupId, latest, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_L_PrevAndNext(long kbArticleId, long groupId, - boolean latest, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_L_PrevAndNext(session, kbArticle, groupId, - latest, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByG_L_PrevAndNext(session, kbArticle, groupId, - latest, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_L_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, boolean latest, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_L_LATEST_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(KBArticleModelImpl.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(groupId); - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_L(long groupId, boolean latest) - throws SystemException { - return filterFindByG_L(groupId, latest, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_L(long groupId, boolean latest, - int start, int end) throws SystemException { - return filterFindByG_L(groupId, latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_L(long groupId, boolean latest, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_L(groupId, latest, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_L_LATEST_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(latest); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_L_PrevAndNext(long kbArticleId, - long groupId, boolean latest, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_L_PrevAndNext(kbArticleId, groupId, latest, - orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_L_PrevAndNext(session, kbArticle, groupId, - latest, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByG_L_PrevAndNext(session, kbArticle, groupId, - latest, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_L_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, boolean latest, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_L_LATEST_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where groupId = ? and latest = ? from the database. - * - * @param groupId the group ID - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_L(long groupId, boolean latest) - throws SystemException { - for (KBArticle kbArticle : findByG_L(groupId, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_L(long groupId, boolean latest) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_L; - - Object[] finderArgs = new Object[] { groupId, latest }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_L_LATEST_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(latest); - - 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(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and latest = ?. - * - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_L(long groupId, boolean latest) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_L(groupId, latest); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_L_LATEST_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(latest); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_L_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_L_LATEST_2 = "kbArticle.latest = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_M", - 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_G_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_M", - new String[] { Long.class.getName(), Boolean.class.getName() }, - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.MAIN_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_M", - new String[] { Long.class.getName(), Boolean.class.getName() }); - - /** - * Returns all the k b articles where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_M(long groupId, boolean main) - throws SystemException { - return findByG_M(groupId, main, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_M(long groupId, boolean main, int start, - int end) throws SystemException { - return findByG_M(groupId, main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_M(long groupId, boolean main, 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_G_M; - finderArgs = new Object[] { groupId, main }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_M; - finderArgs = new Object[] { - groupId, main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (main != kbArticle.getMain())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_M_MAIN_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_M_First(long groupId, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_M_First(groupId, main, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_M_First(long groupId, boolean main, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_M(groupId, main, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_M_Last(long groupId, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_M_Last(groupId, main, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_M_Last(long groupId, boolean main, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_M(groupId, main); - - if (count == 0) { - return null; - } - - List list = findByG_M(groupId, main, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_M_PrevAndNext(long kbArticleId, long groupId, - boolean main, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_M_PrevAndNext(session, kbArticle, groupId, main, - orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByG_M_PrevAndNext(session, kbArticle, groupId, main, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_M_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, boolean main, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_M_MAIN_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(KBArticleModelImpl.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(groupId); - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_M(long groupId, boolean main) - throws SystemException { - return filterFindByG_M(groupId, main, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_M(long groupId, boolean main, - int start, int end) throws SystemException { - return filterFindByG_M(groupId, main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_M(long groupId, boolean main, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_M(groupId, main, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_M_MAIN_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(main); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_M_PrevAndNext(long kbArticleId, - long groupId, boolean main, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_M_PrevAndNext(kbArticleId, groupId, main, - orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_M_PrevAndNext(session, kbArticle, groupId, - main, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByG_M_PrevAndNext(session, kbArticle, groupId, - main, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_M_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, boolean main, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_M_MAIN_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where groupId = ? and main = ? from the database. - * - * @param groupId the group ID - * @param main the main - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_M(long groupId, boolean main) - throws SystemException { - for (KBArticle kbArticle : findByG_M(groupId, main, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_M(long groupId, boolean main) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_M; - - Object[] finderArgs = new Object[] { groupId, main }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_M_MAIN_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(main); - - 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(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and main = ?. - * - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_M(long groupId, boolean main) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_M(groupId, main); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_M_MAIN_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(main); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_M_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_M_MAIN_2 = "kbArticle.main = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.STATUS_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the k b articles where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status) - throws SystemException { - return findByG_S(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, int start, - int end) throws SystemException { - return findByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, 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_G_S; - finderArgs = new Object[] { groupId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S; - finderArgs = new Object[] { - groupId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (status != kbArticle.getStatus())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_S_First(groupId, status, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_S(groupId, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_S_Last(groupId, status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_S(groupId, status); - - if (count == 0) { - return null; - } - - List list = findByG_S(groupId, status, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_S_PrevAndNext(long kbArticleId, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_S_PrevAndNext(session, kbArticle, groupId, - status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByG_S_PrevAndNext(session, kbArticle, groupId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_S_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, int status, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_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(KBArticleModelImpl.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(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status) - throws SystemException { - return filterFindByG_S(groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end) throws SystemException { - return filterFindByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_S(long groupId, int status, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S(groupId, status, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_S_PrevAndNext(long kbArticleId, - long groupId, int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_S_PrevAndNext(kbArticleId, groupId, status, - orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_S_PrevAndNext(session, kbArticle, groupId, - status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByG_S_PrevAndNext(session, kbArticle, groupId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_S_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, int status, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_S(long groupId, int status) throws SystemException { - for (KBArticle kbArticle : findByG_S(groupId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_S(long groupId, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_S; - - Object[] finderArgs = new Object[] { groupId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_S(long groupId, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_S(groupId, status); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_S_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_S_STATUS_2 = "kbArticle.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_C_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByC_L", - 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_C_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByC_L", - new String[] { Long.class.getName(), Boolean.class.getName() }, - KBArticleModelImpl.COMPANYID_COLUMN_BITMASK | - KBArticleModelImpl.LATEST_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_C_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByC_L", - new String[] { Long.class.getName(), Boolean.class.getName() }); - - /** - * Returns all the k b articles where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_L(long companyId, boolean latest) - throws SystemException { - return findByC_L(companyId, latest, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where companyId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_L(long companyId, boolean latest, int start, - int end) throws SystemException { - return findByC_L(companyId, latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where companyId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_L(long companyId, boolean latest, 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_C_L; - finderArgs = new Object[] { companyId, latest }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_C_L; - finderArgs = new Object[] { - companyId, latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((companyId != kbArticle.getCompanyId()) || - (latest != kbArticle.getLatest())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_C_L_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_L_LATEST_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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); - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByC_L_First(long companyId, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByC_L_First(companyId, latest, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("companyId="); - msg.append(companyId); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByC_L_First(long companyId, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - List list = findByC_L(companyId, latest, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByC_L_Last(long companyId, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByC_L_Last(companyId, latest, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("companyId="); - msg.append(companyId); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByC_L_Last(long companyId, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - int count = countByC_L(companyId, latest); - - if (count == 0) { - return null; - } - - List list = findByC_L(companyId, latest, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where companyId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param companyId the company ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByC_L_PrevAndNext(long kbArticleId, long companyId, - boolean latest, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByC_L_PrevAndNext(session, kbArticle, companyId, - latest, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByC_L_PrevAndNext(session, kbArticle, companyId, - latest, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByC_L_PrevAndNext(Session session, - KBArticle kbArticle, long companyId, boolean latest, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_C_L_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_L_LATEST_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(KBArticleModelImpl.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); - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where companyId = ? and latest = ? from the database. - * - * @param companyId the company ID - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByC_L(long companyId, boolean latest) - throws SystemException { - for (KBArticle kbArticle : findByC_L(companyId, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where companyId = ? and latest = ?. - * - * @param companyId the company ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByC_L(long companyId, boolean latest) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_C_L; - - Object[] finderArgs = new Object[] { companyId, latest }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_C_L_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_L_LATEST_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(companyId); - - qPos.add(latest); - - 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_C_L_COMPANYID_2 = "kbArticle.companyId = ? AND "; - private static final String _FINDER_COLUMN_C_L_LATEST_2 = "kbArticle.latest = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_C_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByC_M", - 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_C_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByC_M", - new String[] { Long.class.getName(), Boolean.class.getName() }, - KBArticleModelImpl.COMPANYID_COLUMN_BITMASK | - KBArticleModelImpl.MAIN_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_C_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByC_M", - new String[] { Long.class.getName(), Boolean.class.getName() }); - - /** - * Returns all the k b articles where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_M(long companyId, boolean main) - throws SystemException { - return findByC_M(companyId, main, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the k b articles where companyId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_M(long companyId, boolean main, int start, - int end) throws SystemException { - return findByC_M(companyId, main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where companyId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_M(long companyId, boolean main, 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_C_M; - finderArgs = new Object[] { companyId, main }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_C_M; - finderArgs = new Object[] { - companyId, main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((companyId != kbArticle.getCompanyId()) || - (main != kbArticle.getMain())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_C_M_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_M_MAIN_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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); - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByC_M_First(long companyId, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByC_M_First(companyId, main, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("companyId="); - msg.append(companyId); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByC_M_First(long companyId, boolean main, - OrderByComparator orderByComparator) throws SystemException { - List list = findByC_M(companyId, main, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByC_M_Last(long companyId, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByC_M_Last(companyId, main, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("companyId="); - msg.append(companyId); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByC_M_Last(long companyId, boolean main, - OrderByComparator orderByComparator) throws SystemException { - int count = countByC_M(companyId, main); - - if (count == 0) { - return null; - } - - List list = findByC_M(companyId, main, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where companyId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param companyId the company ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByC_M_PrevAndNext(long kbArticleId, long companyId, - boolean main, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByC_M_PrevAndNext(session, kbArticle, companyId, - main, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByC_M_PrevAndNext(session, kbArticle, companyId, - main, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByC_M_PrevAndNext(Session session, - KBArticle kbArticle, long companyId, boolean main, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_C_M_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_M_MAIN_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(KBArticleModelImpl.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); - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where companyId = ? and main = ? from the database. - * - * @param companyId the company ID - * @param main the main - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByC_M(long companyId, boolean main) - throws SystemException { - for (KBArticle kbArticle : findByC_M(companyId, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where companyId = ? and main = ?. - * - * @param companyId the company ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByC_M(long companyId, boolean main) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_C_M; - - Object[] finderArgs = new Object[] { companyId, main }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_C_M_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_M_MAIN_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(companyId); - - qPos.add(main); - - 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_C_M_COMPANYID_2 = "kbArticle.companyId = ? AND "; - private static final String _FINDER_COLUMN_C_M_MAIN_2 = "kbArticle.main = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_C_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByC_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByC_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - KBArticleModelImpl.COMPANYID_COLUMN_BITMASK | - KBArticleModelImpl.STATUS_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_C_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByC_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the k b articles where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_S(long companyId, int status) - throws SystemException { - return findByC_S(companyId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where companyId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_S(long companyId, int status, int start, - int end) throws SystemException { - return findByC_S(companyId, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where companyId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_S(long companyId, int status, 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_C_S; - finderArgs = new Object[] { companyId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_C_S; - finderArgs = new Object[] { - companyId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((companyId != kbArticle.getCompanyId()) || - (status != kbArticle.getStatus())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_C_S_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByC_S_First(long companyId, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByC_S_First(companyId, status, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("companyId="); - msg.append(companyId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByC_S_First(long companyId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByC_S(companyId, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByC_S_Last(long companyId, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByC_S_Last(companyId, status, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("companyId="); - msg.append(companyId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByC_S_Last(long companyId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByC_S(companyId, status); - - if (count == 0) { - return null; - } - - List list = findByC_S(companyId, status, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where companyId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param companyId the company ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByC_S_PrevAndNext(long kbArticleId, long companyId, - int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByC_S_PrevAndNext(session, kbArticle, companyId, - status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByC_S_PrevAndNext(session, kbArticle, companyId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByC_S_PrevAndNext(Session session, - KBArticle kbArticle, long companyId, int status, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_C_S_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_S_STATUS_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(KBArticleModelImpl.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); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where companyId = ? and status = ? from the database. - * - * @param companyId the company ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByC_S(long companyId, int status) - throws SystemException { - for (KBArticle kbArticle : findByC_S(companyId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where companyId = ? and status = ?. - * - * @param companyId the company ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByC_S(long companyId, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_C_S; - - Object[] finderArgs = new Object[] { companyId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_C_S_COMPANYID_2); - - query.append(_FINDER_COLUMN_C_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(companyId); - - qPos.add(status); - - 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_C_S_COMPANYID_2 = "kbArticle.companyId = ? AND "; - private static final String _FINDER_COLUMN_C_S_STATUS_2 = "kbArticle.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_P_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByP_L", - 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_P_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByP_L", - new String[] { Long.class.getName(), Boolean.class.getName() }, - KBArticleModelImpl.PARENTRESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.LATEST_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_P_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByP_L", - new String[] { Long.class.getName(), Boolean.class.getName() }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByP_L", - new String[] { Long.class.getName(), Boolean.class.getName() }); - - /** - * Returns all the k b articles where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_L(long parentResourcePrimKey, boolean latest) - throws SystemException { - return findByP_L(parentResourcePrimKey, latest, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_L(long parentResourcePrimKey, - boolean latest, int start, int end) throws SystemException { - return findByP_L(parentResourcePrimKey, latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_L(long parentResourcePrimKey, - boolean latest, 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_P_L; - finderArgs = new Object[] { parentResourcePrimKey, latest }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_P_L; - finderArgs = new Object[] { - parentResourcePrimKey, latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - (latest != kbArticle.getLatest())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_P_L_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_P_L_LATEST_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(parentResourcePrimKey); - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByP_L_First(long parentResourcePrimKey, - boolean latest, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByP_L_First(parentResourcePrimKey, latest, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByP_L_First(long parentResourcePrimKey, - boolean latest, OrderByComparator orderByComparator) - throws SystemException { - List list = findByP_L(parentResourcePrimKey, latest, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByP_L_Last(long parentResourcePrimKey, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByP_L_Last(parentResourcePrimKey, latest, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByP_L_Last(long parentResourcePrimKey, - boolean latest, OrderByComparator orderByComparator) - throws SystemException { - int count = countByP_L(parentResourcePrimKey, latest); - - if (count == 0) { - return null; - } - - List list = findByP_L(parentResourcePrimKey, latest, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where parentResourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByP_L_PrevAndNext(long kbArticleId, - long parentResourcePrimKey, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByP_L_PrevAndNext(session, kbArticle, - parentResourcePrimKey, latest, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByP_L_PrevAndNext(session, kbArticle, - parentResourcePrimKey, latest, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByP_L_PrevAndNext(Session session, - KBArticle kbArticle, long parentResourcePrimKey, boolean latest, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_P_L_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_P_L_LATEST_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(KBArticleModelImpl.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(parentResourcePrimKey); - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles where parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_L(long[] parentResourcePrimKeies, - boolean latest) throws SystemException { - return findByP_L(parentResourcePrimKeies, latest, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_L(long[] parentResourcePrimKeies, - boolean latest, int start, int end) throws SystemException { - return findByP_L(parentResourcePrimKeies, latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_L(long[] parentResourcePrimKeies, - boolean latest, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((parentResourcePrimKeies != null) && - (parentResourcePrimKeies.length == 1)) { - return findByP_L(parentResourcePrimKeies[0], latest, start, end, - orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - StringUtil.merge(parentResourcePrimKeies), latest - }; - } - else { - finderArgs = new Object[] { - StringUtil.merge(parentResourcePrimKeies), latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_P_L, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!ArrayUtil.contains(parentResourcePrimKeies, - kbArticle.getParentResourcePrimKey()) || - (latest != kbArticle.getLatest())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_P_L_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_P_L_LATEST_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_P_L, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_P_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where parentResourcePrimKey = ? and latest = ? from the database. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByP_L(long parentResourcePrimKey, boolean latest) - throws SystemException { - for (KBArticle kbArticle : findByP_L(parentResourcePrimKey, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = ? and latest = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByP_L(long parentResourcePrimKey, boolean latest) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_P_L; - - Object[] finderArgs = new Object[] { parentResourcePrimKey, latest }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_P_L_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_P_L_LATEST_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(parentResourcePrimKey); - - qPos.add(latest); - - 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(); - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = any ? and latest = ?. - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByP_L(long[] parentResourcePrimKeies, boolean latest) - throws SystemException { - Object[] finderArgs = new Object[] { - StringUtil.merge(parentResourcePrimKeies), latest - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_L, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_P_L_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_P_L_LATEST_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(latest); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_L, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - private static final String _FINDER_COLUMN_P_L_PARENTRESOURCEPRIMKEY_2 = "kbArticle.parentResourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_P_L_PARENTRESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_P_L_PARENTRESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_P_L_LATEST_2 = "kbArticle.latest = ?"; - private static final String _FINDER_COLUMN_P_L_LATEST_5 = "(" + - removeConjunction(_FINDER_COLUMN_P_L_LATEST_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_P_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByP_M", - 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_P_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByP_M", - new String[] { Long.class.getName(), Boolean.class.getName() }, - KBArticleModelImpl.PARENTRESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.MAIN_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_P_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByP_M", - new String[] { Long.class.getName(), Boolean.class.getName() }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByP_M", - new String[] { Long.class.getName(), Boolean.class.getName() }); - - /** - * Returns all the k b articles where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_M(long parentResourcePrimKey, boolean main) - throws SystemException { - return findByP_M(parentResourcePrimKey, main, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_M(long parentResourcePrimKey, boolean main, - int start, int end) throws SystemException { - return findByP_M(parentResourcePrimKey, main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_M(long parentResourcePrimKey, boolean main, - 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_P_M; - finderArgs = new Object[] { parentResourcePrimKey, main }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_P_M; - finderArgs = new Object[] { - parentResourcePrimKey, main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - (main != kbArticle.getMain())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_P_M_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_P_M_MAIN_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(parentResourcePrimKey); - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByP_M_First(long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByP_M_First(parentResourcePrimKey, main, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByP_M_First(long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) throws SystemException { - List list = findByP_M(parentResourcePrimKey, main, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByP_M_Last(long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByP_M_Last(parentResourcePrimKey, main, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByP_M_Last(long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) throws SystemException { - int count = countByP_M(parentResourcePrimKey, main); - - if (count == 0) { - return null; - } - - List list = findByP_M(parentResourcePrimKey, main, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where parentResourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByP_M_PrevAndNext(long kbArticleId, - long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByP_M_PrevAndNext(session, kbArticle, - parentResourcePrimKey, main, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByP_M_PrevAndNext(session, kbArticle, - parentResourcePrimKey, main, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByP_M_PrevAndNext(Session session, - KBArticle kbArticle, long parentResourcePrimKey, boolean main, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_P_M_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_P_M_MAIN_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(KBArticleModelImpl.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(parentResourcePrimKey); - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles where parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_M(long[] parentResourcePrimKeies, - boolean main) throws SystemException { - return findByP_M(parentResourcePrimKeies, main, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_M(long[] parentResourcePrimKeies, - boolean main, int start, int end) throws SystemException { - return findByP_M(parentResourcePrimKeies, main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_M(long[] parentResourcePrimKeies, - boolean main, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((parentResourcePrimKeies != null) && - (parentResourcePrimKeies.length == 1)) { - return findByP_M(parentResourcePrimKeies[0], main, start, end, - orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - StringUtil.merge(parentResourcePrimKeies), main - }; - } - else { - finderArgs = new Object[] { - StringUtil.merge(parentResourcePrimKeies), main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_P_M, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!ArrayUtil.contains(parentResourcePrimKeies, - kbArticle.getParentResourcePrimKey()) || - (main != kbArticle.getMain())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_P_M_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_P_M_MAIN_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_P_M, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_P_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where parentResourcePrimKey = ? and main = ? from the database. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByP_M(long parentResourcePrimKey, boolean main) - throws SystemException { - for (KBArticle kbArticle : findByP_M(parentResourcePrimKey, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = ? and main = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByP_M(long parentResourcePrimKey, boolean main) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_P_M; - - Object[] finderArgs = new Object[] { parentResourcePrimKey, main }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_P_M_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_P_M_MAIN_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(parentResourcePrimKey); - - qPos.add(main); - - 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(); - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = any ? and main = ?. - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByP_M(long[] parentResourcePrimKeies, boolean main) - throws SystemException { - Object[] finderArgs = new Object[] { - StringUtil.merge(parentResourcePrimKeies), main - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_M, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_P_M_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_P_M_MAIN_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(main); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_M, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - private static final String _FINDER_COLUMN_P_M_PARENTRESOURCEPRIMKEY_2 = "kbArticle.parentResourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_P_M_PARENTRESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_P_M_PARENTRESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_P_M_MAIN_2 = "kbArticle.main = ?"; - private static final String _FINDER_COLUMN_P_M_MAIN_5 = "(" + - removeConjunction(_FINDER_COLUMN_P_M_MAIN_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_P_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByP_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByP_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - KBArticleModelImpl.PARENTRESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.STATUS_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_P_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByP_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByP_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the k b articles where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_S(long parentResourcePrimKey, int status) - throws SystemException { - return findByP_S(parentResourcePrimKey, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_S(long parentResourcePrimKey, int status, - int start, int end) throws SystemException { - return findByP_S(parentResourcePrimKey, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_S(long parentResourcePrimKey, int status, - 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_P_S; - finderArgs = new Object[] { parentResourcePrimKey, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_P_S; - finderArgs = new Object[] { - parentResourcePrimKey, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - (status != kbArticle.getStatus())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_P_S_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_P_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(parentResourcePrimKey); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByP_S_First(long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByP_S_First(parentResourcePrimKey, status, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByP_S_First(long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByP_S(parentResourcePrimKey, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByP_S_Last(long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByP_S_Last(parentResourcePrimKey, status, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByP_S_Last(long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByP_S(parentResourcePrimKey, status); - - if (count == 0) { - return null; - } - - List list = findByP_S(parentResourcePrimKey, status, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where parentResourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByP_S_PrevAndNext(long kbArticleId, - long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByP_S_PrevAndNext(session, kbArticle, - parentResourcePrimKey, status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByP_S_PrevAndNext(session, kbArticle, - parentResourcePrimKey, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByP_S_PrevAndNext(Session session, - KBArticle kbArticle, long parentResourcePrimKey, int status, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_P_S_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_P_S_STATUS_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(KBArticleModelImpl.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(parentResourcePrimKey); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles where parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_S(long[] parentResourcePrimKeies, int status) - throws SystemException { - return findByP_S(parentResourcePrimKeies, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_S(long[] parentResourcePrimKeies, - int status, int start, int end) throws SystemException { - return findByP_S(parentResourcePrimKeies, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByP_S(long[] parentResourcePrimKeies, - int status, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((parentResourcePrimKeies != null) && - (parentResourcePrimKeies.length == 1)) { - return findByP_S(parentResourcePrimKeies[0], status, start, end, - orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - StringUtil.merge(parentResourcePrimKeies), status - }; - } - else { - finderArgs = new Object[] { - StringUtil.merge(parentResourcePrimKeies), status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_P_S, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!ArrayUtil.contains(parentResourcePrimKeies, - kbArticle.getParentResourcePrimKey()) || - (status != kbArticle.getStatus())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_P_S_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_P_S_STATUS_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_P_S, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_P_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where parentResourcePrimKey = ? and status = ? from the database. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByP_S(long parentResourcePrimKey, int status) - throws SystemException { - for (KBArticle kbArticle : findByP_S(parentResourcePrimKey, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = ? and status = ?. - * - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByP_S(long parentResourcePrimKey, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_P_S; - - Object[] finderArgs = new Object[] { parentResourcePrimKey, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_P_S_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_P_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(parentResourcePrimKey); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of k b articles where parentResourcePrimKey = any ? and status = ?. - * - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByP_S(long[] parentResourcePrimKeies, int status) - throws SystemException { - Object[] finderArgs = new Object[] { - StringUtil.merge(parentResourcePrimKeies), status - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_S, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_P_S_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_P_S_STATUS_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(status); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_S, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_P_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - private static final String _FINDER_COLUMN_P_S_PARENTRESOURCEPRIMKEY_2 = "kbArticle.parentResourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_P_S_PARENTRESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_P_S_PARENTRESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_P_S_STATUS_2 = "kbArticle.status = ?"; - private static final String _FINDER_COLUMN_P_S_STATUS_5 = "(" + - removeConjunction(_FINDER_COLUMN_P_S_STATUS_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByR_G_L", - 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_R_G_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByR_G_L", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }, - KBArticleModelImpl.RESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.LATEST_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_R_G_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByR_G_L", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByR_G_L", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }); - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_L(long resourcePrimKey, long groupId, - boolean latest) throws SystemException { - return findByR_G_L(resourcePrimKey, groupId, latest, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_L(long resourcePrimKey, long groupId, - boolean latest, int start, int end) throws SystemException { - return findByR_G_L(resourcePrimKey, groupId, latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_L(long resourcePrimKey, long groupId, - boolean latest, 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_R_G_L; - finderArgs = new Object[] { resourcePrimKey, groupId, latest }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_L; - finderArgs = new Object[] { - resourcePrimKey, groupId, latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((resourcePrimKey != kbArticle.getResourcePrimKey()) || - (groupId != kbArticle.getGroupId()) || - (latest != kbArticle.getLatest())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_L_LATEST_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_G_L_First(long resourcePrimKey, long groupId, - boolean latest, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_G_L_First(resourcePrimKey, groupId, - latest, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_G_L_First(long resourcePrimKey, long groupId, - boolean latest, OrderByComparator orderByComparator) - throws SystemException { - List list = findByR_G_L(resourcePrimKey, groupId, latest, 0, - 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_G_L_Last(long resourcePrimKey, long groupId, - boolean latest, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_G_L_Last(resourcePrimKey, groupId, - latest, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_G_L_Last(long resourcePrimKey, long groupId, - boolean latest, OrderByComparator orderByComparator) - throws SystemException { - int count = countByR_G_L(resourcePrimKey, groupId, latest); - - if (count == 0) { - return null; - } - - List list = findByR_G_L(resourcePrimKey, groupId, latest, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByR_G_L_PrevAndNext(long kbArticleId, - long resourcePrimKey, long groupId, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByR_G_L_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, latest, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByR_G_L_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, latest, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByR_G_L_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, long groupId, - boolean latest, 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_L_LATEST_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(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_L(long resourcePrimKey, - long groupId, boolean latest) throws SystemException { - return filterFindByR_G_L(resourcePrimKey, groupId, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_L(long resourcePrimKey, - long groupId, boolean latest, int start, int end) - throws SystemException { - return filterFindByR_G_L(resourcePrimKey, groupId, latest, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_L(long resourcePrimKey, - long groupId, boolean latest, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_L(resourcePrimKey, groupId, latest, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_L_LATEST_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(latest); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByR_G_L_PrevAndNext(long kbArticleId, - long resourcePrimKey, long groupId, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_L_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, latest, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByR_G_L_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, latest, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByR_G_L_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, latest, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByR_G_L_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, long groupId, - boolean latest, OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_L_LATEST_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_L(long[] resourcePrimKeies, - long groupId, boolean latest) throws SystemException { - return filterFindByR_G_L(resourcePrimKeies, groupId, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_L(long[] resourcePrimKeies, - long groupId, boolean latest, int start, int end) - throws SystemException { - return filterFindByR_G_L(resourcePrimKeies, groupId, latest, start, - end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_L(long[] resourcePrimKeies, - long groupId, boolean latest, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_L(resourcePrimKeies, groupId, latest, start, end, - orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_L_LATEST_5); - - conjunctionable = true; - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(latest); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_L(long[] resourcePrimKeies, long groupId, - boolean latest) throws SystemException { - return findByR_G_L(resourcePrimKeies, groupId, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_L(long[] resourcePrimKeies, long groupId, - boolean latest, int start, int end) throws SystemException { - return findByR_G_L(resourcePrimKeies, groupId, latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_L(long[] resourcePrimKeies, long groupId, - boolean latest, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((resourcePrimKeies != null) && (resourcePrimKeies.length == 1)) { - return findByR_G_L(resourcePrimKeies[0], groupId, latest, start, - end, orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), groupId, latest - }; - } - else { - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), groupId, latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_L, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!ArrayUtil.contains(resourcePrimKeies, - kbArticle.getResourcePrimKey()) || - (groupId != kbArticle.getGroupId()) || - (latest != kbArticle.getLatest())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_L_LATEST_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_L, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? and latest = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByR_G_L(long resourcePrimKey, long groupId, boolean latest) - throws SystemException { - for (KBArticle kbArticle : findByR_G_L(resourcePrimKey, groupId, - latest, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_G_L(long resourcePrimKey, long groupId, boolean latest) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_R_G_L; - - Object[] finderArgs = new Object[] { resourcePrimKey, groupId, latest }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_L_LATEST_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(latest); - - 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(); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_G_L(long[] resourcePrimKeies, long groupId, - boolean latest) throws SystemException { - Object[] finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), groupId, latest - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_L, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_L_LATEST_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(latest); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_L, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and latest = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByR_G_L(long resourcePrimKey, long groupId, - boolean latest) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByR_G_L(resourcePrimKey, groupId, latest); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_L_LATEST_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(latest); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and latest = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByR_G_L(long[] resourcePrimKeies, long groupId, - boolean latest) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByR_G_L(resourcePrimKeies, groupId, latest); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_L_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_L_LATEST_5); - - conjunctionable = true; - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(latest); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_2 = "kbArticle.resourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_G_L_RESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_R_G_L_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_R_G_L_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_G_L_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_R_G_L_LATEST_2 = "kbArticle.latest = ?"; - private static final String _FINDER_COLUMN_R_G_L_LATEST_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_G_L_LATEST_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByR_G_M", - 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_R_G_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByR_G_M", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }, - KBArticleModelImpl.RESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.MAIN_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_R_G_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByR_G_M", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByR_G_M", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }); - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_M(long resourcePrimKey, long groupId, - boolean main) throws SystemException { - return findByR_G_M(resourcePrimKey, groupId, main, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_M(long resourcePrimKey, long groupId, - boolean main, int start, int end) throws SystemException { - return findByR_G_M(resourcePrimKey, groupId, main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_M(long resourcePrimKey, long groupId, - boolean main, 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_R_G_M; - finderArgs = new Object[] { resourcePrimKey, groupId, main }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_M; - finderArgs = new Object[] { - resourcePrimKey, groupId, main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((resourcePrimKey != kbArticle.getResourcePrimKey()) || - (groupId != kbArticle.getGroupId()) || - (main != kbArticle.getMain())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_M_MAIN_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_G_M_First(long resourcePrimKey, long groupId, - boolean main, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_G_M_First(resourcePrimKey, groupId, - main, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_G_M_First(long resourcePrimKey, long groupId, - boolean main, OrderByComparator orderByComparator) - throws SystemException { - List list = findByR_G_M(resourcePrimKey, groupId, main, 0, - 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_G_M_Last(long resourcePrimKey, long groupId, - boolean main, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_G_M_Last(resourcePrimKey, groupId, main, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_G_M_Last(long resourcePrimKey, long groupId, - boolean main, OrderByComparator orderByComparator) - throws SystemException { - int count = countByR_G_M(resourcePrimKey, groupId, main); - - if (count == 0) { - return null; - } - - List list = findByR_G_M(resourcePrimKey, groupId, main, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByR_G_M_PrevAndNext(long kbArticleId, - long resourcePrimKey, long groupId, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByR_G_M_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, main, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByR_G_M_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, main, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByR_G_M_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, long groupId, boolean main, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_M_MAIN_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(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_M(long resourcePrimKey, - long groupId, boolean main) throws SystemException { - return filterFindByR_G_M(resourcePrimKey, groupId, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_M(long resourcePrimKey, - long groupId, boolean main, int start, int end) - throws SystemException { - return filterFindByR_G_M(resourcePrimKey, groupId, main, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_M(long resourcePrimKey, - long groupId, boolean main, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_M(resourcePrimKey, groupId, main, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_M_MAIN_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(main); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByR_G_M_PrevAndNext(long kbArticleId, - long resourcePrimKey, long groupId, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_M_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, main, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByR_G_M_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, main, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByR_G_M_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, main, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByR_G_M_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, long groupId, boolean main, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_M_MAIN_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_M(long[] resourcePrimKeies, - long groupId, boolean main) throws SystemException { - return filterFindByR_G_M(resourcePrimKeies, groupId, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_M(long[] resourcePrimKeies, - long groupId, boolean main, int start, int end) - throws SystemException { - return filterFindByR_G_M(resourcePrimKeies, groupId, main, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_M(long[] resourcePrimKeies, - long groupId, boolean main, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_M(resourcePrimKeies, groupId, main, start, end, - orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_M_MAIN_5); - - conjunctionable = true; - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(main); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_M(long[] resourcePrimKeies, long groupId, - boolean main) throws SystemException { - return findByR_G_M(resourcePrimKeies, groupId, main, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_M(long[] resourcePrimKeies, long groupId, - boolean main, int start, int end) throws SystemException { - return findByR_G_M(resourcePrimKeies, groupId, main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_M(long[] resourcePrimKeies, long groupId, - boolean main, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((resourcePrimKeies != null) && (resourcePrimKeies.length == 1)) { - return findByR_G_M(resourcePrimKeies[0], groupId, main, start, end, - orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), groupId, main - }; - } - else { - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), groupId, main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_M, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!ArrayUtil.contains(resourcePrimKeies, - kbArticle.getResourcePrimKey()) || - (groupId != kbArticle.getGroupId()) || - (main != kbArticle.getMain())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_M_MAIN_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_M, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? and main = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByR_G_M(long resourcePrimKey, long groupId, boolean main) - throws SystemException { - for (KBArticle kbArticle : findByR_G_M(resourcePrimKey, groupId, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_G_M(long resourcePrimKey, long groupId, boolean main) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_R_G_M; - - Object[] finderArgs = new Object[] { resourcePrimKey, groupId, main }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_M_MAIN_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(main); - - 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(); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and groupId = ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_G_M(long[] resourcePrimKeies, long groupId, boolean main) - throws SystemException { - Object[] finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), groupId, main - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_M, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_M_MAIN_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(main); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_M, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and main = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByR_G_M(long resourcePrimKey, long groupId, - boolean main) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByR_G_M(resourcePrimKey, groupId, main); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_M_MAIN_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(main); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and main = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByR_G_M(long[] resourcePrimKeies, long groupId, - boolean main) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByR_G_M(resourcePrimKeies, groupId, main); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_M_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_M_MAIN_5); - - conjunctionable = true; - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(main); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_2 = "kbArticle.resourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_G_M_RESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_R_G_M_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_R_G_M_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_G_M_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_R_G_M_MAIN_2 = "kbArticle.main = ?"; - private static final String _FINDER_COLUMN_R_G_M_MAIN_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_G_M_MAIN_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByR_G_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByR_G_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }, - KBArticleModelImpl.RESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.STATUS_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_R_G_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByR_G_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByR_G_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }); - - /** - * Returns all the k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_S(long resourcePrimKey, long groupId, - int status) throws SystemException { - return findByR_G_S(resourcePrimKey, groupId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_S(long resourcePrimKey, long groupId, - int status, int start, int end) throws SystemException { - return findByR_G_S(resourcePrimKey, groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_S(long resourcePrimKey, long groupId, - int status, 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_R_G_S; - finderArgs = new Object[] { resourcePrimKey, groupId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_S; - finderArgs = new Object[] { - resourcePrimKey, groupId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((resourcePrimKey != kbArticle.getResourcePrimKey()) || - (groupId != kbArticle.getGroupId()) || - (status != kbArticle.getStatus())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_G_S_First(long resourcePrimKey, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_G_S_First(resourcePrimKey, groupId, - status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_G_S_First(long resourcePrimKey, long groupId, - int status, OrderByComparator orderByComparator) - throws SystemException { - List list = findByR_G_S(resourcePrimKey, groupId, status, 0, - 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByR_G_S_Last(long resourcePrimKey, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByR_G_S_Last(resourcePrimKey, groupId, - status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("resourcePrimKey="); - msg.append(resourcePrimKey); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByR_G_S_Last(long resourcePrimKey, long groupId, - int status, OrderByComparator orderByComparator) - throws SystemException { - int count = countByR_G_S(resourcePrimKey, groupId, status); - - if (count == 0) { - return null; - } - - List list = findByR_G_S(resourcePrimKey, groupId, status, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByR_G_S_PrevAndNext(long kbArticleId, - long resourcePrimKey, long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByR_G_S_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByR_G_S_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByR_G_S_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, long groupId, int status, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_S_STATUS_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(KBArticleModelImpl.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(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_S(long resourcePrimKey, - long groupId, int status) throws SystemException { - return filterFindByR_G_S(resourcePrimKey, groupId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_S(long resourcePrimKey, - long groupId, int status, int start, int end) throws SystemException { - return filterFindByR_G_S(resourcePrimKey, groupId, status, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_S(long resourcePrimKey, - long groupId, int status, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_S(resourcePrimKey, groupId, status, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByR_G_S_PrevAndNext(long kbArticleId, - long resourcePrimKey, long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_S_PrevAndNext(kbArticleId, resourcePrimKey, - groupId, status, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByR_G_S_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByR_G_S_PrevAndNext(session, kbArticle, - resourcePrimKey, groupId, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByR_G_S_PrevAndNext(Session session, - KBArticle kbArticle, long resourcePrimKey, long groupId, int status, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_S(long[] resourcePrimKeies, - long groupId, int status) throws SystemException { - return filterFindByR_G_S(resourcePrimKeies, groupId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_S(long[] resourcePrimKeies, - long groupId, int status, int start, int end) throws SystemException { - return filterFindByR_G_S(resourcePrimKeies, groupId, status, start, - end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByR_G_S(long[] resourcePrimKeies, - long groupId, int status, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByR_G_S(resourcePrimKeies, groupId, status, start, end, - orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_S_STATUS_5); - - conjunctionable = true; - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_S(long[] resourcePrimKeies, long groupId, - int status) throws SystemException { - return findByR_G_S(resourcePrimKeies, groupId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_S(long[] resourcePrimKeies, long groupId, - int status, int start, int end) throws SystemException { - return findByR_G_S(resourcePrimKeies, groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByR_G_S(long[] resourcePrimKeies, long groupId, - int status, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((resourcePrimKeies != null) && (resourcePrimKeies.length == 1)) { - return findByR_G_S(resourcePrimKeies[0], groupId, status, start, - end, orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), groupId, status - }; - } - else { - finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), groupId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_S, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if (!ArrayUtil.contains(resourcePrimKeies, - kbArticle.getResourcePrimKey()) || - (groupId != kbArticle.getGroupId()) || - (status != kbArticle.getStatus())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_S_STATUS_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_S, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_R_G_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where resourcePrimKey = ? and groupId = ? and status = ? from the database. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByR_G_S(long resourcePrimKey, long groupId, int status) - throws SystemException { - for (KBArticle kbArticle : findByR_G_S(resourcePrimKey, groupId, - status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_G_S(long resourcePrimKey, long groupId, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_R_G_S; - - Object[] finderArgs = new Object[] { resourcePrimKey, groupId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of k b articles where resourcePrimKey = any ? and groupId = ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByR_G_S(long[] resourcePrimKeies, long groupId, int status) - throws SystemException { - Object[] finderArgs = new Object[] { - StringUtil.merge(resourcePrimKeies), groupId, status - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_S, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_S_STATUS_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(status); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_S, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_R_G_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = ? and groupId = ? and status = ?. - * - * @param resourcePrimKey the resource prim key - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByR_G_S(long resourcePrimKey, long groupId, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByR_G_S(resourcePrimKey, groupId, status); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_R_G_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(resourcePrimKey); - - qPos.add(groupId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where resourcePrimKey = any ? and groupId = ? and status = ?. - * - * @param resourcePrimKeies the resource prim keies - * @param groupId the group ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByR_G_S(long[] resourcePrimKeies, long groupId, - int status) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByR_G_S(resourcePrimKeies, groupId, status); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if ((resourcePrimKeies == null) || (resourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < resourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_5); - - if ((i + 1) < resourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_S_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_R_G_S_STATUS_5); - - conjunctionable = true; - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - if (resourcePrimKeies != null) { - qPos.add(resourcePrimKeies); - } - - qPos.add(groupId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_2 = "kbArticle.resourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_G_S_RESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_R_G_S_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_R_G_S_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_G_S_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_R_G_S_STATUS_2 = "kbArticle.status = ?"; - private static final String _FINDER_COLUMN_R_G_S_STATUS_5 = "(" + - removeConjunction(_FINDER_COLUMN_R_G_S_STATUS_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_P_L", - 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_G_P_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_P_L", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }, - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.PARENTRESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.LATEST_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_P_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_P_L", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_P_L", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }); - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_L(long groupId, - long parentResourcePrimKey, boolean latest) throws SystemException { - return findByG_P_L(groupId, parentResourcePrimKey, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_L(long groupId, - long parentResourcePrimKey, boolean latest, int start, int end) - throws SystemException { - return findByG_P_L(groupId, parentResourcePrimKey, latest, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_L(long groupId, - long parentResourcePrimKey, boolean latest, 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_G_P_L; - finderArgs = new Object[] { groupId, parentResourcePrimKey, latest }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_L; - finderArgs = new Object[] { - groupId, parentResourcePrimKey, latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - (latest != kbArticle.getLatest())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_L_LATEST_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_L_First(long groupId, - long parentResourcePrimKey, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_L_First(groupId, - parentResourcePrimKey, latest, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_L_First(long groupId, - long parentResourcePrimKey, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_P_L(groupId, parentResourcePrimKey, - latest, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_L_Last(long groupId, long parentResourcePrimKey, - boolean latest, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_L_Last(groupId, parentResourcePrimKey, - latest, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_L_Last(long groupId, - long parentResourcePrimKey, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_P_L(groupId, parentResourcePrimKey, latest); - - if (count == 0) { - return null; - } - - List list = findByG_P_L(groupId, parentResourcePrimKey, - latest, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_P_L_PrevAndNext(long kbArticleId, long groupId, - long parentResourcePrimKey, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_P_L_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, latest, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByG_P_L_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, latest, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_P_L_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - boolean latest, 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_L_LATEST_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(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_L(long groupId, - long parentResourcePrimKey, boolean latest) throws SystemException { - return filterFindByG_P_L(groupId, parentResourcePrimKey, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_L(long groupId, - long parentResourcePrimKey, boolean latest, int start, int end) - throws SystemException { - return filterFindByG_P_L(groupId, parentResourcePrimKey, latest, start, - end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_L(long groupId, - long parentResourcePrimKey, boolean latest, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_L(groupId, parentResourcePrimKey, latest, start, - end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_L_LATEST_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(latest); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_P_L_PrevAndNext(long kbArticleId, - long groupId, long parentResourcePrimKey, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_L_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, latest, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_P_L_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, latest, orderByComparator, - true); - - array[1] = kbArticle; - - array[2] = filterGetByG_P_L_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, latest, orderByComparator, - false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_P_L_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - boolean latest, OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_L_LATEST_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_L(long groupId, - long[] parentResourcePrimKeies, boolean latest) - throws SystemException { - return filterFindByG_P_L(groupId, parentResourcePrimKeies, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_L(long groupId, - long[] parentResourcePrimKeies, boolean latest, int start, int end) - throws SystemException { - return filterFindByG_P_L(groupId, parentResourcePrimKeies, latest, - start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_L(long groupId, - long[] parentResourcePrimKeies, boolean latest, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_L(groupId, parentResourcePrimKeies, latest, start, - end, orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_L_LATEST_5); - - conjunctionable = true; - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(latest); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_L(long groupId, - long[] parentResourcePrimKeies, boolean latest) - throws SystemException { - return findByG_P_L(groupId, parentResourcePrimKeies, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_L(long groupId, - long[] parentResourcePrimKeies, boolean latest, int start, int end) - throws SystemException { - return findByG_P_L(groupId, parentResourcePrimKeies, latest, start, - end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_L(long groupId, - long[] parentResourcePrimKeies, boolean latest, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if ((parentResourcePrimKeies != null) && - (parentResourcePrimKeies.length == 1)) { - return findByG_P_L(groupId, parentResourcePrimKeies[0], latest, - start, end, orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - groupId, StringUtil.merge(parentResourcePrimKeies), latest - }; - } - else { - finderArgs = new Object[] { - groupId, StringUtil.merge(parentResourcePrimKeies), latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_L, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - !ArrayUtil.contains(parentResourcePrimKeies, - kbArticle.getParentResourcePrimKey()) || - (latest != kbArticle.getLatest())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_L_LATEST_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_L, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_P_L(long groupId, long parentResourcePrimKey, - boolean latest) throws SystemException { - for (KBArticle kbArticle : findByG_P_L(groupId, parentResourcePrimKey, - latest, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_L(long groupId, long parentResourcePrimKey, - boolean latest) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_P_L; - - Object[] finderArgs = new Object[] { - groupId, parentResourcePrimKey, latest - }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_L_LATEST_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(latest); - - 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(); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_L(long groupId, long[] parentResourcePrimKeies, - boolean latest) throws SystemException { - Object[] finderArgs = new Object[] { - groupId, StringUtil.merge(parentResourcePrimKeies), latest - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_L, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_L_LATEST_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(latest); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_L, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_L(long groupId, long parentResourcePrimKey, - boolean latest) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_L(groupId, parentResourcePrimKey, latest); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_L_LATEST_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(latest); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_L(long groupId, long[] parentResourcePrimKeies, - boolean latest) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_L(groupId, parentResourcePrimKeies, latest); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_L_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_L_LATEST_5); - - conjunctionable = true; - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(latest); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_P_L_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_P_L_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_L_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_2 = "kbArticle.parentResourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_L_PARENTRESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_G_P_L_LATEST_2 = "kbArticle.latest = ?"; - private static final String _FINDER_COLUMN_G_P_L_LATEST_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_L_LATEST_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_P_M", - 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_G_P_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_P_M", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }, - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.PARENTRESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.MAIN_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_P_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_P_M", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_P_M", - new String[] { - Long.class.getName(), Long.class.getName(), - Boolean.class.getName() - }); - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_M(long groupId, - long parentResourcePrimKey, boolean main) throws SystemException { - return findByG_P_M(groupId, parentResourcePrimKey, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_M(long groupId, - long parentResourcePrimKey, boolean main, int start, int end) - throws SystemException { - return findByG_P_M(groupId, parentResourcePrimKey, main, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_M(long groupId, - long parentResourcePrimKey, boolean main, 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_G_P_M; - finderArgs = new Object[] { groupId, parentResourcePrimKey, main }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_M; - finderArgs = new Object[] { - groupId, parentResourcePrimKey, main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - (main != kbArticle.getMain())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_M_MAIN_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_M_First(long groupId, - long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_M_First(groupId, - parentResourcePrimKey, main, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_M_First(long groupId, - long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_P_M(groupId, parentResourcePrimKey, - main, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_M_Last(long groupId, long parentResourcePrimKey, - boolean main, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_M_Last(groupId, parentResourcePrimKey, - main, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_M_Last(long groupId, - long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_P_M(groupId, parentResourcePrimKey, main); - - if (count == 0) { - return null; - } - - List list = findByG_P_M(groupId, parentResourcePrimKey, - main, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_P_M_PrevAndNext(long kbArticleId, long groupId, - long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_P_M_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, main, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByG_P_M_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, main, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_P_M_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - boolean main, 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_M_MAIN_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(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_M(long groupId, - long parentResourcePrimKey, boolean main) throws SystemException { - return filterFindByG_P_M(groupId, parentResourcePrimKey, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_M(long groupId, - long parentResourcePrimKey, boolean main, int start, int end) - throws SystemException { - return filterFindByG_P_M(groupId, parentResourcePrimKey, main, start, - end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_M(long groupId, - long parentResourcePrimKey, boolean main, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_M(groupId, parentResourcePrimKey, main, start, - end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_M_MAIN_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(main); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_P_M_PrevAndNext(long kbArticleId, - long groupId, long parentResourcePrimKey, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_M_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, main, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_P_M_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, main, orderByComparator, - true); - - array[1] = kbArticle; - - array[2] = filterGetByG_P_M_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, main, orderByComparator, - false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_P_M_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - boolean main, OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_M_MAIN_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_M(long groupId, - long[] parentResourcePrimKeies, boolean main) throws SystemException { - return filterFindByG_P_M(groupId, parentResourcePrimKeies, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_M(long groupId, - long[] parentResourcePrimKeies, boolean main, int start, int end) - throws SystemException { - return filterFindByG_P_M(groupId, parentResourcePrimKeies, main, start, - end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_M(long groupId, - long[] parentResourcePrimKeies, boolean main, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_M(groupId, parentResourcePrimKeies, main, start, - end, orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_M_MAIN_5); - - conjunctionable = true; - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(main); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_M(long groupId, - long[] parentResourcePrimKeies, boolean main) throws SystemException { - return findByG_P_M(groupId, parentResourcePrimKeies, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_M(long groupId, - long[] parentResourcePrimKeies, boolean main, int start, int end) - throws SystemException { - return findByG_P_M(groupId, parentResourcePrimKeies, main, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_M(long groupId, - long[] parentResourcePrimKeies, boolean main, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if ((parentResourcePrimKeies != null) && - (parentResourcePrimKeies.length == 1)) { - return findByG_P_M(groupId, parentResourcePrimKeies[0], main, - start, end, orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - groupId, StringUtil.merge(parentResourcePrimKeies), main - }; - } - else { - finderArgs = new Object[] { - groupId, StringUtil.merge(parentResourcePrimKeies), main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_M, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - !ArrayUtil.contains(parentResourcePrimKeies, - kbArticle.getParentResourcePrimKey()) || - (main != kbArticle.getMain())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_M_MAIN_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_M, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and main = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_P_M(long groupId, long parentResourcePrimKey, - boolean main) throws SystemException { - for (KBArticle kbArticle : findByG_P_M(groupId, parentResourcePrimKey, - main, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_M(long groupId, long parentResourcePrimKey, - boolean main) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_P_M; - - Object[] finderArgs = new Object[] { groupId, parentResourcePrimKey, main }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_M_MAIN_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(main); - - 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(); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_M(long groupId, long[] parentResourcePrimKeies, - boolean main) throws SystemException { - Object[] finderArgs = new Object[] { - groupId, StringUtil.merge(parentResourcePrimKeies), main - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_M, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_M_MAIN_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(main); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_M, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_M(long groupId, long parentResourcePrimKey, - boolean main) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_M(groupId, parentResourcePrimKey, main); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_M_MAIN_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(main); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_M(long groupId, long[] parentResourcePrimKeies, - boolean main) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_M(groupId, parentResourcePrimKeies, main); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_M_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_M_MAIN_5); - - conjunctionable = true; - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(main); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_P_M_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_P_M_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_M_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_2 = "kbArticle.parentResourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_M_PARENTRESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_G_P_M_MAIN_2 = "kbArticle.main = ?"; - private static final String _FINDER_COLUMN_G_P_M_MAIN_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_M_MAIN_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_P_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_P_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }, - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.PARENTRESOURCEPRIMKEY_COLUMN_BITMASK | - KBArticleModelImpl.STATUS_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_P_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_P_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_P_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }); - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S(long groupId, - long parentResourcePrimKey, int status) throws SystemException { - return findByG_P_S(groupId, parentResourcePrimKey, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S(long groupId, - long parentResourcePrimKey, int status, int start, int end) - throws SystemException { - return findByG_P_S(groupId, parentResourcePrimKey, status, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S(long groupId, - long parentResourcePrimKey, int status, 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_G_P_S; - finderArgs = new Object[] { groupId, parentResourcePrimKey, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S; - finderArgs = new Object[] { - groupId, parentResourcePrimKey, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - (status != kbArticle.getStatus())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_S_First(long groupId, - long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_S_First(groupId, - parentResourcePrimKey, status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_S_First(long groupId, - long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_P_S(groupId, parentResourcePrimKey, - status, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_S_Last(long groupId, long parentResourcePrimKey, - int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_S_Last(groupId, parentResourcePrimKey, - status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_S_Last(long groupId, - long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_P_S(groupId, parentResourcePrimKey, status); - - if (count == 0) { - return null; - } - - List list = findByG_P_S(groupId, parentResourcePrimKey, - status, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_P_S_PrevAndNext(long kbArticleId, long groupId, - long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_P_S_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByG_P_S_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_P_S_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - int status, 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_S_STATUS_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(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S(long groupId, - long parentResourcePrimKey, int status) throws SystemException { - return filterFindByG_P_S(groupId, parentResourcePrimKey, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S(long groupId, - long parentResourcePrimKey, int status, int start, int end) - throws SystemException { - return filterFindByG_P_S(groupId, parentResourcePrimKey, status, start, - end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S(long groupId, - long parentResourcePrimKey, int status, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S(groupId, parentResourcePrimKey, status, start, - end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_P_S_PrevAndNext(long kbArticleId, - long groupId, long parentResourcePrimKey, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, status, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_P_S_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, status, orderByComparator, - true); - - array[1] = kbArticle; - - array[2] = filterGetByG_P_S_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, status, orderByComparator, - false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_P_S_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - int status, OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S(long groupId, - long[] parentResourcePrimKeies, int status) throws SystemException { - return filterFindByG_P_S(groupId, parentResourcePrimKeies, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S(long groupId, - long[] parentResourcePrimKeies, int status, int start, int end) - throws SystemException { - return filterFindByG_P_S(groupId, parentResourcePrimKeies, status, - start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S(long groupId, - long[] parentResourcePrimKeies, int status, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S(groupId, parentResourcePrimKeies, status, start, - end, orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_STATUS_5); - - conjunctionable = true; - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S(long groupId, - long[] parentResourcePrimKeies, int status) throws SystemException { - return findByG_P_S(groupId, parentResourcePrimKeies, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S(long groupId, - long[] parentResourcePrimKeies, int status, int start, int end) - throws SystemException { - return findByG_P_S(groupId, parentResourcePrimKeies, status, start, - end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S(long groupId, - long[] parentResourcePrimKeies, int status, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if ((parentResourcePrimKeies != null) && - (parentResourcePrimKeies.length == 1)) { - return findByG_P_S(groupId, parentResourcePrimKeies[0], status, - start, end, orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - groupId, StringUtil.merge(parentResourcePrimKeies), status - }; - } - else { - finderArgs = new Object[] { - groupId, StringUtil.merge(parentResourcePrimKeies), status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - !ArrayUtil.contains(parentResourcePrimKeies, - kbArticle.getParentResourcePrimKey()) || - (status != kbArticle.getStatus())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_STATUS_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and status = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_P_S(long groupId, long parentResourcePrimKey, - int status) throws SystemException { - for (KBArticle kbArticle : findByG_P_S(groupId, parentResourcePrimKey, - status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_S(long groupId, long parentResourcePrimKey, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_P_S; - - Object[] finderArgs = new Object[] { - groupId, parentResourcePrimKey, status - }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_S(long groupId, long[] parentResourcePrimKeies, - int status) throws SystemException { - Object[] finderArgs = new Object[] { - groupId, StringUtil.merge(parentResourcePrimKeies), status - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_STATUS_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(status); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_S(long groupId, long parentResourcePrimKey, - int status) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_S(groupId, parentResourcePrimKey, status); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_2); - - query.append(_FINDER_COLUMN_G_P_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKeies the parent resource prim keies - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_S(long groupId, long[] parentResourcePrimKeies, - int status) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_S(groupId, parentResourcePrimKeies, status); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_GROUPID_5); - - conjunctionable = true; - - if ((parentResourcePrimKeies == null) || - (parentResourcePrimKeies.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < parentResourcePrimKeies.length; i++) { - query.append(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_5); - - if ((i + 1) < parentResourcePrimKeies.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_STATUS_5); - - conjunctionable = true; - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (parentResourcePrimKeies != null) { - qPos.add(parentResourcePrimKeies); - } - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_P_S_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_P_S_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_2 = "kbArticle.parentResourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_PARENTRESOURCEPRIMKEY_2) + ")"; - private static final String _FINDER_COLUMN_G_P_S_STATUS_2 = "kbArticle.status = ?"; - private static final String _FINDER_COLUMN_G_P_S_STATUS_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_STATUS_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_KBFI_UT = - new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_KBFI_UT", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_UT = - new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_KBFI_UT", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName() - }, - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.KBFOLDERID_COLUMN_BITMASK | - KBArticleModelImpl.URLTITLE_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_KBFI_UT = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_KBFI_UT", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName() - }); - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_UT(long groupId, long kbFolderId, - String urlTitle) throws SystemException { - return findByG_KBFI_UT(groupId, kbFolderId, urlTitle, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_UT(long groupId, long kbFolderId, - String urlTitle, int start, int end) throws SystemException { - return findByG_KBFI_UT(groupId, kbFolderId, urlTitle, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_UT(long groupId, long kbFolderId, - String urlTitle, 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_G_KBFI_UT; - finderArgs = new Object[] { groupId, kbFolderId, urlTitle }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_KBFI_UT; - finderArgs = new Object[] { - groupId, kbFolderId, urlTitle, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (kbFolderId != kbArticle.getKbFolderId()) || - !Validator.equals(urlTitle, kbArticle.getUrlTitle())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_UT_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_KBFI_UT_First(long groupId, long kbFolderId, - String urlTitle, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_KBFI_UT_First(groupId, kbFolderId, - urlTitle, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", kbFolderId="); - msg.append(kbFolderId); - - msg.append(", urlTitle="); - msg.append(urlTitle); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_KBFI_UT_First(long groupId, long kbFolderId, - String urlTitle, OrderByComparator orderByComparator) - throws SystemException { - List list = findByG_KBFI_UT(groupId, kbFolderId, urlTitle, - 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_KBFI_UT_Last(long groupId, long kbFolderId, - String urlTitle, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_KBFI_UT_Last(groupId, kbFolderId, - urlTitle, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", kbFolderId="); - msg.append(kbFolderId); - - msg.append(", urlTitle="); - msg.append(urlTitle); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_KBFI_UT_Last(long groupId, long kbFolderId, - String urlTitle, OrderByComparator orderByComparator) - throws SystemException { - int count = countByG_KBFI_UT(groupId, kbFolderId, urlTitle); - - if (count == 0) { - return null; - } - - List list = findByG_KBFI_UT(groupId, kbFolderId, urlTitle, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_KBFI_UT_PrevAndNext(long kbArticleId, - long groupId, long kbFolderId, String urlTitle, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_KBFI_UT_PrevAndNext(session, kbArticle, groupId, - kbFolderId, urlTitle, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByG_KBFI_UT_PrevAndNext(session, kbArticle, groupId, - kbFolderId, urlTitle, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_KBFI_UT_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long kbFolderId, String urlTitle, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_UT_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_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(KBArticleModelImpl.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(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_UT(long groupId, long kbFolderId, - String urlTitle) throws SystemException { - return filterFindByG_KBFI_UT(groupId, kbFolderId, urlTitle, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_UT(long groupId, long kbFolderId, - String urlTitle, int start, int end) throws SystemException { - return filterFindByG_KBFI_UT(groupId, kbFolderId, urlTitle, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_UT(long groupId, long kbFolderId, - String urlTitle, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_KBFI_UT(groupId, kbFolderId, urlTitle, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_2); - } - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_KBFI_UT_PrevAndNext(long kbArticleId, - long groupId, long kbFolderId, String urlTitle, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_KBFI_UT_PrevAndNext(kbArticleId, groupId, - kbFolderId, urlTitle, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_KBFI_UT_PrevAndNext(session, kbArticle, - groupId, kbFolderId, urlTitle, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByG_KBFI_UT_PrevAndNext(session, kbArticle, - groupId, kbFolderId, urlTitle, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_KBFI_UT_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long kbFolderId, String urlTitle, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_2); - } - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? from the database. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_KBFI_UT(long groupId, long kbFolderId, String urlTitle) - throws SystemException { - for (KBArticle kbArticle : findByG_KBFI_UT(groupId, kbFolderId, - urlTitle, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_KBFI_UT(long groupId, long kbFolderId, String urlTitle) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_KBFI_UT; - - Object[] finderArgs = new Object[] { groupId, kbFolderId, urlTitle }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_UT_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - 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(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_KBFI_UT(long groupId, long kbFolderId, - String urlTitle) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_KBFI_UT(groupId, kbFolderId, urlTitle); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_UT_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_URLTITLE_2); - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_KBFI_UT_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_KBFI_UT_KBFOLDERID_2 = "kbArticle.kbFolderId = ? AND "; - private static final String _FINDER_COLUMN_G_KBFI_UT_URLTITLE_1 = "kbArticle.urlTitle IS NULL"; - private static final String _FINDER_COLUMN_G_KBFI_UT_URLTITLE_2 = "kbArticle.urlTitle = ?"; - private static final String _FINDER_COLUMN_G_KBFI_UT_URLTITLE_3 = "(kbArticle.urlTitle IS NULL OR kbArticle.urlTitle = '')"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_KBFI_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_KBFI_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_S = - new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_KBFI_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }, - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.KBFOLDERID_COLUMN_BITMASK | - KBArticleModelImpl.STATUS_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_KBFI_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_KBFI_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }); - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_S(long groupId, long kbFolderId, - int status) throws SystemException { - return findByG_KBFI_S(groupId, kbFolderId, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_S(long groupId, long kbFolderId, - int status, int start, int end) throws SystemException { - return findByG_KBFI_S(groupId, kbFolderId, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_S(long groupId, long kbFolderId, - int status, 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_G_KBFI_S; - finderArgs = new Object[] { groupId, kbFolderId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_KBFI_S; - finderArgs = new Object[] { - groupId, kbFolderId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (kbFolderId != kbArticle.getKbFolderId()) || - (status != kbArticle.getStatus())) { - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_KBFOLDERID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(kbFolderId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_KBFI_S_First(long groupId, long kbFolderId, - int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_KBFI_S_First(groupId, kbFolderId, - status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", kbFolderId="); - msg.append(kbFolderId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_KBFI_S_First(long groupId, long kbFolderId, - int status, OrderByComparator orderByComparator) - throws SystemException { - List list = findByG_KBFI_S(groupId, kbFolderId, status, 0, - 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_KBFI_S_Last(long groupId, long kbFolderId, - int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_KBFI_S_Last(groupId, kbFolderId, status, - orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", kbFolderId="); - msg.append(kbFolderId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_KBFI_S_Last(long groupId, long kbFolderId, - int status, OrderByComparator orderByComparator) - throws SystemException { - int count = countByG_KBFI_S(groupId, kbFolderId, status); - - if (count == 0) { - return null; - } - - List list = findByG_KBFI_S(groupId, kbFolderId, status, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and kbFolderId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_KBFI_S_PrevAndNext(long kbArticleId, - long groupId, long kbFolderId, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_KBFI_S_PrevAndNext(session, kbArticle, groupId, - kbFolderId, status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = getByG_KBFI_S_PrevAndNext(session, kbArticle, groupId, - kbFolderId, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_KBFI_S_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long kbFolderId, int status, - 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_KBFOLDERID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_STATUS_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(KBArticleModelImpl.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(groupId); - - qPos.add(kbFolderId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_S(long groupId, long kbFolderId, - int status) throws SystemException { - return filterFindByG_KBFI_S(groupId, kbFolderId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_S(long groupId, long kbFolderId, - int status, int start, int end) throws SystemException { - return filterFindByG_KBFI_S(groupId, kbFolderId, status, start, end, - null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and kbFolderId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_S(long groupId, long kbFolderId, - int status, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_KBFI_S(groupId, kbFolderId, status, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(5 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(5); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_KBFI_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_KBFOLDERID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_KBFI_S_PrevAndNext(long kbArticleId, - long groupId, long kbFolderId, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_KBFI_S_PrevAndNext(kbArticleId, groupId, kbFolderId, - status, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_KBFI_S_PrevAndNext(session, kbArticle, - groupId, kbFolderId, status, orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByG_KBFI_S_PrevAndNext(session, kbArticle, - groupId, kbFolderId, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_KBFI_S_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long kbFolderId, int status, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_KBFI_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_KBFOLDERID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b articles where groupId = ? and kbFolderId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_KBFI_S(long groupId, long kbFolderId, int status) - throws SystemException { - for (KBArticle kbArticle : findByG_KBFI_S(groupId, kbFolderId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_KBFI_S(long groupId, long kbFolderId, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_KBFI_S; - - Object[] finderArgs = new Object[] { groupId, kbFolderId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_KBFOLDERID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_KBFI_S(long groupId, long kbFolderId, int status) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_KBFI_S(groupId, kbFolderId, status); - } - - StringBundler query = new StringBundler(4); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_KBFOLDERID_2); - - query.append(_FINDER_COLUMN_G_KBFI_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_KBFI_S_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_KBFI_S_KBFOLDERID_2 = "kbArticle.kbFolderId = ? AND "; - private static final String _FINDER_COLUMN_G_KBFI_S_STATUS_2 = "kbArticle.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_P_S_L", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Boolean.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_L = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_P_S_L", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Boolean.class.getName() - }); - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_L(long groupId, - long parentResourcePrimKey, String sections, boolean latest) - throws SystemException { - return findByG_P_S_L(groupId, parentResourcePrimKey, sections, latest, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_L(long groupId, - long parentResourcePrimKey, String sections, boolean latest, int start, - int end) throws SystemException { - return findByG_P_S_L(groupId, parentResourcePrimKey, sections, latest, - start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_L(long groupId, - long parentResourcePrimKey, String sections, boolean latest, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - boolean pagination = true; - FinderPath finderPath = null; - Object[] finderArgs = null; - - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_L; - finderArgs = new Object[] { - groupId, parentResourcePrimKey, sections, latest, - - start, end, orderByComparator - }; - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - !StringUtil.wildcardMatches(kbArticle.getSections(), - sections, CharPool.UNDERLINE, CharPool.PERCENT, - CharPool.BACK_SLASH, true) || - (latest != kbArticle.getLatest())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(6); - } - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_S_L_First(long groupId, - long parentResourcePrimKey, String sections, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_S_L_First(groupId, - parentResourcePrimKey, sections, latest, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", sections="); - msg.append(sections); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_S_L_First(long groupId, - long parentResourcePrimKey, String sections, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_P_S_L(groupId, parentResourcePrimKey, - sections, latest, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_S_L_Last(long groupId, - long parentResourcePrimKey, String sections, boolean latest, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_S_L_Last(groupId, - parentResourcePrimKey, sections, latest, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", sections="); - msg.append(sections); - - msg.append(", latest="); - msg.append(latest); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_S_L_Last(long groupId, - long parentResourcePrimKey, String sections, boolean latest, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_P_S_L(groupId, parentResourcePrimKey, sections, - latest); - - if (count == 0) { - return null; - } - - List list = findByG_P_S_L(groupId, parentResourcePrimKey, - sections, latest, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_P_S_L_PrevAndNext(long kbArticleId, - long groupId, long parentResourcePrimKey, String sections, - boolean latest, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_P_S_L_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, sections, latest, orderByComparator, - true); - - array[1] = kbArticle; - - array[2] = getByG_P_S_L_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, sections, latest, orderByComparator, - false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_P_S_L_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - String sections, boolean latest, 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_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(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_L(long groupId, - long parentResourcePrimKey, String sections, boolean latest) - throws SystemException { - return filterFindByG_P_S_L(groupId, parentResourcePrimKey, sections, - latest, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_L(long groupId, - long parentResourcePrimKey, String sections, boolean latest, int start, - int end) throws SystemException { - return filterFindByG_P_S_L(groupId, parentResourcePrimKey, sections, - latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_L(long groupId, - long parentResourcePrimKey, String sections, boolean latest, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_L(groupId, parentResourcePrimKey, sections, - latest, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(6); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(latest); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_P_S_L_PrevAndNext(long kbArticleId, - long groupId, long parentResourcePrimKey, String sections, - boolean latest, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_L_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, sections, latest, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_P_S_L_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, sections, latest, - orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByG_P_S_L_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, sections, latest, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_P_S_L_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - String sections, boolean latest, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(latest); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_L(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean latest) - throws SystemException { - return filterFindByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_L(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean latest, - int start, int end) throws SystemException { - return filterFindByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_L(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean latest, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest, start, end, orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_5); - - conjunctionable = true; - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(latest); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_L(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean latest) - throws SystemException { - return findByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_L(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean latest, - int start, int end) throws SystemException { - return findByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_L(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean latest, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((sectionses != null) && (sectionses.length == 1)) { - return findByG_P_S_L(groupId, parentResourcePrimKey, sectionses[0], - latest, start, end, orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - groupId, parentResourcePrimKey, StringUtil.merge(sectionses), - latest - }; - } - else { - finderArgs = new Object[] { - groupId, parentResourcePrimKey, StringUtil.merge(sectionses), - latest, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_L, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - !ArrayUtil.contains(sectionses, kbArticle.getSections()) || - (latest != kbArticle.getLatest())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(latest); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_L, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_P_S_L(long groupId, long parentResourcePrimKey, - String sections, boolean latest) throws SystemException { - for (KBArticle kbArticle : findByG_P_S_L(groupId, - parentResourcePrimKey, sections, latest, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_S_L(long groupId, long parentResourcePrimKey, - String sections, boolean latest) throws SystemException { - FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_L; - - Object[] finderArgs = new Object[] { - groupId, parentResourcePrimKey, sections, latest - }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(5); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(latest); - - 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(); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_S_L(long groupId, long parentResourcePrimKey, - String[] sectionses, boolean latest) throws SystemException { - Object[] finderArgs = new Object[] { - groupId, parentResourcePrimKey, StringUtil.merge(sectionses), - latest - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_L, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(latest); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_L, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_L, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_S_L(long groupId, long parentResourcePrimKey, - String sections, boolean latest) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_S_L(groupId, parentResourcePrimKey, sections, - latest); - } - - StringBundler query = new StringBundler(5); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(latest); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and latest = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param latest the latest - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_S_L(long groupId, long parentResourcePrimKey, - String[] sectionses, boolean latest) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_S_L(groupId, parentResourcePrimKey, sectionses, - latest); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_L_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_L_LATEST_5); - - conjunctionable = true; - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(latest); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_P_S_L_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_P_S_L_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_L_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_2 = "kbArticle.parentResourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_L_PARENTRESOURCEPRIMKEY_2) + - ")"; - private static final String _FINDER_COLUMN_G_P_S_L_SECTIONS_1 = "kbArticle.sections LIKE NULL AND "; - private static final String _FINDER_COLUMN_G_P_S_L_SECTIONS_2 = "kbArticle.sections LIKE ? AND "; - private static final String _FINDER_COLUMN_G_P_S_L_SECTIONS_3 = "(kbArticle.sections IS NULL OR kbArticle.sections LIKE '') AND "; - private static final String _FINDER_COLUMN_G_P_S_L_SECTIONS_4 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_L_SECTIONS_1) + ")"; - private static final String _FINDER_COLUMN_G_P_S_L_SECTIONS_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_L_SECTIONS_2) + ")"; - private static final String _FINDER_COLUMN_G_P_S_L_SECTIONS_6 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_L_SECTIONS_3) + ")"; - private static final String _FINDER_COLUMN_G_P_S_L_LATEST_2 = "kbArticle.latest = ?"; - private static final String _FINDER_COLUMN_G_P_S_L_LATEST_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_L_LATEST_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_P_S_M", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Boolean.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_M = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_P_S_M", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Boolean.class.getName() - }); - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_M(long groupId, - long parentResourcePrimKey, String sections, boolean main) - throws SystemException { - return findByG_P_S_M(groupId, parentResourcePrimKey, sections, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_M(long groupId, - long parentResourcePrimKey, String sections, boolean main, int start, - int end) throws SystemException { - return findByG_P_S_M(groupId, parentResourcePrimKey, sections, main, - start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_M(long groupId, - long parentResourcePrimKey, String sections, boolean main, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - boolean pagination = true; - FinderPath finderPath = null; - Object[] finderArgs = null; - - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_M; - finderArgs = new Object[] { - groupId, parentResourcePrimKey, sections, main, - - start, end, orderByComparator - }; - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - !StringUtil.wildcardMatches(kbArticle.getSections(), - sections, CharPool.UNDERLINE, CharPool.PERCENT, - CharPool.BACK_SLASH, true) || - (main != kbArticle.getMain())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(6); - } - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_S_M_First(long groupId, - long parentResourcePrimKey, String sections, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_S_M_First(groupId, - parentResourcePrimKey, sections, main, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", sections="); - msg.append(sections); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_S_M_First(long groupId, - long parentResourcePrimKey, String sections, boolean main, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_P_S_M(groupId, parentResourcePrimKey, - sections, main, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_S_M_Last(long groupId, - long parentResourcePrimKey, String sections, boolean main, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_S_M_Last(groupId, - parentResourcePrimKey, sections, main, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", sections="); - msg.append(sections); - - msg.append(", main="); - msg.append(main); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_S_M_Last(long groupId, - long parentResourcePrimKey, String sections, boolean main, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_P_S_M(groupId, parentResourcePrimKey, sections, - main); - - if (count == 0) { - return null; - } - - List list = findByG_P_S_M(groupId, parentResourcePrimKey, - sections, main, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_P_S_M_PrevAndNext(long kbArticleId, - long groupId, long parentResourcePrimKey, String sections, - boolean main, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_P_S_M_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, sections, main, orderByComparator, - true); - - array[1] = kbArticle; - - array[2] = getByG_P_S_M_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, sections, main, orderByComparator, - false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_P_S_M_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - String sections, boolean main, 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_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(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_M(long groupId, - long parentResourcePrimKey, String sections, boolean main) - throws SystemException { - return filterFindByG_P_S_M(groupId, parentResourcePrimKey, sections, - main, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_M(long groupId, - long parentResourcePrimKey, String sections, boolean main, int start, - int end) throws SystemException { - return filterFindByG_P_S_M(groupId, parentResourcePrimKey, sections, - main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_M(long groupId, - long parentResourcePrimKey, String sections, boolean main, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_M(groupId, parentResourcePrimKey, sections, - main, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(6); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(main); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_P_S_M_PrevAndNext(long kbArticleId, - long groupId, long parentResourcePrimKey, String sections, - boolean main, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_M_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, sections, main, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_P_S_M_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, sections, main, - orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByG_P_S_M_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, sections, main, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_P_S_M_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - String sections, boolean main, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(main); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_M(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean main) - throws SystemException { - return filterFindByG_P_S_M(groupId, parentResourcePrimKey, sectionses, - main, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_M(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean main, - int start, int end) throws SystemException { - return filterFindByG_P_S_M(groupId, parentResourcePrimKey, sectionses, - main, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_M(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean main, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_M(groupId, parentResourcePrimKey, sectionses, - main, start, end, orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_5); - - conjunctionable = true; - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(main); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_M(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean main) - throws SystemException { - return findByG_P_S_M(groupId, parentResourcePrimKey, sectionses, main, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_M(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean main, - int start, int end) throws SystemException { - return findByG_P_S_M(groupId, parentResourcePrimKey, sectionses, main, - start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_M(long groupId, - long parentResourcePrimKey, String[] sectionses, boolean main, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((sectionses != null) && (sectionses.length == 1)) { - return findByG_P_S_M(groupId, parentResourcePrimKey, sectionses[0], - main, start, end, orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - groupId, parentResourcePrimKey, StringUtil.merge(sectionses), - main - }; - } - else { - finderArgs = new Object[] { - groupId, parentResourcePrimKey, StringUtil.merge(sectionses), - main, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_M, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - !ArrayUtil.contains(sectionses, kbArticle.getSections()) || - (main != kbArticle.getMain())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(main); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_M, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_P_S_M(long groupId, long parentResourcePrimKey, - String sections, boolean main) throws SystemException { - for (KBArticle kbArticle : findByG_P_S_M(groupId, - parentResourcePrimKey, sections, main, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_S_M(long groupId, long parentResourcePrimKey, - String sections, boolean main) throws SystemException { - FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_M; - - Object[] finderArgs = new Object[] { - groupId, parentResourcePrimKey, sections, main - }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(5); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(main); - - 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(); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_S_M(long groupId, long parentResourcePrimKey, - String[] sectionses, boolean main) throws SystemException { - Object[] finderArgs = new Object[] { - groupId, parentResourcePrimKey, StringUtil.merge(sectionses), - main - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_M, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(main); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_M, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_M, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_S_M(long groupId, long parentResourcePrimKey, - String sections, boolean main) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_S_M(groupId, parentResourcePrimKey, sections, main); - } - - StringBundler query = new StringBundler(5); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(main); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param main the main - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_S_M(long groupId, long parentResourcePrimKey, - String[] sectionses, boolean main) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_S_M(groupId, parentResourcePrimKey, sectionses, - main); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_M_MAIN_5); - - conjunctionable = true; - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(main); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_P_S_M_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_P_S_M_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_M_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_2 = "kbArticle.parentResourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_2) + - ")"; - private static final String _FINDER_COLUMN_G_P_S_M_SECTIONS_1 = "kbArticle.sections LIKE NULL AND "; - private static final String _FINDER_COLUMN_G_P_S_M_SECTIONS_2 = "kbArticle.sections LIKE ? AND "; - private static final String _FINDER_COLUMN_G_P_S_M_SECTIONS_3 = "(kbArticle.sections IS NULL OR kbArticle.sections LIKE '') AND "; - private static final String _FINDER_COLUMN_G_P_S_M_SECTIONS_4 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_M_SECTIONS_1) + ")"; - private static final String _FINDER_COLUMN_G_P_S_M_SECTIONS_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_M_SECTIONS_2) + ")"; - private static final String _FINDER_COLUMN_G_P_S_M_SECTIONS_6 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_M_SECTIONS_3) + ")"; - private static final String _FINDER_COLUMN_G_P_S_M_MAIN_2 = "kbArticle.main = ?"; - private static final String _FINDER_COLUMN_G_P_S_M_MAIN_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_M_MAIN_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_P_S_S", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_S = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_P_S_S", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Integer.class.getName() - }); - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_S(long groupId, - long parentResourcePrimKey, String sections, int status) - throws SystemException { - return findByG_P_S_S(groupId, parentResourcePrimKey, sections, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_S(long groupId, - long parentResourcePrimKey, String sections, int status, int start, - int end) throws SystemException { - return findByG_P_S_S(groupId, parentResourcePrimKey, sections, status, - start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_S(long groupId, - long parentResourcePrimKey, String sections, int status, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - boolean pagination = true; - FinderPath finderPath = null; - Object[] finderArgs = null; - - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_S; - finderArgs = new Object[] { - groupId, parentResourcePrimKey, sections, status, - - start, end, orderByComparator - }; - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - !StringUtil.wildcardMatches(kbArticle.getSections(), - sections, CharPool.UNDERLINE, CharPool.PERCENT, - CharPool.BACK_SLASH, true) || - (status != kbArticle.getStatus())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(6); - } - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_S_S_First(long groupId, - long parentResourcePrimKey, String sections, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_S_S_First(groupId, - parentResourcePrimKey, sections, status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", sections="); - msg.append(sections); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_S_S_First(long groupId, - long parentResourcePrimKey, String sections, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_P_S_S(groupId, parentResourcePrimKey, - sections, status, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_P_S_S_Last(long groupId, - long parentResourcePrimKey, String sections, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_P_S_S_Last(groupId, - parentResourcePrimKey, sections, status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentResourcePrimKey="); - msg.append(parentResourcePrimKey); - - msg.append(", sections="); - msg.append(sections); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_P_S_S_Last(long groupId, - long parentResourcePrimKey, String sections, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_P_S_S(groupId, parentResourcePrimKey, sections, - status); - - if (count == 0) { - return null; - } - - List list = findByG_P_S_S(groupId, parentResourcePrimKey, - sections, status, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_P_S_S_PrevAndNext(long kbArticleId, - long groupId, long parentResourcePrimKey, String sections, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_P_S_S_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, sections, status, orderByComparator, - true); - - array[1] = kbArticle; - - array[2] = getByG_P_S_S_PrevAndNext(session, kbArticle, groupId, - parentResourcePrimKey, sections, status, orderByComparator, - false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_P_S_S_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - String sections, int status, 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_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(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_S(long groupId, - long parentResourcePrimKey, String sections, int status) - throws SystemException { - return filterFindByG_P_S_S(groupId, parentResourcePrimKey, sections, - status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_S(long groupId, - long parentResourcePrimKey, String sections, int status, int start, - int end) throws SystemException { - return filterFindByG_P_S_S(groupId, parentResourcePrimKey, sections, - status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_S(long groupId, - long parentResourcePrimKey, String sections, int status, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_S(groupId, parentResourcePrimKey, sections, - status, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(6); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_P_S_S_PrevAndNext(long kbArticleId, - long groupId, long parentResourcePrimKey, String sections, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_S_PrevAndNext(kbArticleId, groupId, - parentResourcePrimKey, sections, status, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_P_S_S_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, sections, status, - orderByComparator, true); - - array[1] = kbArticle; - - array[2] = filterGetByG_P_S_S_PrevAndNext(session, kbArticle, - groupId, parentResourcePrimKey, sections, status, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_P_S_S_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long parentResourcePrimKey, - String sections, int status, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_S(long groupId, - long parentResourcePrimKey, String[] sectionses, int status) - throws SystemException { - return filterFindByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_S(long groupId, - long parentResourcePrimKey, String[] sectionses, int status, int start, - int end) throws SystemException { - return filterFindByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P_S_S(long groupId, - long parentResourcePrimKey, String[] sectionses, int status, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status, start, end, orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_5); - - conjunctionable = true; - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_S(long groupId, - long parentResourcePrimKey, String[] sectionses, int status) - throws SystemException { - return findByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_S(long groupId, - long parentResourcePrimKey, String[] sectionses, int status, int start, - int end) throws SystemException { - return findByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P_S_S(long groupId, - long parentResourcePrimKey, String[] sectionses, int status, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if ((sectionses != null) && (sectionses.length == 1)) { - return findByG_P_S_S(groupId, parentResourcePrimKey, sectionses[0], - status, start, end, orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - groupId, parentResourcePrimKey, StringUtil.merge(sectionses), - status - }; - } - else { - finderArgs = new Object[] { - groupId, parentResourcePrimKey, StringUtil.merge(sectionses), - status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_S, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (parentResourcePrimKey != kbArticle.getParentResourcePrimKey()) || - !ArrayUtil.contains(sectionses, kbArticle.getSections()) || - (status != kbArticle.getStatus())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_5); - - conjunctionable = true; - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_S, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P_S_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ? from the database. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_P_S_S(long groupId, long parentResourcePrimKey, - String sections, int status) throws SystemException { - for (KBArticle kbArticle : findByG_P_S_S(groupId, - parentResourcePrimKey, sections, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_S_S(long groupId, long parentResourcePrimKey, - String sections, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_S; - - Object[] finderArgs = new Object[] { - groupId, parentResourcePrimKey, sections, status - }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(5); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_S_S(long groupId, long parentResourcePrimKey, - String[] sectionses, int status) throws SystemException { - Object[] finderArgs = new Object[] { - groupId, parentResourcePrimKey, StringUtil.merge(sectionses), - status - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_S, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_5); - - conjunctionable = true; - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(status); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_S, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sections the sections - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_S_S(long groupId, long parentResourcePrimKey, - String sections, int status) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_S_S(groupId, parentResourcePrimKey, sections, - status); - } - - StringBundler query = new StringBundler(5); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_2); - - boolean bindSections = false; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_1); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_3); - } - else { - bindSections = true; - - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_2); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (bindSections) { - qPos.add(sections); - } - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. - * - * @param groupId the group ID - * @param parentResourcePrimKey the parent resource prim key - * @param sectionses the sectionses - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P_S_S(long groupId, long parentResourcePrimKey, - String[] sectionses, int status) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P_S_S(groupId, parentResourcePrimKey, sectionses, - status); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_5); - - conjunctionable = true; - - if ((sectionses == null) || (sectionses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < sectionses.length; i++) { - String sections = sectionses[i]; - - if (sections == null) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_4); - } - else if (sections.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_6); - } - else { - query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_5); - } - - if ((i + 1) < sectionses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_P_S_S_STATUS_5); - - conjunctionable = true; - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentResourcePrimKey); - - if (sectionses != null) { - qPos.add(sectionses); - } - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_P_S_S_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_P_S_S_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_S_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_2 = "kbArticle.parentResourcePrimKey = ? AND "; - private static final String _FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_2) + - ")"; - private static final String _FINDER_COLUMN_G_P_S_S_SECTIONS_1 = "kbArticle.sections LIKE NULL AND "; - private static final String _FINDER_COLUMN_G_P_S_S_SECTIONS_2 = "kbArticle.sections LIKE ? AND "; - private static final String _FINDER_COLUMN_G_P_S_S_SECTIONS_3 = "(kbArticle.sections IS NULL OR kbArticle.sections LIKE '') AND "; - private static final String _FINDER_COLUMN_G_P_S_S_SECTIONS_4 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_S_SECTIONS_1) + ")"; - private static final String _FINDER_COLUMN_G_P_S_S_SECTIONS_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_S_SECTIONS_2) + ")"; - private static final String _FINDER_COLUMN_G_P_S_S_SECTIONS_6 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_S_SECTIONS_3) + ")"; - private static final String _FINDER_COLUMN_G_P_S_S_STATUS_2 = "kbArticle.status = ?"; - private static final String _FINDER_COLUMN_G_P_S_S_STATUS_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_P_S_S_STATUS_2) + ")"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_KBFI_UT_ST = - new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_KBFI_UT_ST", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_UT_ST = - new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, KBArticleImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_KBFI_UT_ST", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Integer.class.getName() - }, - KBArticleModelImpl.GROUPID_COLUMN_BITMASK | - KBArticleModelImpl.KBFOLDERID_COLUMN_BITMASK | - KBArticleModelImpl.URLTITLE_COLUMN_BITMASK | - KBArticleModelImpl.STATUS_COLUMN_BITMASK | - KBArticleModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_KBFI_UT_ST = new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_KBFI_UT_ST", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Integer.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_KBFI_UT_ST = - new FinderPath(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByG_KBFI_UT_ST", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName(), Integer.class.getName() - }); - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int status) throws SystemException { - return findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int status, int start, int end) - throws SystemException { - return findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status, start, - end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int status, 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_G_KBFI_UT_ST; - finderArgs = new Object[] { groupId, kbFolderId, urlTitle, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_KBFI_UT_ST; - finderArgs = new Object[] { - groupId, kbFolderId, urlTitle, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (kbFolderId != kbArticle.getKbFolderId()) || - !Validator.equals(urlTitle, kbArticle.getUrlTitle()) || - (status != kbArticle.getStatus())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(6); - } - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_2); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_KBFI_UT_ST_First(long groupId, long kbFolderId, - String urlTitle, int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_KBFI_UT_ST_First(groupId, kbFolderId, - urlTitle, status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", kbFolderId="); - msg.append(kbFolderId); - - msg.append(", urlTitle="); - msg.append(urlTitle); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the first k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_KBFI_UT_ST_First(long groupId, long kbFolderId, - String urlTitle, int status, OrderByComparator orderByComparator) - throws SystemException { - List list = findByG_KBFI_UT_ST(groupId, kbFolderId, - urlTitle, status, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByG_KBFI_UT_ST_Last(long groupId, long kbFolderId, - String urlTitle, int status, OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByG_KBFI_UT_ST_Last(groupId, kbFolderId, - urlTitle, status, orderByComparator); - - if (kbArticle != null) { - return kbArticle; - } - - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", kbFolderId="); - msg.append(kbFolderId); - - msg.append(", urlTitle="); - msg.append(urlTitle); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchArticleException(msg.toString()); - } - - /** - * Returns the last k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b article, or null if a matching k b article could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByG_KBFI_UT_ST_Last(long groupId, long kbFolderId, - String urlTitle, int status, OrderByComparator orderByComparator) - throws SystemException { - int count = countByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status); - - if (count == 0) { - return null; - } - - List list = findByG_KBFI_UT_ST(groupId, kbFolderId, - urlTitle, status, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] findByG_KBFI_UT_ST_PrevAndNext(long kbArticleId, - long groupId, long kbFolderId, String urlTitle, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = getByG_KBFI_UT_ST_PrevAndNext(session, kbArticle, - groupId, kbFolderId, urlTitle, status, orderByComparator, - true); - - array[1] = kbArticle; - - array[2] = getByG_KBFI_UT_ST_PrevAndNext(session, kbArticle, - groupId, kbFolderId, urlTitle, status, orderByComparator, - false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle getByG_KBFI_UT_ST_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long kbFolderId, String urlTitle, - int status, 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_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_2); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_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(KBArticleModelImpl.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(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_UT_ST(long groupId, - long kbFolderId, String urlTitle, int status) throws SystemException { - return filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_UT_ST(long groupId, - long kbFolderId, String urlTitle, int status, int start, int end) - throws SystemException { - return filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status, - start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permissions to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_UT_ST(long groupId, - long kbFolderId, String urlTitle, int status, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status, - start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(6); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_2); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - qPos.add(status); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b articles before and after the current k b article in the ordered set of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param kbArticleId the primary key of the current k b article - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle[] filterFindByG_KBFI_UT_ST_PrevAndNext(long kbArticleId, - long groupId, long kbFolderId, String urlTitle, int status, - OrderByComparator orderByComparator) - throws NoSuchArticleException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_KBFI_UT_ST_PrevAndNext(kbArticleId, groupId, - kbFolderId, urlTitle, status, orderByComparator); - } - - KBArticle kbArticle = findByPrimaryKey(kbArticleId); - - Session session = null; - - try { - session = openSession(); - - KBArticle[] array = new KBArticleImpl[3]; - - array[0] = filterGetByG_KBFI_UT_ST_PrevAndNext(session, kbArticle, - groupId, kbFolderId, urlTitle, status, orderByComparator, - true); - - array[1] = kbArticle; - - array[2] = filterGetByG_KBFI_UT_ST_PrevAndNext(session, kbArticle, - groupId, kbFolderId, urlTitle, status, orderByComparator, - false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBArticle filterGetByG_KBFI_UT_ST_PrevAndNext(Session session, - KBArticle kbArticle, long groupId, long kbFolderId, String urlTitle, - int status, OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_2); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbArticle); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_UT_ST(long groupId, - long kbFolderId, String urlTitle, int[] statuses) - throws SystemException { - return filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - statuses, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_UT_ST(long groupId, - long kbFolderId, String urlTitle, int[] statuses, int start, int end) - throws SystemException { - return filterFindByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - statuses, start, end, null); - } - - /** - * Returns an ordered range of all the k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_KBFI_UT_ST(long groupId, - long kbFolderId, String urlTitle, int[] statuses, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, statuses, - start, end, orderByComparator); - } - - StringBundler query = new StringBundler(); - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_4); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_6); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_5); - } - - conjunctionable = true; - - if ((statuses == null) || (statuses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < statuses.length; i++) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_5); - - if ((i + 1) < statuses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBArticleModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBArticleModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBArticleImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBArticleImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - if (statuses != null) { - qPos.add(statuses); - } - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int[] statuses) throws SystemException { - return findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, statuses, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int[] statuses, int start, int end) - throws SystemException { - return findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, statuses, - start, end, null); - } - - /** - * Returns an ordered range of all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int[] statuses, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if ((statuses != null) && (statuses.length == 1)) { - return findByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, - statuses[0], start, end, orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - groupId, kbFolderId, urlTitle, StringUtil.merge(statuses) - }; - } - else { - finderArgs = new Object[] { - groupId, kbFolderId, urlTitle, StringUtil.merge(statuses), - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_KBFI_UT_ST, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBArticle kbArticle : list) { - if ((groupId != kbArticle.getGroupId()) || - (kbFolderId != kbArticle.getKbFolderId()) || - !Validator.equals(urlTitle, kbArticle.getUrlTitle()) || - !ArrayUtil.contains(statuses, kbArticle.getStatus())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_4); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_6); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_5); - } - - conjunctionable = true; - - if ((statuses == null) || (statuses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < statuses.length; i++) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_5); - - if ((i + 1) < statuses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBArticleModelImpl.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(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - if (statuses != null) { - qPos.add(statuses); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_KBFI_UT_ST, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_KBFI_UT_ST, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ? from the database. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int status) throws SystemException { - for (KBArticle kbArticle : findByG_KBFI_UT_ST(groupId, kbFolderId, - urlTitle, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_KBFI_UT_ST; - - Object[] finderArgs = new Object[] { groupId, kbFolderId, urlTitle, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(5); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_2); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of k b articles where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the number of matching k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int[] statuses) throws SystemException { - Object[] finderArgs = new Object[] { - groupId, kbFolderId, urlTitle, StringUtil.merge(statuses) - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_KBFI_UT_ST, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_4); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_6); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_5); - } - - conjunctionable = true; - - if ((statuses == null) || (statuses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < statuses.length; i++) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_5); - - if ((i + 1) < statuses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - if (statuses != null) { - qPos.add(statuses); - } - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_KBFI_UT_ST, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_KBFI_UT_ST, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param status the status - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int status) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, status); - } - - StringBundler query = new StringBundler(5); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_2); - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_2); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - qPos.add(status); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the number of k b articles that the user has permission to view where groupId = ? and kbFolderId = ? and urlTitle = ? and status = any ?. - * - * @param groupId the group ID - * @param kbFolderId the kb folder ID - * @param urlTitle the url title - * @param statuses the statuses - * @return the number of matching k b articles that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_KBFI_UT_ST(long groupId, long kbFolderId, - String urlTitle, int[] statuses) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_KBFI_UT_ST(groupId, kbFolderId, urlTitle, statuses); - } - - StringBundler query = new StringBundler(); - - query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_4); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_6); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_5); - } - - conjunctionable = true; - - if ((statuses == null) || (statuses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < statuses.length; i++) { - query.append(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_5); - - if ((i + 1) < statuses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBArticle.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(kbFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - if (statuses != null) { - qPos.add(statuses); - } - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_2 = "kbArticle.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_KBFI_UT_ST_GROUPID_2) + ")"; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_2 = "kbArticle.kbFolderId = ? AND "; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_KBFI_UT_ST_KBFOLDERID_2) + ")"; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_1 = "kbArticle.urlTitle IS NULL AND "; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_2 = "kbArticle.urlTitle = ? AND "; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_3 = "(kbArticle.urlTitle IS NULL OR kbArticle.urlTitle = '') AND "; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_4 = "(" + - removeConjunction(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_1) + ")"; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_2) + ")"; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_6 = "(" + - removeConjunction(_FINDER_COLUMN_G_KBFI_UT_ST_URLTITLE_3) + ")"; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_STATUS_2 = "kbArticle.status = ?"; - private static final String _FINDER_COLUMN_G_KBFI_UT_ST_STATUS_5 = "(" + - removeConjunction(_FINDER_COLUMN_G_KBFI_UT_ST_STATUS_2) + ")"; - - public KBArticlePersistenceImpl() { - setModelClass(KBArticle.class); - } - - /** - * Caches the k b article in the entity cache if it is enabled. - * - * @param kbArticle the k b article - */ - @Override - public void cacheResult(KBArticle kbArticle) { - EntityCacheUtil.putResult(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleImpl.class, kbArticle.getPrimaryKey(), kbArticle); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - new Object[] { kbArticle.getUuid(), kbArticle.getGroupId() }, - kbArticle); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_R_V, - new Object[] { kbArticle.getResourcePrimKey(), kbArticle.getVersion() }, - kbArticle); - - kbArticle.resetOriginalValues(); - } - - /** - * Caches the k b articles in the entity cache if it is enabled. - * - * @param kbArticles the k b articles - */ - @Override - public void cacheResult(List kbArticles) { - for (KBArticle kbArticle : kbArticles) { - if (EntityCacheUtil.getResult( - KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleImpl.class, kbArticle.getPrimaryKey()) == null) { - cacheResult(kbArticle); - } - else { - kbArticle.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all k b articles. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(KBArticleImpl.class.getName()); - } - - EntityCacheUtil.clearCache(KBArticleImpl.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 k b article. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache(KBArticle kbArticle) { - EntityCacheUtil.removeResult(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleImpl.class, kbArticle.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(kbArticle); - } - - @Override - public void clearCache(List kbArticles) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (KBArticle kbArticle : kbArticles) { - EntityCacheUtil.removeResult(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleImpl.class, kbArticle.getPrimaryKey()); - - clearUniqueFindersCache(kbArticle); - } - } - - protected void cacheUniqueFindersCache(KBArticle kbArticle) { - if (kbArticle.isNew()) { - Object[] args = new Object[] { - kbArticle.getUuid(), kbArticle.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - kbArticle); - - args = new Object[] { - kbArticle.getResourcePrimKey(), kbArticle.getVersion() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_R_V, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_R_V, args, kbArticle); - } - else { - KBArticleModelImpl kbArticleModelImpl = (KBArticleModelImpl)kbArticle; - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticle.getUuid(), kbArticle.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - kbArticle); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_R_V.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticle.getResourcePrimKey(), kbArticle.getVersion() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_R_V, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_R_V, args, - kbArticle); - } - } - } - - protected void clearUniqueFindersCache(KBArticle kbArticle) { - KBArticleModelImpl kbArticleModelImpl = (KBArticleModelImpl)kbArticle; - - Object[] args = new Object[] { kbArticle.getUuid(), kbArticle.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - args = new Object[] { - kbArticleModelImpl.getOriginalUuid(), - kbArticleModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - } - - args = new Object[] { - kbArticle.getResourcePrimKey(), kbArticle.getVersion() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_V, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_R_V, args); - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_R_V.getColumnBitmask()) != 0) { - args = new Object[] { - kbArticleModelImpl.getOriginalResourcePrimKey(), - kbArticleModelImpl.getOriginalVersion() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_V, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_R_V, args); - } - } - - /** - * Creates a new k b article with the primary key. Does not add the k b article to the database. - * - * @param kbArticleId the primary key for the new k b article - * @return the new k b article - */ - @Override - public KBArticle create(long kbArticleId) { - KBArticle kbArticle = new KBArticleImpl(); - - kbArticle.setNew(true); - kbArticle.setPrimaryKey(kbArticleId); - - String uuid = PortalUUIDUtil.generate(); - - kbArticle.setUuid(uuid); - - return kbArticle; - } - - /** - * Removes the k b article with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article that was removed - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle remove(long kbArticleId) - throws NoSuchArticleException, SystemException { - return remove((Serializable)kbArticleId); - } - - /** - * Removes the k b article with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the k b article - * @return the k b article that was removed - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle remove(Serializable primaryKey) - throws NoSuchArticleException, SystemException { - Session session = null; - - try { - session = openSession(); - - KBArticle kbArticle = (KBArticle)session.get(KBArticleImpl.class, - primaryKey); - - if (kbArticle == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchArticleException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(kbArticle); - } - catch (NoSuchArticleException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected KBArticle removeImpl(KBArticle kbArticle) - throws SystemException { - kbArticle = toUnwrappedModel(kbArticle); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(kbArticle)) { - kbArticle = (KBArticle)session.get(KBArticleImpl.class, - kbArticle.getPrimaryKeyObj()); - } - - if (kbArticle != null) { - session.delete(kbArticle); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (kbArticle != null) { - clearCache(kbArticle); - } - - return kbArticle; - } - - @Override - public KBArticle updateImpl( - com.liferay.knowledgebase.model.KBArticle kbArticle) - throws SystemException { - kbArticle = toUnwrappedModel(kbArticle); - - boolean isNew = kbArticle.isNew(); - - KBArticleModelImpl kbArticleModelImpl = (KBArticleModelImpl)kbArticle; - - if (Validator.isNull(kbArticle.getUuid())) { - String uuid = PortalUUIDUtil.generate(); - - kbArticle.setUuid(uuid); - } - - Session session = null; - - try { - session = openSession(); - - if (kbArticle.isNew()) { - session.save(kbArticle); - - kbArticle.setNew(false); - } - else { - session.merge(kbArticle); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !KBArticleModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalUuid() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - - args = new Object[] { kbArticleModelImpl.getUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalUuid(), - kbArticleModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - - args = new Object[] { - kbArticleModelImpl.getUuid(), - kbArticleModelImpl.getCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_RESOURCEPRIMKEY.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalResourcePrimKey() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_RESOURCEPRIMKEY, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_RESOURCEPRIMKEY, - args); - - args = new Object[] { kbArticleModelImpl.getResourcePrimKey() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_RESOURCEPRIMKEY, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_RESOURCEPRIMKEY, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalResourcePrimKey(), - kbArticleModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G, - args); - - args = new Object[] { - kbArticleModelImpl.getResourcePrimKey(), - kbArticleModelImpl.getGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_L.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalResourcePrimKey(), - kbArticleModelImpl.getOriginalLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_L, - args); - - args = new Object[] { - kbArticleModelImpl.getResourcePrimKey(), - kbArticleModelImpl.getLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_L, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_M.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalResourcePrimKey(), - kbArticleModelImpl.getOriginalMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_M, - args); - - args = new Object[] { - kbArticleModelImpl.getResourcePrimKey(), - kbArticleModelImpl.getMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_M, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalResourcePrimKey(), - kbArticleModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_S, - args); - - args = new Object[] { - kbArticleModelImpl.getResourcePrimKey(), - kbArticleModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_S, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_L.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_L, - args); - - args = new Object[] { - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_L, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_M.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_M, - args); - - args = new Object[] { - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_M, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - - args = new Object[] { - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_L.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalCompanyId(), - kbArticleModelImpl.getOriginalLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_L, - args); - - args = new Object[] { - kbArticleModelImpl.getCompanyId(), - kbArticleModelImpl.getLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_L, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_M.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalCompanyId(), - kbArticleModelImpl.getOriginalMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_M, - args); - - args = new Object[] { - kbArticleModelImpl.getCompanyId(), - kbArticleModelImpl.getMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_M, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalCompanyId(), - kbArticleModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_S, - args); - - args = new Object[] { - kbArticleModelImpl.getCompanyId(), - kbArticleModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_S, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_L.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalParentResourcePrimKey(), - kbArticleModelImpl.getOriginalLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_P_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_L, - args); - - args = new Object[] { - kbArticleModelImpl.getParentResourcePrimKey(), - kbArticleModelImpl.getLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_P_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_L, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_M.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalParentResourcePrimKey(), - kbArticleModelImpl.getOriginalMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_P_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_M, - args); - - args = new Object[] { - kbArticleModelImpl.getParentResourcePrimKey(), - kbArticleModelImpl.getMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_P_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_M, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalParentResourcePrimKey(), - kbArticleModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_P_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_S, - args); - - args = new Object[] { - kbArticleModelImpl.getParentResourcePrimKey(), - kbArticleModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_P_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_P_S, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_L.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalResourcePrimKey(), - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_G_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_L, - args); - - args = new Object[] { - kbArticleModelImpl.getResourcePrimKey(), - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_G_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_L, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_M.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalResourcePrimKey(), - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_G_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_M, - args); - - args = new Object[] { - kbArticleModelImpl.getResourcePrimKey(), - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_G_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_M, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalResourcePrimKey(), - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_S, - args); - - args = new Object[] { - kbArticleModelImpl.getResourcePrimKey(), - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_R_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_R_G_S, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_L.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalParentResourcePrimKey(), - kbArticleModelImpl.getOriginalLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_L, - args); - - args = new Object[] { - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getParentResourcePrimKey(), - kbArticleModelImpl.getLatest() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_L, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_L, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_M.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalParentResourcePrimKey(), - kbArticleModelImpl.getOriginalMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_M, - args); - - args = new Object[] { - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getParentResourcePrimKey(), - kbArticleModelImpl.getMain() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_M, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_M, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalParentResourcePrimKey(), - kbArticleModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_S, - args); - - args = new Object[] { - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getParentResourcePrimKey(), - kbArticleModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P_S, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_UT.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalKbFolderId(), - kbArticleModelImpl.getOriginalUrlTitle() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_KBFI_UT, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_UT, - args); - - args = new Object[] { - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getKbFolderId(), - kbArticleModelImpl.getUrlTitle() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_KBFI_UT, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_UT, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalKbFolderId(), - kbArticleModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_KBFI_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_S, - args); - - args = new Object[] { - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getKbFolderId(), - kbArticleModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_KBFI_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_S, - args); - } - - if ((kbArticleModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_UT_ST.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbArticleModelImpl.getOriginalGroupId(), - kbArticleModelImpl.getOriginalKbFolderId(), - kbArticleModelImpl.getOriginalUrlTitle(), - kbArticleModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_KBFI_UT_ST, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_UT_ST, - args); - - args = new Object[] { - kbArticleModelImpl.getGroupId(), - kbArticleModelImpl.getKbFolderId(), - kbArticleModelImpl.getUrlTitle(), - kbArticleModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_KBFI_UT_ST, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_KBFI_UT_ST, - args); - } - } - - EntityCacheUtil.putResult(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleImpl.class, kbArticle.getPrimaryKey(), kbArticle); - - clearUniqueFindersCache(kbArticle); - cacheUniqueFindersCache(kbArticle); - - return kbArticle; - } - - protected KBArticle toUnwrappedModel(KBArticle kbArticle) { - if (kbArticle instanceof KBArticleImpl) { - return kbArticle; - } - - KBArticleImpl kbArticleImpl = new KBArticleImpl(); - - kbArticleImpl.setNew(kbArticle.isNew()); - kbArticleImpl.setPrimaryKey(kbArticle.getPrimaryKey()); - - kbArticleImpl.setUuid(kbArticle.getUuid()); - kbArticleImpl.setKbArticleId(kbArticle.getKbArticleId()); - kbArticleImpl.setResourcePrimKey(kbArticle.getResourcePrimKey()); - kbArticleImpl.setGroupId(kbArticle.getGroupId()); - kbArticleImpl.setCompanyId(kbArticle.getCompanyId()); - kbArticleImpl.setUserId(kbArticle.getUserId()); - kbArticleImpl.setUserName(kbArticle.getUserName()); - kbArticleImpl.setCreateDate(kbArticle.getCreateDate()); - kbArticleImpl.setModifiedDate(kbArticle.getModifiedDate()); - kbArticleImpl.setRootResourcePrimKey(kbArticle.getRootResourcePrimKey()); - kbArticleImpl.setParentResourceClassNameId(kbArticle.getParentResourceClassNameId()); - kbArticleImpl.setParentResourcePrimKey(kbArticle.getParentResourcePrimKey()); - kbArticleImpl.setKbFolderId(kbArticle.getKbFolderId()); - kbArticleImpl.setVersion(kbArticle.getVersion()); - kbArticleImpl.setTitle(kbArticle.getTitle()); - kbArticleImpl.setUrlTitle(kbArticle.getUrlTitle()); - kbArticleImpl.setContent(kbArticle.getContent()); - kbArticleImpl.setDescription(kbArticle.getDescription()); - kbArticleImpl.setPriority(kbArticle.getPriority()); - kbArticleImpl.setSections(kbArticle.getSections()); - kbArticleImpl.setViewCount(kbArticle.getViewCount()); - kbArticleImpl.setLatest(kbArticle.isLatest()); - kbArticleImpl.setMain(kbArticle.isMain()); - kbArticleImpl.setSourceURL(kbArticle.getSourceURL()); - kbArticleImpl.setStatus(kbArticle.getStatus()); - kbArticleImpl.setStatusByUserId(kbArticle.getStatusByUserId()); - kbArticleImpl.setStatusByUserName(kbArticle.getStatusByUserName()); - kbArticleImpl.setStatusDate(kbArticle.getStatusDate()); - - return kbArticleImpl; - } - - /** - * Returns the k b article 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 k b article - * @return the k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByPrimaryKey(Serializable primaryKey) - throws NoSuchArticleException, SystemException { - KBArticle kbArticle = fetchByPrimaryKey(primaryKey); - - if (kbArticle == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchArticleException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return kbArticle; - } - - /** - * Returns the k b article with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchArticleException} if it could not be found. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article - * @throws com.liferay.knowledgebase.NoSuchArticleException if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle findByPrimaryKey(long kbArticleId) - throws NoSuchArticleException, SystemException { - return findByPrimaryKey((Serializable)kbArticleId); - } - - /** - * Returns the k b article with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the k b article - * @return the k b article, or null if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - KBArticle kbArticle = (KBArticle)EntityCacheUtil.getResult(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleImpl.class, primaryKey); - - if (kbArticle == _nullKBArticle) { - return null; - } - - if (kbArticle == null) { - Session session = null; - - try { - session = openSession(); - - kbArticle = (KBArticle)session.get(KBArticleImpl.class, - primaryKey); - - if (kbArticle != null) { - cacheResult(kbArticle); - } - else { - EntityCacheUtil.putResult(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleImpl.class, primaryKey, _nullKBArticle); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(KBArticleModelImpl.ENTITY_CACHE_ENABLED, - KBArticleImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return kbArticle; - } - - /** - * Returns the k b article with the primary key or returns null if it could not be found. - * - * @param kbArticleId the primary key of the k b article - * @return the k b article, or null if a k b article with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBArticle fetchByPrimaryKey(long kbArticleId) - throws SystemException { - return fetchByPrimaryKey((Serializable)kbArticleId); - } - - /** - * Returns all the k b articles. - * - * @return the k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @return the range of k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) - throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the k b articles. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b articles - * @param end the upper bound of the range of k b articles (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b articles - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_KBARTICLE); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_KBARTICLE; - - if (pagination) { - sql = sql.concat(KBArticleModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b articles from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (KBArticle kbArticle : findAll()) { - remove(kbArticle); - } - } - - /** - * Returns the number of k b articles. - * - * @return the number of k b articles - * @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_KBARTICLE); - - 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(); - } - - @Override - protected Set getBadColumnNames() { - return _badColumnNames; - } - - /** - * Initializes the k b article persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.com.liferay.knowledgebase.model.KBArticle"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(KBArticleImpl.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_KBARTICLE = "SELECT kbArticle FROM KBArticle kbArticle"; - private static final String _SQL_SELECT_KBARTICLE_WHERE = "SELECT kbArticle FROM KBArticle kbArticle WHERE "; - private static final String _SQL_COUNT_KBARTICLE = "SELECT COUNT(kbArticle) FROM KBArticle kbArticle"; - private static final String _SQL_COUNT_KBARTICLE_WHERE = "SELECT COUNT(kbArticle) FROM KBArticle kbArticle WHERE "; - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN = "kbArticle.rootResourcePrimKey"; - private static final String _FILTER_SQL_SELECT_KBARTICLE_WHERE = "SELECT DISTINCT {kbArticle.*} FROM KBArticle kbArticle WHERE "; - private static final String _FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_1 = - "SELECT {KBArticle.*} FROM (SELECT DISTINCT kbArticle.kbArticleId FROM KBArticle kbArticle WHERE "; - private static final String _FILTER_SQL_SELECT_KBARTICLE_NO_INLINE_DISTINCT_WHERE_2 = - ") TEMP_TABLE INNER JOIN KBArticle ON TEMP_TABLE.kbArticleId = KBArticle.kbArticleId"; - private static final String _FILTER_SQL_COUNT_KBARTICLE_WHERE = "SELECT COUNT(DISTINCT kbArticle.kbArticleId) AS COUNT_VALUE FROM KBArticle kbArticle WHERE "; - private static final String _FILTER_ENTITY_ALIAS = "kbArticle"; - private static final String _FILTER_ENTITY_TABLE = "KBArticle"; - private static final String _ORDER_BY_ENTITY_ALIAS = "kbArticle."; - private static final String _ORDER_BY_ENTITY_TABLE = "KBArticle."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No KBArticle exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No KBArticle 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(KBArticlePersistenceImpl.class); - private static Set _badColumnNames = SetUtil.fromArray(new String[] { - "uuid" - }); - private static KBArticle _nullKBArticle = new KBArticleImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullKBArticleCacheModel; - } - }; - - private static CacheModel _nullKBArticleCacheModel = new CacheModel() { - @Override - public KBArticle toEntityModel() { - return _nullKBArticle; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBCommentPersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBCommentPersistenceImpl.java deleted file mode 100644 index 8d80f0ed2b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBCommentPersistenceImpl.java +++ /dev/null @@ -1,5810 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.NoSuchCommentException; -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.model.impl.KBCommentImpl; -import com.liferay.knowledgebase.model.impl.KBCommentModelImpl; - -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.ArrayUtil; -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.SetUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * The persistence implementation for the k b comment service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBCommentPersistence - * @see KBCommentUtil - * @generated - */ -public class KBCommentPersistenceImpl extends BasePersistenceImpl - implements KBCommentPersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link KBCommentUtil} to access the k b comment persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = KBCommentImpl.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(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.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_UUID = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", - new String[] { String.class.getName() }, - KBCommentModelImpl.UUID_COLUMN_BITMASK | - KBCommentModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", - new String[] { String.class.getName() }); - - /** - * Returns all the k b comments where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid) throws SystemException { - return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b comments where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, int start, int end) - throws SystemException { - return findByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the k b comments where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, 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_UUID; - finderArgs = new Object[] { uuid }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; - finderArgs = new Object[] { uuid, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBComment kbComment : list) { - if (!Validator.equals(uuid, kbComment.getUuid())) { - 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_KBCOMMENT_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBCommentModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByUuid_First(String uuid, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByUuid_First(uuid, orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the first k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByUuid_First(String uuid, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid(uuid, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByUuid_Last(String uuid, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByUuid_Last(uuid, orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the last k b comment in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByUuid_Last(String uuid, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid(uuid); - - if (count == 0) { - return null; - } - - List list = findByUuid(uuid, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where uuid = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment[] findByUuid_PrevAndNext(long kbCommentId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = findByPrimaryKey(kbCommentId); - - Session session = null; - - try { - session = openSession(); - - KBComment[] array = new KBCommentImpl[3]; - - array[0] = getByUuid_PrevAndNext(session, kbComment, uuid, - orderByComparator, true); - - array[1] = kbComment; - - array[2] = getByUuid_PrevAndNext(session, kbComment, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBComment getByUuid_PrevAndNext(Session session, - KBComment kbComment, String uuid, 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_KBCOMMENT_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_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(KBCommentModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbComment); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b comments where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid(String uuid) throws SystemException { - for (KBComment kbComment : findByUuid(uuid, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbComment); - } - } - - /** - * Returns the number of k b comments where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid(String uuid) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; - - Object[] finderArgs = new Object[] { uuid }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_UUID_1 = "kbComment.uuid IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2 = "kbComment.uuid = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3 = "(kbComment.uuid IS NULL OR kbComment.uuid = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }, - KBCommentModelImpl.UUID_COLUMN_BITMASK | - KBCommentModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns the k b comment where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchCommentException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByUUID_G(String uuid, long groupId) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByUUID_G(uuid, groupId); - - if (kbComment == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchCommentException(msg.toString()); - } - - return kbComment; - } - - /** - * Returns the k b comment where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByUUID_G(String uuid, long groupId) - throws SystemException { - return fetchByUUID_G(uuid, groupId, true); - } - - /** - * Returns the k b comment where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByUUID_G(String uuid, long groupId, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { uuid, groupId }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, this); - } - - if (result instanceof KBComment) { - KBComment kbComment = (KBComment)result; - - if (!Validator.equals(uuid, kbComment.getUuid()) || - (groupId != kbComment.getGroupId())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_KBCOMMENT_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, list); - } - else { - KBComment kbComment = list.get(0); - - result = kbComment; - - cacheResult(kbComment); - - if ((kbComment.getUuid() == null) || - !kbComment.getUuid().equals(uuid) || - (kbComment.getGroupId() != groupId)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, kbComment); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (KBComment)result; - } - } - - /** - * Removes the k b comment where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b comment that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment removeByUUID_G(String uuid, long groupId) - throws NoSuchCommentException, SystemException { - KBComment kbComment = findByUUID_G(uuid, groupId); - - return remove(kbComment); - } - - /** - * Returns the number of k b comments where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUUID_G(String uuid, long groupId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; - - Object[] finderArgs = new Object[] { uuid, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - 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_UUID_G_UUID_1 = "kbComment.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "kbComment.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(kbComment.uuid IS NULL OR kbComment.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "kbComment.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", - new String[] { - String.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = - new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }, - KBCommentModelImpl.UUID_COLUMN_BITMASK | - KBCommentModelImpl.COMPANYID_COLUMN_BITMASK | - KBCommentModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns all the k b comments where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId) - throws SystemException { - return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b comments where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId, int start, - int end) throws SystemException { - return findByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the k b comments where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, 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_UUID_C; - finderArgs = new Object[] { uuid, companyId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; - finderArgs = new Object[] { - uuid, companyId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBComment kbComment : list) { - if (!Validator.equals(uuid, kbComment.getUuid()) || - (companyId != kbComment.getCompanyId())) { - 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_KBCOMMENT_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBCommentModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByUuid_C_First(uuid, companyId, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the first k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid_C(uuid, companyId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByUuid_C_Last(uuid, companyId, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the last k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid_C(uuid, companyId); - - if (count == 0) { - return null; - } - - List list = findByUuid_C(uuid, companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where uuid = ? and companyId = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment[] findByUuid_C_PrevAndNext(long kbCommentId, String uuid, - long companyId, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = findByPrimaryKey(kbCommentId); - - Session session = null; - - try { - session = openSession(); - - KBComment[] array = new KBCommentImpl[3]; - - array[0] = getByUuid_C_PrevAndNext(session, kbComment, uuid, - companyId, orderByComparator, true); - - array[1] = kbComment; - - array[2] = getByUuid_C_PrevAndNext(session, kbComment, uuid, - companyId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBComment getByUuid_C_PrevAndNext(Session session, - KBComment kbComment, String uuid, 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_KBCOMMENT_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_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(KBCommentModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbComment); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b comments where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid_C(String uuid, long companyId) - throws SystemException { - for (KBComment kbComment : findByUuid_C(uuid, companyId, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbComment); - } - } - - /** - * Returns the number of k b comments where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid_C(String uuid, long companyId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; - - Object[] finderArgs = new Object[] { uuid, companyId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_C_UUID_1 = "kbComment.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "kbComment.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(kbComment.uuid IS NULL OR kbComment.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "kbComment.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByGroupId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID = - new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByGroupId", - new String[] { Long.class.getName() }, - KBCommentModelImpl.GROUPID_COLUMN_BITMASK | - KBCommentModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_GROUPID = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByGroupId", - new String[] { Long.class.getName() }); - - /** - * Returns all the k b comments where groupId = ?. - * - * @param groupId the group ID - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId) - throws SystemException { - return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b comments where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, int start, int end) - throws SystemException { - return findByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the k b comments where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, 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_GROUPID; - finderArgs = new Object[] { groupId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID; - finderArgs = new Object[] { groupId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBComment kbComment : list) { - if ((groupId != kbComment.getGroupId())) { - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBCommentModelImpl.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(groupId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByGroupId_First(long groupId, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByGroupId_First(groupId, orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the first k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByGroupId_First(long groupId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByGroupId(groupId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByGroupId_Last(long groupId, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByGroupId_Last(groupId, orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the last k b comment in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByGroupId_Last(long groupId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByGroupId(groupId); - - if (count == 0) { - return null; - } - - List list = findByGroupId(groupId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where groupId = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment[] findByGroupId_PrevAndNext(long kbCommentId, - long groupId, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = findByPrimaryKey(kbCommentId); - - Session session = null; - - try { - session = openSession(); - - KBComment[] array = new KBCommentImpl[3]; - - array[0] = getByGroupId_PrevAndNext(session, kbComment, groupId, - orderByComparator, true); - - array[1] = kbComment; - - array[2] = getByGroupId_PrevAndNext(session, kbComment, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBComment getByGroupId_PrevAndNext(Session session, - KBComment kbComment, long groupId, 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_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(KBCommentModelImpl.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(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbComment); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b comments where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByGroupId(long groupId) throws SystemException { - for (KBComment kbComment : findByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbComment); - } - } - - /** - * Returns the number of k b comments where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByGroupId(long groupId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_GROUPID; - - Object[] finderArgs = new Object[] { groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - 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_GROUPID_GROUPID_2 = "kbComment.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_C", - new String[] { - Long.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_C", - new String[] { Long.class.getName(), Long.class.getName() }, - KBCommentModelImpl.GROUPID_COLUMN_BITMASK | - KBCommentModelImpl.CLASSNAMEID_COLUMN_BITMASK | - KBCommentModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_C", - new String[] { Long.class.getName(), Long.class.getName() }); - - /** - * Returns all the k b comments where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_C(long groupId, long classNameId) - throws SystemException { - return findByG_C(groupId, classNameId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b comments where groupId = ? and classNameId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_C(long groupId, long classNameId, int start, - int end) throws SystemException { - return findByG_C(groupId, classNameId, start, end, null); - } - - /** - * Returns an ordered range of all the k b comments where groupId = ? and classNameId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_C(long groupId, long classNameId, 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_G_C; - finderArgs = new Object[] { groupId, classNameId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_C; - finderArgs = new Object[] { - groupId, classNameId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBComment kbComment : list) { - if ((groupId != kbComment.getGroupId()) || - (classNameId != kbComment.getClassNameId())) { - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_G_C_GROUPID_2); - - query.append(_FINDER_COLUMN_G_C_CLASSNAMEID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBCommentModelImpl.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(groupId); - - qPos.add(classNameId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByG_C_First(long groupId, long classNameId, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByG_C_First(groupId, classNameId, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", classNameId="); - msg.append(classNameId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the first k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByG_C_First(long groupId, long classNameId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_C(groupId, classNameId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByG_C_Last(long groupId, long classNameId, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByG_C_Last(groupId, classNameId, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", classNameId="); - msg.append(classNameId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the last k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByG_C_Last(long groupId, long classNameId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_C(groupId, classNameId); - - if (count == 0) { - return null; - } - - List list = findByG_C(groupId, classNameId, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where groupId = ? and classNameId = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param groupId the group ID - * @param classNameId the class name ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment[] findByG_C_PrevAndNext(long kbCommentId, long groupId, - long classNameId, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = findByPrimaryKey(kbCommentId); - - Session session = null; - - try { - session = openSession(); - - KBComment[] array = new KBCommentImpl[3]; - - array[0] = getByG_C_PrevAndNext(session, kbComment, groupId, - classNameId, orderByComparator, true); - - array[1] = kbComment; - - array[2] = getByG_C_PrevAndNext(session, kbComment, groupId, - classNameId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBComment getByG_C_PrevAndNext(Session session, - KBComment kbComment, long groupId, long classNameId, - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_G_C_GROUPID_2); - - query.append(_FINDER_COLUMN_G_C_CLASSNAMEID_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(KBCommentModelImpl.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(groupId); - - qPos.add(classNameId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbComment); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b comments where groupId = ? and classNameId = ? from the database. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_C(long groupId, long classNameId) - throws SystemException { - for (KBComment kbComment : findByG_C(groupId, classNameId, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbComment); - } - } - - /** - * Returns the number of k b comments where groupId = ? and classNameId = ?. - * - * @param groupId the group ID - * @param classNameId the class name ID - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_C(long groupId, long classNameId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_C; - - Object[] finderArgs = new Object[] { groupId, classNameId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_G_C_GROUPID_2); - - query.append(_FINDER_COLUMN_G_C_CLASSNAMEID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(classNameId); - - 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_G_C_GROUPID_2 = "kbComment.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_C_CLASSNAMEID_2 = "kbComment.classNameId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_S", - new String[] { - Long.class.getName(), Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }, - KBCommentModelImpl.GROUPID_COLUMN_BITMASK | - KBCommentModelImpl.STATUS_COLUMN_BITMASK | - KBCommentModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_S = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_S", - new String[] { Long.class.getName(), Integer.class.getName() }); - - /** - * Returns all the k b comments where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status) - throws SystemException { - return findByG_S(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the k b comments where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, int start, - int end) throws SystemException { - return findByG_S(groupId, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b comments where groupId = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(long groupId, int status, 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_G_S; - finderArgs = new Object[] { groupId, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S; - finderArgs = new Object[] { - groupId, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBComment kbComment : list) { - if ((groupId != kbComment.getGroupId()) || - (status != kbComment.getStatus())) { - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBCommentModelImpl.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(groupId); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByG_S_First(groupId, status, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the first k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByG_S_First(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_S(groupId, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByG_S_Last(groupId, status, orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the last k b comment in the ordered set where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByG_S_Last(long groupId, int status, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_S(groupId, status); - - if (count == 0) { - return null; - } - - List list = findByG_S(groupId, status, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where groupId = ? and status = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param groupId the group ID - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment[] findByG_S_PrevAndNext(long kbCommentId, long groupId, - int status, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = findByPrimaryKey(kbCommentId); - - Session session = null; - - try { - session = openSession(); - - KBComment[] array = new KBCommentImpl[3]; - - array[0] = getByG_S_PrevAndNext(session, kbComment, groupId, - status, orderByComparator, true); - - array[1] = kbComment; - - array[2] = getByG_S_PrevAndNext(session, kbComment, groupId, - status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBComment getByG_S_PrevAndNext(Session session, - KBComment kbComment, long groupId, int status, - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_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(KBCommentModelImpl.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(groupId); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbComment); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b comments where groupId = ? and status = ? from the database. - * - * @param groupId the group ID - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_S(long groupId, int status) throws SystemException { - for (KBComment kbComment : findByG_S(groupId, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbComment); - } - } - - /** - * Returns the number of k b comments where groupId = ? and status = ?. - * - * @param groupId the group ID - * @param status the status - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_S(long groupId, int status) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_S; - - Object[] finderArgs = new Object[] { groupId, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_G_S_GROUPID_2); - - query.append(_FINDER_COLUMN_G_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(status); - - 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_G_S_GROUPID_2 = "kbComment.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_S_STATUS_2 = "kbComment.status = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_C_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByC_C", - new String[] { - Long.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByC_C", - new String[] { Long.class.getName(), Long.class.getName() }, - KBCommentModelImpl.CLASSNAMEID_COLUMN_BITMASK | - KBCommentModelImpl.CLASSPK_COLUMN_BITMASK | - KBCommentModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_C_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByC_C", - new String[] { Long.class.getName(), Long.class.getName() }); - - /** - * Returns all the k b comments where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_C(long classNameId, long classPK) - throws SystemException { - return findByC_C(classNameId, classPK, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b comments where classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_C(long classNameId, long classPK, int start, - int end) throws SystemException { - return findByC_C(classNameId, classPK, start, end, null); - } - - /** - * Returns an ordered range of all the k b comments where classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_C(long classNameId, long classPK, 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_C_C; - finderArgs = new Object[] { classNameId, classPK }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_C_C; - finderArgs = new Object[] { - classNameId, classPK, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBComment kbComment : list) { - if ((classNameId != kbComment.getClassNameId()) || - (classPK != kbComment.getClassPK())) { - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_C_C_CLASSNAMEID_2); - - query.append(_FINDER_COLUMN_C_C_CLASSPK_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBCommentModelImpl.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(classNameId); - - qPos.add(classPK); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByC_C_First(long classNameId, long classPK, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByC_C_First(classNameId, classPK, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("classNameId="); - msg.append(classNameId); - - msg.append(", classPK="); - msg.append(classPK); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByC_C_First(long classNameId, long classPK, - OrderByComparator orderByComparator) throws SystemException { - List list = findByC_C(classNameId, classPK, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByC_C_Last(long classNameId, long classPK, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByC_C_Last(classNameId, classPK, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("classNameId="); - msg.append(classNameId); - - msg.append(", classPK="); - msg.append(classPK); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByC_C_Last(long classNameId, long classPK, - OrderByComparator orderByComparator) throws SystemException { - int count = countByC_C(classNameId, classPK); - - if (count == 0) { - return null; - } - - List list = findByC_C(classNameId, classPK, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where classNameId = ? and classPK = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment[] findByC_C_PrevAndNext(long kbCommentId, - long classNameId, long classPK, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = findByPrimaryKey(kbCommentId); - - Session session = null; - - try { - session = openSession(); - - KBComment[] array = new KBCommentImpl[3]; - - array[0] = getByC_C_PrevAndNext(session, kbComment, classNameId, - classPK, orderByComparator, true); - - array[1] = kbComment; - - array[2] = getByC_C_PrevAndNext(session, kbComment, classNameId, - classPK, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBComment getByC_C_PrevAndNext(Session session, - KBComment kbComment, long classNameId, long classPK, - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_C_C_CLASSNAMEID_2); - - query.append(_FINDER_COLUMN_C_C_CLASSPK_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(KBCommentModelImpl.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(classNameId); - - qPos.add(classPK); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbComment); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b comments where classNameId = ? and classPK = ? from the database. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByC_C(long classNameId, long classPK) - throws SystemException { - for (KBComment kbComment : findByC_C(classNameId, classPK, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbComment); - } - } - - /** - * Returns the number of k b comments where classNameId = ? and classPK = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByC_C(long classNameId, long classPK) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_C_C; - - Object[] finderArgs = new Object[] { classNameId, classPK }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_C_C_CLASSNAMEID_2); - - query.append(_FINDER_COLUMN_C_C_CLASSPK_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(classNameId); - - qPos.add(classPK); - - 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_C_C_CLASSNAMEID_2 = "kbComment.classNameId = ? AND "; - private static final String _FINDER_COLUMN_C_C_CLASSPK_2 = "kbComment.classPK = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_U_C_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByU_C_C", - new String[] { - Long.class.getName(), Long.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_U_C_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByU_C_C", - new String[] { - Long.class.getName(), Long.class.getName(), Long.class.getName() - }, - KBCommentModelImpl.USERID_COLUMN_BITMASK | - KBCommentModelImpl.CLASSNAMEID_COLUMN_BITMASK | - KBCommentModelImpl.CLASSPK_COLUMN_BITMASK | - KBCommentModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_U_C_C = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByU_C_C", - new String[] { - Long.class.getName(), Long.class.getName(), Long.class.getName() - }); - - /** - * Returns all the k b comments where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByU_C_C(long userId, long classNameId, - long classPK) throws SystemException { - return findByU_C_C(userId, classNameId, classPK, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b comments where userId = ? and classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByU_C_C(long userId, long classNameId, - long classPK, int start, int end) throws SystemException { - return findByU_C_C(userId, classNameId, classPK, start, end, null); - } - - /** - * Returns an ordered range of all the k b comments where userId = ? and classNameId = ? and classPK = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByU_C_C(long userId, long classNameId, - long classPK, 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_U_C_C; - finderArgs = new Object[] { userId, classNameId, classPK }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_U_C_C; - finderArgs = new Object[] { - userId, classNameId, classPK, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBComment kbComment : list) { - if ((userId != kbComment.getUserId()) || - (classNameId != kbComment.getClassNameId()) || - (classPK != kbComment.getClassPK())) { - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_U_C_C_USERID_2); - - query.append(_FINDER_COLUMN_U_C_C_CLASSNAMEID_2); - - query.append(_FINDER_COLUMN_U_C_C_CLASSPK_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBCommentModelImpl.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(userId); - - qPos.add(classNameId); - - qPos.add(classPK); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByU_C_C_First(long userId, long classNameId, - long classPK, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByU_C_C_First(userId, classNameId, classPK, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(", classNameId="); - msg.append(classNameId); - - msg.append(", classPK="); - msg.append(classPK); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the first k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByU_C_C_First(long userId, long classNameId, - long classPK, OrderByComparator orderByComparator) - throws SystemException { - List list = findByU_C_C(userId, classNameId, classPK, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByU_C_C_Last(long userId, long classNameId, - long classPK, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByU_C_C_Last(userId, classNameId, classPK, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(", classNameId="); - msg.append(classNameId); - - msg.append(", classPK="); - msg.append(classPK); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the last k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByU_C_C_Last(long userId, long classNameId, - long classPK, OrderByComparator orderByComparator) - throws SystemException { - int count = countByU_C_C(userId, classNameId, classPK); - - if (count == 0) { - return null; - } - - List list = findByU_C_C(userId, classNameId, classPK, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where userId = ? and classNameId = ? and classPK = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment[] findByU_C_C_PrevAndNext(long kbCommentId, long userId, - long classNameId, long classPK, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = findByPrimaryKey(kbCommentId); - - Session session = null; - - try { - session = openSession(); - - KBComment[] array = new KBCommentImpl[3]; - - array[0] = getByU_C_C_PrevAndNext(session, kbComment, userId, - classNameId, classPK, orderByComparator, true); - - array[1] = kbComment; - - array[2] = getByU_C_C_PrevAndNext(session, kbComment, userId, - classNameId, classPK, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBComment getByU_C_C_PrevAndNext(Session session, - KBComment kbComment, long userId, long classNameId, long classPK, - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_U_C_C_USERID_2); - - query.append(_FINDER_COLUMN_U_C_C_CLASSNAMEID_2); - - query.append(_FINDER_COLUMN_U_C_C_CLASSPK_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(KBCommentModelImpl.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(userId); - - qPos.add(classNameId); - - qPos.add(classPK); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbComment); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b comments where userId = ? and classNameId = ? and classPK = ? from the database. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByU_C_C(long userId, long classNameId, long classPK) - throws SystemException { - for (KBComment kbComment : findByU_C_C(userId, classNameId, classPK, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbComment); - } - } - - /** - * Returns the number of k b comments where userId = ? and classNameId = ? and classPK = ?. - * - * @param userId the user ID - * @param classNameId the class name ID - * @param classPK the class p k - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByU_C_C(long userId, long classNameId, long classPK) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_U_C_C; - - Object[] finderArgs = new Object[] { userId, classNameId, classPK }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_U_C_C_USERID_2); - - query.append(_FINDER_COLUMN_U_C_C_CLASSNAMEID_2); - - query.append(_FINDER_COLUMN_U_C_C_CLASSPK_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - qPos.add(classNameId); - - qPos.add(classPK); - - 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_U_C_C_USERID_2 = "kbComment.userId = ? AND "; - private static final String _FINDER_COLUMN_U_C_C_CLASSNAMEID_2 = "kbComment.classNameId = ? AND "; - private static final String _FINDER_COLUMN_U_C_C_CLASSPK_2 = "kbComment.classPK = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_C_C_S = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByC_C_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_C_S = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, KBCommentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByC_C_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }, - KBCommentModelImpl.CLASSNAMEID_COLUMN_BITMASK | - KBCommentModelImpl.CLASSPK_COLUMN_BITMASK | - KBCommentModelImpl.STATUS_COLUMN_BITMASK | - KBCommentModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_C_C_S = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByC_C_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_C_C_S = new FinderPath(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByC_C_S", - new String[] { - Long.class.getName(), Long.class.getName(), - Integer.class.getName() - }); - - /** - * Returns all the k b comments where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_C_S(long classNameId, long classPK, - int status) throws SystemException { - return findByC_C_S(classNameId, classPK, status, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b comments where classNameId = ? and classPK = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_C_S(long classNameId, long classPK, - int status, int start, int end) throws SystemException { - return findByC_C_S(classNameId, classPK, status, start, end, null); - } - - /** - * Returns an ordered range of all the k b comments where classNameId = ? and classPK = ? and status = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_C_S(long classNameId, long classPK, - int status, 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_C_C_S; - finderArgs = new Object[] { classNameId, classPK, status }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_C_C_S; - finderArgs = new Object[] { - classNameId, classPK, status, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBComment kbComment : list) { - if ((classNameId != kbComment.getClassNameId()) || - (classPK != kbComment.getClassPK()) || - (status != kbComment.getStatus())) { - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_C_C_S_CLASSNAMEID_2); - - query.append(_FINDER_COLUMN_C_C_S_CLASSPK_2); - - query.append(_FINDER_COLUMN_C_C_S_STATUS_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBCommentModelImpl.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(classNameId); - - qPos.add(classPK); - - qPos.add(status); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByC_C_S_First(long classNameId, long classPK, - int status, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByC_C_S_First(classNameId, classPK, status, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("classNameId="); - msg.append(classNameId); - - msg.append(", classPK="); - msg.append(classPK); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the first k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByC_C_S_First(long classNameId, long classPK, - int status, OrderByComparator orderByComparator) - throws SystemException { - List list = findByC_C_S(classNameId, classPK, status, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByC_C_S_Last(long classNameId, long classPK, - int status, OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByC_C_S_Last(classNameId, classPK, status, - orderByComparator); - - if (kbComment != null) { - return kbComment; - } - - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("classNameId="); - msg.append(classNameId); - - msg.append(", classPK="); - msg.append(classPK); - - msg.append(", status="); - msg.append(status); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchCommentException(msg.toString()); - } - - /** - * Returns the last k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b comment, or null if a matching k b comment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByC_C_S_Last(long classNameId, long classPK, - int status, OrderByComparator orderByComparator) - throws SystemException { - int count = countByC_C_S(classNameId, classPK, status); - - if (count == 0) { - return null; - } - - List list = findByC_C_S(classNameId, classPK, status, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b comments before and after the current k b comment in the ordered set where classNameId = ? and classPK = ? and status = ?. - * - * @param kbCommentId the primary key of the current k b comment - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment[] findByC_C_S_PrevAndNext(long kbCommentId, - long classNameId, long classPK, int status, - OrderByComparator orderByComparator) - throws NoSuchCommentException, SystemException { - KBComment kbComment = findByPrimaryKey(kbCommentId); - - Session session = null; - - try { - session = openSession(); - - KBComment[] array = new KBCommentImpl[3]; - - array[0] = getByC_C_S_PrevAndNext(session, kbComment, classNameId, - classPK, status, orderByComparator, true); - - array[1] = kbComment; - - array[2] = getByC_C_S_PrevAndNext(session, kbComment, classNameId, - classPK, status, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBComment getByC_C_S_PrevAndNext(Session session, - KBComment kbComment, long classNameId, long classPK, int status, - 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_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_C_C_S_CLASSNAMEID_2); - - query.append(_FINDER_COLUMN_C_C_S_CLASSPK_2); - - query.append(_FINDER_COLUMN_C_C_S_STATUS_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(KBCommentModelImpl.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(classNameId); - - qPos.add(classPK); - - qPos.add(status); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbComment); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b comments where classNameId = ? and classPK = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @return the matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_C_S(long classNameId, long classPK, - int[] statuses) throws SystemException { - return findByC_C_S(classNameId, classPK, statuses, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b comments where classNameId = ? and classPK = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_C_S(long classNameId, long classPK, - int[] statuses, int start, int end) throws SystemException { - return findByC_C_S(classNameId, classPK, statuses, start, end, null); - } - - /** - * Returns an ordered range of all the k b comments where classNameId = ? and classPK = ? and status = any ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByC_C_S(long classNameId, long classPK, - int[] statuses, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if ((statuses != null) && (statuses.length == 1)) { - return findByC_C_S(classNameId, classPK, statuses[0], start, end, - orderByComparator); - } - - boolean pagination = true; - Object[] finderArgs = null; - - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderArgs = new Object[] { - classNameId, classPK, StringUtil.merge(statuses) - }; - } - else { - finderArgs = new Object[] { - classNameId, classPK, StringUtil.merge(statuses), - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_C_C_S, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBComment kbComment : list) { - if ((classNameId != kbComment.getClassNameId()) || - (classPK != kbComment.getClassPK()) || - !ArrayUtil.contains(statuses, kbComment.getStatus())) { - list = null; - - break; - } - } - } - - if (list == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_SELECT_KBCOMMENT_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_C_C_S_CLASSNAMEID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_C_C_S_CLASSPK_5); - - conjunctionable = true; - - if ((statuses == null) || (statuses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < statuses.length; i++) { - query.append(_FINDER_COLUMN_C_C_S_STATUS_5); - - if ((i + 1) < statuses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBCommentModelImpl.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(classNameId); - - qPos.add(classPK); - - if (statuses != null) { - qPos.add(statuses); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } - - cacheResult(list); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_C_C_S, - finderArgs, list); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_C_C_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return list; - } - - /** - * Removes all the k b comments where classNameId = ? and classPK = ? and status = ? from the database. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByC_C_S(long classNameId, long classPK, int status) - throws SystemException { - for (KBComment kbComment : findByC_C_S(classNameId, classPK, status, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbComment); - } - } - - /** - * Returns the number of k b comments where classNameId = ? and classPK = ? and status = ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param status the status - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByC_C_S(long classNameId, long classPK, int status) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_C_C_S; - - Object[] finderArgs = new Object[] { classNameId, classPK, status }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - query.append(_FINDER_COLUMN_C_C_S_CLASSNAMEID_2); - - query.append(_FINDER_COLUMN_C_C_S_CLASSPK_2); - - query.append(_FINDER_COLUMN_C_C_S_STATUS_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(classNameId); - - qPos.add(classPK); - - qPos.add(status); - - 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(); - } - - /** - * Returns the number of k b comments where classNameId = ? and classPK = ? and status = any ?. - * - * @param classNameId the class name ID - * @param classPK the class p k - * @param statuses the statuses - * @return the number of matching k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByC_C_S(long classNameId, long classPK, int[] statuses) - throws SystemException { - Object[] finderArgs = new Object[] { - classNameId, classPK, StringUtil.merge(statuses) - }; - - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_C_C_S, - finderArgs, this); - - if (count == null) { - StringBundler query = new StringBundler(); - - query.append(_SQL_COUNT_KBCOMMENT_WHERE); - - boolean conjunctionable = false; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_C_C_S_CLASSNAMEID_5); - - conjunctionable = true; - - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(_FINDER_COLUMN_C_C_S_CLASSPK_5); - - conjunctionable = true; - - if ((statuses == null) || (statuses.length > 0)) { - if (conjunctionable) { - query.append(WHERE_AND); - } - - query.append(StringPool.OPEN_PARENTHESIS); - - for (int i = 0; i < statuses.length; i++) { - query.append(_FINDER_COLUMN_C_C_S_STATUS_5); - - if ((i + 1) < statuses.length) { - query.append(WHERE_OR); - } - } - - query.append(StringPool.CLOSE_PARENTHESIS); - - conjunctionable = true; - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(classNameId); - - qPos.add(classPK); - - if (statuses != null) { - qPos.add(statuses); - } - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_C_C_S, - finderArgs, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_C_C_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - private static final String _FINDER_COLUMN_C_C_S_CLASSNAMEID_2 = "kbComment.classNameId = ? AND "; - private static final String _FINDER_COLUMN_C_C_S_CLASSNAMEID_5 = "(" + - removeConjunction(_FINDER_COLUMN_C_C_S_CLASSNAMEID_2) + ")"; - private static final String _FINDER_COLUMN_C_C_S_CLASSPK_2 = "kbComment.classPK = ? AND "; - private static final String _FINDER_COLUMN_C_C_S_CLASSPK_5 = "(" + - removeConjunction(_FINDER_COLUMN_C_C_S_CLASSPK_2) + ")"; - private static final String _FINDER_COLUMN_C_C_S_STATUS_2 = "kbComment.status = ?"; - private static final String _FINDER_COLUMN_C_C_S_STATUS_5 = "(" + - removeConjunction(_FINDER_COLUMN_C_C_S_STATUS_2) + ")"; - - public KBCommentPersistenceImpl() { - setModelClass(KBComment.class); - } - - /** - * Caches the k b comment in the entity cache if it is enabled. - * - * @param kbComment the k b comment - */ - @Override - public void cacheResult(KBComment kbComment) { - EntityCacheUtil.putResult(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentImpl.class, kbComment.getPrimaryKey(), kbComment); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - new Object[] { kbComment.getUuid(), kbComment.getGroupId() }, - kbComment); - - kbComment.resetOriginalValues(); - } - - /** - * Caches the k b comments in the entity cache if it is enabled. - * - * @param kbComments the k b comments - */ - @Override - public void cacheResult(List kbComments) { - for (KBComment kbComment : kbComments) { - if (EntityCacheUtil.getResult( - KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentImpl.class, kbComment.getPrimaryKey()) == null) { - cacheResult(kbComment); - } - else { - kbComment.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all k b comments. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(KBCommentImpl.class.getName()); - } - - EntityCacheUtil.clearCache(KBCommentImpl.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 k b comment. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache(KBComment kbComment) { - EntityCacheUtil.removeResult(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentImpl.class, kbComment.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(kbComment); - } - - @Override - public void clearCache(List kbComments) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (KBComment kbComment : kbComments) { - EntityCacheUtil.removeResult(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentImpl.class, kbComment.getPrimaryKey()); - - clearUniqueFindersCache(kbComment); - } - } - - protected void cacheUniqueFindersCache(KBComment kbComment) { - if (kbComment.isNew()) { - Object[] args = new Object[] { - kbComment.getUuid(), kbComment.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - kbComment); - } - else { - KBCommentModelImpl kbCommentModelImpl = (KBCommentModelImpl)kbComment; - - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbComment.getUuid(), kbComment.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - kbComment); - } - } - } - - protected void clearUniqueFindersCache(KBComment kbComment) { - KBCommentModelImpl kbCommentModelImpl = (KBCommentModelImpl)kbComment; - - Object[] args = new Object[] { kbComment.getUuid(), kbComment.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - args = new Object[] { - kbCommentModelImpl.getOriginalUuid(), - kbCommentModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - } - } - - /** - * Creates a new k b comment with the primary key. Does not add the k b comment to the database. - * - * @param kbCommentId the primary key for the new k b comment - * @return the new k b comment - */ - @Override - public KBComment create(long kbCommentId) { - KBComment kbComment = new KBCommentImpl(); - - kbComment.setNew(true); - kbComment.setPrimaryKey(kbCommentId); - - String uuid = PortalUUIDUtil.generate(); - - kbComment.setUuid(uuid); - - return kbComment; - } - - /** - * Removes the k b comment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment that was removed - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment remove(long kbCommentId) - throws NoSuchCommentException, SystemException { - return remove((Serializable)kbCommentId); - } - - /** - * Removes the k b comment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the k b comment - * @return the k b comment that was removed - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment remove(Serializable primaryKey) - throws NoSuchCommentException, SystemException { - Session session = null; - - try { - session = openSession(); - - KBComment kbComment = (KBComment)session.get(KBCommentImpl.class, - primaryKey); - - if (kbComment == 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(kbComment); - } - catch (NoSuchCommentException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected KBComment removeImpl(KBComment kbComment) - throws SystemException { - kbComment = toUnwrappedModel(kbComment); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(kbComment)) { - kbComment = (KBComment)session.get(KBCommentImpl.class, - kbComment.getPrimaryKeyObj()); - } - - if (kbComment != null) { - session.delete(kbComment); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (kbComment != null) { - clearCache(kbComment); - } - - return kbComment; - } - - @Override - public KBComment updateImpl( - com.liferay.knowledgebase.model.KBComment kbComment) - throws SystemException { - kbComment = toUnwrappedModel(kbComment); - - boolean isNew = kbComment.isNew(); - - KBCommentModelImpl kbCommentModelImpl = (KBCommentModelImpl)kbComment; - - if (Validator.isNull(kbComment.getUuid())) { - String uuid = PortalUUIDUtil.generate(); - - kbComment.setUuid(uuid); - } - - Session session = null; - - try { - session = openSession(); - - if (kbComment.isNew()) { - session.save(kbComment); - - kbComment.setNew(false); - } - else { - session.merge(kbComment); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !KBCommentModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbCommentModelImpl.getOriginalUuid() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - - args = new Object[] { kbCommentModelImpl.getUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - } - - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbCommentModelImpl.getOriginalUuid(), - kbCommentModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - - args = new Object[] { - kbCommentModelImpl.getUuid(), - kbCommentModelImpl.getCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - } - - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbCommentModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - - args = new Object[] { kbCommentModelImpl.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - } - - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbCommentModelImpl.getOriginalGroupId(), - kbCommentModelImpl.getOriginalClassNameId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_C, - args); - - args = new Object[] { - kbCommentModelImpl.getGroupId(), - kbCommentModelImpl.getClassNameId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_C, - args); - } - - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbCommentModelImpl.getOriginalGroupId(), - kbCommentModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - - args = new Object[] { - kbCommentModelImpl.getGroupId(), - kbCommentModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - } - - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbCommentModelImpl.getOriginalClassNameId(), - kbCommentModelImpl.getOriginalClassPK() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_C, - args); - - args = new Object[] { - kbCommentModelImpl.getClassNameId(), - kbCommentModelImpl.getClassPK() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_C, - args); - } - - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_U_C_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbCommentModelImpl.getOriginalUserId(), - kbCommentModelImpl.getOriginalClassNameId(), - kbCommentModelImpl.getOriginalClassPK() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_U_C_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_U_C_C, - args); - - args = new Object[] { - kbCommentModelImpl.getUserId(), - kbCommentModelImpl.getClassNameId(), - kbCommentModelImpl.getClassPK() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_U_C_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_U_C_C, - args); - } - - if ((kbCommentModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_C_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbCommentModelImpl.getOriginalClassNameId(), - kbCommentModelImpl.getOriginalClassPK(), - kbCommentModelImpl.getOriginalStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_C_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_C_S, - args); - - args = new Object[] { - kbCommentModelImpl.getClassNameId(), - kbCommentModelImpl.getClassPK(), - kbCommentModelImpl.getStatus() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_C_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_C_C_S, - args); - } - } - - EntityCacheUtil.putResult(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentImpl.class, kbComment.getPrimaryKey(), kbComment); - - clearUniqueFindersCache(kbComment); - cacheUniqueFindersCache(kbComment); - - return kbComment; - } - - protected KBComment toUnwrappedModel(KBComment kbComment) { - if (kbComment instanceof KBCommentImpl) { - return kbComment; - } - - KBCommentImpl kbCommentImpl = new KBCommentImpl(); - - kbCommentImpl.setNew(kbComment.isNew()); - kbCommentImpl.setPrimaryKey(kbComment.getPrimaryKey()); - - kbCommentImpl.setUuid(kbComment.getUuid()); - kbCommentImpl.setKbCommentId(kbComment.getKbCommentId()); - kbCommentImpl.setGroupId(kbComment.getGroupId()); - kbCommentImpl.setCompanyId(kbComment.getCompanyId()); - kbCommentImpl.setUserId(kbComment.getUserId()); - kbCommentImpl.setUserName(kbComment.getUserName()); - kbCommentImpl.setCreateDate(kbComment.getCreateDate()); - kbCommentImpl.setModifiedDate(kbComment.getModifiedDate()); - kbCommentImpl.setClassNameId(kbComment.getClassNameId()); - kbCommentImpl.setClassPK(kbComment.getClassPK()); - kbCommentImpl.setContent(kbComment.getContent()); - kbCommentImpl.setUserRating(kbComment.getUserRating()); - kbCommentImpl.setStatus(kbComment.getStatus()); - - return kbCommentImpl; - } - - /** - * Returns the k b 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 k b comment - * @return the k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByPrimaryKey(Serializable primaryKey) - throws NoSuchCommentException, SystemException { - KBComment kbComment = fetchByPrimaryKey(primaryKey); - - if (kbComment == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchCommentException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return kbComment; - } - - /** - * Returns the k b comment with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchCommentException} if it could not be found. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment - * @throws com.liferay.knowledgebase.NoSuchCommentException if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment findByPrimaryKey(long kbCommentId) - throws NoSuchCommentException, SystemException { - return findByPrimaryKey((Serializable)kbCommentId); - } - - /** - * Returns the k b comment with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the k b comment - * @return the k b comment, or null if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - KBComment kbComment = (KBComment)EntityCacheUtil.getResult(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentImpl.class, primaryKey); - - if (kbComment == _nullKBComment) { - return null; - } - - if (kbComment == null) { - Session session = null; - - try { - session = openSession(); - - kbComment = (KBComment)session.get(KBCommentImpl.class, - primaryKey); - - if (kbComment != null) { - cacheResult(kbComment); - } - else { - EntityCacheUtil.putResult(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentImpl.class, primaryKey, _nullKBComment); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(KBCommentModelImpl.ENTITY_CACHE_ENABLED, - KBCommentImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return kbComment; - } - - /** - * Returns the k b comment with the primary key or returns null if it could not be found. - * - * @param kbCommentId the primary key of the k b comment - * @return the k b comment, or null if a k b comment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBComment fetchByPrimaryKey(long kbCommentId) - throws SystemException { - return fetchByPrimaryKey((Serializable)kbCommentId); - } - - /** - * Returns all the k b comments. - * - * @return the k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @return the range of k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) - throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the k b comments. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBCommentModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b comments - * @param end the upper bound of the range of k b comments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b comments - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_KBCOMMENT); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_KBCOMMENT; - - if (pagination) { - sql = sql.concat(KBCommentModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b comments from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (KBComment kbComment : findAll()) { - remove(kbComment); - } - } - - /** - * Returns the number of k b comments. - * - * @return the number of k b 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_KBCOMMENT); - - 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(); - } - - @Override - protected Set getBadColumnNames() { - return _badColumnNames; - } - - /** - * Initializes the k b comment persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.com.liferay.knowledgebase.model.KBComment"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(KBCommentImpl.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_KBCOMMENT = "SELECT kbComment FROM KBComment kbComment"; - private static final String _SQL_SELECT_KBCOMMENT_WHERE = "SELECT kbComment FROM KBComment kbComment WHERE "; - private static final String _SQL_COUNT_KBCOMMENT = "SELECT COUNT(kbComment) FROM KBComment kbComment"; - private static final String _SQL_COUNT_KBCOMMENT_WHERE = "SELECT COUNT(kbComment) FROM KBComment kbComment WHERE "; - private static final String _ORDER_BY_ENTITY_ALIAS = "kbComment."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No KBComment exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No KBComment 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(KBCommentPersistenceImpl.class); - private static Set _badColumnNames = SetUtil.fromArray(new String[] { - "uuid" - }); - private static KBComment _nullKBComment = new KBCommentImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullKBCommentCacheModel; - } - }; - - private static CacheModel _nullKBCommentCacheModel = new CacheModel() { - @Override - public KBComment toEntityModel() { - return _nullKBComment; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBFolderPersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBFolderPersistenceImpl.java deleted file mode 100644 index e86c488439..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBFolderPersistenceImpl.java +++ /dev/null @@ -1,3787 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.NoSuchFolderException; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.impl.KBFolderImpl; -import com.liferay.knowledgebase.model.impl.KBFolderModelImpl; - -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.SQLQuery; -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.SetUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.security.permission.InlineSQLHelperUtil; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * The persistence implementation for the k b folder service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBFolderPersistence - * @see KBFolderUtil - * @generated - */ -public class KBFolderPersistenceImpl extends BasePersistenceImpl - implements KBFolderPersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link KBFolderUtil} to access the k b folder persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = KBFolderImpl.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(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.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_UUID = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", - new String[] { String.class.getName() }, - KBFolderModelImpl.UUID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", - new String[] { String.class.getName() }); - - /** - * Returns all the k b folders where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid) throws SystemException { - return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b folders where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, int start, int end) - throws SystemException { - return findByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the k b folders where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, 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_UUID; - finderArgs = new Object[] { uuid }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; - finderArgs = new Object[] { uuid, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBFolder kbFolder : list) { - if (!Validator.equals(uuid, kbFolder.getUuid())) { - 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_KBFOLDER_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBFolderModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByUuid_First(String uuid, - OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByUuid_First(uuid, orderByComparator); - - if (kbFolder != null) { - return kbFolder; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchFolderException(msg.toString()); - } - - /** - * Returns the first k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByUuid_First(String uuid, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid(uuid, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByUuid_Last(String uuid, - OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByUuid_Last(uuid, orderByComparator); - - if (kbFolder != null) { - return kbFolder; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchFolderException(msg.toString()); - } - - /** - * Returns the last k b folder in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByUuid_Last(String uuid, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid(uuid); - - if (count == 0) { - return null; - } - - List list = findByUuid(uuid, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b folders before and after the current k b folder in the ordered set where uuid = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder[] findByUuid_PrevAndNext(long kbFolderId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = findByPrimaryKey(kbFolderId); - - Session session = null; - - try { - session = openSession(); - - KBFolder[] array = new KBFolderImpl[3]; - - array[0] = getByUuid_PrevAndNext(session, kbFolder, uuid, - orderByComparator, true); - - array[1] = kbFolder; - - array[2] = getByUuid_PrevAndNext(session, kbFolder, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBFolder getByUuid_PrevAndNext(Session session, - KBFolder kbFolder, String uuid, 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_KBFOLDER_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_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(KBFolderModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbFolder); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b folders where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid(String uuid) throws SystemException { - for (KBFolder kbFolder : findByUuid(uuid, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbFolder); - } - } - - /** - * Returns the number of k b folders where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid(String uuid) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; - - Object[] finderArgs = new Object[] { uuid }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_KBFOLDER_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_UUID_1 = "kbFolder.uuid IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2 = "kbFolder.uuid = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3 = "(kbFolder.uuid IS NULL OR kbFolder.uuid = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }, - KBFolderModelImpl.UUID_COLUMN_BITMASK | - KBFolderModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns the k b folder where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByUUID_G(String uuid, long groupId) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByUUID_G(uuid, groupId); - - if (kbFolder == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchFolderException(msg.toString()); - } - - return kbFolder; - } - - /** - * Returns the k b folder where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByUUID_G(String uuid, long groupId) - throws SystemException { - return fetchByUUID_G(uuid, groupId, true); - } - - /** - * Returns the k b folder where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByUUID_G(String uuid, long groupId, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { uuid, groupId }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, this); - } - - if (result instanceof KBFolder) { - KBFolder kbFolder = (KBFolder)result; - - if (!Validator.equals(uuid, kbFolder.getUuid()) || - (groupId != kbFolder.getGroupId())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_KBFOLDER_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, list); - } - else { - KBFolder kbFolder = list.get(0); - - result = kbFolder; - - cacheResult(kbFolder); - - if ((kbFolder.getUuid() == null) || - !kbFolder.getUuid().equals(uuid) || - (kbFolder.getGroupId() != groupId)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, kbFolder); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (KBFolder)result; - } - } - - /** - * Removes the k b folder where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder removeByUUID_G(String uuid, long groupId) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = findByUUID_G(uuid, groupId); - - return remove(kbFolder); - } - - /** - * Returns the number of k b folders where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUUID_G(String uuid, long groupId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; - - Object[] finderArgs = new Object[] { uuid, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBFOLDER_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - 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_UUID_G_UUID_1 = "kbFolder.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "kbFolder.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(kbFolder.uuid IS NULL OR kbFolder.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "kbFolder.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", - new String[] { - String.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = - new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }, - KBFolderModelImpl.UUID_COLUMN_BITMASK | - KBFolderModelImpl.COMPANYID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns all the k b folders where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId) - throws SystemException { - return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b folders where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId, int start, - int end) throws SystemException { - return findByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the k b folders where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, 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_UUID_C; - finderArgs = new Object[] { uuid, companyId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; - finderArgs = new Object[] { - uuid, companyId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBFolder kbFolder : list) { - if (!Validator.equals(uuid, kbFolder.getUuid()) || - (companyId != kbFolder.getCompanyId())) { - 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_KBFOLDER_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBFolderModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByUuid_C_First(uuid, companyId, - orderByComparator); - - if (kbFolder != null) { - return kbFolder; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchFolderException(msg.toString()); - } - - /** - * Returns the first k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid_C(uuid, companyId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByUuid_C_Last(uuid, companyId, - orderByComparator); - - if (kbFolder != null) { - return kbFolder; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchFolderException(msg.toString()); - } - - /** - * Returns the last k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid_C(uuid, companyId); - - if (count == 0) { - return null; - } - - List list = findByUuid_C(uuid, companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b folders before and after the current k b folder in the ordered set where uuid = ? and companyId = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder[] findByUuid_C_PrevAndNext(long kbFolderId, String uuid, - long companyId, OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = findByPrimaryKey(kbFolderId); - - Session session = null; - - try { - session = openSession(); - - KBFolder[] array = new KBFolderImpl[3]; - - array[0] = getByUuid_C_PrevAndNext(session, kbFolder, uuid, - companyId, orderByComparator, true); - - array[1] = kbFolder; - - array[2] = getByUuid_C_PrevAndNext(session, kbFolder, uuid, - companyId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBFolder getByUuid_C_PrevAndNext(Session session, - KBFolder kbFolder, String uuid, 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_KBFOLDER_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_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(KBFolderModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbFolder); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b folders where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid_C(String uuid, long companyId) - throws SystemException { - for (KBFolder kbFolder : findByUuid_C(uuid, companyId, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbFolder); - } - } - - /** - * Returns the number of k b folders where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid_C(String uuid, long companyId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; - - Object[] finderArgs = new Object[] { uuid, companyId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBFOLDER_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_C_UUID_1 = "kbFolder.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "kbFolder.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(kbFolder.uuid IS NULL OR kbFolder.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "kbFolder.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_P", - new String[] { - Long.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_P", - new String[] { Long.class.getName(), Long.class.getName() }, - KBFolderModelImpl.GROUPID_COLUMN_BITMASK | - KBFolderModelImpl.PARENTKBFOLDERID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_P = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_P", - new String[] { Long.class.getName(), Long.class.getName() }); - - /** - * Returns all the k b folders where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P(long groupId, long parentKBFolderId) - throws SystemException { - return findByG_P(groupId, parentKBFolderId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b folders where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P(long groupId, long parentKBFolderId, - int start, int end) throws SystemException { - return findByG_P(groupId, parentKBFolderId, start, end, null); - } - - /** - * Returns an ordered range of all the k b folders where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_P(long groupId, long parentKBFolderId, - 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_G_P; - finderArgs = new Object[] { groupId, parentKBFolderId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_P; - finderArgs = new Object[] { - groupId, parentKBFolderId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBFolder kbFolder : list) { - if ((groupId != kbFolder.getGroupId()) || - (parentKBFolderId != kbFolder.getParentKBFolderId())) { - 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_KBFOLDER_WHERE); - - query.append(_FINDER_COLUMN_G_P_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_PARENTKBFOLDERID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBFolderModelImpl.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(groupId); - - qPos.add(parentKBFolderId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByG_P_First(long groupId, long parentKBFolderId, - OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByG_P_First(groupId, parentKBFolderId, - orderByComparator); - - if (kbFolder != null) { - return kbFolder; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentKBFolderId="); - msg.append(parentKBFolderId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchFolderException(msg.toString()); - } - - /** - * Returns the first k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByG_P_First(long groupId, long parentKBFolderId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_P(groupId, parentKBFolderId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByG_P_Last(long groupId, long parentKBFolderId, - OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByG_P_Last(groupId, parentKBFolderId, - orderByComparator); - - if (kbFolder != null) { - return kbFolder; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentKBFolderId="); - msg.append(parentKBFolderId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchFolderException(msg.toString()); - } - - /** - * Returns the last k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByG_P_Last(long groupId, long parentKBFolderId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_P(groupId, parentKBFolderId); - - if (count == 0) { - return null; - } - - List list = findByG_P(groupId, parentKBFolderId, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b folders before and after the current k b folder in the ordered set where groupId = ? and parentKBFolderId = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder[] findByG_P_PrevAndNext(long kbFolderId, long groupId, - long parentKBFolderId, OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = findByPrimaryKey(kbFolderId); - - Session session = null; - - try { - session = openSession(); - - KBFolder[] array = new KBFolderImpl[3]; - - array[0] = getByG_P_PrevAndNext(session, kbFolder, groupId, - parentKBFolderId, orderByComparator, true); - - array[1] = kbFolder; - - array[2] = getByG_P_PrevAndNext(session, kbFolder, groupId, - parentKBFolderId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBFolder getByG_P_PrevAndNext(Session session, KBFolder kbFolder, - long groupId, long parentKBFolderId, - 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_KBFOLDER_WHERE); - - query.append(_FINDER_COLUMN_G_P_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_PARENTKBFOLDERID_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(KBFolderModelImpl.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(groupId); - - qPos.add(parentKBFolderId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbFolder); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P(long groupId, long parentKBFolderId) - throws SystemException { - return filterFindByG_P(groupId, parentKBFolderId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P(long groupId, long parentKBFolderId, - int start, int end) throws SystemException { - return filterFindByG_P(groupId, parentKBFolderId, start, end, null); - } - - /** - * Returns an ordered range of all the k b folders that the user has permissions to view where groupId = ? and parentKBFolderId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByG_P(long groupId, long parentKBFolderId, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P(groupId, parentKBFolderId, start, end, - orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBFOLDER_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBFOLDER_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_PARENTKBFOLDERID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBFOLDER_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBFolderModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBFolderModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBFolder.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBFolderImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBFolderImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentKBFolderId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b folders before and after the current k b folder in the ordered set of k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - * @param kbFolderId the primary key of the current k b folder - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder[] filterFindByG_P_PrevAndNext(long kbFolderId, - long groupId, long parentKBFolderId, OrderByComparator orderByComparator) - throws NoSuchFolderException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByG_P_PrevAndNext(kbFolderId, groupId, parentKBFolderId, - orderByComparator); - } - - KBFolder kbFolder = findByPrimaryKey(kbFolderId); - - Session session = null; - - try { - session = openSession(); - - KBFolder[] array = new KBFolderImpl[3]; - - array[0] = filterGetByG_P_PrevAndNext(session, kbFolder, groupId, - parentKBFolderId, orderByComparator, true); - - array[1] = kbFolder; - - array[2] = filterGetByG_P_PrevAndNext(session, kbFolder, groupId, - parentKBFolderId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBFolder filterGetByG_P_PrevAndNext(Session session, - KBFolder kbFolder, long groupId, long parentKBFolderId, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBFOLDER_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBFOLDER_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_G_P_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_PARENTKBFOLDERID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBFOLDER_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBFolderModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBFolderModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBFolder.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBFolderImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBFolderImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentKBFolderId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbFolder); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b folders where groupId = ? and parentKBFolderId = ? from the database. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_P(long groupId, long parentKBFolderId) - throws SystemException { - for (KBFolder kbFolder : findByG_P(groupId, parentKBFolderId, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbFolder); - } - } - - /** - * Returns the number of k b folders where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P(long groupId, long parentKBFolderId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_P; - - Object[] finderArgs = new Object[] { groupId, parentKBFolderId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBFOLDER_WHERE); - - query.append(_FINDER_COLUMN_G_P_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_PARENTKBFOLDERID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentKBFolderId); - - 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(); - } - - /** - * Returns the number of k b folders that the user has permission to view where groupId = ? and parentKBFolderId = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @return the number of matching k b folders that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByG_P(long groupId, long parentKBFolderId) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByG_P(groupId, parentKBFolderId); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_KBFOLDER_WHERE); - - query.append(_FINDER_COLUMN_G_P_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_PARENTKBFOLDERID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBFolder.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentKBFolderId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_G_P_GROUPID_2 = "kbFolder.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_P_PARENTKBFOLDERID_2 = "kbFolder.parentKBFolderId = ?"; - public static final FinderPath FINDER_PATH_FETCH_BY_G_P_N = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByG_P_N", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName() - }, - KBFolderModelImpl.GROUPID_COLUMN_BITMASK | - KBFolderModelImpl.PARENTKBFOLDERID_COLUMN_BITMASK | - KBFolderModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_P_N = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_P_N", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName() - }); - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and name = ? or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByG_P_N(long groupId, long parentKBFolderId, String name) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByG_P_N(groupId, parentKBFolderId, name); - - if (kbFolder == null) { - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentKBFolderId="); - msg.append(parentKBFolderId); - - msg.append(", name="); - msg.append(name); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchFolderException(msg.toString()); - } - - return kbFolder; - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and name = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByG_P_N(long groupId, long parentKBFolderId, - String name) throws SystemException { - return fetchByG_P_N(groupId, parentKBFolderId, name, true); - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and name = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByG_P_N(long groupId, long parentKBFolderId, - String name, boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { groupId, parentKBFolderId, name }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_G_P_N, - finderArgs, this); - } - - if (result instanceof KBFolder) { - KBFolder kbFolder = (KBFolder)result; - - if ((groupId != kbFolder.getGroupId()) || - (parentKBFolderId != kbFolder.getParentKBFolderId()) || - !Validator.equals(name, kbFolder.getName())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(5); - - query.append(_SQL_SELECT_KBFOLDER_WHERE); - - query.append(_FINDER_COLUMN_G_P_N_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_N_PARENTKBFOLDERID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_P_N_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_N_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_P_N_NAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentKBFolderId); - - if (bindName) { - qPos.add(name); - } - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_N, - finderArgs, list); - } - else { - if ((list.size() > 1) && _log.isWarnEnabled()) { - _log.warn( - "KBFolderPersistenceImpl.fetchByG_P_N(long, long, String, boolean) with parameters (" + - StringUtil.merge(finderArgs) + - ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); - } - - KBFolder kbFolder = list.get(0); - - result = kbFolder; - - cacheResult(kbFolder); - - if ((kbFolder.getGroupId() != groupId) || - (kbFolder.getParentKBFolderId() != parentKBFolderId) || - (kbFolder.getName() == null) || - !kbFolder.getName().equals(name)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_N, - finderArgs, kbFolder); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_P_N, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (KBFolder)result; - } - } - - /** - * Removes the k b folder where groupId = ? and parentKBFolderId = ? and name = ? from the database. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder removeByG_P_N(long groupId, long parentKBFolderId, - String name) throws NoSuchFolderException, SystemException { - KBFolder kbFolder = findByG_P_N(groupId, parentKBFolderId, name); - - return remove(kbFolder); - } - - /** - * Returns the number of k b folders where groupId = ? and parentKBFolderId = ? and name = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param name the name - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_N(long groupId, long parentKBFolderId, String name) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_P_N; - - Object[] finderArgs = new Object[] { groupId, parentKBFolderId, name }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBFOLDER_WHERE); - - query.append(_FINDER_COLUMN_G_P_N_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_N_PARENTKBFOLDERID_2); - - boolean bindName = false; - - if (name == null) { - query.append(_FINDER_COLUMN_G_P_N_NAME_1); - } - else if (name.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_N_NAME_3); - } - else { - bindName = true; - - query.append(_FINDER_COLUMN_G_P_N_NAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentKBFolderId); - - if (bindName) { - qPos.add(name); - } - - 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_G_P_N_GROUPID_2 = "kbFolder.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_P_N_PARENTKBFOLDERID_2 = "kbFolder.parentKBFolderId = ? AND "; - private static final String _FINDER_COLUMN_G_P_N_NAME_1 = "kbFolder.name IS NULL"; - private static final String _FINDER_COLUMN_G_P_N_NAME_2 = "kbFolder.name = ?"; - private static final String _FINDER_COLUMN_G_P_N_NAME_3 = "(kbFolder.name IS NULL OR kbFolder.name = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_G_P_UT = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, KBFolderImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByG_P_UT", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName() - }, - KBFolderModelImpl.GROUPID_COLUMN_BITMASK | - KBFolderModelImpl.PARENTKBFOLDERID_COLUMN_BITMASK | - KBFolderModelImpl.URLTITLE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_P_UT = new FinderPath(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_P_UT", - new String[] { - Long.class.getName(), Long.class.getName(), - String.class.getName() - }); - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the matching k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByG_P_UT(long groupId, long parentKBFolderId, - String urlTitle) throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByG_P_UT(groupId, parentKBFolderId, urlTitle); - - if (kbFolder == null) { - StringBundler msg = new StringBundler(8); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", parentKBFolderId="); - msg.append(parentKBFolderId); - - msg.append(", urlTitle="); - msg.append(urlTitle); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchFolderException(msg.toString()); - } - - return kbFolder; - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? or returns null if it could not be found. Uses the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByG_P_UT(long groupId, long parentKBFolderId, - String urlTitle) throws SystemException { - return fetchByG_P_UT(groupId, parentKBFolderId, urlTitle, true); - } - - /** - * Returns the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b folder, or null if a matching k b folder could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByG_P_UT(long groupId, long parentKBFolderId, - String urlTitle, boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { groupId, parentKBFolderId, urlTitle }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_G_P_UT, - finderArgs, this); - } - - if (result instanceof KBFolder) { - KBFolder kbFolder = (KBFolder)result; - - if ((groupId != kbFolder.getGroupId()) || - (parentKBFolderId != kbFolder.getParentKBFolderId()) || - !Validator.equals(urlTitle, kbFolder.getUrlTitle())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(5); - - query.append(_SQL_SELECT_KBFOLDER_WHERE); - - query.append(_FINDER_COLUMN_G_P_UT_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_UT_PARENTKBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_P_UT_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_UT_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_P_UT_URLTITLE_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentKBFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_UT, - finderArgs, list); - } - else { - if ((list.size() > 1) && _log.isWarnEnabled()) { - _log.warn( - "KBFolderPersistenceImpl.fetchByG_P_UT(long, long, String, boolean) with parameters (" + - StringUtil.merge(finderArgs) + - ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); - } - - KBFolder kbFolder = list.get(0); - - result = kbFolder; - - cacheResult(kbFolder); - - if ((kbFolder.getGroupId() != groupId) || - (kbFolder.getParentKBFolderId() != parentKBFolderId) || - (kbFolder.getUrlTitle() == null) || - !kbFolder.getUrlTitle().equals(urlTitle)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_UT, - finderArgs, kbFolder); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_P_UT, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (KBFolder)result; - } - } - - /** - * Removes the k b folder where groupId = ? and parentKBFolderId = ? and urlTitle = ? from the database. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the k b folder that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder removeByG_P_UT(long groupId, long parentKBFolderId, - String urlTitle) throws NoSuchFolderException, SystemException { - KBFolder kbFolder = findByG_P_UT(groupId, parentKBFolderId, urlTitle); - - return remove(kbFolder); - } - - /** - * Returns the number of k b folders where groupId = ? and parentKBFolderId = ? and urlTitle = ?. - * - * @param groupId the group ID - * @param parentKBFolderId the parent k b folder ID - * @param urlTitle the url title - * @return the number of matching k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_P_UT(long groupId, long parentKBFolderId, - String urlTitle) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_P_UT; - - Object[] finderArgs = new Object[] { groupId, parentKBFolderId, urlTitle }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_COUNT_KBFOLDER_WHERE); - - query.append(_FINDER_COLUMN_G_P_UT_GROUPID_2); - - query.append(_FINDER_COLUMN_G_P_UT_PARENTKBFOLDERID_2); - - boolean bindUrlTitle = false; - - if (urlTitle == null) { - query.append(_FINDER_COLUMN_G_P_UT_URLTITLE_1); - } - else if (urlTitle.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_P_UT_URLTITLE_3); - } - else { - bindUrlTitle = true; - - query.append(_FINDER_COLUMN_G_P_UT_URLTITLE_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - qPos.add(parentKBFolderId); - - if (bindUrlTitle) { - qPos.add(urlTitle); - } - - 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_G_P_UT_GROUPID_2 = "kbFolder.groupId = ? AND "; - private static final String _FINDER_COLUMN_G_P_UT_PARENTKBFOLDERID_2 = "kbFolder.parentKBFolderId = ? AND "; - private static final String _FINDER_COLUMN_G_P_UT_URLTITLE_1 = "kbFolder.urlTitle IS NULL"; - private static final String _FINDER_COLUMN_G_P_UT_URLTITLE_2 = "kbFolder.urlTitle = ?"; - private static final String _FINDER_COLUMN_G_P_UT_URLTITLE_3 = "(kbFolder.urlTitle IS NULL OR kbFolder.urlTitle = '')"; - - public KBFolderPersistenceImpl() { - setModelClass(KBFolder.class); - } - - /** - * Caches the k b folder in the entity cache if it is enabled. - * - * @param kbFolder the k b folder - */ - @Override - public void cacheResult(KBFolder kbFolder) { - EntityCacheUtil.putResult(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderImpl.class, kbFolder.getPrimaryKey(), kbFolder); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - new Object[] { kbFolder.getUuid(), kbFolder.getGroupId() }, kbFolder); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_N, - new Object[] { - kbFolder.getGroupId(), kbFolder.getParentKBFolderId(), - kbFolder.getName() - }, kbFolder); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_UT, - new Object[] { - kbFolder.getGroupId(), kbFolder.getParentKBFolderId(), - kbFolder.getUrlTitle() - }, kbFolder); - - kbFolder.resetOriginalValues(); - } - - /** - * Caches the k b folders in the entity cache if it is enabled. - * - * @param kbFolders the k b folders - */ - @Override - public void cacheResult(List kbFolders) { - for (KBFolder kbFolder : kbFolders) { - if (EntityCacheUtil.getResult( - KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderImpl.class, kbFolder.getPrimaryKey()) == null) { - cacheResult(kbFolder); - } - else { - kbFolder.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all k b folders. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(KBFolderImpl.class.getName()); - } - - EntityCacheUtil.clearCache(KBFolderImpl.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 k b folder. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache(KBFolder kbFolder) { - EntityCacheUtil.removeResult(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderImpl.class, kbFolder.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(kbFolder); - } - - @Override - public void clearCache(List kbFolders) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (KBFolder kbFolder : kbFolders) { - EntityCacheUtil.removeResult(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderImpl.class, kbFolder.getPrimaryKey()); - - clearUniqueFindersCache(kbFolder); - } - } - - protected void cacheUniqueFindersCache(KBFolder kbFolder) { - if (kbFolder.isNew()) { - Object[] args = new Object[] { - kbFolder.getUuid(), kbFolder.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - kbFolder); - - args = new Object[] { - kbFolder.getGroupId(), kbFolder.getParentKBFolderId(), - kbFolder.getName() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_P_N, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_N, args, kbFolder); - - args = new Object[] { - kbFolder.getGroupId(), kbFolder.getParentKBFolderId(), - kbFolder.getUrlTitle() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_P_UT, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_UT, args, - kbFolder); - } - else { - KBFolderModelImpl kbFolderModelImpl = (KBFolderModelImpl)kbFolder; - - if ((kbFolderModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbFolder.getUuid(), kbFolder.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - kbFolder); - } - - if ((kbFolderModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_P_N.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbFolder.getGroupId(), kbFolder.getParentKBFolderId(), - kbFolder.getName() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_P_N, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_N, args, - kbFolder); - } - - if ((kbFolderModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_P_UT.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbFolder.getGroupId(), kbFolder.getParentKBFolderId(), - kbFolder.getUrlTitle() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_P_UT, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P_UT, args, - kbFolder); - } - } - } - - protected void clearUniqueFindersCache(KBFolder kbFolder) { - KBFolderModelImpl kbFolderModelImpl = (KBFolderModelImpl)kbFolder; - - Object[] args = new Object[] { kbFolder.getUuid(), kbFolder.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - - if ((kbFolderModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - args = new Object[] { - kbFolderModelImpl.getOriginalUuid(), - kbFolderModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - } - - args = new Object[] { - kbFolder.getGroupId(), kbFolder.getParentKBFolderId(), - kbFolder.getName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_N, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_P_N, args); - - if ((kbFolderModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_P_N.getColumnBitmask()) != 0) { - args = new Object[] { - kbFolderModelImpl.getOriginalGroupId(), - kbFolderModelImpl.getOriginalParentKBFolderId(), - kbFolderModelImpl.getOriginalName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_N, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_P_N, args); - } - - args = new Object[] { - kbFolder.getGroupId(), kbFolder.getParentKBFolderId(), - kbFolder.getUrlTitle() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_UT, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_P_UT, args); - - if ((kbFolderModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_P_UT.getColumnBitmask()) != 0) { - args = new Object[] { - kbFolderModelImpl.getOriginalGroupId(), - kbFolderModelImpl.getOriginalParentKBFolderId(), - kbFolderModelImpl.getOriginalUrlTitle() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P_UT, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_P_UT, args); - } - } - - /** - * Creates a new k b folder with the primary key. Does not add the k b folder to the database. - * - * @param kbFolderId the primary key for the new k b folder - * @return the new k b folder - */ - @Override - public KBFolder create(long kbFolderId) { - KBFolder kbFolder = new KBFolderImpl(); - - kbFolder.setNew(true); - kbFolder.setPrimaryKey(kbFolderId); - - String uuid = PortalUUIDUtil.generate(); - - kbFolder.setUuid(uuid); - - return kbFolder; - } - - /** - * Removes the k b folder with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder that was removed - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder remove(long kbFolderId) - throws NoSuchFolderException, SystemException { - return remove((Serializable)kbFolderId); - } - - /** - * Removes the k b folder with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the k b folder - * @return the k b folder that was removed - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder remove(Serializable primaryKey) - throws NoSuchFolderException, SystemException { - Session session = null; - - try { - session = openSession(); - - KBFolder kbFolder = (KBFolder)session.get(KBFolderImpl.class, - primaryKey); - - if (kbFolder == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchFolderException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(kbFolder); - } - catch (NoSuchFolderException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected KBFolder removeImpl(KBFolder kbFolder) throws SystemException { - kbFolder = toUnwrappedModel(kbFolder); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(kbFolder)) { - kbFolder = (KBFolder)session.get(KBFolderImpl.class, - kbFolder.getPrimaryKeyObj()); - } - - if (kbFolder != null) { - session.delete(kbFolder); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (kbFolder != null) { - clearCache(kbFolder); - } - - return kbFolder; - } - - @Override - public KBFolder updateImpl( - com.liferay.knowledgebase.model.KBFolder kbFolder) - throws SystemException { - kbFolder = toUnwrappedModel(kbFolder); - - boolean isNew = kbFolder.isNew(); - - KBFolderModelImpl kbFolderModelImpl = (KBFolderModelImpl)kbFolder; - - if (Validator.isNull(kbFolder.getUuid())) { - String uuid = PortalUUIDUtil.generate(); - - kbFolder.setUuid(uuid); - } - - Session session = null; - - try { - session = openSession(); - - if (kbFolder.isNew()) { - session.save(kbFolder); - - kbFolder.setNew(false); - } - else { - session.merge(kbFolder); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !KBFolderModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((kbFolderModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { kbFolderModelImpl.getOriginalUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - - args = new Object[] { kbFolderModelImpl.getUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - } - - if ((kbFolderModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbFolderModelImpl.getOriginalUuid(), - kbFolderModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - - args = new Object[] { - kbFolderModelImpl.getUuid(), - kbFolderModelImpl.getCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - } - - if ((kbFolderModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbFolderModelImpl.getOriginalGroupId(), - kbFolderModelImpl.getOriginalParentKBFolderId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P, - args); - - args = new Object[] { - kbFolderModelImpl.getGroupId(), - kbFolderModelImpl.getParentKBFolderId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_P, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_P, - args); - } - } - - EntityCacheUtil.putResult(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderImpl.class, kbFolder.getPrimaryKey(), kbFolder); - - clearUniqueFindersCache(kbFolder); - cacheUniqueFindersCache(kbFolder); - - return kbFolder; - } - - protected KBFolder toUnwrappedModel(KBFolder kbFolder) { - if (kbFolder instanceof KBFolderImpl) { - return kbFolder; - } - - KBFolderImpl kbFolderImpl = new KBFolderImpl(); - - kbFolderImpl.setNew(kbFolder.isNew()); - kbFolderImpl.setPrimaryKey(kbFolder.getPrimaryKey()); - - kbFolderImpl.setUuid(kbFolder.getUuid()); - kbFolderImpl.setKbFolderId(kbFolder.getKbFolderId()); - kbFolderImpl.setGroupId(kbFolder.getGroupId()); - kbFolderImpl.setCompanyId(kbFolder.getCompanyId()); - kbFolderImpl.setUserId(kbFolder.getUserId()); - kbFolderImpl.setUserName(kbFolder.getUserName()); - kbFolderImpl.setCreateDate(kbFolder.getCreateDate()); - kbFolderImpl.setModifiedDate(kbFolder.getModifiedDate()); - kbFolderImpl.setParentKBFolderId(kbFolder.getParentKBFolderId()); - kbFolderImpl.setName(kbFolder.getName()); - kbFolderImpl.setUrlTitle(kbFolder.getUrlTitle()); - kbFolderImpl.setDescription(kbFolder.getDescription()); - - return kbFolderImpl; - } - - /** - * Returns the k b folder 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 k b folder - * @return the k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByPrimaryKey(Serializable primaryKey) - throws NoSuchFolderException, SystemException { - KBFolder kbFolder = fetchByPrimaryKey(primaryKey); - - if (kbFolder == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchFolderException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return kbFolder; - } - - /** - * Returns the k b folder with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchFolderException} if it could not be found. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder - * @throws com.liferay.knowledgebase.NoSuchFolderException if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder findByPrimaryKey(long kbFolderId) - throws NoSuchFolderException, SystemException { - return findByPrimaryKey((Serializable)kbFolderId); - } - - /** - * Returns the k b folder with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the k b folder - * @return the k b folder, or null if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - KBFolder kbFolder = (KBFolder)EntityCacheUtil.getResult(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderImpl.class, primaryKey); - - if (kbFolder == _nullKBFolder) { - return null; - } - - if (kbFolder == null) { - Session session = null; - - try { - session = openSession(); - - kbFolder = (KBFolder)session.get(KBFolderImpl.class, primaryKey); - - if (kbFolder != null) { - cacheResult(kbFolder); - } - else { - EntityCacheUtil.putResult(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderImpl.class, primaryKey, _nullKBFolder); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(KBFolderModelImpl.ENTITY_CACHE_ENABLED, - KBFolderImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return kbFolder; - } - - /** - * Returns the k b folder with the primary key or returns null if it could not be found. - * - * @param kbFolderId the primary key of the k b folder - * @return the k b folder, or null if a k b folder with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBFolder fetchByPrimaryKey(long kbFolderId) - throws SystemException { - return fetchByPrimaryKey((Serializable)kbFolderId); - } - - /** - * Returns all the k b folders. - * - * @return the k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @return the range of k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the k b folders. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBFolderModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b folders - * @param end the upper bound of the range of k b folders (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b folders - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_KBFOLDER); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_KBFOLDER; - - if (pagination) { - sql = sql.concat(KBFolderModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b folders from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (KBFolder kbFolder : findAll()) { - remove(kbFolder); - } - } - - /** - * Returns the number of k b folders. - * - * @return the number of k b folders - * @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_KBFOLDER); - - 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(); - } - - @Override - protected Set getBadColumnNames() { - return _badColumnNames; - } - - /** - * Initializes the k b folder persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.com.liferay.knowledgebase.model.KBFolder"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(KBFolderImpl.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_KBFOLDER = "SELECT kbFolder FROM KBFolder kbFolder"; - private static final String _SQL_SELECT_KBFOLDER_WHERE = "SELECT kbFolder FROM KBFolder kbFolder WHERE "; - private static final String _SQL_COUNT_KBFOLDER = "SELECT COUNT(kbFolder) FROM KBFolder kbFolder"; - private static final String _SQL_COUNT_KBFOLDER_WHERE = "SELECT COUNT(kbFolder) FROM KBFolder kbFolder WHERE "; - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN = "kbFolder.kbFolderId"; - private static final String _FILTER_SQL_SELECT_KBFOLDER_WHERE = "SELECT DISTINCT {kbFolder.*} FROM KBFolder kbFolder WHERE "; - private static final String _FILTER_SQL_SELECT_KBFOLDER_NO_INLINE_DISTINCT_WHERE_1 = - "SELECT {KBFolder.*} FROM (SELECT DISTINCT kbFolder.kbFolderId FROM KBFolder kbFolder WHERE "; - private static final String _FILTER_SQL_SELECT_KBFOLDER_NO_INLINE_DISTINCT_WHERE_2 = - ") TEMP_TABLE INNER JOIN KBFolder ON TEMP_TABLE.kbFolderId = KBFolder.kbFolderId"; - private static final String _FILTER_SQL_COUNT_KBFOLDER_WHERE = "SELECT COUNT(DISTINCT kbFolder.kbFolderId) AS COUNT_VALUE FROM KBFolder kbFolder WHERE "; - private static final String _FILTER_ENTITY_ALIAS = "kbFolder"; - private static final String _FILTER_ENTITY_TABLE = "KBFolder"; - private static final String _ORDER_BY_ENTITY_ALIAS = "kbFolder."; - private static final String _ORDER_BY_ENTITY_TABLE = "KBFolder."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No KBFolder exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No KBFolder 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(KBFolderPersistenceImpl.class); - private static Set _badColumnNames = SetUtil.fromArray(new String[] { - "uuid" - }); - private static KBFolder _nullKBFolder = new KBFolderImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullKBFolderCacheModel; - } - }; - - private static CacheModel _nullKBFolderCacheModel = new CacheModel() { - @Override - public KBFolder toEntityModel() { - return _nullKBFolder; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBTemplatePersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBTemplatePersistenceImpl.java deleted file mode 100644 index ab7faa53cc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/service/persistence/KBTemplatePersistenceImpl.java +++ /dev/null @@ -1,3043 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.service.persistence; - -import com.liferay.knowledgebase.NoSuchTemplateException; -import com.liferay.knowledgebase.model.KBTemplate; -import com.liferay.knowledgebase.model.impl.KBTemplateImpl; -import com.liferay.knowledgebase.model.impl.KBTemplateModelImpl; - -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.SQLQuery; -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.SetUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.security.permission.InlineSQLHelperUtil; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * The persistence implementation for the k b template service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see KBTemplatePersistence - * @see KBTemplateUtil - * @generated - */ -public class KBTemplatePersistenceImpl extends BasePersistenceImpl - implements KBTemplatePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link KBTemplateUtil} to access the k b template persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = KBTemplateImpl.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(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, KBTemplateImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, KBTemplateImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.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_UUID = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, KBTemplateImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, KBTemplateImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", - new String[] { String.class.getName() }, - KBTemplateModelImpl.UUID_COLUMN_BITMASK | - KBTemplateModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", - new String[] { String.class.getName() }); - - /** - * Returns all the k b templates where uuid = ?. - * - * @param uuid the uuid - * @return the matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid) throws SystemException { - return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b templates where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, int start, int end) - throws SystemException { - return findByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the k b templates where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, 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_UUID; - finderArgs = new Object[] { uuid }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; - finderArgs = new Object[] { uuid, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBTemplate kbTemplate : list) { - if (!Validator.equals(uuid, kbTemplate.getUuid())) { - 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_KBTEMPLATE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBTemplateModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate findByUuid_First(String uuid, - OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = fetchByUuid_First(uuid, orderByComparator); - - if (kbTemplate != null) { - return kbTemplate; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchTemplateException(msg.toString()); - } - - /** - * Returns the first k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByUuid_First(String uuid, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid(uuid, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate findByUuid_Last(String uuid, - OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = fetchByUuid_Last(uuid, orderByComparator); - - if (kbTemplate != null) { - return kbTemplate; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchTemplateException(msg.toString()); - } - - /** - * Returns the last k b template in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByUuid_Last(String uuid, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid(uuid); - - if (count == 0) { - return null; - } - - List list = findByUuid(uuid, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b templates before and after the current k b template in the ordered set where uuid = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate[] findByUuid_PrevAndNext(long kbTemplateId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = findByPrimaryKey(kbTemplateId); - - Session session = null; - - try { - session = openSession(); - - KBTemplate[] array = new KBTemplateImpl[3]; - - array[0] = getByUuid_PrevAndNext(session, kbTemplate, uuid, - orderByComparator, true); - - array[1] = kbTemplate; - - array[2] = getByUuid_PrevAndNext(session, kbTemplate, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBTemplate getByUuid_PrevAndNext(Session session, - KBTemplate kbTemplate, String uuid, - 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_KBTEMPLATE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_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(KBTemplateModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbTemplate); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b templates where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid(String uuid) throws SystemException { - for (KBTemplate kbTemplate : findByUuid(uuid, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbTemplate); - } - } - - /** - * Returns the number of k b templates where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid(String uuid) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; - - Object[] finderArgs = new Object[] { uuid }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_KBTEMPLATE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_UUID_1 = "kbTemplate.uuid IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2 = "kbTemplate.uuid = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3 = "(kbTemplate.uuid IS NULL OR kbTemplate.uuid = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, KBTemplateImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }, - KBTemplateModelImpl.UUID_COLUMN_BITMASK | - KBTemplateModelImpl.GROUPID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns the k b template where uuid = ? and groupId = ? or throws a {@link com.liferay.knowledgebase.NoSuchTemplateException} if it could not be found. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate findByUUID_G(String uuid, long groupId) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = fetchByUUID_G(uuid, groupId); - - if (kbTemplate == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchTemplateException(msg.toString()); - } - - return kbTemplate; - } - - /** - * Returns the k b template where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByUUID_G(String uuid, long groupId) - throws SystemException { - return fetchByUUID_G(uuid, groupId, true); - } - - /** - * Returns the k b template where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param uuid the uuid - * @param groupId the group ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByUUID_G(String uuid, long groupId, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { uuid, groupId }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, this); - } - - if (result instanceof KBTemplate) { - KBTemplate kbTemplate = (KBTemplate)result; - - if (!Validator.equals(uuid, kbTemplate.getUuid()) || - (groupId != kbTemplate.getGroupId())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_KBTEMPLATE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, list); - } - else { - KBTemplate kbTemplate = list.get(0); - - result = kbTemplate; - - cacheResult(kbTemplate); - - if ((kbTemplate.getUuid() == null) || - !kbTemplate.getUuid().equals(uuid) || - (kbTemplate.getGroupId() != groupId)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs, kbTemplate); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (KBTemplate)result; - } - } - - /** - * Removes the k b template where uuid = ? and groupId = ? from the database. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the k b template that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate removeByUUID_G(String uuid, long groupId) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = findByUUID_G(uuid, groupId); - - return remove(kbTemplate); - } - - /** - * Returns the number of k b templates where uuid = ? and groupId = ?. - * - * @param uuid the uuid - * @param groupId the group ID - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUUID_G(String uuid, long groupId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; - - Object[] finderArgs = new Object[] { uuid, groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBTEMPLATE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_G_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_G_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_G_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(groupId); - - 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_UUID_G_UUID_1 = "kbTemplate.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "kbTemplate.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(kbTemplate.uuid IS NULL OR kbTemplate.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "kbTemplate.groupId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, KBTemplateImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", - new String[] { - String.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = - new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, KBTemplateImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }, - KBTemplateModelImpl.UUID_COLUMN_BITMASK | - KBTemplateModelImpl.COMPANYID_COLUMN_BITMASK | - KBTemplateModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns all the k b templates where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId) - throws SystemException { - return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b templates where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId, - int start, int end) throws SystemException { - return findByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the k b templates where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, 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_UUID_C; - finderArgs = new Object[] { uuid, companyId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; - finderArgs = new Object[] { - uuid, companyId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBTemplate kbTemplate : list) { - if (!Validator.equals(uuid, kbTemplate.getUuid()) || - (companyId != kbTemplate.getCompanyId())) { - 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_KBTEMPLATE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBTemplateModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate findByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = fetchByUuid_C_First(uuid, companyId, - orderByComparator); - - if (kbTemplate != null) { - return kbTemplate; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchTemplateException(msg.toString()); - } - - /** - * Returns the first k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid_C(uuid, companyId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate findByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = fetchByUuid_C_Last(uuid, companyId, - orderByComparator); - - if (kbTemplate != null) { - return kbTemplate; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchTemplateException(msg.toString()); - } - - /** - * Returns the last k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid_C(uuid, companyId); - - if (count == 0) { - return null; - } - - List list = findByUuid_C(uuid, companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b templates before and after the current k b template in the ordered set where uuid = ? and companyId = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate[] findByUuid_C_PrevAndNext(long kbTemplateId, - String uuid, long companyId, OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = findByPrimaryKey(kbTemplateId); - - Session session = null; - - try { - session = openSession(); - - KBTemplate[] array = new KBTemplateImpl[3]; - - array[0] = getByUuid_C_PrevAndNext(session, kbTemplate, uuid, - companyId, orderByComparator, true); - - array[1] = kbTemplate; - - array[2] = getByUuid_C_PrevAndNext(session, kbTemplate, uuid, - companyId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBTemplate getByUuid_C_PrevAndNext(Session session, - KBTemplate kbTemplate, String uuid, 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_KBTEMPLATE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_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(KBTemplateModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbTemplate); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b templates where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid_C(String uuid, long companyId) - throws SystemException { - for (KBTemplate kbTemplate : findByUuid_C(uuid, companyId, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(kbTemplate); - } - } - - /** - * Returns the number of k b templates where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid_C(String uuid, long companyId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; - - Object[] finderArgs = new Object[] { uuid, companyId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_KBTEMPLATE_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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_UUID_C_UUID_1 = "kbTemplate.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "kbTemplate.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(kbTemplate.uuid IS NULL OR kbTemplate.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "kbTemplate.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, KBTemplateImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByGroupId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID = - new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, KBTemplateImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByGroupId", - new String[] { Long.class.getName() }, - KBTemplateModelImpl.GROUPID_COLUMN_BITMASK | - KBTemplateModelImpl.MODIFIEDDATE_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_GROUPID = new FinderPath(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByGroupId", - new String[] { Long.class.getName() }); - - /** - * Returns all the k b templates where groupId = ?. - * - * @param groupId the group ID - * @return the matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId) - throws SystemException { - return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b templates where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, int start, int end) - throws SystemException { - return findByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the k b templates where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGroupId(long groupId, 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_GROUPID; - finderArgs = new Object[] { groupId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID; - finderArgs = new Object[] { groupId, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (KBTemplate kbTemplate : list) { - if ((groupId != kbTemplate.getGroupId())) { - 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_KBTEMPLATE_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(KBTemplateModelImpl.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(groupId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate findByGroupId_First(long groupId, - OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = fetchByGroupId_First(groupId, orderByComparator); - - if (kbTemplate != null) { - return kbTemplate; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchTemplateException(msg.toString()); - } - - /** - * Returns the first k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByGroupId_First(long groupId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByGroupId(groupId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate findByGroupId_Last(long groupId, - OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = fetchByGroupId_Last(groupId, orderByComparator); - - if (kbTemplate != null) { - return kbTemplate; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchTemplateException(msg.toString()); - } - - /** - * Returns the last k b template in the ordered set where groupId = ?. - * - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching k b template, or null if a matching k b template could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByGroupId_Last(long groupId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByGroupId(groupId); - - if (count == 0) { - return null; - } - - List list = findByGroupId(groupId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the k b templates before and after the current k b template in the ordered set where groupId = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate[] findByGroupId_PrevAndNext(long kbTemplateId, - long groupId, OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = findByPrimaryKey(kbTemplateId); - - Session session = null; - - try { - session = openSession(); - - KBTemplate[] array = new KBTemplateImpl[3]; - - array[0] = getByGroupId_PrevAndNext(session, kbTemplate, groupId, - orderByComparator, true); - - array[1] = kbTemplate; - - array[2] = getByGroupId_PrevAndNext(session, kbTemplate, groupId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBTemplate getByGroupId_PrevAndNext(Session session, - KBTemplate kbTemplate, long groupId, - 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_KBTEMPLATE_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_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(KBTemplateModelImpl.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(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbTemplate); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the k b templates that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId) - throws SystemException { - return filterFindByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b templates that the user has permission to view where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, int end) - throws SystemException { - return filterFindByGroupId(groupId, start, end, null); - } - - /** - * Returns an ordered range of all the k b templates that the user has permissions to view where groupId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param groupId the group ID - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByGroupId(long groupId, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId(groupId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(3 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBTEMPLATE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBTEMPLATE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBTEMPLATE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBTemplateModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBTemplateModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBTemplate.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBTemplateImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBTemplateImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the k b templates before and after the current k b template in the ordered set of k b templates that the user has permission to view where groupId = ?. - * - * @param kbTemplateId the primary key of the current k b template - * @param groupId the group ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate[] filterFindByGroupId_PrevAndNext(long kbTemplateId, - long groupId, OrderByComparator orderByComparator) - throws NoSuchTemplateException, SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return findByGroupId_PrevAndNext(kbTemplateId, groupId, - orderByComparator); - } - - KBTemplate kbTemplate = findByPrimaryKey(kbTemplateId); - - Session session = null; - - try { - session = openSession(); - - KBTemplate[] array = new KBTemplateImpl[3]; - - array[0] = filterGetByGroupId_PrevAndNext(session, kbTemplate, - groupId, orderByComparator, true); - - array[1] = kbTemplate; - - array[2] = filterGetByGroupId_PrevAndNext(session, kbTemplate, - groupId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected KBTemplate filterGetByGroupId_PrevAndNext(Session session, - KBTemplate kbTemplate, long groupId, - OrderByComparator orderByComparator, boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBTEMPLATE_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_KBTEMPLATE_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_KBTEMPLATE_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(KBTemplateModelImpl.ORDER_BY_JPQL); - } - else { - query.append(KBTemplateModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBTemplate.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, KBTemplateImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, KBTemplateImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(kbTemplate); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the k b templates where groupId = ? from the database. - * - * @param groupId the group ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByGroupId(long groupId) throws SystemException { - for (KBTemplate kbTemplate : findByGroupId(groupId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(kbTemplate); - } - } - - /** - * Returns the number of k b templates where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public int countByGroupId(long groupId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_GROUPID; - - Object[] finderArgs = new Object[] { groupId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_KBTEMPLATE_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - 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(); - } - - /** - * Returns the number of k b templates that the user has permission to view where groupId = ?. - * - * @param groupId the group ID - * @return the number of matching k b templates that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByGroupId(long groupId) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled(groupId)) { - return countByGroupId(groupId); - } - - StringBundler query = new StringBundler(2); - - query.append(_FILTER_SQL_COUNT_KBTEMPLATE_WHERE); - - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - KBTemplate.class.getName(), - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(groupId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 = "kbTemplate.groupId = ?"; - - public KBTemplatePersistenceImpl() { - setModelClass(KBTemplate.class); - } - - /** - * Caches the k b template in the entity cache if it is enabled. - * - * @param kbTemplate the k b template - */ - @Override - public void cacheResult(KBTemplate kbTemplate) { - EntityCacheUtil.putResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateImpl.class, kbTemplate.getPrimaryKey(), kbTemplate); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, - new Object[] { kbTemplate.getUuid(), kbTemplate.getGroupId() }, - kbTemplate); - - kbTemplate.resetOriginalValues(); - } - - /** - * Caches the k b templates in the entity cache if it is enabled. - * - * @param kbTemplates the k b templates - */ - @Override - public void cacheResult(List kbTemplates) { - for (KBTemplate kbTemplate : kbTemplates) { - if (EntityCacheUtil.getResult( - KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateImpl.class, kbTemplate.getPrimaryKey()) == null) { - cacheResult(kbTemplate); - } - else { - kbTemplate.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all k b templates. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(KBTemplateImpl.class.getName()); - } - - EntityCacheUtil.clearCache(KBTemplateImpl.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 k b template. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache(KBTemplate kbTemplate) { - EntityCacheUtil.removeResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateImpl.class, kbTemplate.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(kbTemplate); - } - - @Override - public void clearCache(List kbTemplates) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (KBTemplate kbTemplate : kbTemplates) { - EntityCacheUtil.removeResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateImpl.class, kbTemplate.getPrimaryKey()); - - clearUniqueFindersCache(kbTemplate); - } - } - - protected void cacheUniqueFindersCache(KBTemplate kbTemplate) { - if (kbTemplate.isNew()) { - Object[] args = new Object[] { - kbTemplate.getUuid(), kbTemplate.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - kbTemplate); - } - else { - KBTemplateModelImpl kbTemplateModelImpl = (KBTemplateModelImpl)kbTemplate; - - if ((kbTemplateModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbTemplate.getUuid(), kbTemplate.getGroupId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, - kbTemplate); - } - } - } - - protected void clearUniqueFindersCache(KBTemplate kbTemplate) { - KBTemplateModelImpl kbTemplateModelImpl = (KBTemplateModelImpl)kbTemplate; - - Object[] args = new Object[] { - kbTemplate.getUuid(), kbTemplate.getGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - - if ((kbTemplateModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { - args = new Object[] { - kbTemplateModelImpl.getOriginalUuid(), - kbTemplateModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); - } - } - - /** - * Creates a new k b template with the primary key. Does not add the k b template to the database. - * - * @param kbTemplateId the primary key for the new k b template - * @return the new k b template - */ - @Override - public KBTemplate create(long kbTemplateId) { - KBTemplate kbTemplate = new KBTemplateImpl(); - - kbTemplate.setNew(true); - kbTemplate.setPrimaryKey(kbTemplateId); - - String uuid = PortalUUIDUtil.generate(); - - kbTemplate.setUuid(uuid); - - return kbTemplate; - } - - /** - * Removes the k b template with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template that was removed - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate remove(long kbTemplateId) - throws NoSuchTemplateException, SystemException { - return remove((Serializable)kbTemplateId); - } - - /** - * Removes the k b template with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the k b template - * @return the k b template that was removed - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate remove(Serializable primaryKey) - throws NoSuchTemplateException, SystemException { - Session session = null; - - try { - session = openSession(); - - KBTemplate kbTemplate = (KBTemplate)session.get(KBTemplateImpl.class, - primaryKey); - - if (kbTemplate == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchTemplateException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(kbTemplate); - } - catch (NoSuchTemplateException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected KBTemplate removeImpl(KBTemplate kbTemplate) - throws SystemException { - kbTemplate = toUnwrappedModel(kbTemplate); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(kbTemplate)) { - kbTemplate = (KBTemplate)session.get(KBTemplateImpl.class, - kbTemplate.getPrimaryKeyObj()); - } - - if (kbTemplate != null) { - session.delete(kbTemplate); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (kbTemplate != null) { - clearCache(kbTemplate); - } - - return kbTemplate; - } - - @Override - public KBTemplate updateImpl( - com.liferay.knowledgebase.model.KBTemplate kbTemplate) - throws SystemException { - kbTemplate = toUnwrappedModel(kbTemplate); - - boolean isNew = kbTemplate.isNew(); - - KBTemplateModelImpl kbTemplateModelImpl = (KBTemplateModelImpl)kbTemplate; - - if (Validator.isNull(kbTemplate.getUuid())) { - String uuid = PortalUUIDUtil.generate(); - - kbTemplate.setUuid(uuid); - } - - Session session = null; - - try { - session = openSession(); - - if (kbTemplate.isNew()) { - session.save(kbTemplate); - - kbTemplate.setNew(false); - } - else { - session.merge(kbTemplate); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !KBTemplateModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((kbTemplateModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbTemplateModelImpl.getOriginalUuid() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - - args = new Object[] { kbTemplateModelImpl.getUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - } - - if ((kbTemplateModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbTemplateModelImpl.getOriginalUuid(), - kbTemplateModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - - args = new Object[] { - kbTemplateModelImpl.getUuid(), - kbTemplateModelImpl.getCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - } - - if ((kbTemplateModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - kbTemplateModelImpl.getOriginalGroupId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - - args = new Object[] { kbTemplateModelImpl.getGroupId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, - args); - } - } - - EntityCacheUtil.putResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateImpl.class, kbTemplate.getPrimaryKey(), kbTemplate); - - clearUniqueFindersCache(kbTemplate); - cacheUniqueFindersCache(kbTemplate); - - return kbTemplate; - } - - protected KBTemplate toUnwrappedModel(KBTemplate kbTemplate) { - if (kbTemplate instanceof KBTemplateImpl) { - return kbTemplate; - } - - KBTemplateImpl kbTemplateImpl = new KBTemplateImpl(); - - kbTemplateImpl.setNew(kbTemplate.isNew()); - kbTemplateImpl.setPrimaryKey(kbTemplate.getPrimaryKey()); - - kbTemplateImpl.setUuid(kbTemplate.getUuid()); - kbTemplateImpl.setKbTemplateId(kbTemplate.getKbTemplateId()); - kbTemplateImpl.setGroupId(kbTemplate.getGroupId()); - kbTemplateImpl.setCompanyId(kbTemplate.getCompanyId()); - kbTemplateImpl.setUserId(kbTemplate.getUserId()); - kbTemplateImpl.setUserName(kbTemplate.getUserName()); - kbTemplateImpl.setCreateDate(kbTemplate.getCreateDate()); - kbTemplateImpl.setModifiedDate(kbTemplate.getModifiedDate()); - kbTemplateImpl.setTitle(kbTemplate.getTitle()); - kbTemplateImpl.setContent(kbTemplate.getContent()); - - return kbTemplateImpl; - } - - /** - * Returns the k b template 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 k b template - * @return the k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate findByPrimaryKey(Serializable primaryKey) - throws NoSuchTemplateException, SystemException { - KBTemplate kbTemplate = fetchByPrimaryKey(primaryKey); - - if (kbTemplate == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchTemplateException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return kbTemplate; - } - - /** - * Returns the k b template with the primary key or throws a {@link com.liferay.knowledgebase.NoSuchTemplateException} if it could not be found. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template - * @throws com.liferay.knowledgebase.NoSuchTemplateException if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate findByPrimaryKey(long kbTemplateId) - throws NoSuchTemplateException, SystemException { - return findByPrimaryKey((Serializable)kbTemplateId); - } - - /** - * Returns the k b template with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the k b template - * @return the k b template, or null if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - KBTemplate kbTemplate = (KBTemplate)EntityCacheUtil.getResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateImpl.class, primaryKey); - - if (kbTemplate == _nullKBTemplate) { - return null; - } - - if (kbTemplate == null) { - Session session = null; - - try { - session = openSession(); - - kbTemplate = (KBTemplate)session.get(KBTemplateImpl.class, - primaryKey); - - if (kbTemplate != null) { - cacheResult(kbTemplate); - } - else { - EntityCacheUtil.putResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateImpl.class, primaryKey, _nullKBTemplate); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED, - KBTemplateImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return kbTemplate; - } - - /** - * Returns the k b template with the primary key or returns null if it could not be found. - * - * @param kbTemplateId the primary key of the k b template - * @return the k b template, or null if a k b template with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public KBTemplate fetchByPrimaryKey(long kbTemplateId) - throws SystemException { - return fetchByPrimaryKey((Serializable)kbTemplateId); - } - - /** - * Returns all the k b templates. - * - * @return the k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @return the range of k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) - throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the k b templates. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBTemplateModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of k b templates - * @param end the upper bound of the range of k b templates (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of k b templates - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_KBTEMPLATE); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_KBTEMPLATE; - - if (pagination) { - sql = sql.concat(KBTemplateModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 k b templates from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (KBTemplate kbTemplate : findAll()) { - remove(kbTemplate); - } - } - - /** - * Returns the number of k b templates. - * - * @return the number of k b templates - * @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_KBTEMPLATE); - - 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(); - } - - @Override - protected Set getBadColumnNames() { - return _badColumnNames; - } - - /** - * Initializes the k b template persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.com.liferay.knowledgebase.model.KBTemplate"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(KBTemplateImpl.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_KBTEMPLATE = "SELECT kbTemplate FROM KBTemplate kbTemplate"; - private static final String _SQL_SELECT_KBTEMPLATE_WHERE = "SELECT kbTemplate FROM KBTemplate kbTemplate WHERE "; - private static final String _SQL_COUNT_KBTEMPLATE = "SELECT COUNT(kbTemplate) FROM KBTemplate kbTemplate"; - private static final String _SQL_COUNT_KBTEMPLATE_WHERE = "SELECT COUNT(kbTemplate) FROM KBTemplate kbTemplate WHERE "; - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN = "kbTemplate.kbTemplateId"; - private static final String _FILTER_SQL_SELECT_KBTEMPLATE_WHERE = "SELECT DISTINCT {kbTemplate.*} FROM KBTemplate kbTemplate WHERE "; - private static final String _FILTER_SQL_SELECT_KBTEMPLATE_NO_INLINE_DISTINCT_WHERE_1 = - "SELECT {KBTemplate.*} FROM (SELECT DISTINCT kbTemplate.kbTemplateId FROM KBTemplate kbTemplate WHERE "; - private static final String _FILTER_SQL_SELECT_KBTEMPLATE_NO_INLINE_DISTINCT_WHERE_2 = - ") TEMP_TABLE INNER JOIN KBTemplate ON TEMP_TABLE.kbTemplateId = KBTemplate.kbTemplateId"; - private static final String _FILTER_SQL_COUNT_KBTEMPLATE_WHERE = "SELECT COUNT(DISTINCT kbTemplate.kbTemplateId) AS COUNT_VALUE FROM KBTemplate kbTemplate WHERE "; - private static final String _FILTER_ENTITY_ALIAS = "kbTemplate"; - private static final String _FILTER_ENTITY_TABLE = "KBTemplate"; - private static final String _ORDER_BY_ENTITY_ALIAS = "kbTemplate."; - private static final String _ORDER_BY_ENTITY_TABLE = "KBTemplate."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No KBTemplate exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No KBTemplate 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(KBTemplatePersistenceImpl.class); - private static Set _badColumnNames = SetUtil.fromArray(new String[] { - "uuid" - }); - private static KBTemplate _nullKBTemplate = new KBTemplateImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullKBTemplateCacheModel; - } - }; - - private static CacheModel _nullKBTemplateCacheModel = new CacheModel() { - @Override - public KBTemplate toEntityModel() { - return _nullKBTemplate; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KBArticleURLHelper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KBArticleURLHelper.java deleted file mode 100644 index 3a03b7ebb3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KBArticleURLHelper.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBFolderServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.util.PortalUtil; - -import javax.portlet.PortletURL; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -/** - * @author Adolfo Pérez - */ -public class KBArticleURLHelper { - - public KBArticleURLHelper( - RenderRequest renderRequest, RenderResponse renderResponse, - String templatePath) { - - _renderRequest = renderRequest; - _renderResponse = renderResponse; - _templatePath = templatePath; - } - - public PortletURL createViewURL(KBArticle kbArticle) - throws PortalException, SystemException { - - PortletURL portletURL = _renderResponse.createRenderURL(); - - String portletId = PortalUtil.getPortletId(_renderRequest); - - if (portletId.startsWith(PortletKeys.KNOWLEDGE_BASE_ADMIN) || - portletId.startsWith(PortletKeys.KNOWLEDGE_BASE_SECTION)) { - - portletURL.setParameter( - "mvcPath", _templatePath + "view_article.jsp"); - } - - if (portletId.startsWith(PortletKeys.KNOWLEDGE_BASE_ADMIN)) { - portletURL.setParameter( - "redirect", PortalUtil.getCurrentURL(_renderRequest)); - } - - if (Validator.isNull(kbArticle.getUrlTitle()) || - portletId.equals(PortletKeys.KNOWLEDGE_BASE_ADMIN)) { - - portletURL.setParameter( - "resourceClassNameId", - String.valueOf(kbArticle.getClassNameId())); - portletURL.setParameter( - "resourcePrimKey", - String.valueOf(kbArticle.getResourcePrimKey())); - } - else { - portletURL.setParameter("urlTitle", kbArticle.getUrlTitle()); - - if (kbArticle.getKbFolderId() != - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - KBFolder kbFolder = KBFolderServiceUtil.getKBFolder( - kbArticle.getKbFolderId()); - - portletURL.setParameter( - "kbFolderUrlTitle", kbFolder.getUrlTitle()); - } - } - - return portletURL; - } - - public PortletURL createViewWithCommentsURL(KBArticle kbArticle) - throws PortalException, SystemException { - - PortletURL portletURL = createViewURL(kbArticle); - - portletURL.setParameter("expanded", Boolean.TRUE.toString()); - - return portletURL; - } - - public PortletURL createViewWithRedirectURL( - KBArticle kbArticle, String redirect) - throws PortalException, SystemException { - - PortletURL portletURL = createViewURL(kbArticle); - - if (Validator.isNotNull(redirect)) { - portletURL.setParameter("redirect", redirect); - } - - return portletURL; - } - - private final RenderRequest _renderRequest; - private final RenderResponse _renderResponse; - private final String _templatePath; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KBNavigationDisplayContext.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KBNavigationDisplayContext.java deleted file mode 100644 index 83cc126e5a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KBNavigationDisplayContext.java +++ /dev/null @@ -1,268 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBArticleLocalServiceUtil; -import com.liferay.knowledgebase.service.KBFolderServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortalPreferences; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequest; - -/** - * @author Adolfo Pérez - */ -public class KBNavigationDisplayContext { - - public KBNavigationDisplayContext( - PortletRequest portletRequest, PortalPreferences portalPreferences, - PortletPreferences portletPreferences, KBArticle kbArticle) { - - _portletRequest = portletRequest; - _portalPreferences = portalPreferences; - _portletPreferences = portletPreferences; - _kbArticle = kbArticle; - } - - public List getAncestorResourcePrimaryKeys() - throws PortalException, SystemException { - - List ancestorResourcePrimaryKeys = new ArrayList(); - - if (_kbArticle != null) { - KBArticle latestKBArticle = - KBArticleLocalServiceUtil.getLatestKBArticle( - _kbArticle.getResourcePrimKey(), - WorkflowConstants.STATUS_APPROVED); - - ancestorResourcePrimaryKeys = - latestKBArticle.getAncestorResourcePrimaryKeys(); - - Collections.reverse(ancestorResourcePrimaryKeys); - } - else { - ancestorResourcePrimaryKeys.add( - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - } - - return ancestorResourcePrimaryKeys; - } - - public String getCurrentKBFolderURLTitle() - throws PortalException, SystemException { - - String currentKBFolderURLTitle = - KnowledgeBaseUtil.getPreferredKBFolderURLTitle( - _portalPreferences, getContentRootPrefix()); - - long rootResourcePrimKey = getRootResourcePrimKey(); - - if (rootResourcePrimKey != KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - KBFolder kbFolder = KBFolderServiceUtil.getKBFolder( - rootResourcePrimKey); - - currentKBFolderURLTitle = kbFolder.getUrlTitle(); - } - - return currentKBFolderURLTitle; - } - - public String getPageTitle() throws PortalException, SystemException { - long rootResourcePrimKey = getRootResourcePrimKey(); - - String pageTitle = null; - - if (rootResourcePrimKey != KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - KBFolder kbFolder = KBFolderServiceUtil.getKBFolder( - rootResourcePrimKey); - - pageTitle = getContentRootPrefix() + " " + kbFolder.getName(); - - if (_kbArticle != null) { - pageTitle = _kbArticle.getTitle() + " - " + pageTitle; - } - } - else { - if (_kbArticle != null) { - pageTitle = _kbArticle.getTitle(); - } - } - - return pageTitle; - } - - public long getRootResourcePrimKey() - throws PortalException, SystemException { - - if (_rootResourcePrimKey == null) { - _rootResourcePrimKey = KBFolderConstants.DEFAULT_PARENT_FOLDER_ID; - - if (_kbArticle != null) { - _rootResourcePrimKey = KnowledgeBaseUtil.getKBFolderId( - _kbArticle.getParentResourceClassNameId(), - _kbArticle.getParentResourcePrimKey()); - } - - if (_rootResourcePrimKey == - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - _rootResourcePrimKey = KnowledgeBaseUtil.getRootResourcePrimKey( - _portletRequest, - PortalUtil.getScopeGroupId(_portletRequest), - getResourceClassNameId(), getResourcePrimKey()); - } - } - - return _rootResourcePrimKey; - } - - public boolean isLeftNavigationVisible() - throws PortalException, SystemException { - - if (_leftNavigationVisible == null) { - _leftNavigationVisible = hasMultipleDescendantKBArticles(); - } - - return _leftNavigationVisible; - } - - public boolean isTopNavigationVisible() - throws PortalException, SystemException { - - long kbFolderClassNameId = PortalUtil.getClassNameId( - KBFolderConstants.getClassName()); - - if ((getResourceClassNameId() == kbFolderClassNameId) && - !isLeftNavigationVisible()) { - - return true; - } - - return false; - } - - protected String getContentRootPrefix() { - return GetterUtil.getString( - _portletPreferences.getValue("contentRootPrefix", null)); - } - - protected long getResourceClassNameId() { - if (_resourceClassNameId == null) { - _resourceClassNameId = GetterUtil.getLong( - _portletPreferences.getValue("resourceClassNameId", null), - PortalUtil.getClassNameId(KBFolderConstants.getClassName())); - } - - return _resourceClassNameId; - } - - protected long getResourcePrimKey() { - if (_resourcePrimKey == null) { - _resourcePrimKey = GetterUtil.getLong( - _portletPreferences.getValue("resourcePrimKey", null)); - } - - return _resourcePrimKey; - } - - protected boolean hasMultipleDescendantKBArticles() - throws PortalException, SystemException { - - long scopeGroupId = PortalUtil.getScopeGroupId(_portletRequest); - - long kbFolderClassNameId = PortalUtil.getClassNameId( - KBFolderConstants.getClassName()); - - if (getResourceClassNameId() == kbFolderClassNameId) { - List kbFolders = - KnowledgeBaseUtil.getAlternateRootKBFolders( - scopeGroupId, getResourcePrimKey()); - - if (kbFolders.size() > 1) { - int maxKBArticlesCount = 0; - - for (KBFolder kbFolder : kbFolders) { - int kbArticlesCount = - KBArticleLocalServiceUtil.getKBFolderKBArticlesCount( - scopeGroupId, kbFolder.getKbFolderId(), - WorkflowConstants.STATUS_APPROVED); - - if (kbArticlesCount > maxKBArticlesCount) { - maxKBArticlesCount = kbArticlesCount; - } - } - - if (maxKBArticlesCount > 1) { - return true; - } - - return false; - } - } - - boolean showNavigation = true; - - long rootResourcePrimKey = getRootResourcePrimKey(); - - int kbArticlesCount = KBArticleLocalServiceUtil.getKBArticlesCount( - scopeGroupId, rootResourcePrimKey, - WorkflowConstants.STATUS_APPROVED); - - if (kbArticlesCount == 0) { - showNavigation = false; - } - else if (kbArticlesCount == 1) { - List kbArticles = - KBArticleLocalServiceUtil.getKBArticles( - scopeGroupId, rootResourcePrimKey, - WorkflowConstants.STATUS_APPROVED, 0, 1, null); - - KBArticle navigationKBArticle = kbArticles.get(0); - - int navigationKBArticleChildCount = - KBArticleLocalServiceUtil.getKBArticlesCount( - scopeGroupId, navigationKBArticle.getResourcePrimKey(), - WorkflowConstants.STATUS_APPROVED); - - if (navigationKBArticleChildCount == 0) { - showNavigation = false; - } - } - - return showNavigation; - } - - private final KBArticle _kbArticle; - private Boolean _leftNavigationVisible; - private final PortalPreferences _portalPreferences; - private final PortletPreferences _portletPreferences; - private final PortletRequest _portletRequest; - private Long _resourceClassNameId; - private Long _resourcePrimKey; - private Long _rootResourcePrimKey; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KBSuggestionListDisplayContext.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KBSuggestionListDisplayContext.java deleted file mode 100644 index 9887f6e831..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KBSuggestionListDisplayContext.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBArticleConstants; -import com.liferay.knowledgebase.model.KBComment; -import com.liferay.knowledgebase.model.KBCommentConstants; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBCommentServiceUtil; -import com.liferay.knowledgebase.service.KBFolderLocalServiceUtil; -import com.liferay.portal.kernel.dao.search.SearchContainer; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.Validator; - -import java.util.List; - -import javax.portlet.PortletURL; -import javax.portlet.RenderResponse; - -/** - * @author Adolfo Pérez - */ -public class KBSuggestionListDisplayContext { - - public KBSuggestionListDisplayContext( - KBArticle kbArticle, String selectedNavItem) { - - _kbArticle = kbArticle; - _selectedNavItem = selectedNavItem; - } - - public KBSuggestionListDisplayContext( - long groupId, String selectedNavItem) { - - _groupId = groupId; - _selectedNavItem = selectedNavItem; - } - - public int getCompletedKBCommentsCount() - throws PortalException, SystemException { - - return getKBCommentsCount(KBCommentConstants.STATUS_COMPLETED); - } - - public int getInProgressKBCommentsCount() - throws PortalException, SystemException { - - return getKBCommentsCount(KBCommentConstants.STATUS_IN_PROGRESS); - } - - public List getKBComments( - int status, SearchContainer searchContainer) - throws PortalException, SystemException { - - if (_kbArticle == null) { - return KBCommentServiceUtil.getKBComments( - _groupId, status, searchContainer.getStart(), - searchContainer.getEnd()); - } - else { - return KBCommentServiceUtil.getKBComments( - _groupId, KBArticleConstants.getClassName(), - _kbArticle.getClassPK(), status, searchContainer.getStart(), - searchContainer.getEnd()); - } - } - - public int getKBCommentsCount(int status) - throws PortalException, SystemException { - - if (_kbArticle == null) { - return KBCommentServiceUtil.getKBCommentsCount(_groupId, status); - } - else { - return KBCommentServiceUtil.getKBCommentsCount( - _groupId, KBArticleConstants.getClassName(), - _kbArticle.getClassPK(), status); - } - } - - public int getNewKBCommentsCount() throws PortalException, SystemException { - return getKBCommentsCount(KBCommentConstants.STATUS_NEW); - } - - public String getSelectedNavItem() { - return _selectedNavItem; - } - - public String getViewSuggestionURL(PortletURL portletURL, String navItem) - throws PortalException, SystemException { - - portletURL.setParameter("navItem", navItem); - portletURL.setParameter("expanded", Boolean.TRUE.toString()); - - if (_kbArticle == null) { - portletURL.setParameter("mvcPath", "/admin/view_suggestions.jsp"); - } - else if (Validator.isNull(_kbArticle.getUrlTitle())) { - portletURL.setParameter( - "resourceClassNameId", - String.valueOf(_kbArticle.getClassNameId())); - portletURL.setParameter( - "resourcePrimKey", - String.valueOf(_kbArticle.getResourcePrimKey())); - } - else { - portletURL.setParameter("urlTitle", _kbArticle.getUrlTitle()); - - if (_kbArticle.getKbFolderId() != - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - KBFolder kbFolder = KBFolderLocalServiceUtil.getKBFolder( - _kbArticle.getKbFolderId()); - - portletURL.setParameter( - "kbFolderUrlTitle", kbFolder.getUrlTitle()); - } - } - - return portletURL.toString() + "#kbSuggestions"; - } - - public String getViewSuggestionURL( - RenderResponse renderResponse, String navItem) - throws PortalException, SystemException { - - return getViewSuggestionURL(renderResponse.createRenderURL(), navItem); - } - - public boolean isShowKBArticleTitle() { - return _kbArticle == null; - } - - private long _groupId; - private KBArticle _kbArticle; - private String _selectedNavItem; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KnowledgeBaseConstants.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KnowledgeBaseConstants.java deleted file mode 100644 index d307b49781..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KnowledgeBaseConstants.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util; - -import com.liferay.knowledgebase.admin.portlet.AdminPortlet; - -/** - * @author Adolfo Pérez - */ -public class KnowledgeBaseConstants { - - public static final String TEMP_FOLDER_NAME = AdminPortlet.class.getName(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KnowledgeBaseUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KnowledgeBaseUtil.java deleted file mode 100644 index 3c162d58ff..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/KnowledgeBaseUtil.java +++ /dev/null @@ -1,693 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util; - -import com.liferay.knowledgebase.model.KBArticle; -import com.liferay.knowledgebase.model.KBCommentConstants; -import com.liferay.knowledgebase.model.KBFolder; -import com.liferay.knowledgebase.model.KBFolderConstants; -import com.liferay.knowledgebase.service.KBArticleServiceUtil; -import com.liferay.knowledgebase.service.KBFolderServiceUtil; -import com.liferay.knowledgebase.util.comparator.KBArticleCreateDateComparator; -import com.liferay.knowledgebase.util.comparator.KBArticleModifiedDateComparator; -import com.liferay.knowledgebase.util.comparator.KBArticlePriorityComparator; -import com.liferay.knowledgebase.util.comparator.KBArticleStatusComparator; -import com.liferay.knowledgebase.util.comparator.KBArticleTitleComparator; -import com.liferay.knowledgebase.util.comparator.KBArticleUserNameComparator; -import com.liferay.knowledgebase.util.comparator.KBArticleVersionComparator; -import com.liferay.knowledgebase.util.comparator.KBArticleViewCountComparator; -import com.liferay.knowledgebase.util.comparator.KBCommentCreateDateComparator; -import com.liferay.knowledgebase.util.comparator.KBCommentModifiedDateComparator; -import com.liferay.knowledgebase.util.comparator.KBTemplateCreateDateComparator; -import com.liferay.knowledgebase.util.comparator.KBTemplateModifiedDateComparator; -import com.liferay.knowledgebase.util.comparator.KBTemplateTitleComparator; -import com.liferay.knowledgebase.util.comparator.KBTemplateUserNameComparator; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -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.json.JSONException; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.Sort; -import com.liferay.portal.kernel.search.SortFactoryUtil; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.CharPool; -import com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ListUtil; -import com.liferay.portal.kernel.util.MimeTypesUtil; -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.StreamUtil; -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.Validator; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.model.ModelHintsUtil; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.PortalPreferences; -import com.liferay.portlet.PortletPreferencesFactoryUtil; - -import java.io.InputStream; - -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; -import javax.portlet.RenderResponse; - -import javax.servlet.http.HttpServletRequest; - -/** - * @author Peter Shin - * @author Brian Wing Shun Chan - */ -public class KnowledgeBaseUtil { - - public static void addPortletBreadcrumbEntries( - long originalParentResourceClassNameId, - long originalParentResourcePrimKey, long parentResourceClassNameId, - long parentResourcePrimKey, String mvcPath, - HttpServletRequest request, RenderResponse renderResponse) - throws PortalException, SystemException { - - Map parameters = new HashMap(); - - parameters.put( - "originalParentResourceClassNameId", - originalParentResourceClassNameId); - parameters.put( - "originalParentResourcePrimKey", originalParentResourcePrimKey); - parameters.put("parentResourceClassNameId", parentResourceClassNameId); - parameters.put("parentResourcePrimKey", parentResourcePrimKey); - parameters.put("mvcPath", mvcPath); - - addPortletBreadcrumbEntries(parameters, request, renderResponse); - } - - public static void addPortletBreadcrumbEntries( - long parentResourceClassNameId, long parentResourcePrimKey, - String mvcPath, HttpServletRequest request, - RenderResponse renderResponse) - throws PortalException, SystemException { - - Map parameters = new HashMap(); - - parameters.put("parentResourceClassNameId", parentResourceClassNameId); - parameters.put("parentResourcePrimKey", parentResourcePrimKey); - parameters.put("mvcPath", mvcPath); - - addPortletBreadcrumbEntries(parameters, request, renderResponse); - } - - public static List getAlternateRootKBFolders( - long groupId, long kbFolderId) - throws PortalException, SystemException { - - List kbFolders = KBFolderServiceUtil.getKBFolders( - groupId, kbFolderId, QueryUtil.ALL_POS, QueryUtil.ALL_POS); - - kbFolders = new ArrayList(kbFolders); - - Iterator itr = kbFolders.iterator(); - - while (itr.hasNext()) { - KBFolder kbFolder = itr.next(); - - if (kbFolder.isEmpty()) { - itr.remove(); - } - } - - return ListUtil.sort( - kbFolders, - new Comparator() { - - @Override - public int compare(KBFolder kbFolder1, KBFolder kbFolder2) { - String name1 = kbFolder1.getName(); - String name2 = kbFolder2.getName(); - - return name1.compareTo(name2) * -1; - } - - }); - } - - public static OrderByComparator getKBArticleOrderByComparator( - String orderByCol, String orderByType) { - - if (Validator.isNull(orderByCol) || Validator.isNull(orderByType)) { - return null; - } - - boolean ascending = false; - - if (orderByType.equals("asc")) { - ascending = true; - } - - if (orderByCol.equals("create-date")) { - return new KBArticleCreateDateComparator(ascending); - } - else if (orderByCol.equals("modified-date")) { - return new KBArticleModifiedDateComparator(ascending); - } - else if (orderByCol.equals("priority")) { - return new KBArticlePriorityComparator(ascending); - } - else if (orderByCol.equals("status")) { - return new KBArticleStatusComparator(ascending); - } - else if (orderByCol.equals("title")) { - return new KBArticleTitleComparator(ascending); - } - else if (orderByCol.equals("user-name")) { - return new KBArticleUserNameComparator(ascending); - } - else if (orderByCol.equals("version")) { - return new KBArticleVersionComparator(ascending); - } - else if (orderByCol.equals("view-count")) { - return new KBArticleViewCountComparator(ascending); - } - - return null; - } - - public static Sort[] getKBArticleSorts( - String orderByCol, String orderByType) { - - if (Validator.isNull(orderByCol) || Validator.isNull(orderByType)) { - return SortFactoryUtil.getDefaultSorts(); - } - - boolean reverse = true; - - if (orderByType.equals("asc")) { - reverse = false; - } - - if (orderByCol.equals("create-date")) { - String fieldName = Field.CREATE_DATE; - - return new Sort[] { - SortFactoryUtil.create(fieldName, Sort.LONG_TYPE, reverse), - SortFactoryUtil.create(null, Sort.SCORE_TYPE, false) - }; - } - else if (orderByCol.equals("modified-date")) { - String fieldName = Field.MODIFIED_DATE; - - return new Sort[] { - SortFactoryUtil.create(fieldName, Sort.LONG_TYPE, reverse), - SortFactoryUtil.create(null, Sort.SCORE_TYPE, false) - }; - } - else if (orderByCol.equals("score")) { - String fieldName = null; - - return new Sort[] { - SortFactoryUtil.create(fieldName, Sort.SCORE_TYPE, !reverse), - SortFactoryUtil.create( - Field.MODIFIED_DATE, Sort.LONG_TYPE, true) - }; - } - else if (orderByCol.equals("title")) { - String fieldName = "titleKeyword"; - - return new Sort[] { - SortFactoryUtil.create(fieldName, Sort.STRING_TYPE, reverse), - SortFactoryUtil.create(null, Sort.SCORE_TYPE, false) - }; - } - else if (orderByCol.equals("user-name")) { - String fieldName = Field.USER_NAME; - - return new Sort[] { - SortFactoryUtil.create(fieldName, Sort.STRING_TYPE, reverse), - SortFactoryUtil.create(null, Sort.SCORE_TYPE, false) - }; - } - - return SortFactoryUtil.getDefaultSorts(); - } - - public static String getKBArticleURL( - long plid, long resourcePrimKey, int status, String portalURL, - boolean maximized) { - - StringBundler sb = new StringBundler(11); - - sb.append(portalURL); - sb.append(PortalUtil.getPathMain()); - sb.append("/portal/knowledge_base/find_kb_article"); - sb.append(StringPool.QUESTION); - sb.append("plid"); - sb.append(StringPool.EQUAL); - sb.append(String.valueOf(plid)); - sb.append(StringPool.AMPERSAND); - sb.append("resourcePrimKey"); - sb.append(StringPool.EQUAL); - sb.append(String.valueOf(resourcePrimKey)); - - String url = sb.toString(); - - if (status != WorkflowConstants.STATUS_APPROVED) { - url = url.concat(StringPool.AMPERSAND).concat("status").concat( - StringPool.EQUAL).concat(String.valueOf(status)); - } - - if (maximized) { - url = url.concat(StringPool.AMPERSAND).concat("maximized").concat( - StringPool.EQUAL).concat(String.valueOf(maximized)); - } - - return url; - } - - public static OrderByComparator getKBCommentOrderByComparator( - String orderByCol, String orderByType) { - - if (Validator.isNull(orderByCol) || Validator.isNull(orderByType)) { - return null; - } - - boolean ascending = false; - - if (orderByType.equals("asc")) { - ascending = true; - } - - if (orderByCol.equals("create-date")) { - return new KBCommentCreateDateComparator(ascending); - } - else if (orderByCol.equals("modified-date")) { - return new KBCommentModifiedDateComparator(ascending); - } - - return null; - } - - public static long getKBFolderId( - long parentResourceClassNameId, long parentResourcePrimKey) - throws PortalException, SystemException { - - long kbFolderClassNameId = PortalUtil.getClassNameId( - KBFolderConstants.getClassName()); - - if (parentResourceClassNameId == kbFolderClassNameId) { - return parentResourcePrimKey; - } - - KBArticle kbArticle = KBArticleServiceUtil.getLatestKBArticle( - parentResourcePrimKey, WorkflowConstants.STATUS_ANY); - - return kbArticle.getKbFolderId(); - } - - public static OrderByComparator getKBTemplateOrderByComparator( - String orderByCol, String orderByType) { - - if (Validator.isNull(orderByCol) || Validator.isNull(orderByType)) { - return null; - } - - boolean ascending = false; - - if (orderByType.equals("asc")) { - ascending = true; - } - - if (orderByCol.equals("create-date")) { - return new KBTemplateCreateDateComparator(ascending); - } - else if (orderByCol.equals("modified-date")) { - return new KBTemplateModifiedDateComparator(ascending); - } - else if (orderByCol.equals("title")) { - return new KBTemplateTitleComparator(ascending); - } - else if (orderByCol.equals("user-name")) { - return new KBTemplateUserNameComparator(ascending); - } - - return null; - } - - public static String getMimeType(byte[] bytes, String fileName) { - InputStream inputStream = new UnsyncByteArrayInputStream(bytes); - - try { - return MimeTypesUtil.getContentType(inputStream, fileName); - } - finally { - StreamUtil.cleanUp(inputStream); - } - } - - public static final int getNextStatus(int status) { - if (status == KBCommentConstants.STATUS_IN_PROGRESS) { - return KBCommentConstants.STATUS_COMPLETED; - } - else if (status == KBCommentConstants.STATUS_NEW) { - return KBCommentConstants.STATUS_IN_PROGRESS; - } - else { - return KBCommentConstants.STATUS_NONE; - } - } - - public static Long[][] getParams(Long[] params) { - if (ArrayUtil.isEmpty(params)) { - return null; - } - - if (params.length <= _SQL_DATA_MAX_PARAMETERS) { - return new Long[][] {new Long[0], params}; - } - - return new Long[][] { - ArrayUtil.subset(params, _SQL_DATA_MAX_PARAMETERS, params.length), - ArrayUtil.subset(params, 0, _SQL_DATA_MAX_PARAMETERS) - }; - } - - public static String getPreferredKBFolderURLTitle( - PortalPreferences portalPreferences, String contentRootPrefix) - throws JSONException { - - String preferredKBFolderURLTitle = portalPreferences.getValue( - PortletKeys.KNOWLEDGE_BASE_DISPLAY, "preferredKBFolderURLTitle", - "{}"); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject( - preferredKBFolderURLTitle); - - return jsonObject.getString(contentRootPrefix, StringPool.BLANK); - } - - public static final int getPreviousStatus(int status) { - if (status == KBCommentConstants.STATUS_COMPLETED) { - return KBCommentConstants.STATUS_IN_PROGRESS; - } - else if (status == KBCommentConstants.STATUS_IN_PROGRESS) { - return KBCommentConstants.STATUS_NEW; - } - else { - return KBCommentConstants.STATUS_NONE; - } - } - - public static long getRootResourcePrimKey( - PortletRequest portletRequest, long groupId, - long resourceClassNameId, long resourcePrimKey) - throws PortalException, SystemException { - - long kbFolderClassNameId = PortalUtil.getClassNameId( - KBFolderConstants.getClassName()); - - if (resourceClassNameId == kbFolderClassNameId) { - return getCurrentRootKBFolder( - portletRequest, groupId, resourcePrimKey); - } - - return getKBFolderId(resourceClassNameId, resourcePrimKey); - } - - public static final String getStatusLabel(int status) { - if (status == KBCommentConstants.STATUS_COMPLETED) { - return "resolved"; - } - else if (status == KBCommentConstants.STATUS_IN_PROGRESS) { - return "in-progress"; - } - else if (status == KBCommentConstants.STATUS_NEW) { - return "new"; - } - else { - throw new IllegalArgumentException( - String.format("Invalid suggestion status %s", status)); - } - } - - public static final String getStatusTransitionLabel(int status) { - if (status == KBCommentConstants.STATUS_COMPLETED) { - return "resolve"; - } - else if (status == KBCommentConstants.STATUS_IN_PROGRESS) { - return "move-to-in-progress"; - } - else if (status == KBCommentConstants.STATUS_NEW) { - return "move-to-new"; - } - else { - throw new IllegalArgumentException( - String.format("Invalid suggestion status %s", status)); - } - } - - public static String getUrlTitle(long id, String title) { - if (title == null) { - return String.valueOf(id); - } - - title = StringUtil.toLowerCase(title.trim()); - - if (Validator.isNull(title) || Validator.isNumber(title) || - title.equals("rss")) { - - title = String.valueOf(id); - } - else { - title = FriendlyURLNormalizerUtil.normalize( - title, _normalizationFriendlyUrlPattern); - } - - return ModelHintsUtil.trimString( - KBArticle.class.getName(), "urlTitle", title); - } - - public static boolean isValidUrlTitle(String urlTitle) { - Matcher matcher = _validFriendlyUrlPattern.matcher(urlTitle); - - return matcher.matches(); - } - - public static void setPreferredKBFolderURLTitle( - PortalPreferences portalPreferences, String contentRootPrefix, - String value) - throws JSONException { - - String preferredKBFolderURLTitle = portalPreferences.getValue( - PortletKeys.KNOWLEDGE_BASE_DISPLAY, "preferredKBFolderURLTitle", - "{}"); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject( - preferredKBFolderURLTitle); - - jsonObject.put(contentRootPrefix, value); - - portalPreferences.setValue( - PortletKeys.KNOWLEDGE_BASE_DISPLAY, "preferredKBFolderURLTitle", - jsonObject.toString()); - } - - public static List sort( - long[] resourcePrimKeys, List kbArticles) { - - Map map = new HashMap(); - - for (KBArticle kbArticle : kbArticles) { - map.put(kbArticle.getResourcePrimKey(), kbArticle); - } - - kbArticles.clear(); - - for (long resourcePrimKey : resourcePrimKeys) { - if (map.containsKey(resourcePrimKey)) { - kbArticles.add(map.get(resourcePrimKey)); - } - } - - return kbArticles; - } - - public static String[] splitKeywords(String keywords) { - Set keywordsSet = new LinkedHashSet(); - - StringBundler sb = new StringBundler(); - - for (char c : keywords.toCharArray()) { - if (Character.isWhitespace(c)) { - if (sb.length() > 0) { - keywordsSet.add(sb.toString()); - - sb = new StringBundler(); - } - } - else if (Character.isLetterOrDigit(c)) { - sb.append(c); - } - else { - return new String[] {keywords}; - } - } - - if (sb.length() > 0) { - keywordsSet.add(sb.toString()); - } - - return StringUtil.split(StringUtil.merge(keywordsSet)); - } - - public static String trimLeadingSlash(String s) { - if (Validator.isNull(s)) { - return s; - } - - int x = 0; - - for (char c : s.toCharArray()) { - if ((c != CharPool.BACK_SLASH) && (c != CharPool.FORWARD_SLASH)) { - break; - } - - x = x + 1; - } - - return s.substring(x, s.length()); - } - - protected static void addPortletBreadcrumbEntries( - Map parameters, HttpServletRequest request, - RenderResponse renderResponse) - throws PortalException, SystemException { - - PortletURL portletURL = renderResponse.createRenderURL(); - - for (Map.Entry entry : parameters.entrySet()) { - Object value = entry.getValue(); - - portletURL.setParameter(entry.getKey(), value.toString()); - } - - long kbFolderClassNameId = PortalUtil.getClassNameId( - KBFolderConstants.getClassName()); - - long parentResourceClassNameId = (Long)parameters.get( - "parentResourceClassNameId"); - long parentResourcePrimKey = (Long)parameters.get( - "parentResourcePrimKey"); - - String mvcPath = (String)parameters.get("mvcPath"); - - if (parentResourcePrimKey == - KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - - ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute( - WebKeys.THEME_DISPLAY); - - PortalUtil.addPortletBreadcrumbEntry( - request, themeDisplay.translate("home"), portletURL.toString()); - } - else if (parentResourceClassNameId == kbFolderClassNameId) { - KBFolder kbFolder = KBFolderServiceUtil.getKBFolder( - parentResourcePrimKey); - - addPortletBreadcrumbEntries( - kbFolder.getClassNameId(), kbFolder.getParentKBFolderId(), - mvcPath, request, renderResponse); - - PortalUtil.addPortletBreadcrumbEntry( - request, kbFolder.getName(), portletURL.toString()); - } - else { - KBArticle kbArticle = KBArticleServiceUtil.getLatestKBArticle( - parentResourcePrimKey, WorkflowConstants.STATUS_ANY); - - addPortletBreadcrumbEntries( - kbArticle.getParentResourceClassNameId(), - kbArticle.getParentResourcePrimKey(), mvcPath, request, - renderResponse); - - PortalUtil.addPortletBreadcrumbEntry( - request, kbArticle.getTitle(), portletURL.toString()); - } - } - - private static long getCurrentRootKBFolder( - PortletRequest portletRequest, long groupId, long kbFolderId) - throws PortalException, SystemException { - - PortalPreferences portalPreferences = - PortletPreferencesFactoryUtil.getPortalPreferences(portletRequest); - - PortletPreferences portletPreferences = portletRequest.getPreferences(); - - String contentRootPrefix = GetterUtil.getString( - portletPreferences.getValue("contentRootPrefix", null)); - - String kbFolderURLTitle = getPreferredKBFolderURLTitle( - portalPreferences, contentRootPrefix); - - long childKbFolderId = KBFolderConstants.DEFAULT_PARENT_FOLDER_ID; - - if (kbFolderURLTitle == null) { - List kbFolders = getAlternateRootKBFolders( - groupId, kbFolderId); - - if (!kbFolders.isEmpty()) { - KBFolder kbFolder = kbFolders.get(0); - - childKbFolderId = kbFolder.getKbFolderId(); - } - } - else { - KBFolder kbFolder = KBFolderServiceUtil.fetchKBFolderByUrlTitle( - groupId, kbFolderId, kbFolderURLTitle); - - if (kbFolder != null) { - childKbFolderId = kbFolder.getKbFolderId(); - } - } - - return childKbFolderId; - } - - private static final int _SQL_DATA_MAX_PARAMETERS = GetterUtil.getInteger( - PropsUtil.get(PropsKeys.SQL_DATA_MAX_PARAMETERS)); - - private static Pattern _normalizationFriendlyUrlPattern = Pattern.compile( - "[^a-z0-9_-]"); - private static Pattern _validFriendlyUrlPattern = Pattern.compile( - "/[a-z0-9_-]+"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/PortletPropsKeys.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/PortletPropsKeys.java deleted file mode 100644 index e7dadb5e63..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/PortletPropsKeys.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util; - -/** - * @author Peter Shin - */ -public class PortletPropsKeys { - - public static final String ADMIN_EMAIL_FROM_ADDRESS = - "admin.email.from.address"; - - public static final String ADMIN_EMAIL_FROM_NAME = "admin.email.from.name"; - - public static final String ADMIN_EMAIL_KB_ARTICLE_ADDED_BODY = - "admin.email.kb.article.added.body"; - - public static final String ADMIN_EMAIL_KB_ARTICLE_ADDED_ENABLED = - "admin.email.kb.article.added.enabled"; - - public static final String ADMIN_EMAIL_KB_ARTICLE_ADDED_SUBJECT = - "admin.email.kb.article.added.subject"; - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_BODY = - "admin.email.kb.article.suggestion.in.progress.body"; - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_ENABLED = - "admin.email.kb.article.suggestion.in.progress.enabled"; - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_SUBJECT = - "admin.email.kb.article.suggestion.in.progress.subject"; - - public static final String ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_BODY = - "admin.email.kb.article.suggestion.received.body"; - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_ENABLED = - "admin.email.kb.article.suggestion.received.enabled"; - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_SUBJECT = - "admin.email.kb.article.suggestion.received.subject"; - - public static final String ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_BODY = - "admin.email.kb.article.suggestion.resolved.body"; - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_ENABLED = - "admin.email.kb.article.suggestion.resolved.enabled"; - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_SUBJECT = - "admin.email.kb.article.suggestion.resolved.subject"; - - public static final String ADMIN_EMAIL_KB_ARTICLE_UPDATED_BODY = - "admin.email.kb.article.updated.body"; - - public static final String ADMIN_EMAIL_KB_ARTICLE_UPDATED_ENABLED = - "admin.email.kb.article.updated.enabled"; - - public static final String ADMIN_EMAIL_KB_ARTICLE_UPDATED_SUBJECT = - "admin.email.kb.article.updated.subject"; - - public static final String ADMIN_KB_ARTICLE_DEFAULT_SECTIONS = - "admin.kb.article.default.sections"; - - public static final String ADMIN_KB_ARTICLE_INCREMENT_PRIORITY_ENABLED = - "admin.kb.article.increment.priority.enabled"; - - public static final String ADMIN_KB_ARTICLE_SECTIONS = - "admin.kb.article.sections"; - - public static final String KNOWLEDGE_BASE_DISPLAY_SELECTOR = - "knowledge.base.display.selector"; - - public static final String KNOWLEDGE_BASE_RATINGS_NUMBER_OF_STARS = - "knowledge.base.ratings.number.of.stars"; - - public static final String KNOWLEDGE_BASE_SOCIAL_BOOKMARKS_DISPLAY_STYLE = - "knowledge.base.social.bookmarks.display.style"; - - public static final String KNOWLEDGE_BASE_SOURCE_URL_EDIT_MESSAGE_KEY = - "knowledge.base.source.url.edit.message.key"; - - public static final String KNOWLEDGE_BASE_SOURCE_URL_ENABLED = - "knowledge.base.source.url.enabled"; - - public static final String MARKDOWN_IMPORTER_ARTICLE_EXTENSIONS = - "markdown.importer.article.extensions"; - - public static final String MARKDOWN_IMPORTER_ARTICLE_INTRO = - "markdown.importer.article.intro"; - - public static final String MARKDOWN_IMPORTER_IMAGE_FILE_EXTENSIONS = - "markdown.importer.image.file.extensions"; - - public static final String MARKDOWN_IMPORTER_IMAGE_FOLDER = - "markdown.importer.image.folder"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/PortletPropsValues.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/PortletPropsValues.java deleted file mode 100644 index 77b8b1b187..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/PortletPropsValues.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util; - -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.PropsKeys; -import com.liferay.portal.kernel.util.PropsUtil; -import com.liferay.util.portlet.PortletProps; - -/** - * @author Peter Shin - */ -public class PortletPropsValues { - - public static final String ADMIN_EMAIL_FROM_ADDRESS = PortletProps.get( - PortletPropsKeys.ADMIN_EMAIL_FROM_ADDRESS); - - public static final String ADMIN_EMAIL_FROM_NAME = PortletProps.get( - PortletPropsKeys.ADMIN_EMAIL_FROM_NAME); - - public static final String ADMIN_EMAIL_KB_ARTICLE_ADDED_BODY = - PortletProps.get(PortletPropsKeys.ADMIN_EMAIL_KB_ARTICLE_ADDED_BODY); - - public static final boolean ADMIN_EMAIL_KB_ARTICLE_ADDED_ENABLED = - GetterUtil.getBoolean( - PortletProps.get( - PortletPropsKeys.ADMIN_EMAIL_KB_ARTICLE_ADDED_ENABLED)); - - public static final String ADMIN_EMAIL_KB_ARTICLE_ADDED_SUBJECT = - PortletProps.get(PortletPropsKeys.ADMIN_EMAIL_KB_ARTICLE_ADDED_SUBJECT); - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_BODY = PortletProps.get( - PortletPropsKeys. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_BODY); - - public static final boolean - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_ENABLED = - GetterUtil.getBoolean( - PortletProps.get( - PortletPropsKeys. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_ENABLED)); - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_SUBJECT = - PortletProps.get( - PortletPropsKeys. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_IN_PROGRESS_SUBJECT); - - public static final String ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_BODY = - PortletProps.get( - PortletPropsKeys.ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_BODY); - - public static final boolean - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_ENABLED = - GetterUtil.getBoolean( - PortletProps.get( - PortletPropsKeys. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_ENABLED)); - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_SUBJECT = PortletProps.get( - PortletPropsKeys. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RECEIVED_SUBJECT); - - public static final String ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_BODY = - PortletProps.get( - PortletPropsKeys.ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_BODY); - - public static final boolean - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_ENABLED = - GetterUtil.getBoolean( - PortletProps.get( - PortletPropsKeys. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_ENABLED)); - - public static final String - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_SUBJECT = PortletProps.get( - PortletPropsKeys. - ADMIN_EMAIL_KB_ARTICLE_SUGGESTION_RESOLVED_SUBJECT); - - public static final String ADMIN_EMAIL_KB_ARTICLE_UPDATED_BODY = - PortletProps.get(PortletPropsKeys.ADMIN_EMAIL_KB_ARTICLE_UPDATED_BODY); - - public static final boolean ADMIN_EMAIL_KB_ARTICLE_UPDATED_ENABLED = - GetterUtil.getBoolean( - PortletProps.get( - PortletPropsKeys.ADMIN_EMAIL_KB_ARTICLE_UPDATED_ENABLED)); - - public static final String ADMIN_EMAIL_KB_ARTICLE_UPDATED_SUBJECT = - PortletProps.get( - PortletPropsKeys.ADMIN_EMAIL_KB_ARTICLE_UPDATED_SUBJECT); - - public static final String[] ADMIN_KB_ARTICLE_DEFAULT_SECTIONS = - PortletProps.getArray( - PortletPropsKeys.ADMIN_KB_ARTICLE_DEFAULT_SECTIONS); - - public static final boolean ADMIN_KB_ARTICLE_INCREMENT_PRIORITY_ENABLED = - GetterUtil.getBoolean( - PortletProps.get( - PortletPropsKeys.ADMIN_KB_ARTICLE_INCREMENT_PRIORITY_ENABLED)); - - public static final String[] ADMIN_KB_ARTICLE_SECTIONS = - PortletProps.getArray(PortletPropsKeys.ADMIN_KB_ARTICLE_SECTIONS); - - public static final int KNOWLEDGE_BASE_RATINGS_NUMBER_OF_STARS = - GetterUtil.getInteger( - PortletProps.get( - PortletPropsKeys. - KNOWLEDGE_BASE_RATINGS_NUMBER_OF_STARS), - GetterUtil.getInteger( - PropsUtil.get(PropsKeys.RATINGS_DEFAULT_NUMBER_OF_STARS))); - - public static final String KNOWLEDGE_BASE_SOCIAL_BOOKMARKS_DISPLAY_STYLE = - PortletProps.get( - PortletPropsKeys.KNOWLEDGE_BASE_SOCIAL_BOOKMARKS_DISPLAY_STYLE); - - public static final String KNOWLEDGE_BASE_SOURCE_URL_EDIT_MESSAGE_KEY = - PortletProps.get( - PortletPropsKeys.KNOWLEDGE_BASE_SOURCE_URL_EDIT_MESSAGE_KEY); - - public static final boolean KNOWLEDGE_BASE_SOURCE_URL_ENABLED = - GetterUtil.getBoolean( - PortletProps.get( - PortletPropsKeys.KNOWLEDGE_BASE_SOURCE_URL_ENABLED)); - - public static final String[] MARKDOWN_IMPORTER_ARTICLE_EXTENSIONS = - PortletProps.getArray( - PortletPropsKeys.MARKDOWN_IMPORTER_ARTICLE_EXTENSIONS); - - public static final String MARKDOWN_IMPORTER_ARTICLE_INTRO = - GetterUtil.getString( - PortletProps.get(PortletPropsKeys.MARKDOWN_IMPORTER_ARTICLE_INTRO)); - - public static final String[] MARKDOWN_IMPORTER_IMAGE_FILE_EXTENSIONS = - PortletProps.getArray( - PortletPropsKeys.MARKDOWN_IMPORTER_IMAGE_FILE_EXTENSIONS); - - public static final String MARKDOWN_IMPORTER_IMAGE_FOLDER = - GetterUtil.getString( - PortletProps.get(PortletPropsKeys.MARKDOWN_IMPORTER_IMAGE_FOLDER)); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/WebKeys.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/WebKeys.java deleted file mode 100644 index 828135d498..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/util/WebKeys.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.knowledgebase.util; - -/** - * @author Brian Wing Shun Chan - * @author Peter Shin - */ -public class WebKeys implements com.liferay.portal.kernel.util.WebKeys { - - public static final String KNOWLEDGE_BASE_KB_ARTICLE = - "KNOWLEDGE_BASE_KB_ARTICLE"; - - public static final String - KNOWLEDGE_BASE_KB_NAVIGATION_DISPLAY_CONTEXT = - "KNOWLEDGE_BASE_KB_NAVIGATION_DISPLAY_CONTEXT"; - - public static final String - KNOWLEDGE_BASE_KB_SUGGESTION_LIST_DISPLAY_CONTEXT = - "KNOWLEDGE_BASE_KB_SUGGESTION_LIST_DISPLAY_CONTEXT"; - - public static final String KNOWLEDGE_BASE_KB_TEMPLATE = - "KNOWLEDGE_BASE_KB_TEMPLATE"; - - public static final String KNOWLEDGE_BASE_STATUS = "KNOWLEDGE_BASE_STATUS"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language.properties deleted file mode 100644 index 60d6356b3f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. -action.ADD_KB_ARTICLE=Add Article -action.ADD_KB_FOLDER=Add Folder -action.ADD_KB_TEMPLATE=Add Template -action.ADMINISTRATOR=Administrator -action.DELETE_KB_ARTICLES=Delete Articles -action.DELETE_KB_TEMPLATES=Delete Templates -action.MOVE_KB_ARTICLE=Move Article -action.MOVE_KB_FOLDER=Move Folder -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities -action.VIEW_KB_TEMPLATES=View Templates -action.VIEW_SUGGESTIONS=View Suggestions -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=Add Article -add-child-article=Add Child Article -all-comments-x=All Comments ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? -article-added-email=Article Added Email -article-display-style=Article Display Style -article-or-folder=Article or Folder -article-updated-email=Article Updated Email -article-window-state=Article Window State -articles=Articles -articles-with-tag-x=Articles with tag {0}. -articles-with-x-x=Articles with {0} {1}. -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. -basic-article=Basic Article -between=Between -child-articles-display-style=Child Articles Display Style -child-articles-for-x=Child Articles for {0}. -comments=Comments -content-root-prefix=Content Root Prefix -did-you-like-this-article=Did you like this article? -do-you-have-any-suggestions=Do you have any suggestions? -edit-on-github=Edit on GitHub -enable-description=Enable Description -enable-history=Enable History -enable-subscriptions=Enable Subscriptions -enable-suggestions=Enable Suggestions -enable-view-count-increment=Enable View Count Increment -help-us-improve-it=Help us improve it. -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments -knowledge-base-home=Knowledge Base Home -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base Template -most-popular=Most Popular -most-recent=Most Recent -move-to-in-progress=Move to in Progress -move-to-new=Move to New -new-article=New Article -no-articles-were-found=No articles were found. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. -no-in-progress-suggestion-was-found=No in progress suggestion was found. -no-new-suggestion-was-found=No new suggestion was found. -no-subscriptions-were-found=No subscriptions were found. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. -parent-article=Parent Article -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. -please-enter-a-valid-source-url=Please enter a valid source URL. -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. -please-select-at-least-one-section=Please select at least one section. -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) -prioritization-strategy=Prioritization Strategy -recent-articles=Recent Articles -resolve=Resolve -saved-attachments=Saved Attachments -search-articles=Search Articles -sections=Sections -select-parent=Select Parent -show-asset-entries=Show Asset Entries -show-author-column=Show Author Column -show-create-date-column=Show Create Date Column -show-modified-date-column=Show Modified Date Column -show-pagination=Show Pagination -show-priority-column=Show Priority Column -show-ratings=Show Ratings -show-sections-title=Show Sections Title -show-status-column=Show Status Column -show-suggestions=Show Suggestions -show-views-column=Show Views Column -source-url=Source URL -suggestion-deleted-successfully=Suggestion deleted successfully. -suggestion-in-progress-email=Suggestion in Progress Email -suggestion-received-email=Suggestion Received Email -suggestion-resolved-email=Suggestion Resolved Email -suggestion-saved-successfully=Suggestion saved successfully. -suggestion-status-updated-successfully=Suggestion status updated successfully. -templates=Templates -the-article-attachments-file-names=The article attachments' file names -the-article-content=The article content -the-article-content-diff=The article content diff -the-article-could-not-be-found=The article could not be found. -the-article-title=The article title -the-article-title-diff=The article title diff -the-article-url=The article URL -the-article-version=The article version -the-comment-content=The comment content -the-comment-could-not-be-found=The comment could not be found. -the-comment-create-date=The comment create date -the-company-id-associated-with-the-article=The company ID associated with the article -the-company-mx-associated-with-the-article=The company MX associated with the article -the-company-name-associated-with-the-article=The company name associated with the article -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article -the-selected-article-no-longer-exists=The selected article no longer exists. -the-site-name-associated-with-the-article=The site name associated with the article -the-subscription-could-not-be-found=The subscription could not be found. -the-user-did-not-like-the-article=The user did not like the article. -the-user-liked-the-article=The user liked the article. -the-user-who-added-the-article=The user who added the article -there-are-no-articles=There are no articles. -there-are-no-articles-with-tag-x=There are no articles with tag {0}. -there-are-no-articles-with-x-x=There are no articles with {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. -there-are-no-attachments=There are no attachments. -there-are-no-child-articles-for-x=There are no child articles for {0}. -there-are-x-suggestions=There are {0} suggestions. -there-is-one-suggestion=There is one suggestion. -upload-your-zip-file=Upload Your ZIP File -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. -use-star-ratings=Use Star Ratings -use-this-template=Use This Template -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down -view-articles-with-tag-x=View articles with tag {0}. -view-articles-with-x-x=View articles with {0} {1}. -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. -was-this-information-helpful=Was this information helpful? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? -x-pending={0} Pending -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ar.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ar.properties deleted file mode 100644 index ec60994c1a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ar.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=اض٠مقالة -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=اض٠قالب -action.ADMINISTRATOR=المسؤول -action.DELETE_KB_ARTICLES=احذ٠المقالة -action.DELETE_KB_TEMPLATES=احذ٠القالب -action.MOVE_KB_ARTICLE=انقل المقالة -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=تحديث الأولويات للمقالات -action.VIEW_KB_TEMPLATES=عرض القوالب -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=اض٠مقالة -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=جميع التعليقات ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=اضي٠البريد الكتروني للمقالة -article-display-style=طريقة عرض المقالة -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=حدثت المقالة بوسطة البريد الالكتروني -article-window-state=حالة Ù†Ø§ÙØ°Ø© المقالة -articles=مقالات -articles-with-tag-x=مقالات مع دلالة {0}. -articles-with-x-x=مقالات مع {0} {1}. -articles-with-x-x-and-tag-x=مقالات مع {0} {1} Ùˆ الدلالة {2}. -basic-article=Basic Article (Automatic Copy) -between=بين -child-articles-display-style=طريقة عرض المقالات Ø§Ù„ÙØ±Ø¹ÙŠØ© -child-articles-for-x=المقالات Ø§Ù„ÙØ±Ø¹ÙŠØ© من اجل{0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=تمكين الوص٠-enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=قاعدة Ø§Ù„Ù…Ø¹Ø±ÙØ© ØªÙˆÙØ± وسيلة لجمع وتنظيم واسترجاع المحتويات المتعلقة بمستندات المنتج والدعم . يمكن للمسؤولين توÙير مستخدمين للوصول الى قوالب لتسهيل إنشاء قواعد مقالات المعار٠-javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=مقال عن قاعدة Ø§Ù„Ù…Ø¹Ø±ÙØ© -javax.portlet.title.4_WAR_knowledgebaseportlet=قسم قاعدة Ø§Ù„Ù…Ø¹Ø±ÙØ© -javax.portlet.title.5_WAR_knowledgebaseportlet=بحث قاعدة Ø§Ù„Ù…Ø¹Ø±ÙØ© -kb-articles-kb-templates-and-kb-comments=المقالات والتعليقات وقوالب -knowledge-base-home=Ø§Ù„ØµÙØ­Ø© الرئيسة للقواعد Ø§Ù„Ù…Ø¹Ø±ÙØ© -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=مقال عن قاعدة Ø§Ù„Ù…Ø¹Ø±ÙØ© -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=قالب قاعدة Ø§Ù„Ù…Ø¹Ø±ÙØ© -most-popular=أكثر شيوعاً -most-recent=آخر التحديثات -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=مقالة جديدة -no-articles-were-found=لم يتم العثور على المقالات. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=لم يتم العثور على الاشتراكات. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=مقالة الاصل -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=الرجاء إدخال الأولوية التي هي أكبر من {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=الرجاء إدخال قائمة من الكلمات محدد Ø¨Ø§Ù„ÙØ§ØµÙ„Ø© عن خصائص البورتليت {0} لتمكين هذا البورتليت. -please-select-at-least-one-section=الرجاء اختيار قسم واحد على الأقل. -portlet-configuration-page-x-instance-id-x=إعدادات البورتليت (ØµÙØ­Ø© -- {0} رقم نسخة البورتليت، -- {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=المقالات الأخيرة -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=بحث المقالات -sections=الأقسام -select-parent=Select Parent (Automatic Copy) -show-asset-entries=إظهار إدخالات الأسيت -show-author-column=عرض عمود المؤل٠-show-create-date-column=إظهار تاريخ إنشاء عمود -show-modified-date-column=إظهار تاريخ تعديل العمود -show-pagination=إظهار ترقيم Ø§Ù„ØµÙØ­Ø§Øª -show-priority-column=إظهار أولوية العمود -show-ratings=إظهار التقييم -show-sections-title=إظهار عنوان الأقسام -show-status-column=إظهار حالة العمود -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=إظهار عدد المشاهدات العمود -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=أسماء Ø§Ù„Ù…Ù„ÙØ§Øª المرÙقات للمقالة -the-article-content=محتوى المقالة -the-article-content-diff=اختلا٠محتوى المقالة -the-article-could-not-be-found=تعذر إيجاد المقالة. -the-article-title=عنوان المقالة -the-article-title-diff=اختلا٠عنوان المقالة -the-article-url=مسار المقالة -the-article-version=إصدارة المقالة -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=تعذر العثور على التعليق -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=معر٠الشركة مرتبط مع المقالة -the-company-mx-associated-with-the-article=الشركة MX مرتبطة مع المقالة -the-company-name-associated-with-the-article=اسم الشركة مرتبط مع المقالة -the-email-address-of-the-user-who-added-the-article=عنوان البريد الإلكتروني للمستخدم الذي أضا٠المقالة -the-selected-article-no-longer-exists=المقالة المختارة لم تعد موجودة. -the-site-name-associated-with-the-article=اسم موقع المرتبط مع المقالة -the-subscription-could-not-be-found=تعذر ايجاد الاشتراك. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=المستخدم الذي أضا٠المقالة -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=لا توجد مقالات مع دالة {0}. -there-are-no-articles-with-x-x=لا توجد مقالات مع {1} {0}. -there-are-no-articles-with-x-x-and-tag-x=لا توجد مقالات مع {0} {1} والدالة {2}. -there-are-no-attachments=لا توجد مرÙقات. -there-are-no-child-articles-for-x=لا توجد مقالات ÙØ±Ø¹ÙŠØ© من اجل {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=استخدام هذا القالب -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=عرض المقالات مع الدالة {0}. -view-articles-with-x-x=عرض المقالات مع {1} {0}. -view-articles-with-x-x-and-tag-x=عرض المقالات مع {0} {1} والدالة {2}. -was-this-information-helpful=هل كانت هذه المعلومات Ù…Ùيدة؟ -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_bg.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_bg.properties deleted file mode 100644 index 4e07922464..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_bg.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ca.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ca.properties deleted file mode 100644 index ca7e1faf2a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ca.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=Un total de {0} artículos fueron importados. -action.ADD_KB_ARTICLE=Afegeix Article -action.ADD_KB_FOLDER=Añadir carpeta -action.ADD_KB_TEMPLATE=Afegeix plantilla -action.ADMINISTRATOR=Administrador -action.DELETE_KB_ARTICLES=Esborra articles -action.DELETE_KB_TEMPLATES=Esborra plantilles -action.MOVE_KB_ARTICLE=Mou article -action.MOVE_KB_FOLDER=Mover carpeta -action.UPDATE_KB_ARTICLES_PRIORITIES=Actualitza la prioritat dels articles -action.VIEW_KB_TEMPLATES=Mostra plantilles -action.VIEW_SUGGESTIONS=Ver sugerencias -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=Afegeix Article -add-child-article=Afegeix un article fill -all-comments-x=Tots el comentaris ({0}) -an-unexpected-error-occurred-while-importing-articles-x=Un error inesperat va ocòrrer mentre s'importaven els articles: {0}. -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Està segur que vol esborrar els articles seleccionats? -article-added-email=Article afegit per Email -article-display-style=Estil de visualització de l'Article -article-or-folder=Article o Carpeta -article-updated-email=Article actualitzat per Email -article-window-state=Estat de la finestra de l'article -articles=Articles -articles-with-tag-x=Articles amb etiqueta {0}. -articles-with-x-x=Articles amb {0} {1}. -articles-with-x-x-and-tag-x=Articles amb {0} {1} i etiqueta {2}. -basic-article=Article bàsic -between=entre -child-articles-display-style=Estil de visualització dels articles fill -child-articles-for-x=Articles fill per {0}. -comments=Comentaris -content-root-prefix=Prefixe del contingut arrel -did-you-like-this-article=T'ha agradat aquest article? -do-you-have-any-suggestions=Tens alguna suggerència? -edit-on-github=Editar a GitHub -enable-description=Habilita Descripció -enable-history=Activar històtic -enable-subscriptions=Habilita Descripció -enable-suggestions=Activar suggerències -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Ayuda'ns a millorar-ho. -javax.portlet.description.1_WAR_knowledgebaseportlet=Base de coneixement proporciona un mitjà per recopilar, organitzar i recuperar els continguts relatius a la documentació del producte i suport. Els administradors poden proporcionar als usuaris accés a les plantilles per facilitar la creació d'articles de la Base de coneixement. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=Article de la Base de Coneixement -javax.portlet.title.4_WAR_knowledgebaseportlet=Secció de la Base de Coneixement -javax.portlet.title.5_WAR_knowledgebaseportlet=Cercar en la Base de Coneixement -kb-articles-kb-templates-and-kb-comments=Articles, plantilles i comentaris -knowledge-base-home=Inici de la Base de Coneixement -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=Article de la Base de coneixement -model.resource.com.liferay.knowledgebase.model.KBFolder=Inici de la Base de Coneixement -model.resource.com.liferay.knowledgebase.model.KBTemplate=Plantilla de la base de coneixement -most-popular=El més popular -most-recent=El més recent -move-to-in-progress=Mogut a en progrés -move-to-new=Moure a nou -new-article=Nou Article -no-articles-were-found=No es van trobar articles. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=Cap suggeriment complert ha estat trobat. -no-in-progress-suggestion-was-found=No s'ha trobat cap suggeriment en procés. -no-new-suggestion-was-found=No s'ha trobat cap suggeriment nou. -no-subscriptions-were-found=No es van trobar subscripcions. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=No s'ha importat res. No s'ha trobat articles amb una de les extensions suportades: {0}. -parent-article=Article Pare -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Per favor, introdueixi una URL amigable que comenci amb una barra i que contingui caràcters alfanumèrics, guions i guions baixos. -please-enter-a-priority-that-is-greater-than-x=Per favor entrau una prioritat major que {0}. -please-enter-a-valid-folder-name=Per favor, introdueixi un nom de carpeta vàlit. -please-enter-a-valid-source-url=Per favor, introdueixi una URL de font vàlida. -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Si us plau, introduïu una llista de paraules delimitada per comes per al portlet de propietat {0} per activar aquest portlet. -please-select-at-least-one-section=Si us plau, seleccioneu almenys una secció. -portlet-configuration-page-x-instance-id-x=Configuració del Portlet (pàgina - {0}, ID d'instància - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Articles Recents -resolve=Resoldre -saved-attachments=Adjunts guardats -search-articles=Cerca Articles -sections=Seccions -select-parent=Seleccioni el pare -show-asset-entries=Mostrar entrades d'actius -show-author-column=Mostrar columna d'autor -show-create-date-column=Mostra com crear una data de la columna -show-modified-date-column=Mostrar la data de la columna modificada -show-pagination=Mostrar la paginació -show-priority-column=Mostrar columna de prioritat -show-ratings=Mostra Puntuacions -show-sections-title=Mostrar el títol de les seccions -show-status-column=Mostrar l'estat de la columna -show-suggestions=Mostrar suggeriments -show-views-column=Mostrar les vistes de la columna -source-url=URL font -suggestion-deleted-successfully=Suggeriments esborrats correctament. -suggestion-in-progress-email=Suggeriment en procés de correu electrònic -suggestion-received-email=Email de suggeriment rebut -suggestion-resolved-email=Email de suggeriment resolt -suggestion-saved-successfully=Suggeriment guardat correctament. -suggestion-status-updated-successfully=Estat del suggeriment actualitzat correctament. -templates=Plantilles -the-article-attachments-file-names=Nom de l'article dels arxius adjunts -the-article-content=Contingut de l'article -the-article-content-diff=El contingut de l'article dif -the-article-could-not-be-found=L'article no es va trobar. -the-article-title=Títol de l'article -the-article-title-diff=El títol de l'article dif -the-article-url=URL de l'article -the-article-version=Versió de l'article -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=El comentari no es va trobar. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=L'ID de la companyia associat amb l'article -the-company-mx-associated-with-the-article=El MX de la companyia associat amb l'article -the-company-name-associated-with-the-article=El nom de la companyia associada amb l'article -the-email-address-of-the-user-who-added-the-article=Adreça de correu electrónic de l'usuari que va afegir l'article -the-selected-article-no-longer-exists=L'article seleccionat no existeix. -the-site-name-associated-with-the-article=El nom del lloc web està associat amb l'article -the-subscription-could-not-be-found=La subscripció no es va trobar. -the-user-did-not-like-the-article=A l'usuari no li va agradar l'article. -the-user-liked-the-article=L'usuari va linkar l'article. -the-user-who-added-the-article=Usuari que va afegir l'article -there-are-no-articles=No hi ha elements adjunts. -there-are-no-articles-with-tag-x=No hi ha articles amb etiqueta {0}. -there-are-no-articles-with-x-x=No hi ha articles amb {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=No hi ha articles amb {0} {1} i l'etiqueta de {2}. -there-are-no-attachments=No hi ha elements adjunts. -there-are-no-child-articles-for-x=No hi ha articles fills per {0}. -there-are-x-suggestions=Hi han {0} suggeriments. -there-is-one-suggestion=Hi ha un suggeriment. -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Fer servir les valoracions amb estrelles -use-this-template=Usa aquesta plantilla -use-thumbs-up-thumbs-down=Fes servir polzes cap amunt / polzes cap abaix -view-articles-with-tag-x=Veu articles amb etiqueta {0}. -view-articles-with-x-x=Veure articles amb {0} {1}. -view-articles-with-x-x-and-tag-x=Veure articles amb {0} {1} i l'etiqueta de {2}. -was-this-information-helpful=Va ser útil aquesta informació? -what-did-you-like-the-most-what-would-you-improve=Què va ser el que més et va agradar ? Què milloraries ? -x-pending={0} Pendents -you-sent-one-suggestion-for-this-article=Tu vas enviar una suggeriment per aquest article. -you-sent-x-suggestions-for-this-article=Tu has enviat {0} suggeriments per aquest article. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_cs.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_cs.properties deleted file mode 100644 index f43e774bbe..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_cs.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=PÅ™idat Älánek -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=PÅ™idat Å¡ablonu -action.ADMINISTRATOR=Správce -action.DELETE_KB_ARTICLES=Odstranit Älánky -action.DELETE_KB_TEMPLATES=Odstranit Å¡ablony -action.MOVE_KB_ARTICLE=PÅ™esunout Älánek -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Aktualizovat priority Älánků -action.VIEW_KB_TEMPLATES=Zobrazit Å¡ablony -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=PÅ™idat Älánek -add-child-article=PÅ™idat odvozený Älánek -all-comments-x=VÅ¡echny komentáře ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=E-mail o pÅ™idání Älánku -article-display-style=Styl zobrazení Älánku -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=E-mail o aktualizaci Älánku -article-window-state=Stav okna Älánku -articles=ÄŒlánky -articles-with-tag-x=ÄŒlánky se Å¡títkem {0}. -articles-with-x-x=ÄŒlánky s {0} {1}. -articles-with-x-x-and-tag-x=ÄŒlánky s {0} {1} a Å¡títkem {2}. -basic-article=Basic Article (Automatic Copy) -between=Mezi -child-articles-display-style=Styl zobrazení pro potomky Älánku -child-articles-for-x=Potomci Älánku {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Povolit popis -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Znalostní báze umožňuje sbÄ›r, organizaci a získávání obsahu, který se týká produktové dokumentace a podpory. Správci mohou spravovat Å¡ablony pro usnadnÄ›ní tvorby Älánků znalostní báze. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=ÄŒlánek znalostní báze -javax.portlet.title.4_WAR_knowledgebaseportlet=Sekce znalostní báze -javax.portlet.title.5_WAR_knowledgebaseportlet=Vyhledávání ve znalostní bázi -kb-articles-kb-templates-and-kb-comments=ÄŒlánky, Å¡ablony a komentáře -knowledge-base-home=Úvodní stránka znalostní báze -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=ÄŒlánek znalostní báze -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Å ablona znalostní báze -most-popular=NejoblíbenÄ›jší -most-recent=NejnovÄ›jší -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Nový Älánek -no-articles-were-found=Nebyly nalezeny žádné Älánky. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Informace o zmÄ›nách nikdo neodebírá. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=NadÅ™azený Älánek -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Zadejte prioritu vÄ›tší než {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Pro zprovoznÄ›ní tohoto portletu je zapotÅ™ebí zadat seznam slov oddÄ›lených Äárkou pro vlastnost {0}. -please-select-at-least-one-section=Vyberte, prosím, nejménÄ› jednu sekci. -portlet-configuration-page-x-instance-id-x=Nastavení portletu (Stránka: {0}, ID Instance: {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=NejnovÄ›jší Älánky -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Prohledat Älánky -sections=Sekce -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Zobrazit položky -show-author-column=Zobrazit sloupec Autor. -show-create-date-column=Zobrazit sloupec Datum vytvoÅ™ení -show-modified-date-column=Zobrazit sloupec Datum posledních úprav -show-pagination=Zobrazit stránkování -show-priority-column=Zobrazit sloupec Priorita -show-ratings=Zobrazit hodnocení -show-sections-title=Zobrazit nadpisy sekcí -show-status-column=Zobrazit sloupec Stav -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Zobrazit sloupec Zobrazení -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Jména příloh Älánku -the-article-content=Obsah Älánku -the-article-content-diff=Porovnání obsahu Älánku -the-article-could-not-be-found=ÄŒlánek nebyl nalezen. -the-article-title=Titulek Älánku -the-article-title-diff=Porovnání titulku Älánku -the-article-url=URL adresa Älánku -the-article-version=Verze Älánku -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Komentář nebyl nalezen. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=Company ID spjaté s Älánkem -the-company-mx-associated-with-the-article=Company MX spjatý se Älánkem -the-company-name-associated-with-the-article=Company name spjaté se Älánkem -the-email-address-of-the-user-who-added-the-article=E-mailová adresa uživatele, který Älánek pÅ™idal -the-selected-article-no-longer-exists=Vybraný Älánek již neexistuje. -the-site-name-associated-with-the-article=Web, který je spjatý s Älánkem -the-subscription-could-not-be-found=Sledování nebylo nalezeno. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Uživatel, který Älánek pÅ™idal -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Nebyly nalezeny žádné Älánky se Å¡títkem {0}. -there-are-no-articles-with-x-x=Nebyly nalezeny žádné Älánky s {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Nebyly nalezeny žádné Älánky s {0} {1} a Å¡títkem {2}. -there-are-no-attachments=Nebyly nalezeny žádné přílohy. -there-are-no-child-articles-for-x=Nebyli nalezeni žádní potomci Älánku {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Použít tuto Å¡ablonu -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=Zobrazit Älánky se Å¡títkem {0}. -view-articles-with-x-x=Zobrazit Älánky s {0} {1}. -view-articles-with-x-x-and-tag-x=Zobrazit Älánky s {0} {1} a se Å¡títkem {2}. -was-this-information-helpful=Byla tato informace užiteÄná? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_da.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_da.properties deleted file mode 100644 index 153ffa9a61..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_da.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base Template (Automatic Copy) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_de.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_de.properties deleted file mode 100644 index 1d8e4ce48e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_de.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Artikel hinzufügen -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Vorlage hinzufügen -action.ADMINISTRATOR=Administrator -action.DELETE_KB_ARTICLES=Artkel löschen -action.DELETE_KB_TEMPLATES=Vorlagen löschen -action.MOVE_KB_ARTICLE=Artikel verschieben -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Prioritäten der Artikel aktualisieren -action.VIEW_KB_TEMPLATES=Vorlagen ansehen -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Artikel hinzufügen -add-child-article=Untergeordneten Artikel hinzufügen -all-comments-x=Alle Kommentare ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=E-Mail: Artikel hinzugefügt -article-display-style=Artikeldarstellungsstil -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=E-Mail: Artikel aktualisiert -article-window-state=Window-State des Artikels -articles=Artikel -articles-with-tag-x=Artikel mit dem Schlagwort {0}. -articles-with-x-x=Artikel mit {0} {1}. -articles-with-x-x-and-tag-x=Artikel mit {0} {1} und dem Schlagwort {2}. -basic-article=Basic Article (Automatic Copy) -between=Zwischen -child-articles-display-style=Anzeige der untergeordneten Artikel -child-articles-for-x=Untergeordnete Artikel für {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Beschreibung aktivieren -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Die Wissensdatenbank bietet die Möglichkeit Inhalt zu sammeln, zu organisieren und zu beziehen, um Produktinformationen und Unterstützung zu erhalten. Administratoren können Benutzern den Zugriff auf Vorlagen zur Erstellung von Wissensdatenbankartikeln erlauben. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Wissensdatenbankartikel -javax.portlet.title.4_WAR_knowledgebaseportlet=Abschnitt der Wissensdatenbank -javax.portlet.title.5_WAR_knowledgebaseportlet=Wissensdatenbanksuche -kb-articles-kb-templates-and-kb-comments=Artikel, Vorlagen und Kommentare -knowledge-base-home=Wissendatenbank-Start -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Artikel der Wissensdatenbank -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Vorlage der Wissensdatenbank -most-popular=Beliebteste -most-recent=Neueste -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Neuer Artikel -no-articles-were-found=Es wurden keine Artikel gefunden. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Es wurde keine Abonnements gefunden. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Übergeordneter Artikel -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Bitte geben Sie eine Priorität an, die größer als {0} ist. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Bitte geben Sie eine Komme-separierte Liste von Wörtern für die Portlet-Einstellung {0} an, um das Portlet zu aktivieren. -please-select-at-least-one-section=Bitte wählen Sie mindestens einen Abschnitt. -portlet-configuration-page-x-instance-id-x=Portlet Konfiguratioon (Seite - {0}, Instanz ID - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Kürzlich aktualisierte Artikel -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Nach Artikeln suchen -sections=Abschnitte -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Assets anzeigen -show-author-column=Spalte mit Autoren anzeigen -show-create-date-column=Spalte mit Erstellungsdaten anzeigen -show-modified-date-column=Spalte mit Änderungsdaten anzeigen -show-pagination=Seitennummerierung anzeigen -show-priority-column=Spalte mit Prioritäten anzeigen -show-ratings=Bewertungen anzeigen -show-sections-title=Abschnittstitel anzeigen -show-status-column=Spalte mit Status anzeigen -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Spalte mit Aufrufen anzeigen -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Die Namen der Dateianhänge des Artikels -the-article-content=Der Inhalt des Artikels -the-article-content-diff=Der Unterschied zwischen den Inhalten des Inhalts -the-article-could-not-be-found=Der Artikel konnte nicht gefunden werden. -the-article-title=Die Überschrift des Artikels -the-article-title-diff=Der Unterschied zwischen den Überschriften des Inhalts -the-article-url=Die URL des Artikels -the-article-version=Die Version des Artikels -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Der Kommentar konnte nicht gefunden werden. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=Die Firmen ID, die mit diesem Artikel verknüpft ist -the-company-mx-associated-with-the-article=Der Firmen E-Mail-Server (MX), der mit diesem Artikel verknüpft ist -the-company-name-associated-with-the-article=Der Firmenname, der mit diesem Artikel verknüpft ist -the-email-address-of-the-user-who-added-the-article=Die E-Mail-Adresse des Benutzers, der diesen Artikel hinzugefügt hat -the-selected-article-no-longer-exists=Der ausgewählte Artikel existiert nicht mehr. -the-site-name-associated-with-the-article=Der Website-Name, der diesem Artikel zugeordnet ist -the-subscription-could-not-be-found=Das Abonnement konnte nicht gefunden werden. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Der Benutzer, der den Artikel hinzugefügt hat -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Es gibt keine Artikel mit dem Schlagwort {0}. -there-are-no-articles-with-x-x=Es gibt keine Artikel mit {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Es gibt keinen Artikel mit {0} {1} und dem Schlagwort {2}. -there-are-no-attachments=Es gibt keine Dateianhänge. -there-are-no-child-articles-for-x=Es gibt keine untergeordneten Artikel für {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Diese Vorlage verwenden -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=Artikel mit dem Schlagwort {0} anzeigen. -view-articles-with-x-x=Artikel mit {0} {1} anzeigen. -view-articles-with-x-x-and-tag-x=Artikel mit {0} {1} und dem Schlagwort {2} anzeigen. -was-this-information-helpful=Hat Ihnen diese Information weitergeholfen? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_el.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_el.properties deleted file mode 100644 index cbf85b09e1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_el.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=ΠÏοσθήκη φακέλου (Automatic Translation) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Μετακ (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=ΠÏοσθήκη άÏθÏο (Automatic Translation) -add-child-article=ΠÏοσθέστε παιδιών άÏθÏο (Automatic Translation) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=ΙσχÏουν τα αÏιθμητικά Ï€Ïοθέματα άÏθÏο αÏχείων ως Ï€ÏοτεÏαιότητες. (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=Όλα τα άÏθÏα στο αÏχείο ZIP αντιστοιχίζονται Ï€ÏοτεÏαιότητες σÏμφωνα με τα αÏιθμητικά Ï€Ïοθέματα τους αÏχεία ή τις διαδÏομές των αÏχείων, αν είναι δυνατόν. Κάθε άÏθÏο Εισαγωγή αποδίδεται Ï€ÏοτεÏαιότητα με βάση το αÏιθμητικό Ï€Ïόθεμα το όνομα του φακέλου στον οποίο ανήκει στο αÏχείο ZIP. Κάθε παιδί άÏθÏο αποδίδεται Ï€ÏοτεÏαιότητα με βάση την αÏιθμητική Ï€Ïόθεμα το όνομα του αÏχείου στο αÏχείο ZIP. ΠÏοτεÏαιότητα από αÏιθμητικό Ï€Ïόθεμα αντικαθιστά όλα τα άλλα Ï€ÏοτεÏαιότητας. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=Είστε βέβαιοι ότι θέλετε να διαγÏάψετε τα επιλεγμένα άÏθÏα; (Automatic Translation) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Ύφος επίδειξης άÏθÏου (Automatic Translation) -article-or-folder=ΆÏθÏο ή φάκελο (Automatic Translation) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Βασικό άÏθÏο (Automatic Translation) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Σχόλια (Automatic Translation) -content-root-prefix=ΠÏόθεμα πεÏιεχομένου Ïίζα (Automatic Translation) -did-you-like-this-article=Σας άÏεσε αυτό το άÏθÏο; (Automatic Translation) -do-you-have-any-suggestions=Έχετε οποιεσδήποτε Ï€Ïοτάσεις; (Automatic Translation) -edit-on-github=ΕπεξεÏγασία σε GitHub (Automatic Translation) -enable-description=Enable Description (Automatic Copy) -enable-history=ΕνεÏγοποίηση ιστοÏία (Automatic Translation) -enable-subscriptions=ΕνεÏγοποίηση συνδÏομές (Automatic Translation) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=ΕπιτÏέψει την Ï€Ïοβολή Count Ï€ÏοσαÏξηση (Automatic Translation) -help-us-improve-it=Συμβάλετε στη βελτίωση αυτό. (Automatic Translation) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Γνωσιακή βάση (Automatic Translation) -javax.portlet.title.2_WAR_knowledgebaseportlet=Εμφάνιση Γνωσιακής βάσης (Automatic Translation) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Τμήμα βάσεων γνώσεων (Automatic Translation) -javax.portlet.title.5_WAR_knowledgebaseportlet=Αναζήτηση βάσεων γνώσεων (Automatic Translation) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Γνωσιακή βάση (Automatic Translation) -model.resource.com.liferay.knowledgebase.display=Εμφάνιση Γνωσιακής βάσης (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Φάκελο Γνωσιακής βάσης (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Ο δημοφιλέστεÏος (Automatic Translation) -most-recent=Ο πιό Ï€Ïόσφατος (Automatic Translation) -move-to-in-progress=Μετακινηθείτε σε εξέλιξη (Automatic Translation) -move-to-new=Μετακίνηση σε νέα (Automatic Translation) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=ΠληκτÏολογήστε ένα φιλικό URL που αÏχίζει με μια κάθετο και να πεÏιέχει αλφαÏιθμητικοÏÏ‚ χαÏακτήÏες, παÏλες, και χαÏακτήÏες υπογÏάμμισης. (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=ΠαÏακαλώ πληκτÏολογήστε το έγκυÏο όνομα. (Automatic Translation) -please-enter-a-valid-source-url=ΠαÏακαλώ εισάγετε μια έγκυÏη πηγή URL. (Automatic Translation) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=ΠαÏακαλώ επιλέξτε τουλάχιστον ένα τμήμα. (Automatic Translation) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=ΣτÏατηγική Ï€ÏοτεÏαιότητα (Automatic Translation) -recent-articles=Recent Articles (Automatic Copy) -resolve=Επίλυση (Automatic Translation) -saved-attachments=Αποθηκευ συνημμένα (Automatic Translation) -search-articles=Search Articles (Automatic Copy) -sections=Τμήματα (Automatic Translation) -select-parent=Επιλογή γονικής (Automatic Translation) -show-asset-entries=ΠαÏουσιάστε καταχωÏήσεις Ï€ÏοτεÏημάτων (Automatic Translation) -show-author-column=ΠαÏουσιάστε στήλη συντακτών (Automatic Translation) -show-create-date-column=ΠαÏουσιάστε ότι δημιουÏγήστε τη στήλη ημεÏομηνίας (Automatic Translation) -show-modified-date-column=ΠαÏουσιάστε Ï„Ïοποποιημένη στήλη ημεÏομηνίας (Automatic Translation) -show-pagination=ΠαÏουσιάστε σελιδοποιήσεις (Automatic Translation) -show-priority-column=ΠαÏουσιάστε στήλη Ï€ÏοτεÏαιότητας (Automatic Translation) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=ΠαÏουσιάστε τίτλο τμημάτων (Automatic Translation) -show-status-column=ΠαÏουσιάστε στήλη θέσης (Automatic Translation) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=ΠαÏουσιάστε στήλη απόψεων (Automatic Translation) -source-url=Πηγή URL (Automatic Translation) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=ΠÏότυπα (Automatic Translation) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=Το πεÏιεχόμενο του σχολίου (Automatic Translation) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=Το σχόλιο δημιουÏγία ημεÏομηνίας (Automatic Translation) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=Το επιλεγμένο άÏθÏο δεν υπάÏχει πλέον. (Automatic Translation) -the-site-name-associated-with-the-article=Το όνομα πεÏιοχών που συνδέεται με το άÏθÏο (Automatic Translation) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=Ο χÏήστης δεν άÏεσε το άÏθÏο. (Automatic Translation) -the-user-liked-the-article=Ο χÏήστης που άÏεσε το άÏθÏο. (Automatic Translation) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=Δεν υπάÏχουν άÏθÏα. (Automatic Translation) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=ΥπάÏχει μια Ï€Ïόταση. (Automatic Translation) -upload-your-zip-file=Ανεβάστε το αÏχείο ZIP σας (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=ΧÏήση χαÏακτηÏισμών (Automatic Translation) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=ΧÏήση μπÏάβο / αντίχειÏες κάτω (Automatic Translation) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=Τι σας άÏεσε πεÏισσότεÏο; Τι θα βελτιώνατε; (Automatic Translation) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=Στείλατε μια Ï€Ïόταση για αυτό το άÏθÏο. (Automatic Translation) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_en.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_en.properties deleted file mode 100644 index 60d6356b3f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_en.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. -action.ADD_KB_ARTICLE=Add Article -action.ADD_KB_FOLDER=Add Folder -action.ADD_KB_TEMPLATE=Add Template -action.ADMINISTRATOR=Administrator -action.DELETE_KB_ARTICLES=Delete Articles -action.DELETE_KB_TEMPLATES=Delete Templates -action.MOVE_KB_ARTICLE=Move Article -action.MOVE_KB_FOLDER=Move Folder -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities -action.VIEW_KB_TEMPLATES=View Templates -action.VIEW_SUGGESTIONS=View Suggestions -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=Add Article -add-child-article=Add Child Article -all-comments-x=All Comments ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? -article-added-email=Article Added Email -article-display-style=Article Display Style -article-or-folder=Article or Folder -article-updated-email=Article Updated Email -article-window-state=Article Window State -articles=Articles -articles-with-tag-x=Articles with tag {0}. -articles-with-x-x=Articles with {0} {1}. -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. -basic-article=Basic Article -between=Between -child-articles-display-style=Child Articles Display Style -child-articles-for-x=Child Articles for {0}. -comments=Comments -content-root-prefix=Content Root Prefix -did-you-like-this-article=Did you like this article? -do-you-have-any-suggestions=Do you have any suggestions? -edit-on-github=Edit on GitHub -enable-description=Enable Description -enable-history=Enable History -enable-subscriptions=Enable Subscriptions -enable-suggestions=Enable Suggestions -enable-view-count-increment=Enable View Count Increment -help-us-improve-it=Help us improve it. -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments -knowledge-base-home=Knowledge Base Home -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base Template -most-popular=Most Popular -most-recent=Most Recent -move-to-in-progress=Move to in Progress -move-to-new=Move to New -new-article=New Article -no-articles-were-found=No articles were found. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. -no-in-progress-suggestion-was-found=No in progress suggestion was found. -no-new-suggestion-was-found=No new suggestion was found. -no-subscriptions-were-found=No subscriptions were found. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. -parent-article=Parent Article -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. -please-enter-a-valid-source-url=Please enter a valid source URL. -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. -please-select-at-least-one-section=Please select at least one section. -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) -prioritization-strategy=Prioritization Strategy -recent-articles=Recent Articles -resolve=Resolve -saved-attachments=Saved Attachments -search-articles=Search Articles -sections=Sections -select-parent=Select Parent -show-asset-entries=Show Asset Entries -show-author-column=Show Author Column -show-create-date-column=Show Create Date Column -show-modified-date-column=Show Modified Date Column -show-pagination=Show Pagination -show-priority-column=Show Priority Column -show-ratings=Show Ratings -show-sections-title=Show Sections Title -show-status-column=Show Status Column -show-suggestions=Show Suggestions -show-views-column=Show Views Column -source-url=Source URL -suggestion-deleted-successfully=Suggestion deleted successfully. -suggestion-in-progress-email=Suggestion in Progress Email -suggestion-received-email=Suggestion Received Email -suggestion-resolved-email=Suggestion Resolved Email -suggestion-saved-successfully=Suggestion saved successfully. -suggestion-status-updated-successfully=Suggestion status updated successfully. -templates=Templates -the-article-attachments-file-names=The article attachments' file names -the-article-content=The article content -the-article-content-diff=The article content diff -the-article-could-not-be-found=The article could not be found. -the-article-title=The article title -the-article-title-diff=The article title diff -the-article-url=The article URL -the-article-version=The article version -the-comment-content=The comment content -the-comment-could-not-be-found=The comment could not be found. -the-comment-create-date=The comment create date -the-company-id-associated-with-the-article=The company ID associated with the article -the-company-mx-associated-with-the-article=The company MX associated with the article -the-company-name-associated-with-the-article=The company name associated with the article -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article -the-selected-article-no-longer-exists=The selected article no longer exists. -the-site-name-associated-with-the-article=The site name associated with the article -the-subscription-could-not-be-found=The subscription could not be found. -the-user-did-not-like-the-article=The user did not like the article. -the-user-liked-the-article=The user liked the article. -the-user-who-added-the-article=The user who added the article -there-are-no-articles=There are no articles. -there-are-no-articles-with-tag-x=There are no articles with tag {0}. -there-are-no-articles-with-x-x=There are no articles with {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. -there-are-no-attachments=There are no attachments. -there-are-no-child-articles-for-x=There are no child articles for {0}. -there-are-x-suggestions=There are {0} suggestions. -there-is-one-suggestion=There is one suggestion. -upload-your-zip-file=Upload Your ZIP File -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. -use-star-ratings=Use Star Ratings -use-this-template=Use This Template -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down -view-articles-with-tag-x=View articles with tag {0}. -view-articles-with-x-x=View articles with {0} {1}. -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. -was-this-information-helpful=Was this information helpful? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? -x-pending={0} Pending -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_es.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_es.properties deleted file mode 100644 index e978bc3046..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_es.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Añadir artículo -action.ADD_KB_FOLDER=Agregar carpeta (Automatic Translation) -action.ADD_KB_TEMPLATE=Añadir plantilla -action.ADMINISTRATOR=Administrador -action.DELETE_KB_ARTICLES=Eliminar artículos -action.DELETE_KB_TEMPLATES=Eliminar plantillas -action.MOVE_KB_ARTICLE=Mover artículo -action.MOVE_KB_FOLDER=Mover carpeta (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Actualizar la prioridad de los artículos -action.VIEW_KB_TEMPLATES=Ver plantillas -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Añadir artículo -add-child-article=Añadir artículo hijo -all-comments-x=Todos los comentarios ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Se aplican los prefijos numéricos de archivos artículo como prioridades. (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=Todos los artículos en el archivo ZIP se asignan prioridades según los prefijos numéricos de sus archivos o rutas de archivo, si es posible. Cada artículo de introducción se asigna una prioridad basada en el prefijo numérico del nombre de la carpeta a la que pertenece en el archivo ZIP. Cada artículo de niño se le asigna una prioridad basada en el prefijo numérico de su nombre de archivo en el archivo ZIP. Priorización por prefijo numérico reemplaza todas otras prioridades. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=¿Está seguro que desea eliminar los artículos seleccionados? (Automatic Translation) -article-added-email=Correo-e de artículo creado -article-display-style=Estilo de presentación del artículo -article-or-folder=Artículo o carpeta (Automatic Translation) -article-updated-email=Correo-e de artículo actualizado -article-window-state=Estado de ventana del artículo -articles=Artículos -articles-with-tag-x=Artículos con etiqueta {0}. -articles-with-x-x=Artículos con {0} {1}. -articles-with-x-x-and-tag-x=Artículos con {0} {1} y etiqueta {2}. -basic-article=Artículo básico (Automatic Translation) -between=entre -child-articles-display-style=Estilo de visualización de artículos hijo -child-articles-for-x=Artículos hijos de {0}. -comments=Comentarios (Automatic Translation) -content-root-prefix=Prefijo raíz contenido (Automatic Translation) -did-you-like-this-article=¿Te gustó este artículo? (Automatic Translation) -do-you-have-any-suggestions=¿Tienes alguna sugerencia? (Automatic Translation) -edit-on-github=Editar en GitHub (Automatic Translation) -enable-description=Habilitar descripción -enable-history=Habilitar la historia (Automatic Translation) -enable-subscriptions=Permitir suscripciones (Automatic Translation) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Activar vista Conde incremento (Automatic Translation) -help-us-improve-it=Ayudarnos a mejorarla. (Automatic Translation) -javax.portlet.description.1_WAR_knowledgebaseportlet=La base de conocimiento es un medio para recopilar, organizar y distribuir contenido relacionado con la documentación y el soporte a productos. Los administradores pueden dar a los usuarios acceso a plantillas que les permitan publicar fácilmente artículos en la base de conocimiento. -javax.portlet.title.1_WAR_knowledgebaseportlet=Base de conocimientos (Automatic Translation) -javax.portlet.title.2_WAR_knowledgebaseportlet=Pantalla de la Base de conocimientos (Automatic Translation) -javax.portlet.title.3_WAR_knowledgebaseportlet=Artículo de la base de conocimiento -javax.portlet.title.4_WAR_knowledgebaseportlet=Sección de la base de conocimiento -javax.portlet.title.5_WAR_knowledgebaseportlet=Búsqueda en la base de conocimiento -kb-articles-kb-templates-and-kb-comments=Artículos, plantillas y comentarios -knowledge-base-home=Inicio de la base de conocimiento -model.resource.com.liferay.knowledgebase.admin=Base de conocimientos (Automatic Translation) -model.resource.com.liferay.knowledgebase.display=Pantalla de la Base de conocimientos (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBArticle=Artículo de la base de conocimiento -model.resource.com.liferay.knowledgebase.model.KBFolder=Carpeta de Base de conocimientos (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Plantilla de la base de conocimiento -most-popular=Más popular -most-recent=Más reciente -move-to-in-progress=Poner en marcha (Automatic Translation) -move-to-new=Mudarse a nuevo (Automatic Translation) -new-article=Nuevo artículo -no-articles-were-found=No se encontraron artículos. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No se encontraton subscripciones. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Artículo padre -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Por favor, introduzca una URL amigable que comienza con una barra y contiene caracteres alfanuméricos, guiones y guiones bajos. (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Por favor, indique una prioridad mayor que {0}. -please-enter-a-valid-folder-name=Por favor, introduzca un nombre de carpeta válida. (Automatic Translation) -please-enter-a-valid-source-url=Por favor, introduzca una URL de origen válido. (Automatic Translation) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Por favor, introduzca una lista de palabras separadas por coma para la propiedad {0} del portlet para habilitarlo. -please-select-at-least-one-section=Por favor, seleccione al menos una sección. -portlet-configuration-page-x-instance-id-x=Configuración del portlet (página - {0}, ID de instancia - {1}) -prioritization-strategy=Estrategia de priorización (Automatic Translation) -recent-articles=Artículos recientes -resolve=Resolver (Automatic Translation) -saved-attachments=Archivos adjuntos guardados (Automatic Translation) -search-articles=Búsqueda de artículos -sections=Secciones -select-parent=Seleccione los padres (Automatic Translation) -show-asset-entries=Mostrar assets -show-author-column=Mostrar autor -show-create-date-column=Mostrar fecha de creación -show-modified-date-column=Mostrar fecha de modificación -show-pagination=Mostrar paginación -show-priority-column=Mostrar prioridad -show-ratings=Mostrar valoraciones -show-sections-title=Mostrar título de secciones -show-status-column=Mostrar estado -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Mostrar vistas -source-url=Fuente URL (Automatic Translation) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Plantillas (Automatic Translation) -the-article-attachments-file-names=Los nombres de archivos adjuntos del artículo -the-article-content=El contenido del artículo -the-article-content-diff=La diferencia del contenido del artículo -the-article-could-not-be-found=No se pudo encontrar el artículo. -the-article-title=El título del artículo -the-article-title-diff=La diferencia del título del artículo -the-article-url=La URL del artículo -the-article-version=La versión del artículo -the-comment-content=El contenido del comentario (Automatic Translation) -the-comment-could-not-be-found=No se pudo encontrar el comentario. -the-comment-create-date=El comentario crear fecha (Automatic Translation) -the-company-id-associated-with-the-article=El id de instancia de portal asociada con el artículo -the-company-mx-associated-with-the-article=El MX de la instancia de portal asociada con el artículo -the-company-name-associated-with-the-article=El nombre de la instancia de portal asociada con el artículo -the-email-address-of-the-user-who-added-the-article=El correo-e del usuario que añadió el artículo -the-selected-article-no-longer-exists=No existe el artículo seleccionado. -the-site-name-associated-with-the-article=El nombre del sitio asociado con el artículo -the-subscription-could-not-be-found=No pudo encontrarse la suscripción. -the-user-did-not-like-the-article=El usuario no le gustó el artículo. (Automatic Translation) -the-user-liked-the-article=El usuario ha gustado el artículo. (Automatic Translation) -the-user-who-added-the-article=El usuario que añadió el artículo -there-are-no-articles=No hay ningún artículo. (Automatic Translation) -there-are-no-articles-with-tag-x=No hay artículos con la etiqueta {0}. -there-are-no-articles-with-x-x=No hay artículos con {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=No hay artículos con {0} {1} y etiqueta {2}. -there-are-no-attachments=No hay adjuntos. -there-are-no-child-articles-for-x=No hay artículos hijos de {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=Hay una sugerencia. (Automatic Translation) -upload-your-zip-file=Suba su archivo ZIP (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Utilizar la clasificación por estrellas (Automatic Translation) -use-this-template=Utilizar esta plantilla -use-thumbs-up-thumbs-down=Uso pulgares arriba / pulgares abajo (Automatic Translation) -view-articles-with-tag-x=Ver artículos con etiqueta {0}. -view-articles-with-x-x=Ver artículos con {0} {1}. -view-articles-with-x-x-and-tag-x=Ver artículos con {0} {1} y etiqueta {2}. -was-this-information-helpful=¿Le ha resultado útil esta información? -what-did-you-like-the-most-what-would-you-improve=¿Qué te gustó más? ¿Qué mejorarías? (Automatic Translation) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=Envió una sugerencia para este artículo. (Automatic Translation) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_et.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_et.properties deleted file mode 100644 index 4e07922464..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_et.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_eu.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_eu.properties deleted file mode 100644 index 369f968186..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_eu.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Artikulua Gehitu -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Txantiloia Gehitu -action.ADMINISTRATOR=Administratzailea -action.DELETE_KB_ARTICLES=Artikuluak Ezabatu -action.DELETE_KB_TEMPLATES=Txantiloiak Ezabatu -action.MOVE_KB_ARTICLE=Artikulu Lekuz aldatu -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Artikuluen Lehentasuna Eguneratu -action.VIEW_KB_TEMPLATES=Txantiloiak Ikusi -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Artikulua Gehitu -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=Iruzkin Guztiak ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Artikulu Gehitze Emaila -article-display-style=Artikuluaren Bistaratze Estiloa -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Artikulu Eguneratze Emaila -article-window-state=Artikuluaren Leihoaren Egoera -articles=Artikuluak -articles-with-tag-x={0} marka duten artikuluak. -articles-with-x-x={0} {1} duten artikuluak. -articles-with-x-x-and-tag-x={0} {1} eta {2} marka duten artikuluak. -basic-article=Basic Article (Automatic Copy) -between=Artean -child-articles-display-style=Artikulu Umeen Bistaratze Estiloa -child-articles-for-x={0}ren Artikulu Umeak. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Deskribapena Gaitu -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Ezagutza Oinarriak produktu eta laguntzari dagozkion edukiak bildu, antolatu eta eskuratzeko bide bat eskaintzen du. Administratzaileek erabiltzaileei ezagutza oinarriaren artikuluak sortzea errazteko txantiloietara sarbide baimena eman diezaiekete. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Ezagutza Oinarriaren Artikulua -javax.portlet.title.4_WAR_knowledgebaseportlet=Ezagutza Oinarriaren Atala -javax.portlet.title.5_WAR_knowledgebaseportlet=Ezagutza Oinarriaren Bilaketa -kb-articles-kb-templates-and-kb-comments=Artikulu, Txantiloi eta Iruzkinak -knowledge-base-home=Ezagutza Oinarriaren Etxea -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Oinarrizko Ezagutzaren Artikulua -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Oinarrizko Ezagutzaren Txantiloia -most-popular=Popularrena -most-recent=Azkenengoa -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Artikulu Berria -no-articles-were-found=Ez da artikulurik aurkitu. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Ez da harpidetzarik aurkitu. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Artikulu Aita -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Mesedez, sartu {0} baino handiagoa den lehentasun bat. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Mesedez, portleta gaitzeko, portlearen {0} propietatearentzat sartu koma batekin banatutako hitzen zerrenda. -please-select-at-least-one-section=Mesedez, hautatu atal bat gutxienez. -portlet-configuration-page-x-instance-id-x=Portletaren Konfigurazioa (Orria - {0}, Instantzia IDa - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Duela gutxiko Artikuluak -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Artikuluak Bilatu -sections=Atalak -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Aktibo Sarrerak Erakutsi -show-author-column=Egilearen Zutabea Erakutsi -show-create-date-column=Sortze Data Zutabea Erakutsi -show-modified-date-column=Aldaketa Data Zutabea Erakutsi -show-pagination=Paginazioa Erakutsi -show-priority-column=Lehentasun Zutabea Erakutsi -show-ratings=Balorazioak Erakutsi -show-sections-title=Atalen Titulua Erakutsi -show-status-column=Egoera Zutabea Erakutsi -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Ikuspegi Zutabea Erakutsi -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Artikuluaren eranskinaren fitxategi izenak -the-article-content=Artikuluaren edukia -the-article-content-diff=Artikuluaren edukiaren diffa -the-article-could-not-be-found=Ez da artikulua aurkitu. -the-article-title=Artikuluaren izenburua -the-article-title-diff=Artikuluaren izenburuaren diffa -the-article-url=Artikuluaren URLa -the-article-version=Artikuluaren bertsioa -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Ez da iruzkina aurkitu. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=Artikuluarekin lotutako komunitatearen IDa. -the-company-mx-associated-with-the-article=Artikuluarekin lotutako komunitatearen MXa. -the-company-name-associated-with-the-article=Artikuluarekin lotutako komunitatearen izena. -the-email-address-of-the-user-who-added-the-article=Artikulua gehitu duen erabiltzailerean posta helbidea -the-selected-article-no-longer-exists=Hautatutako artikulua jadanik ez da existitzen. -the-site-name-associated-with-the-article=Artikuluarekin lotutako gunearen izena. -the-subscription-could-not-be-found=Ez da harpidetza aurkitu. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Arikulua gehitu duen erabiltzailea -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Ez dago {0} marka duten artikulurik. -there-are-no-articles-with-x-x=Ez dago {0} {1} duten artikulurik. -there-are-no-articles-with-x-x-and-tag-x=Ez dago {0} {1} eta {2} marka duten artikulurik. -there-are-no-attachments=Ez dago eranskinik. -there-are-no-child-articles-for-x=Ez dago {0}ren artikulu umerik. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Txantiloi hau erabili. -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=Ikusi {0} marka duten artikuluak. -view-articles-with-x-x=Ikusi {0} {1} duten artikuluak. -view-articles-with-x-x-and-tag-x=Ikusi {0} {1} eta {2} marka duten artikuluak. -was-this-information-helpful=Informazio hau erabilgarria izan da? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fa.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fa.properties deleted file mode 100644 index 9d5b3e6f3a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fa.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Ø§ÙØ²ÙˆØ¯Ù† محتوا -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Ø§ÙØ²ÙˆØ¯Ù† الگو -action.ADMINISTRATOR=مدیر -action.DELETE_KB_ARTICLES=حذ٠محتوا -action.DELETE_KB_TEMPLATES=حذ٠الگوها -action.MOVE_KB_ARTICLE=انتقال محتوا -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=بروزرسانی مشخصات محتوا -action.VIEW_KB_TEMPLATES=مشاهده‌ی الگوها -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=Ø§ÙØ²ÙˆØ¯Ù† محتوا -add-child-article=اضاÙÙ‡ کردن زیر مقاله -all-comments-x=همه توضیحات ({0}) -an-unexpected-error-occurred-while-importing-articles-x=هنگام وارد کردن مقاله‌های {0} خطای غیر منتظره‌ای رخ داد. -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=آیا مطمئنید Ú©Ù‡ می‌خواهید مقاله انتخاب شده را حذ٠کنید. -article-added-email=محتوا به ایمیل اضاÙÙ‡ شد. -article-display-style=ساختار نمایش محتوا -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=محتوا ایمیل را بروزرسانی کرد. -article-window-state=حالت پنجره‌ی محتوا -articles=محتوا -articles-with-tag-x=محتواهای با علامت {0} -articles-with-x-x=محتواهای با {0} {1}. -articles-with-x-x-and-tag-x=محتواها با {0}{1} Ùˆ علامت {2} -basic-article=مقاله اصلی -between=بین -child-articles-display-style=حالت نمایش زیرمحتواها -child-articles-for-x=زیرمحتواهای {0} -comments=توضیحات -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=آیا این مقاله را پسندیدید؟ -do-you-have-any-suggestions=آیا پیشنهادی دارید؟ -edit-on-github=ویرایش گیتهاب -enable-description=ÙØ¹Ø§Ù„ کردن ØªÙˆØµÛŒÙØ§Øª -enable-history=ÙØ¹Ø§Ù„سازی تاریخچه -enable-subscriptions=ÙØ¹Ø§Ù„سازی عضویت‌‌ها -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=برای بهبود این به ما Ú©Ù…Ú© کنید. -javax.portlet.description.1_WAR_knowledgebaseportlet=پایگاه دانش ابزاری برای جمع آوری، سازماندهی Ùˆ بازیابی مطالب مربوط به مستندات Ùˆ پشتیبانی از محصول را ÙØ±Ø§Ù‡Ù… می‌کند. مدیران می‌توانند به منظور تسهیل در ایجاد مقالات این پایگاه دانش، دسترسی کاربران را به الگوها ÙØ±Ø§Ù‡Ù… کنند. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=محتوای پایگاه دانش -javax.portlet.title.4_WAR_knowledgebaseportlet=بخش پایگاه دانش -javax.portlet.title.5_WAR_knowledgebaseportlet=جستجو در پایگاه دانش -kb-articles-kb-templates-and-kb-comments=محتوا، الگو Ùˆ توضیحات -knowledge-base-home=ابتدای پایگاه دانش -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=محتوای پایگاه دانش -model.resource.com.liferay.knowledgebase.model.KBFolder=ابتدای پایگاه دانش -model.resource.com.liferay.knowledgebase.model.KBTemplate=الگوی پایگاه دانش -most-popular=معروÙ‌ترین -most-recent=اخیر -move-to-in-progress=به سوی Ù¾ÛŒØ´Ø±ÙØª حرکت کنید. -move-to-new=به جدید بروید. -new-article=محتوای جدید -no-articles-were-found=هیچ محتوایی ÛŒØ§ÙØª نشد. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=هیچ بازخورد در حال Ù¾ÛŒØ´Ø±ÙØªÛŒ ÛŒØ§ÙØª نشد. -no-in-progress-suggestion-was-found=هیچ بازخورد در حال Ù¾ÛŒØ´Ø±ÙØªÛŒ ÛŒØ§ÙØª نشد. -no-new-suggestion-was-found=هیچ بازخورد در حال Ù¾ÛŒØ´Ø±ÙØªÛŒ ÛŒØ§ÙØª نشد. -no-subscriptions-were-found=هیچ اشتراکی ÛŒØ§ÙØª نشد. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=محتوای اصلی -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Ù„Ø·ÙØ§ یک اولویت Ú©Ù‡ از {0} بیشتر باشد وارد نمایید. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Ù„Ø·ÙØ§ یک آدرس URL معتبر وارد کنید. -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=برای ÙØ¹Ø§Ù„ شدن مولÙه‌ی {0}ØŒ Ù„Ø·ÙØ§ لیستی از ویژگی‌های مولÙÙ‡ را وارد نمایید. کلمات را با کاما از هم جدا کنید. -please-select-at-least-one-section=Ù„Ø·ÙØ§ دست‌کم یک بخش انتخاب نمایید. -portlet-configuration-page-x-instance-id-x=تنظیمات پورتلت (ØµÙØ­Ù‡â€ŒÛŒ - {0}ØŒ شناسه‌ی نمونه -{1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=محتواهای اخیر -resolve=حل شدن -saved-attachments=پیوست‌های ذخیره شده -search-articles=جستجوی محتوا -sections=بخش‌ها -select-parent=Select Parent (Automatic Copy) -show-asset-entries=مشاهده‌ی نمایش -show-author-column=نمایش ستون نویسنده -show-create-date-column=نمایش ستون ایجاد تاریخ -show-modified-date-column=نمایش ستون تاریخ تغییر -show-pagination=نمایش ØµÙØ­Ù‡â€ŒØ¨Ù†Ø¯ÛŒ -show-priority-column=نمایش ستون اولویت -show-ratings=نمایش رتبه -show-sections-title=نمایش عنوان بخش -show-status-column=نمایش ستون وضعیت -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=نمایش ستون دیدگاه -source-url=آدرس URL -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=وضعیت بازخورد با موÙقیت به روز رسانی شد. -templates=الگوها -the-article-attachments-file-names=نام ÙØ§ÛŒÙ„‌های ضمیمه شده به محتوا -the-article-content=محتوا -the-article-content-diff=ØªÙØ§ÙˆØª محتوا -the-article-could-not-be-found=محتوا ÛŒØ§ÙØª نشد. -the-article-title=عنوان محتوا -the-article-title-diff=ØªÙØ§ÙˆØª عنوان محتوا -the-article-url=آدرس محتوا -the-article-version=نسخه‌ی محتوا -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=مورد موردنظر ÛŒØ§ÙØª نشد. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=شناسه‌ی پورتال به محتوا وابسته است. -the-company-mx-associated-with-the-article=MX پورتال به محتوا وابسته است. -the-company-name-associated-with-the-article=نام پورتال به محتوا وابسته است. -the-email-address-of-the-user-who-added-the-article=آدرس ایمیل کاربری Ú©Ù‡ محتوا را اضاÙÙ‡ کرده است. -the-selected-article-no-longer-exists=مقاله انتخابی وجود ندارد. -the-site-name-associated-with-the-article=نام سایت با نام مقاله مرتبط می‌باشد. -the-subscription-could-not-be-found=اشتراک ÛŒØ§ÙØª نشد. -the-user-did-not-like-the-article=کاربر مقاله را نمی‌پسندد. -the-user-liked-the-article=کاربر مقاله را می‌پسندد. -the-user-who-added-the-article=کاربری Ú©Ù‡ محتوا را اضاÙÙ‡ کرده است. -there-are-no-articles=هیچ مقاله‌ای وجود ندارد. -there-are-no-articles-with-tag-x=محتوایی با علامت {0} ÛŒØ§ÙØª نشد. -there-are-no-articles-with-x-x=مقاله‌های با {0} {1} وجود ندارد. -there-are-no-articles-with-x-x-and-tag-x=محتوایی با {0} {1} Ùˆ علامت {2} وجود ندارد. -there-are-no-attachments=هیچ ضمیمه‌ای وجود ندارد. -there-are-no-child-articles-for-x=هیچ زیرمحتوایی برای {0} وجود ندارد. -there-are-x-suggestions={0} پیشنهاد وجود دارد. -there-is-one-suggestion=یک پیشنهاد وجود دارد. -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=از رتبه‌بندی ستاره Ø§Ø³ØªÙØ§Ø¯Ù‡ کنید. -use-this-template=از این الگو Ø§Ø³ØªÙØ§Ø¯Ù‡ شود. -use-thumbs-up-thumbs-down=از علامت بالا/پایین Ø§Ø³ØªÙØ§Ø¯Ù‡ کنید. -view-articles-with-tag-x=نمایش مقاله با برچسب {0}. -view-articles-with-x-x=نمایش مقاله با {0} {1}. -view-articles-with-x-x-and-tag-x=نمایش محتوا با {0} {1} Ùˆ علامت {2}. -was-this-information-helpful=آیا این اطلاعات Ù…Ùید بود؟ -what-did-you-like-the-most-what-would-you-improve=Ú†Ù‡ چیزی را بیشتر از همه پسندیدید؟ Ú†Ù‡ چیزی را ارتقا می‌دهید؟ -x-pending={0} انتظار -you-sent-one-suggestion-for-this-article=یک پیشنهاد برای این محتوا ارسال کرده‌اید. -you-sent-x-suggestions-for-this-article=شما {0} پیشنهاد برای این محتوا ارسال کرده‌اید. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fi.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fi.properties deleted file mode 100644 index aa5000cdf3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fi.properties +++ /dev/null @@ -1,159 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Lisää artikkeli -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Lisää sivupohja -action.ADMINISTRATOR=Pääkäyttäjä -action.DELETE_KB_ARTICLES=Poista artikkeleita -action.DELETE_KB_TEMPLATES=Poista sivupohjia -action.MOVE_KB_ARTICLE=Siirrä artikkeli -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Päivitä artikkelien tärkeysjärjestystä -action.VIEW_KB_TEMPLATES=Näytä sivupohjia -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Lisää artikkeli -add-child-article=Lisää aliartikkeli. -all-comments-x=Kaikki kommentit ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Artikkeliin lisätty sähköposti -article-display-style=Artikkelin näyttötyyli -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Artikkelin päivitetty sähköposti -article-window-state=Artikkelin ikkunan tila -articles=Artikkelit -articles-with-tag-x=Artikkelit tageille {0}. -articles-with-x-x=Artikkelit joissa {0} {1}. -articles-with-x-x-and-tag-x=Artikkelit joissa {0} {1} ja tagi {2}. -basic-article=Basic Article (Automatic Copy) -between=Välillä -child-articles-display-style=Ala-artikkeleiden näyttötyyli -child-articles-for-x=Ala-artikkelit {0}:lle. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Ota kuvaukset käyttöön -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base (KB) antaa työkalut tuotteen dokumentaation ja tuen keräämiseen, järjestämiseen ja hakuun. Pääkäyttäjät voivat sallia käyttäjille oikeudet sivupohjiin jouduttaen artikkeleiden luontia Knowledge Baseen. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base artikeli -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base osasto -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Haku -kb-articles-kb-templates-and-kb-comments=Kirjoitukset, sivupohjat ja kommentit -knowledge-base-home=Knowledge Base Etusivu -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base artikkeli -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base sivupohja -most-popular=Suosituin -most-recent=Uusin -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Uusi artikkeli -no-articles-were-found=Kirjoituksia ei löytynyt. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Tilauksia ei löytynyt. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Isäntäkirjoitus -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Ole hyvä ja anna tärkeysaste, joka on suurempi kuin {0}. -please-enter-a-unique-friendly-url=Please enter a unique friendly URL. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Ottaessasi käyttöön tämän portletin, lisää pilkulla erotettuja sanoja {0} portletin asetuksiin -please-select-at-least-one-section=Ole hyvä ja valitse ainakin yksi osasto. -portlet-configuration-page-x-instance-id-x=Portletin asetukset (Sivu -{0}, instanssi ID - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Viimeaikaiset kirjoitukset -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Etsi artikkeleita -sections=Osastot -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Näytä Asset Entries -show-author-column=Näytä tekijä sarake -show-create-date-column=Näytä luomispäivä sarake -show-modified-date-column=Näytä muokkauspäivä sarake -show-pagination=Näytä sivutus -show-priority-column=Näytä tärkeysjärjestys sarake -show-ratings=Näytä arvosana -show-sections-title=Näytä osaston otsikko -show-status-column=Näytä status sarake -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Näytä näytöt sarake -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Artikkelin liitteiden tiedostonimet -the-article-content=Artikkelin sisältö -the-article-content-diff=Artikkelin sisällön eroavaisuudet -the-article-could-not-be-found=Artikkelia ei löydy -the-article-title=Artikkelin otsikko -the-article-title-diff=Artikkelin otsikon eroavaisuudet -the-article-url=Artikkelin URL -the-article-version=Artikkelin versio -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Kommenttia ei löydy. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=Artikkeliin liitetyn yrityksen id -the-company-mx-associated-with-the-article=Artikkeliin liitetyn yrityksen MX -the-company-name-associated-with-the-article=Artikkeliin liitetyn yrityksen nimi -the-email-address-of-the-user-who-added-the-article=Artikkelin lisääjän sähköpostiosoite -the-selected-article-no-longer-exists=Valittu artikkeli ei enää ole olemassa. -the-site-name-associated-with-the-article=Artikkeliin liitetty sivuston nimi -the-subscription-could-not-be-found=Tilausta ei löydy. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Käyttäjä, joka lisäsi artikkelin -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Artikkeleita ei löydy tagilla {0}. -there-are-no-articles-with-x-x=Artikkeleita ei löydy {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Artikkeleita ei löydy {0} {1} ja tag {2}. -there-are-no-attachments=Ei ole liitteitä. -there-are-no-child-articles-for-x={0}:lle ei löydy aliartikkeleita. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Käytä tätä sivumallia. -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=Artikkelit tagilla {0}. -view-articles-with-x-x=Artikkelit {0} {1}. -view-articles-with-x-x-and-tag-x=Artikkelit {0} {1} ja tagilla {2} -was-this-information-helpful=Oliko tämä tieto hyödyllistä? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr.properties deleted file mode 100644 index dce63c6124..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Ajouter un article -action.ADD_KB_FOLDER=Ajouter un dossier (Automatic Translation) -action.ADD_KB_TEMPLATE=Ajouter un modèle -action.ADMINISTRATOR=Administrateur -action.DELETE_KB_ARTICLES=Supprimer des articles -action.DELETE_KB_TEMPLATES=Supprimer les modèles -action.MOVE_KB_ARTICLE=Déplacer l'article -action.MOVE_KB_FOLDER=Déplacer le dossier (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Mettre à jour les priorités des articles -action.VIEW_KB_TEMPLATES=Voir les modèles -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=Ajouter un article -add-child-article=Ajouter en article enfant -all-comments-x=Tous les commentaires ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Appliquer des préfixes numériques des fichiers article comme des priorités. (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=Tous les articles dans l'archive zip sont assignés les priorités selon les préfixes numériques de leurs fichiers ou chemins d'accès, si possible. Une priorité basée sur le préfixe numérique du nom du dossier auquel il appartient dans le fichier ZIP est attribuée à chaque article d'introduction. Une priorité basée sur le préfixe numérique de son nom de fichier dans l'archive zip est attribuée à chaque article de l'enfant. Priorisation par préfixe numérique remplace toutes les autres priorités. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=Êtes-vous sûr de que vouloir supprimer les articles sélectionnés ? (Automatic Translation) -article-added-email=Courriel ajouté à l'article -article-display-style=Style d'affichage de l'article -article-or-folder=Article ou dossier (Automatic Translation) -article-updated-email=Courriel de mise-à-jour d'article -article-window-state=État de la fenêtre de l'article -articles=Articles -articles-with-tag-x=Articles avec le tag {0}. -articles-with-x-x=Articles avec {0} {1}. -articles-with-x-x-and-tag-x=Articles avec {0} {1} et tag {2}. -basic-article=Base Article (Automatic Translation) -between=Entre -child-articles-display-style=Style d'affichage des sous-articles -child-articles-for-x=Sous-articles pour {0}. -comments=Commentaires -content-root-prefix=Préfixe de la racine du contenu (Automatic Translation) -did-you-like-this-article=Est-ce que vous avez aimé cet article ? (Automatic Translation) -do-you-have-any-suggestions=Avez-vous des suggestions? -edit-on-github=Edit sur GitHub (Automatic Translation) -enable-description=Activer les Descriptions -enable-history=Activer l'historique (Automatic Translation) -enable-subscriptions=Activer les Descriptions -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Activez l'incrément du nombre d'avis (Automatic Translation) -help-us-improve-it=Aidez-nous à l'améliorer. (Automatic Translation) -javax.portlet.description.1_WAR_knowledgebaseportlet=La Base de Connaissances donne un sens à la collecte, l'organisation et la récupération de contenu pertinent pour produire une documentation et un support. Les administrateurs peuvent donner aux utilisateurs des accès à des modèles pour faciliter la création d'articles de base de connaissance. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=Article de la base de connaissance -javax.portlet.title.4_WAR_knowledgebaseportlet=Section de la base de connaissance -javax.portlet.title.5_WAR_knowledgebaseportlet=Recherche dans la base de connaissance -kb-articles-kb-templates-and-kb-comments=Articles, Modèles et Commentaires -knowledge-base-home=Accueil de la base de connaissance -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=Article de la base de connaissance -model.resource.com.liferay.knowledgebase.model.KBFolder=Accueil de la base de connaissance -model.resource.com.liferay.knowledgebase.model.KBTemplate=Modèle de base de connaissances -most-popular=Le plus populaire -most-recent=Le plus récent -move-to-in-progress=Aller en cours (Automatic Translation) -move-to-new=Se déplacer à nouveau (Automatic Translation) -new-article=Nouvel article -no-articles-were-found=Aucun article trouvé. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Aucune souscription trouvée -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Article parent -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Veuillez entrer une URL conviviale qui commence par une barre oblique et contient des caractères alphanumériques, les tirets et les traits de soulignement. (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Veuillez entrer une priorité supérieure à {0}. -please-enter-a-valid-folder-name=Veuillez entrer un nom de dossier valide. (Automatic Translation) -please-enter-a-valid-source-url=Entrez l'URL source valide. (Automatic Translation) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Veuillez saisir une liste de mots séparés par des virgules pour la propriété {0} afin d'activer ce portlet. -please-select-at-least-one-section=Veuillez choisir au moins une section. -portlet-configuration-page-x-instance-id-x=Configuration du portlet (Page - {0}, Identifiant de l'instance - {1}) -prioritization-strategy=Stratégie de priorisation (Automatic Translation) -recent-articles=Articles récents -resolve=Résoudre (Automatic Translation) -saved-attachments=Pièces jointes enregistrées (Automatic Translation) -search-articles=Rechercher des articles -sections=Sections -select-parent=Sélectionnez Parent (Automatic Translation) -show-asset-entries=Montrer les entrées -show-author-column=Montrez la colonne auteur -show-create-date-column=Montrez la colonne de date de création -show-modified-date-column=Montrer la colonne de date de modification -show-pagination=Montrer la pagination -show-priority-column=Montrer la colonne priorité -show-ratings=Voir les évaluations -show-sections-title=Voir le titre de la section -show-status-column=Voir la colonne de statut -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Voir la colonne des vues -source-url=URL de la source (Automatic Translation) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Modèles -the-article-attachments-file-names=Le nom du fichier joint -the-article-content=Le contenu de l'article -the-article-content-diff=Les différences de l'article -the-article-could-not-be-found=L'article n'a pu être trouvé. -the-article-title=Le titre de l'article -the-article-title-diff=La différence du titre de l'article -the-article-url=L'URL de l'article -the-article-version=Version de l'article -the-comment-content=Le contenu du commentaire (Automatic Translation) -the-comment-could-not-be-found=Le commentaire est introuvable. -the-comment-create-date=Le commentaire créer date (Automatic Translation) -the-company-id-associated-with-the-article=L'identifiant de la compagnie associé à l'article -the-company-mx-associated-with-the-article=Le MX de la compagnie associé à l'article -the-company-name-associated-with-the-article=Nom de la société associé à l'article -the-email-address-of-the-user-who-added-the-article=Adresse courriel de l'utilisateur ayant ajouté l'article -the-selected-article-no-longer-exists=L'article sélectionné n'existe plus. -the-site-name-associated-with-the-article=Le nom du site associé à l'article -the-subscription-could-not-be-found=L'abonnement est introuvable. -the-user-did-not-like-the-article=L'utilisateur n'aimait pas l'article. (Automatic Translation) -the-user-liked-the-article=L'utilisateur bien aimé l'article. (Automatic Translation) -the-user-who-added-the-article=Utilisateur ayant ajouté l'article -there-are-no-articles=Pas de pièce-jointe. -there-are-no-articles-with-tag-x=Aucun article avec l'étiquette {0}. -there-are-no-articles-with-x-x=Il n'y a pas d'articles avec {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Il n'y a pas d'articles avec {0}, {1} et le tag {2}. -there-are-no-attachments=Pas de pièce-jointe. -there-are-no-child-articles-for-x=Aucun article enfant pour {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=Il y a une suggestion. (Automatic Translation) -upload-your-zip-file=Transférez votre fichier ZIP (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Utiliser les cotes étoiles (Automatic Translation) -use-this-template=Utiliser ce modèle -use-thumbs-up-thumbs-down=Utilisation Thumbs Up / Thumbs Down (Automatic Translation) -view-articles-with-tag-x=Voir les articles avec le tag {0}. -view-articles-with-x-x=Voir les articles avec {0} {1}. -view-articles-with-x-x-and-tag-x=Voir les articles avec {0} {1} et le tag {2}. -was-this-information-helpful=Cette information était-elle utile ? -what-did-you-like-the-most-what-would-you-improve=Qu'avez-vous aimé le plus ? Ce qui vous permettrait d'améliorer ? (Automatic Translation) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=Vous avez envoyé une suggestion pour cet article. (Automatic Translation) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr_CA.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr_CA.properties deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_gl.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_gl.properties deleted file mode 100644 index ae01271c8a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_gl.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Engadir artigo -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Engadir modelo -action.ADMINISTRATOR=Administrador -action.DELETE_KB_ARTICLES=Eliminar artigos -action.DELETE_KB_TEMPLATES=Eliminar modelos -action.MOVE_KB_ARTICLE=Mover artigo -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Actualizar a prioridade dos artigos -action.VIEW_KB_TEMPLATES=Ver modelos -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Engadir artigo -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=Todos os comentarios ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Email engadido no artigo -article-display-style=Estilo de vista do artigo -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Email actualizado no artigo -article-window-state=Estado da ventá do artigo -articles=Artigos -articles-with-tag-x=Artigos ca etiqueta {0}. -articles-with-x-x=Artigos con {0} {1}. -articles-with-x-x-and-tag-x=Artigos con {0} {1} e etiqueta {2}. -basic-article=Basic Article (Automatic Copy) -between=Entre -child-articles-display-style=Estilo de vista do artigos fillo -child-articles-for-x=Artigos fillo de {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Habilitar descrición -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Base de coñecemento proporciona un medio para recopilar, organizar e recuperar os contidos relativos á documentación do producto e soporte. Os administradores poden proporcionar aos usuarios o acceso aos modelos para facilitar a creación de artigos de Base de coñecemento. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Artigo da base de coñecemento -javax.portlet.title.4_WAR_knowledgebaseportlet=Sección da base de coñecemento -javax.portlet.title.5_WAR_knowledgebaseportlet=Búsqueda na base de coñecemento -kb-articles-kb-templates-and-kb-comments=Artigos, modelos e comentarios -knowledge-base-home=Inicio da base de coñecemento -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Artigo da base de coñecemento -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Modelo da base de coñecemento -most-popular=Máis popular -most-recent=Máis recente -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Novo artigo -no-articles-were-found=Non se atoparon artigos. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Non se atoparon subscricións. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Artigo pai -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Por favor, utiliza unha prioridade máis alta que {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Por favor, escribe unha lista de palabras separadas por comas para a propiedade do portlet {0} para activar este portlet. -please-select-at-least-one-section=Por favor, selecciona polo menos unha sección. -portlet-configuration-page-x-instance-id-x=Configuración do portlet (Páxina - {0}, Instancia ID - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Artigos recentes -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Buscar artigos -sections=Seccións -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Mostrar elementos -show-author-column=Mostrar columna do autor -show-create-date-column=Mostrar columna da data de creación -show-modified-date-column=Mostrar columna da data de modificación -show-pagination=Mostrar paxinación -show-priority-column=Mostrar columna da priporidade -show-ratings=Mostrar valoracións -show-sections-title=Mostrar título das seccións -show-status-column=Mostrar columna do estado -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Mostrar columna das vistas -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Os nomes dos adxuntos do artigo -the-article-content=O contido do artigo -the-article-content-diff=Diferenzas no contido do artigo -the-article-could-not-be-found=O artigo non foi atopado. -the-article-title=O título do artigo -the-article-title-diff=Diferenzas no título do artigo -the-article-url=O URL do artigo -the-article-version=A versión do artigo -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=O comentario non foi atopado. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=O ID de compañía asociado co artigo -the-company-mx-associated-with-the-article=O MX de compañía asociado co artigo -the-company-name-associated-with-the-article=O nome da compañía asociado co artigo -the-email-address-of-the-user-who-added-the-article=O enderzo de email do usuario que engadeu o artigo -the-selected-article-no-longer-exists=O artigo seleccionado xa non existe. -the-site-name-associated-with-the-article=O nome do sitio asociado co artigo -the-subscription-could-not-be-found=A subscrición non foi atopada. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=O usuario que engadeu o artigo -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Non hai artigos coa etiqueta {0}. -there-are-no-articles-with-x-x=Non hai artigos con {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Non hai artigos coas etiquetas {0} {1} e {2}. -there-are-no-attachments=Non hai adxuntos. -there-are-no-child-articles-for-x=Non hai artigos fillos para {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Usar este modelo -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=Ver artigos coa etiqueta {0}. -view-articles-with-x-x=Ver artigos con {0} {1}. -view-articles-with-x-x-and-tag-x=Ver artigos coas etiquetas {0} {1} e {2}. -was-this-information-helpful=¿Foi de axuda esta información? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hi_IN.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hi_IN.properties deleted file mode 100644 index 9d604ab3b2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hi_IN.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=फ़ोलà¥à¤¡à¤° जोड़ें (Automatic Translation) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=फ़ोलà¥à¤¡à¤° ले जाà¤à¤ (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=आलेख जोड़ें (Automatic Translation) -add-child-article=बचà¥à¤šà¥‡ आलेख जोड़ें (Automatic Translation) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=संखà¥à¤¯à¤¾à¤¤à¥à¤®à¤• उपसरà¥à¤— लेख फ़ाइलों की पà¥à¤°à¤¾à¤¥à¤®à¤¿à¤•ताओं के रूप में लागू होते हैं। (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=ज़िप फ़ाइल में सभी लेख पà¥à¤°à¤¾à¤¥à¤®à¤¿à¤•ताओं के उनके फ़ाइलों या फ़ाइल पथ, संखà¥à¤¯à¤¾à¤¤à¥à¤®à¤• उपसरà¥à¤— के अनà¥à¤¸à¤¾à¤° यदि संभव हो तो असाइन किठजाते हैं। पà¥à¤°à¤¤à¥à¤¯à¥‡à¤• परिचय लेख जिसमें यह ज़िप फ़ाइल में है फ़ोलà¥à¤¡à¤° का नाम के संखà¥à¤¯à¤¾à¤¤à¥à¤®à¤• उपसरà¥à¤— के आधार पर à¤à¤• पà¥à¤°à¤¾à¤¥à¤®à¤¿à¤•ता असाइन किया गया है। पà¥à¤°à¤¤à¥à¤¯à¥‡à¤• बचà¥à¤šà¥‡ के लेख अपनी ज़िप फ़ाइल में फ़ाइल नाम के संखà¥à¤¯à¤¾à¤¤à¥à¤®à¤• उपसरà¥à¤— के आधार पर à¤à¤• पà¥à¤°à¤¾à¤¥à¤®à¤¿à¤•ता असाइन किया गया है। पà¥à¤°à¤¾à¤¥à¤®à¤¿à¤•ीकरण संखà¥à¤¯à¤¾à¤¤à¥à¤®à¤• उपसरà¥à¤— दà¥à¤µà¤¾à¤°à¤¾ अनà¥à¤¯ सभी पà¥à¤°à¤¾à¤¥à¤®à¤¿à¤•ीकरण supersedes. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=आप सà¥à¤¨à¤¿à¤¶à¥à¤šà¤¿à¤¤ करें कि आप चयनित आलेखों को हटाना चाहते हैं? (Automatic Translation) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=लेख या फ़ोलà¥à¤¡à¤° (Automatic Translation) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=मूल लेख (Automatic Translation) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=टिपà¥à¤ªà¤£à¤¿à¤¯à¤¾à¤ (Automatic Translation) -content-root-prefix=सामगà¥à¤°à¥€ जड़ उपसरà¥à¤— (Automatic Translation) -did-you-like-this-article=आप इस लेख पसंद आया? (Automatic Translation) -do-you-have-any-suggestions=कà¥à¤¯à¤¾ आप किसी भी सà¥à¤à¤¾à¤µ है? (Automatic Translation) -edit-on-github=GitHub पर संपादित करें (Automatic Translation) -enable-description=Enable Description (Automatic Copy) -enable-history=इतिहास को सकà¥à¤·à¤® करें (Automatic Translation) -enable-subscriptions=सदसà¥à¤¯à¤¤à¤¾à¤“ं को सकà¥à¤·à¤® करें (Automatic Translation) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=दृशà¥à¤¯ गणना वेतन वृदà¥à¤§à¤¿ को सकà¥à¤·à¤® करें (Automatic Translation) -help-us-improve-it=हमें इसे बेहतर बनाने में मदद। (Automatic Translation) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=नॉलेज बेस (Automatic Translation) -javax.portlet.title.2_WAR_knowledgebaseportlet=नॉलेज बेस पà¥à¤°à¤¦à¤°à¥à¤¶à¤¨ (Automatic Translation) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=नॉलेज बेस (Automatic Translation) -model.resource.com.liferay.knowledgebase.display=नॉलेज बेस पà¥à¤°à¤¦à¤°à¥à¤¶à¤¨ (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=नॉलेज बेस फ़ोलà¥à¤¡à¤° (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=पà¥à¤°à¤—ति में ले जाà¤à¤ (Automatic Translation) -move-to-new=नई करने के लिठले जाà¤à¤ (Automatic Translation) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=कृपया कि à¤à¤• सà¥à¤²à¥ˆà¤¶ के साथ शà¥à¤°à¥‚ होता है और जिसमें अलà¥à¤«à¤¼à¤¾à¤¨à¥à¤¯à¥‚मेरिक वरà¥à¤£, डैश और अंडरसà¥à¤•ोरà¥à¤¸ à¤à¤• दोसà¥à¤¤à¤¾à¤¨à¤¾ URL दरà¥à¤œ करें। (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=कृपया कोई मानà¥à¤¯ फ़ोलà¥à¤¡à¤° नाम दरà¥à¤œ करें। (Automatic Translation) -please-enter-a-valid-source-url=कृपया à¤à¤• मानà¥à¤¯ सà¥à¤°à¥‹à¤¤ URL दरà¥à¤œ करें। (Automatic Translation) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=पà¥à¤°à¤¾à¤¥à¤®à¤¿à¤•ीकरण रणनीति (Automatic Translation) -recent-articles=Recent Articles (Automatic Copy) -resolve=हल करें (Automatic Translation) -saved-attachments=सहेजे गठअनà¥à¤²à¤—à¥à¤¨à¤• (Automatic Translation) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=माता पिता का चयन करें (Automatic Translation) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=सà¥à¤°à¥‹à¤¤ URL (Automatic Translation) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=टेमà¥à¤ªà¤²à¥‡à¤Ÿà¥à¤¸ (Automatic Translation) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=टिपà¥à¤ªà¤£à¥€ सामगà¥à¤°à¥€ (Automatic Translation) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=टिपà¥à¤ªà¤£à¥€ का निरà¥à¤®à¤¾à¤£ दिनांक (Automatic Translation) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=उपयोगकरà¥à¤¤à¤¾ लेख पसंद नहीं आया। (Automatic Translation) -the-user-liked-the-article=उपयोगकरà¥à¤¤à¤¾ लेख पसंद आया। (Automatic Translation) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=वहाठकोई लेख नहीं हैं। (Automatic Translation) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=वहाठà¤à¤• सà¥à¤à¤¾à¤µ है। (Automatic Translation) -upload-your-zip-file=आपके ज़िप फ़ाइल अपलोड करें (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=सितारा रेटिंग का उपयोग करें (Automatic Translation) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=उपयोग अंगूठे ऊपर / नीचे अंगूठे (Automatic Translation) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=कà¥à¤¯à¤¾ आप सबसे अधिक पसंद आया? कà¥à¤¯à¤¾ आप में सà¥à¤§à¤¾à¤° होगा? (Automatic Translation) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=आप इस लेख के लिठà¤à¤• सà¥à¤à¤¾à¤µ भेजा। (Automatic Translation) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hr.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hr.properties deleted file mode 100644 index 1deb5fdc3f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hr.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Dodaj Älanak -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Dodaj predložak -action.ADMINISTRATOR=Administrator -action.DELETE_KB_ARTICLES=ObriÅ¡i Älanke -action.DELETE_KB_TEMPLATES=ObriÅ¡i predloÅ¡ke -action.MOVE_KB_ARTICLE=Premjesti Älanak -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Ažuriraj prioritete Älanaka -action.VIEW_KB_TEMPLATES=Pogledaj predloÅ¡ke -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Dodaj Älanak -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=Svi komentari ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Email nakon dodavanja Älanka -article-display-style=Stil prikaza Älanka -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Email nakon dorade Älanka -article-window-state=Stanje prozora Älanka -articles=ÄŒlanci -articles-with-tag-x=ÄŒlanci s oznakom {0}. -articles-with-x-x=ÄŒlanci s {0} {1}. -articles-with-x-x-and-tag-x=ÄŒlanci s {0} {1} i oznakom {2}. -basic-article=Basic Article (Automatic Copy) -between=IzmeÄ‘u -child-articles-display-style=Stil prikaza pod-Älanaka -child-articles-for-x=Pod-Älanci za {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Omogući opis -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Baza znanja pruža mogućnost skupljanja, organiziranja i prihvata sadržaja vezanog za podrÅ¡ku ili dokumentaciju proizvoda. Administratori korisnicima omogućavaju pristup predloÅ¡cima s ciljem naprednijeg kreiranja sadržaja. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=ÄŒlanak baze znanja -javax.portlet.title.4_WAR_knowledgebaseportlet=Rubrika baze znanja -javax.portlet.title.5_WAR_knowledgebaseportlet=Pretraga baze znanja -kb-articles-kb-templates-and-kb-comments=ÄŒlanci, predloÅ¡ci i komentari -knowledge-base-home=IshodiÅ¡te baze znanja -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=ÄŒlanak baze znanja -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Predložak baze znanja -most-popular=Najpopularniji -most-recent=Najnovije -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Novi Älanak -no-articles-were-found=Nije pronaÄ‘en nijedan Älanak. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Nisu pronaÄ‘ene pretplate. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Glavni Älanak -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Unesite važnost veću od {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Da biste omogućili rad portleta definirajte njegovu postavku {0} unosom niza rijeÄi odvojenih zarezima. -please-select-at-least-one-section=Odaberite barem jednu rubriku. -portlet-configuration-page-x-instance-id-x=Konfiguracija portleta (strana - {0}, ID instance - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Nedavni Älanci -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Pretraži artikle -sections=Sekcije -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Prikaži unesena sredstva -show-author-column=Prikaži kolonu s autorom -show-create-date-column=Prikaži kolonu s datumom kreiranja -show-modified-date-column=Prikaži kolonu sa datumom izmjene -show-pagination=Prikaži straniÄenje -show-priority-column=Prikaži kolonu prioriteta -show-ratings=Prikaži ocjene -show-sections-title=Prikaži naslove sekcija -show-status-column=Prikaži kolonu statusa -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Prikaži kolonu s pogledima -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Nazivi datoteka priloženih Älanku -the-article-content=Sadržaj Älanka -the-article-content-diff=Razlike sadržaja Älanaka -the-article-could-not-be-found=ÄŒlanak nije pronaÄ‘en. -the-article-title=Naslov Älanka -the-article-title-diff=Razlike u naslovu Älanaka -the-article-url=URL Älanka -the-article-version=Verzija Älanka -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Komentar nije pronaÄ‘en. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=ID kompanije vezane uz Älanak -the-company-mx-associated-with-the-article=MX kompanije vezane uz Älanak -the-company-name-associated-with-the-article=Naziv kompanije vezane za Älanak -the-email-address-of-the-user-who-added-the-article=Email adresa korisnika koji je dodao Älanak -the-selected-article-no-longer-exists=Odabrani Älanak viÅ¡e ne postoji. -the-site-name-associated-with-the-article=Naziv web lokacije vezane za ovaj Älanak -the-subscription-could-not-be-found=Pretplata nije pronaÄ‘ena. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Korisnik koji je dodao Älanak -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Nema Älanaka sa oznakom {0}. -there-are-no-articles-with-x-x=Nema Älanaka sa {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Nema Älanaka sa {0} {1} i oznakom {2}. -there-are-no-attachments=Nema priloga. -there-are-no-child-articles-for-x=Nema podreÄ‘enih Älanaka od {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Koristi ovaj predložak -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=Prikaži Älanke s oznakom {0}. -view-articles-with-x-x=Prikaži Älanake sa {0} {1}. -view-articles-with-x-x-and-tag-x=Prikaži Älanake sa {0} {1} i oznakom {2}. -was-this-information-helpful=Da li je ova informacija bila korisna? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hu.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hu.properties deleted file mode 100644 index 2212f9c4bd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hu.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=Összesen {0} cikk lett importálva. -action.ADD_KB_ARTICLE=Cikk hozzáadása -action.ADD_KB_FOLDER=Új mappa -action.ADD_KB_TEMPLATE=Sablon hozzáadása -action.ADMINISTRATOR=Adminisztrátor -action.DELETE_KB_ARTICLES=Cikkek törlése -action.DELETE_KB_TEMPLATES=Sablonok törlése -action.MOVE_KB_ARTICLE=Cikk áthelyezése -action.MOVE_KB_FOLDER=Mappa áthelyezése -action.UPDATE_KB_ARTICLES_PRIORITIES=Cikkek prioritásainak frissítése -action.VIEW_KB_TEMPLATES=Sablonok megtekintése -action.VIEW_SUGGESTIONS=Javaslatok megtekintése -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=Cikk hozzáadása -add-child-article=Új gyermek cikk -all-comments-x=Minden megjegyzés ({0}) -an-unexpected-error-occurred-while-importing-articles-x=Egy váratlan hiba történt a cikkek importálása közben: {0}. -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Biztos, hogy törölni szeretnéd a kiválasztott cikkeket? -article-added-email=Email hozzáadva cikk -article-display-style=Cikk megjelenési stílusa -article-or-folder=Cikk vagy mappa -article-updated-email=Frissített e-mail cikk -article-window-state=Ablakállapot cikk -articles=Cikkek -articles-with-tag-x=Cikkek ezzel a címkével: {0}. -articles-with-x-x=Cikkek ezekkel: {0} {1}. -articles-with-x-x-and-tag-x=Cikkek ezekkel: {0} {1} és ezzel a címkével: {2}. -basic-article=Alap cikk -between=Között -child-articles-display-style=Alcikkek megjelenési stílusa -child-articles-for-x={0} alcikkei. -comments=Hozzászólások -content-root-prefix=Tartalom gyökér elÅ‘tag -did-you-like-this-article=Tetszett ez a cikk? -do-you-have-any-suggestions=Van javaslatod? -edit-on-github=GitHubon szerkesztés -enable-description=Leírás bekapcsolása -enable-history=ElÅ‘zmények engedélyezése -enable-subscriptions=Feliratkozások engedélyezése -enable-suggestions=Javaslatok engedélyezése -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Segíts nekünk javítani. -javax.portlet.description.1_WAR_knowledgebaseportlet=A tudásbázis erÅ‘forrásokat biztosít a termékdokumentációra és -támogatásra vonatkozó tartalom gyűjtésére, rendezésére és helyrehozására. Az adminisztrátorok hozzáférést biztosíthatnak a sablonokhoz, a tudásbázis-cikkek létrehozásának elÅ‘segítéséhez. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=Tudásbázis cikk -javax.portlet.title.4_WAR_knowledgebaseportlet=Tudásbázis szekció -javax.portlet.title.5_WAR_knowledgebaseportlet=Tudásbázis keresés -kb-articles-kb-templates-and-kb-comments=Cikkek, sablonok és megjegyzések -knowledge-base-home=Tudásbázis kiindulópont -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=Tudásbázis cikk -model.resource.com.liferay.knowledgebase.model.KBFolder=Tudásbázis kiindulópont -model.resource.com.liferay.knowledgebase.model.KBTemplate=Tudásbázis sablon -most-popular=Legnépszerűbb -most-recent=Legutóbbi -move-to-in-progress=Folyamatban állapotba mozgatás -move-to-new=Új állapotba mozgatás -new-article=Új cikk -no-articles-were-found=Nem található cikk. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=Nem található folyamatban lévÅ‘ visszajelzés. -no-in-progress-suggestion-was-found=Nem található folyamatban lévÅ‘ visszajelzés. -no-new-suggestion-was-found=Nem található folyamatban lévÅ‘ visszajelzés. -no-subscriptions-were-found=Nem található feliratkozás -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Semmi sem lett importálva. Nem találhatóak cikkek az egyik támogatott kiterjesztéssel: {0}. -parent-article=SzülÅ‘cikk -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Adj meg egy rövid URL-t, ami perjellel kezdÅ‘dik, és számokat, betűket, kötÅ‘jelet, aláhúzást tartalmazhat. -please-enter-a-priority-that-is-greater-than-x={0} értéknél nagyobb prioritás megadása szükséges. -please-enter-a-valid-folder-name=Adj meg egy érvényes mappa nevet. -please-enter-a-valid-source-url=Adj meg egy érvényes forrás URL-t. -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=A portlet tulajdonságához ({0}) vesszÅ‘vel elválasztott szavak listája szükséges, hogy ez a portlet engedélyezve legyen. -please-select-at-least-one-section=Legalább egy szakaszt ki kell választani. -portlet-configuration-page-x-instance-id-x=Portlet beállítás ({0} oldal, {1} példányazonosító} -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Legutóbbi cikkek -resolve=Megold -saved-attachments=Mentett csatolmányok -search-articles=Cikk-keresés -sections=Szakaszok -select-parent=Válassz szülÅ‘t -show-asset-entries=Tartalombejegyzések mutatása -show-author-column=SzerzÅ‘ oszlop megjelenítése -show-create-date-column=Létrehozás dátuma-oszlop mutatása -show-modified-date-column=Módosítás dátuma-oszlop mutatása -show-pagination=Megjelenítés több oldalon -show-priority-column=ElsÅ‘bbségi oszlop megjelenítése -show-ratings=Értékelések megjelenítése -show-sections-title=Szakaszcímek megjelenítése -show-status-column=Státusz-oszlop megjelenítése -show-suggestions=Javaslatok megmutatása -show-views-column=Megtekintések-oszlop megjelenítése -source-url=Forrás URL -suggestion-deleted-successfully=Javaslat sikeresen törölve. -suggestion-in-progress-email=Javaslat folyamatban e-mail -suggestion-received-email=Javaslat beérkezett e-mail -suggestion-resolved-email=Javaslat megoldva e-mail -suggestion-saved-successfully=Javaslat sikeresen elmentve. -suggestion-status-updated-successfully=Visszajelzés állapot frissítése sikerült. -templates=Sablonok -the-article-attachments-file-names=A cikk fájlmellékleteinek neve -the-article-content=A cikktartalom -the-article-content-diff=A cikktartalom különbözik -the-article-could-not-be-found=A cikk nem található. -the-article-title=A cikk címe -the-article-title-diff=A cikk címe különbözik -the-article-url=A cikk URL címe -the-article-version=A cikk verziója -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=A megjegyzés nem található. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=A cégazonosító a cikkhez kapcsolódik. -the-company-mx-associated-with-the-article=A cég MX-je a cikkhez kapcsolódik -the-company-name-associated-with-the-article=A cégnév a cikkhez kapcsolódik -the-email-address-of-the-user-who-added-the-article=A cikket hozzáadó felhasználó e-mail címe -the-selected-article-no-longer-exists=A kiválasztott cikk megszűnt. -the-site-name-associated-with-the-article=A cikkhez kapcsolódó webhely neve -the-subscription-could-not-be-found=A feliratkozás nem található. -the-user-did-not-like-the-article=A felhasználónak nem tetszett a cikk. -the-user-liked-the-article=A felhasználónak tetszett a cikk. -the-user-who-added-the-article=A cikket hozzáadó felhasználó -there-are-no-articles=Nincsenek cikkek. -there-are-no-articles-with-tag-x=Nincs cikk ezzel a címkével: {0}. -there-are-no-articles-with-x-x=Nincsenek cikkek ezekkel: {0}, {1}. -there-are-no-articles-with-x-x-and-tag-x=Nincsenek cikkek ezekkel: {0}, {1} és ezzel a címkével: {2}. -there-are-no-attachments=Nincs melléklet. -there-are-no-child-articles-for-x=Nincs alcikk ehhez: {0}. -there-are-x-suggestions={0} javaslat van. -there-is-one-suggestion=Egy javaslat van. -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Használd a csillagos értékelést -use-this-template=E sablon használata -use-thumbs-up-thumbs-down=Használd a hüvelykujjas értékelést -view-articles-with-tag-x={0} címkével ellátott cikkek megtekintése. -view-articles-with-x-x=Cikkek megtekintése ezekkel: {0}, {1}. -view-articles-with-x-x-and-tag-x={2} címkéjű cikkek megtekintése ezekkel: {0}, {1}. -was-this-information-helpful=Hasznos volt ez az információ? -what-did-you-like-the-most-what-would-you-improve=Mit szerettél a legjobban? Min változtatnál? -x-pending={0} függÅ‘ben -you-sent-one-suggestion-for-this-article=Egy javaslatot küldtél ehhez a cikkhez. -you-sent-x-suggestions-for-this-article={0} javaslatot küldtél ehhez a cikkhez. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_in.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_in.properties deleted file mode 100644 index 40646d73eb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_in.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Tambah Artikel -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Tambah Template -action.ADMINISTRATOR=Administrator -action.DELETE_KB_ARTICLES=Hapus Artikel -action.DELETE_KB_TEMPLATES=Hapus Template -action.MOVE_KB_ARTICLE=Pindahkan Artikel -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Prioritas Artikel -action.VIEW_KB_TEMPLATES=Lihat Template -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Tambah Artikel -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=Semua Komentar ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Artikel yang ditambahkan Email -article-display-style=Style Tampilan Artikel -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Artikel yang diperbarui Email -article-window-state=Window State Artikel -articles=Artikel -articles-with-tag-x=Artikel dengan tag {0}. -articles-with-x-x=Artikel dengan {0} {1}. -articles-with-x-x-and-tag-x=Artikel dengan{0} {1} dan tag {2}. -basic-article=Basic Article (Automatic Copy) -between=Antara -child-articles-display-style=Gaya Tampilan Child Article -child-articles-for-x=Child Article untuk {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Aktifkan Deskripsi -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Basis pengetahuan menyediakan sarana untuk mengumpulkan, mengorganisir, dan mengambil konten yang berkaitan dengan dokumentasi produk dan dukungan. Administrator dapat memberikan pengguna dengan akses ke template untuk memfasilitasi penciptaan artikel basis pengetahuan. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Artikel Knowledge Base -javax.portlet.title.4_WAR_knowledgebaseportlet=Bagian Knowledge Base -javax.portlet.title.5_WAR_knowledgebaseportlet=Pencarian Knowledge Base -kb-articles-kb-templates-and-kb-comments=Artikel, Template dan Komentar -knowledge-base-home=Knowledge Base Home -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Artikel Knowledge Base -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Template Knowledge Base -most-popular=Paling Populer -most-recent=Paling terbaru -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Artikel Baru -no-articles-were-found=Tidak ada artikel yang ditemukan. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Tidak ada subscription yang ditemukan. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Artikel Induk -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Harap masukkan sebuah prioritas yang lebih besar daripada {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Harap masukkan daftar kata yang dipisahkan dengan koma untuk properti portlet {0} untuk mengaktifkan portlet ini -please-select-at-least-one-section=Silahkan pilih setidaknya satu bagian. -portlet-configuration-page-x-instance-id-x=Konfigurasi Portlet (Page - {0}, ID Instance - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Artikel Terbaru -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Cari Artikel -sections=Bagian -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Tampilkan Entri Aset -show-author-column=Tampilkan Kolom Penulis -show-create-date-column=Tampilkan Kolom Membuat Tanggal -show-modified-date-column=Tampilkan Kolom Tanggal Diubah -show-pagination=Tampilkan Nomor Halaman -show-priority-column=Tampilkan Kolom Prioritas -show-ratings=Tampilkan Rating -show-sections-title=Tampilkan Bagian Judul -show-status-column=Tampilkan Kolom Status -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Tampilkan Kolom Tampilan -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Nama file lampiran artikel -the-article-content=Isi Artikel -the-article-content-diff=Diff Artikel konten -the-article-could-not-be-found=Artikel ini tidak dapat ditemukan. -the-article-title=Judul artikel -the-article-title-diff=Diff Judul Artikel -the-article-url=URL artikel -the-article-version=Versi Artikel -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Komentar tidak dapat ditemukan. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=ID perusahaan yang terhubung dengan artikel -the-company-mx-associated-with-the-article=MX perusahaan yang terkait dengan artikel -the-company-name-associated-with-the-article=Nama perusahaan yang terkait dengan artikel -the-email-address-of-the-user-who-added-the-article=Alamat email dari pengguna yang menambahkan artikel -the-selected-article-no-longer-exists=Artikel yang dipilih tidak ada lagi. -the-site-name-associated-with-the-article=Nama situs yang terkait dengan artikel -the-subscription-could-not-be-found=Subscription tidak dapat ditemukan. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Pengguna yang menambahkan artikel -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Tidak ada artikel dengan tag {0}. -there-are-no-articles-with-x-x=Tidak ada artikel dengan {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Tidak ada artikel dengan{0} {1} dan tag {2}. -there-are-no-attachments=Tidak ada attachment -there-are-no-child-articles-for-x=Tidak ada child article untuk {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Gunakan Template ini -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=Lihat artikel dengan tag {0}. -view-articles-with-x-x=Lihat artikel dengan {0} {1}. -view-articles-with-x-x-and-tag-x=Lihat artikel dengan {0} {1} dan tag {2}. -was-this-information-helpful=Apakah informasi ini bermanfaat? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_it.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_it.properties deleted file mode 100644 index ad15d94298..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_it.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Aggiungi Articolo -action.ADD_KB_FOLDER=Aggiungi cartella (Automatic Translation) -action.ADD_KB_TEMPLATE=Aggiungi Modello -action.ADMINISTRATOR=Amministratore -action.DELETE_KB_ARTICLES=Cancella Articoli -action.DELETE_KB_TEMPLATES=Cancella Modelli -action.MOVE_KB_ARTICLE=Sposta Articolo -action.MOVE_KB_FOLDER=Spostare la cartella (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Aggiorna le priorità degli articoli -action.VIEW_KB_TEMPLATES=Mostra Modello -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=Aggiungi Articolo -add-child-article=Aggiungi Articolo Figlio -all-comments-x=Tutti i Commenti ({0}) -an-unexpected-error-occurred-while-importing-articles-x=Si è verificato un errore inaspettato importando gli articoli: {0}. -apply-numerical-prefixes-of-article-files-as-priorities=Applicare i prefissi numerici dei file articolo come priorità. (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=Tutti gli articoli nel file ZIP sono assegnati le priorità secondo i prefissi numerici di un file o percorsi di file, se possibile. Ogni articolo di introduzione è assegnata una priorità basata sul prefisso numerico del nome della cartella a cui appartiene nel file ZIP. Ogni articolo figlio è assegnata una priorità basata sul prefisso numerico del nome del file nel file ZIP. Prioritizzazione dal prefisso numerico sostituisce tutte le altre priorità. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=Sei sicuro di voler cancellare gli articoli selezionati? -article-added-email=Email Aggiunta Articolo -article-display-style=Stile di visualizzazione Articolo -article-or-folder=Articolo o cartella (Automatic Translation) -article-updated-email=Email Aggiornata per l'articolo -article-window-state=Stato Finestra dell'Articolo -articles=Articoli -articles-with-tag-x=Articoli con tag {0}. -articles-with-x-x=Articoli con {0} {1}. -articles-with-x-x-and-tag-x=Articoli con {0} {1} e tag {2}. -basic-article=Articolo Base -between=Tra -child-articles-display-style=Stile di visualizzazione degli articoli figli -child-articles-for-x=Articoli figli per {0}. -comments=Commenti -content-root-prefix=Prefisso principale del contenuto (Automatic Translation) -did-you-like-this-article=Ti è piaciuto questo articolo? -do-you-have-any-suggestions=Hai suggerimenti? -edit-on-github=Modifica su GitHub -enable-description=Attiva Descrizione -enable-history=Abilita Storia -enable-subscriptions=Attiva Sottoscrizioni -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Abilitare la visualizzazione incremento (Automatic Translation) -help-us-improve-it=Aiutaci a migliorare. -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base mette a disposizione un metodo per collezionare, organizzare e recuperare contenuti che riguardano documentazione e supporto prodotti. Gli amministratori possono consentire l'accesso degli utenti ai modelli per facilitare la creazione di articoli knowledge base. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=Articolo Knowledge Base -javax.portlet.title.4_WAR_knowledgebaseportlet=Sezione Knowledge Base -javax.portlet.title.5_WAR_knowledgebaseportlet=Ricerca Knowledge Base -kb-articles-kb-templates-and-kb-comments=Articoli, Modelli e Commenti -knowledge-base-home=Home Knowledge Base -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=Articolo Knowledge Base -model.resource.com.liferay.knowledgebase.model.KBFolder=Home Knowledge Base -model.resource.com.liferay.knowledgebase.model.KBTemplate=Modello Knowledge Base -most-popular=Più Popolare -most-recent=Più Recente -move-to-in-progress=Spostamento in corso -move-to-new=Sposta a Nuovo -new-article=Nuovo Articolo -no-articles-were-found=Nessun articolo trovato. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=Non è stato trovato alcun Feedback in elaborazione. -no-in-progress-suggestion-was-found=Non è stato trovato alcun Feedback in elaborazione. -no-new-suggestion-was-found=Non è stato trovato alcun Feedback in elaborazione. -no-subscriptions-were-found=Nessuna iscrizione trovata. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Articolo Padre -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Immettere un URL amichevole che inizia con una barra e contiene caratteri alfanumerici, trattini e caratteri di sottolineatura. (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Inserire una priorità maggiore di {0}. -please-enter-a-valid-folder-name=Inserisci un nome di cartella valido. (Automatic Translation) -please-enter-a-valid-source-url=Inserire un URL sorgente valido. -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Inserire una lista di parole delimitate da virgole per la proprietà {0} per attivare questa portlet. -please-select-at-least-one-section=Selezionare almeno una sezione. -portlet-configuration-page-x-instance-id-x=Configurazione Portlet (Pagina - {0}, ID Istanza - {1}) -prioritization-strategy=Strategia di priorità (Automatic Translation) -recent-articles=Articoli Recenti -resolve=Risolvi -saved-attachments=Salva Allegati -search-articles=Cerca Articoli -sections=Sezioni -select-parent=Selezionare il padre (Automatic Translation) -show-asset-entries=Mostra Risorse -show-author-column=Mostra Colonna Autore -show-create-date-column=Mostra Colonna Data di Creazione -show-modified-date-column=Mostra Colonna Data di Modifica -show-pagination=Mostra Paginazione -show-priority-column=Mostra Colonna Priorità -show-ratings=Mostra Punteggi -show-sections-title=Mostra Titolo delle Sezioni -show-status-column=Mostra Colonna dello Stato -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Mostra Colonna Visualizzazioni -source-url=URL Sorgente -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Stato del feedback aggiornato correttamente. -templates=Modelli -the-article-attachments-file-names=Il nome dei file degli allegati dell'articolo -the-article-content=Contenuto dell'articolo -the-article-content-diff=Le diff del contenuto dell'articolo -the-article-could-not-be-found=L'articolo non è stato trovato. -the-article-title=Titolo dell'articolo -the-article-title-diff=Il titolo della diff dell'articolo -the-article-url=URL dell'articolo -the-article-version=Versione dell'articolo -the-comment-content=Il contenuto del commento (Automatic Translation) -the-comment-could-not-be-found=Il commento non è stato trovato. -the-comment-create-date=Commento creare data (Automatic Translation) -the-company-id-associated-with-the-article=L'ID dell'istanza di portale associato con questo articolo -the-company-mx-associated-with-the-article=MX dell'istanza di portale associato con l'articolo -the-company-name-associated-with-the-article=Il nome azienda associato con l'articolo -the-email-address-of-the-user-who-added-the-article=L'indirizzo email dell'utente che ha aggiunto l'articolo -the-selected-article-no-longer-exists=L'articolo selezionato non è più presente. -the-site-name-associated-with-the-article=Il nome del sito associato con l'articolo -the-subscription-could-not-be-found=L'iscrizione non è stata trovata. -the-user-did-not-like-the-article=All'utente non piace l'articolo. -the-user-liked-the-article=All'utente piace l'articolo. -the-user-who-added-the-article=L'utente che ha aggiunto l'articolo -there-are-no-articles=Non ci sono articoli. -there-are-no-articles-with-tag-x=Non ci sono articoli con il tag {0}. -there-are-no-articles-with-x-x=Non ci sono articoli con {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Non ci sono articoli con {0} {1} e tag {2}. -there-are-no-attachments=Non ci sono allegati. -there-are-no-child-articles-for-x=Non ci sono articoli figli per {0}. -there-are-x-suggestions=Ci sono {0} suggerimenti. -there-is-one-suggestion=C'è un suggerimento. -upload-your-zip-file=Carica il File ZIP (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Usa le stelline di voto -use-this-template=Utilizza questo Modello -use-thumbs-up-thumbs-down=Usa Pollice Su/Giù -view-articles-with-tag-x=Visualizza articoli con tag {0}. -view-articles-with-x-x=Visualizza articoli con {0} {1}. -view-articles-with-x-x-and-tag-x=Visualizza articoli con {0} {1} e tag {2}. -was-this-information-helpful=Le informazioni qui contenute sono state utili? -what-did-you-like-the-most-what-would-you-improve=Cosa ti è piaciuto di più? Cosa vorresti migliorare? -x-pending={0} In Sospeso -you-sent-one-suggestion-for-this-article=Hai mandato un suggerimento per questo articolo. -you-sent-x-suggestions-for-this-article=Hai mandato {0} suggerimenti per questo articolo. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_iw.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_iw.properties deleted file mode 100644 index 9464b7b54c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_iw.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=הוספת מ×מר -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=הוספת תבנית -action.ADMINISTRATOR=×דמיניסטרטור -action.DELETE_KB_ARTICLES=מחיקת מ××ž×¨×™× -action.DELETE_KB_TEMPLATES=מחיקת תבניות -action.MOVE_KB_ARTICLE=שינוי ×ž×™×§×•× ×ž×מר -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=עדכון מ×פייני מ××ž×¨×™× -action.VIEW_KB_TEMPLATES=צפייה בתבניות -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=הוספת מ×מר -add-child-article=הוספת תת-מ×מר -all-comments-x=כל ההערות ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=מ×מר - ×ימייל חדש -article-display-style=מ×מר - סגנון תצוגה -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=מ×מר - ×ימייל מעודכן -article-window-state=מ×מר - מצב חלון -articles=מ××ž×¨×™× -articles-with-tag-x=מ××ž×¨×™× ×¢× ×ª×’ {0}. -articles-with-x-x=מ××ž×¨×™× ×¢× {0} {1}. -articles-with-x-x-and-tag-x=מ××ž×¨×™× ×¢× {0} {1} ותג {2}. -basic-article=Basic Article (Automatic Copy) -between=בין -child-articles-display-style=סגנון תצוגה של תת-מ××ž×¨×™× -child-articles-for-x=תת-מ××ž×¨×™× ×¢×‘×•×¨ {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=הפעלת תי×ור -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=בסיס המידע מספק ×מצעי ל×יסוף, ×רגון, ו×חזור תוכן המתייחס לתיעוד מוצר ותמיכה. ××“×ž×™× ×™×¡×˜×¨×˜×•×¨×™× ×™×›×•×œ×™× ×œ×פשר ×œ×ž×©×ª×ž×©×™× ×’×™×©×” לתבניות על מנת להקל על יצירת מ×מרי בסיס מידע. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=מ×מר בסיס מידע -javax.portlet.title.4_WAR_knowledgebaseportlet=קטע בסיס מידע -javax.portlet.title.5_WAR_knowledgebaseportlet=חיפוש בבסיס המידע -kb-articles-kb-templates-and-kb-comments=מ×מרי×, תבניות והערות -knowledge-base-home=בסיס מידע - עמוד הבית -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=מ×מר בסיס מידע -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=תבנית בסיס מידע -most-popular=הפופולרי ביותר -most-recent=העדכני ביותר -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=מ×מר חדש -no-articles-were-found=×œ× × ×ž×¦×ו מ×מרי×. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=×œ× × ×ž×¦×ו מנויי×. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=מ×מר ×ב -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=×× × ×”×–×Ÿ עדיפות גדולה מ-{0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=להפעלת הפורטלט, ×× × ×”×–×Ÿ רשימת ×ž×™×œ×™× ×©×ž×•×¤×¨×“×•×ª ×‘×¤×¡×™×§×™× ×¢×‘×•×¨ מ×פיין פורטלט {0}. -please-select-at-least-one-section=×× × ×‘×—×¨ לפחות קטע ×חד. -portlet-configuration-page-x-instance-id-x=הגדרת פורטלט (עמוד - {0}, מספר מופע - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=מ××ž×¨×™× ××—×¨×•× ×™× -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=חיפוש מ××ž×¨×™× -sections=×§×˜×¢×™× -select-parent=Select Parent (Automatic Copy) -show-asset-entries=הצגת רשומות נכס -show-author-column=הצגת עמודת מחבר -show-create-date-column=הצגת עמודת ת×ריך יצירה -show-modified-date-column=הצגת עמודת ת×ריך עדכון -show-pagination=הצגת עימוד -show-priority-column=הצגת עמודת עדיפות -show-ratings=הצגת ×“×™×¨×•×’×™× -show-sections-title=הצגת כותרת ×§×˜×¢×™× -show-status-column=הצגת עמודת סטטוס -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=הצגת עמודת ×ž×‘×˜×™× -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=שמות ×”×§×‘×¦×™× ×”×ž×¦×•×¨×¤×™× ×©×œ המ×מר -the-article-content=תוכן המ×מר -the-article-content-diff=×”×‘×“×œ×™× ×‘×ª×•×›×Ÿ המ×מר -the-article-could-not-be-found=×œ× × ×™×ª×Ÿ ×œ×ž×¦×•× ×ת המ×מר. -the-article-title=כותרת מ×מר -the-article-title-diff=×”×‘×“×œ×™× ×‘×›×•×ª×¨×ª המ×מר -the-article-url=URL מ×מר -the-article-version=גרסת מ×מר -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=×œ× × ×™×ª×Ÿ ×œ×ž×¦×•× ×ת ההערה. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=מס' החברה שמשויך למ×מר -the-company-mx-associated-with-the-article=MX חברה שמשויך למ×מר -the-company-name-associated-with-the-article=×©× ×—×‘×¨×” שמשויך למ×מר -the-email-address-of-the-user-who-added-the-article=כתובת המייל של המשתמש שהוסיף ×ת המ×מר -the-selected-article-no-longer-exists=המ×מר שנבחר ×ינו ×§×™×™× ×™×•×ª×¨. -the-site-name-associated-with-the-article=×©× ×”×תר שמשויך למ×מר -the-subscription-could-not-be-found=×œ× × ×™×ª×Ÿ ×œ×ž×¦×•× ×ת המנוי. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=המשתמש שהוסיף ×ת המ×מר -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=×œ× ×§×™×™×ž×™× ×ž××ž×¨×™× ×¢× ×ª×’ {0}. -there-are-no-articles-with-x-x=×œ× ×§×™×™×ž×™× ×ž××ž×¨×™× ×¢× {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=×œ× ×§×™×™×ž×™× ×ž××ž×¨×™× ×¢× {0} {1} ותג {2}. -there-are-no-attachments=×ין ×§×‘×¦×™× ×ž×¦×•×¨×¤×™×. -there-are-no-child-articles-for-x=×œ× ×§×™×™×ž×™× ×ª×ª-מ××ž×¨×™× ×¢×‘×•×¨ {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=השתמש בתבנית ×–×ת -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=צפייה במ××ž×¨×™× ×¢× ×ª×’ {0}. -view-articles-with-x-x=צפייה במ××ž×¨×™× ×¢× {0} {1}. -view-articles-with-x-x-and-tag-x=צפייה במ××ž×¨×™× ×¢× {0} {1} ותג {2}. -was-this-information-helpful=×”×× ×”×ž×™×“×¢ ×”× "ל ×”×™×” שימושי? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ja.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ja.properties deleted file mode 100644 index 49a4563421..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ja.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported={0}個ã®è¨˜äº‹ãŒã‚¤ãƒ³ãƒãƒ¼ãƒˆã•れã¾ã—㟠-action.ADD_KB_ARTICLE=記事ã®è¿½åŠ  -action.ADD_KB_FOLDER=フォルダã®è¿½åŠ  -action.ADD_KB_TEMPLATE=テンプレートã®è¿½åŠ  -action.ADMINISTRATOR=管ç†è€… -action.DELETE_KB_ARTICLES=記事ã®å‰Šé™¤ -action.DELETE_KB_TEMPLATES=テンプレートã®å‰Šé™¤ -action.MOVE_KB_ARTICLE=記事ã®ç§»å‹• -action.MOVE_KB_FOLDER=フォルダã®ç§»å‹• -action.UPDATE_KB_ARTICLES_PRIORITIES=記事ã®å„ªå…ˆåº¦ã®æ›´æ–° -action.VIEW_KB_TEMPLATES=テンプレートã®å‚ç…§ -action.VIEW_SUGGESTIONS=ææ¡ˆã‚’見る -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=記事ã®è¿½åŠ  -add-child-article=サブ記事を追加 -all-comments-x=ã™ã¹ã¦ã®ã‚³ãƒ¡ãƒ³ãƒˆ ({0}) -an-unexpected-error-occurred-while-importing-articles-x=記事{0}をインãƒãƒ¼ãƒˆä¸­ã«äºˆæœŸã—ãªã„エラーãŒç™ºç”Ÿã—ã¾ã—㟠-apply-numerical-prefixes-of-article-files-as-priorities=優先順ä½ã¨ã—ã¦ã®è¨˜äº‹ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°å€¤ã®ãƒ—レフィックスをé©ç”¨ã—ã¾ã™ã€‚ (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=ZIP ファイル内ã®ã™ã¹ã¦ã®è¨˜äº‹ã¯å¯èƒ½ã§ã‚れã°ãã®ãƒ•ァイルã¾ãŸã¯ãƒ•ァイル ãƒ‘ã‚¹ã®æ•°å€¤ã®ãƒ—レフィックスã«ã‚ˆã£ã¦å„ªå…ˆåº¦ã‚’割り当ã¦ã‚‰ã‚Œã¾ã™ã€‚å„紹介記事ã¯ã€ZIP ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ‰€å±žã™ã‚‹ãƒ•ォルダーã®åå‰ã®æ•°å€¤ã®ãƒ—レフィックスã«åŸºã¥ã„ã¦å„ªå…ˆåº¦ã‚’割り当ã¦ã‚‰ã‚Œã¾ã™ã€‚å„å­è¨˜äº‹ã¯ ZIP ファイルã§ãƒ•ァイルåã®æ•°å€¤ã®ãƒ—レフィックスã«åŸºã¥ã„ã¦å„ªå…ˆåº¦ã‚’割り当ã¦ã‚‰ã‚Œã¾ã™ã€‚数値ã®ãƒ—レフィックスを優先順ä½ä»˜ã‘ã¯ã€ä»–ã®å„ªå…ˆé †ä½ä»˜ã‘より優先ã•れã¾ã™ã€‚ (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=é¸æŠžã•れãŸè¨˜äº‹ã‚’削除ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ -article-added-email=記事ã«ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒè¿½åŠ ã•れã¾ã—ãŸã€‚ -article-display-style=記事ã®è¡¨ç¤ºå½¢å¼ -article-or-folder=記事もã—ãã¯ãƒ•ォルダ -article-updated-email=記事ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒæ›´æ–°ã•れã¾ã—ãŸã€‚ -article-window-state=記事ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦çŠ¶æ…‹ -articles=記事 -articles-with-tag-x=ã‚¿ã‚° {0} ã®è¨˜äº‹ -articles-with-x-x={0}ã€{1} ã®è¨˜äº‹ -articles-with-x-x-and-tag-x={0}ã€{1} 㨠タグ {2} ã®è¨˜äº‹ -basic-article=基本記事 -between=é–“ -child-articles-display-style=å­è¨˜äº‹ã®è¡¨ç¤ºå½¢å¼ -child-articles-for-x={0} ã®å­è¨˜äº‹ -comments=コメント -content-root-prefix=コンテンツルートã®ãƒ—リフィックス -did-you-like-this-article=ã“ã®è¨˜äº‹ã¯æ°—ã«å…¥ã‚Šã¾ã—ãŸã‹ï¼Ÿ -do-you-have-any-suggestions=ãŠã™ã™ã‚ã¯ã‚りã¾ã™ã‹ï¼Ÿ -edit-on-github=GitHub上ã§ç·¨é›† -enable-description=è¨˜è¿°ã®æœ‰åŠ¹åŒ– -enable-history=ヒストリーを有効ã«ã™ã‚‹ -enable-subscriptions=購読を有効ã«ã™ã‚‹ -enable-suggestions=ææ¡ˆã‚’有効ã«ã™ã‚‹ -enable-view-count-increment=ビュー カウントã®å¢—加] を有効ã«ã—ã¾ã™ã€‚ (Automatic Translation) -help-us-improve-it=使ã„勿‰‹ã®å‘上ã«ã”å”力ãã ã•ã„ -javax.portlet.description.1_WAR_knowledgebaseportlet=ナレッジベースã«ã‚ˆã‚Šãƒ—ロダクトドキュメントやサãƒãƒ¼ãƒˆã«é–¢ã™ã‚‹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®åŽé›†ã€ç·¨æˆã€å–得を行ãˆã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚管ç†è€…ã¯ãƒŠãƒ¬ãƒƒã‚¸ãƒ™ãƒ¼ã‚¹è¨˜äº‹ã®ä½œæˆã‚’促ã™ãƒ†ãƒ³ãƒ—レートã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©é™ã‚’ユーザã«ä»˜ä¸Žã§ãã¾ã™ã€‚ -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=ナレッジベース記事 -javax.portlet.title.4_WAR_knowledgebaseportlet=ナレッジベースセクション -javax.portlet.title.5_WAR_knowledgebaseportlet=ナレッジベース検索 -kb-articles-kb-templates-and-kb-comments=記事ã€ãƒ†ãƒ³ãƒ—レートã¨ã‚³ãƒ¡ãƒ³ãƒˆ -knowledge-base-home=ナレッジベースホーム -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=ナレッジベース記事 -model.resource.com.liferay.knowledgebase.model.KBFolder=ナレッジベースホーム -model.resource.com.liferay.knowledgebase.model.KBTemplate=ナレッジベーステンプレート -most-popular=ã‚‚ã£ã¨ã‚‚人気ã®ã‚ã‚‹ -most-recent=最近 -move-to-in-progress=処ç†ä¸­ã«ç§»å‹• -move-to-new=æ–°è¦ã«ç§»å‹• -new-article=æ–°ã—ã„記事 -no-articles-were-found=記事ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=ææ¡ˆæ¸ˆã¿ã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—㟠-no-in-progress-suggestion-was-found=処ç†ä¸­ãƒ•ィードãƒãƒƒã‚¯ã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ -no-new-suggestion-was-found=æ–°è¦ææ¡ˆã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—㟠-no-subscriptions-were-found=サブスクリプションãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚ -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=何もインãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。サãƒãƒ¼ãƒˆã•れるエクステンションã®ä¸­ã«è¨˜äº‹ã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚: {0} -parent-article=親記事 -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=スラッシュã‹ã‚‰å§‹ã¾ã‚‹ã€è‹±æ•°å­—ã€ãƒ€ãƒƒã‚·ãƒ¥ã‚‚ã—ãã¯ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã§è¡¨è¨˜ã•れãŸãƒ•レンドリーURLを入力ã—ã¦ãã ã•ã„ -please-enter-a-priority-that-is-greater-than-x={0}より大ãã„優先度を入力ã—ã¦ãã ã•ã„ -please-enter-a-valid-folder-name=有効ãªãƒ•ォルダåを入力ã—ã¦ãã ã•ã„ -please-enter-a-valid-source-url=æœ‰åŠ¹ãªæƒ…報元URLを入力ã—ã¦ãã ã•ã„ -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=ãƒãƒ¼ãƒˆãƒ¬ãƒƒãƒˆã‚’有効ã«ã™ã‚‹ãŸã‚ã«{0}プロパティã¸ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã§å…¥åŠ›ã—ã¦ãã ã•ã„。 -please-select-at-least-one-section=å°‘ãªãã¨ã‚‚1ã¤ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’é¸ã‚“ã§ãã ã•ã„ -portlet-configuration-page-x-instance-id-x=ãƒãƒ¼ãƒˆãƒ¬ãƒƒãƒˆè¨­å®š (ページ - {0}ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ID - {1}) -prioritization-strategy=優先順ä½ä»˜ã‘戦略 (Automatic Translation) -recent-articles=最近ã®è¨˜äº‹ -resolve=解決 -saved-attachments=ä¿å­˜æ¸ˆã¿æ·»ä»˜ãƒ•ァイル -search-articles=è¨˜äº‹ã®æ¤œç´¢ -sections=セクション -select-parent=è¦ªã‚’é¸æŠž -show-asset-entries=アセットエントリã®è¡¨ç¤º -show-author-column=作者ã®è¡¨ç¤º -show-create-date-column=ä½œæˆæ—¥ã®è¡¨ç¤º -show-modified-date-column=変更日ã®è¡¨ç¤º -show-pagination=ページã®è¡¨ç¤º -show-priority-column=優先度ã®è¡¨ç¤º -show-ratings=レーティングã®è¡¨ç¤º -show-sections-title=セクションタイトルã®è¡¨ç¤º -show-status-column=ステータスã®è¡¨ç¤º -show-suggestions=ææ¡ˆã‚’表示 -show-views-column=ビューã®è¡¨ç¤º -source-url=情報元URL -suggestion-deleted-successfully=ææ¡ˆãŒå‰Šé™¤ã•れã¾ã—㟠-suggestion-in-progress-email=æ¤œè¨Žä¸­ã®ææ¡ˆã®é€šçŸ¥ãƒ¡ãƒ¼ãƒ« -suggestion-received-email=ææ¡ˆå—付済ã¿é€šçŸ¥ãƒ¡ãƒ¼ãƒ« -suggestion-resolved-email=ææ¡ˆè§£æ±ºæ¸ˆã¿é€šçŸ¥ãƒ¡ãƒ¼ãƒ« -suggestion-saved-successfully=ææ¡ˆãŒä¿å­˜ã•れã¾ã—㟠-suggestion-status-updated-successfully=フィードãƒãƒƒã‚¯ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãŒæ­£ã—ãæ›´æ–°ã•れã¾ã—㟠-templates=テンプレート -the-article-attachments-file-names=è¨˜äº‹ã«æ·»ä»˜ã•れãŸãƒ•ァイルå -the-article-content=記事内容 -the-article-content-diff=記事内容ã®å·®ç•° -the-article-could-not-be-found=記事ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 -the-article-title=記事タイトル -the-article-title-diff=記事タイトルã®å·®ç•° -the-article-url=記事URL -the-article-version=記事ãƒãƒ¼ã‚¸ãƒ§ãƒ³ -the-comment-content=コメントã®å†…容 (Automatic Translation) -the-comment-could-not-be-found=コメントãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 -the-comment-create-date=コメントã®ä½œæˆæ—¥ (Automatic Translation) -the-company-id-associated-with-the-article=記事ã¨é–¢é€£ã™ã‚‹ã‚«ãƒ³ãƒ‘ニーID -the-company-mx-associated-with-the-article=記事ã«é–¢é€£ã™ã‚‹ã‚«ãƒ³ãƒ‘ニーMX -the-company-name-associated-with-the-article=記事ã«é–¢é€£ã™ã‚‹ã‚«ãƒ³ãƒ‘ニーå -the-email-address-of-the-user-who-added-the-article=記事を追加ã—ãŸãƒ¦ãƒ¼ã‚¶ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ -the-selected-article-no-longer-exists=é¸æŠžã•れãŸè¨˜äº‹ã¯å­˜åœ¨ã—ã¾ã›ã‚“。 -the-site-name-associated-with-the-article=記事ã«é–¢é€£ã™ã‚‹ã‚µã‚¤ãƒˆå -the-subscription-could-not-be-found=サブスクリプションãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 -the-user-did-not-like-the-article=ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ°—ã«å…¥ã‚‰ãªã‹ã£ãŸè¨˜äº‹ -the-user-liked-the-article=ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ°—ã«å…¥ã£ãŸè¨˜äº‹ -the-user-who-added-the-article=記事を追加ã—ãŸãƒ¦ãƒ¼ã‚¶ -there-are-no-articles=記事ãŒã‚りã¾ã›ã‚“ -there-are-no-articles-with-tag-x=ã‚¿ã‚°{0}ã®è¨˜äº‹ãŒã‚りã¾ã›ã‚“。 -there-are-no-articles-with-x-x={0} {1} ã®è¨˜äº‹ãŒã‚りã¾ã›ã‚“。 -there-are-no-articles-with-x-x-and-tag-x={0} {1} ã¨ã‚¿ã‚°{2}ã®è¨˜äº‹ãŒã‚りã¾ã›ã‚“。 -there-are-no-attachments=添付ãŒã‚りã¾ã›ã‚“。 -there-are-no-child-articles-for-x={0}ã®å­è¨˜äº‹ãŒã‚りã¾ã›ã‚“。 -there-are-x-suggestions={0}å€‹ã®ææ¡ˆãŒã‚りã¾ã™ -there-is-one-suggestion=ææ¡ˆãŒã‚りã¾ã›ã‚“ -upload-your-zip-file=ZIP ファイルをアップロードã—ã¾ã™ã€‚ (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=レーティングã™ã‚‹ã®ã«æ˜Ÿã‚’ã¤ã‘ã¦ãã ã•ã„ -use-this-template=ã“ã®ãƒ†ãƒ³ãƒ—レートを使ㆠ-use-thumbs-up-thumbs-down=ã„ã„ã­/å½¹ã«ãŸãŸãªã‹ã£ãŸãƒœã‚¿ãƒ³ã‚’使ã£ã¦ãã ã•ã„ -view-articles-with-tag-x=ã‚¿ã‚°{0}ã®è¨˜äº‹ã‚’å‚ç…§ã—ã¾ã™ -view-articles-with-x-x={0} {1}ã®è¨˜äº‹ã‚’å‚ç…§ã—ã¾ã™ã€‚ -view-articles-with-x-x-and-tag-x={0} {1} ã¨ã‚¿ã‚°{2}ã®è¨˜äº‹ã‚’å‚ç…§ã—ã¾ã™ã€‚ -was-this-information-helpful=ã“ã®æƒ…å ±ã¯å½¹ã«ç«‹ã¡ã¾ã—ãŸã‹ï¼Ÿ -what-did-you-like-the-most-what-would-you-improve=å½¹ã«ç«‹ã¡ã¾ã—ãŸã‹ï¼Ÿçµæžœã®å‘上ã«å”力ã„ãŸã ã‘ã¾ã™ã‹ï¼Ÿ -x-pending={0}å€‹ãŒæ¤œè¨Žä¸­ -you-sent-one-suggestion-for-this-article=ã“ã®è¨˜äº‹ã«å¯¾ã—ã¦ã€ææ¡ˆã‚’é€ä¿¡ã—ã¾ã—ãŸã€‚ -you-sent-x-suggestions-for-this-article=ã“ã®è¨˜äº‹ã«å¯¾ã—ã¦{0}å€‹ã®ææ¡ˆã‚’é€ä¿¡ã—ã¾ã—㟠\ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ko.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ko.properties deleted file mode 100644 index 09d2299fdd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ko.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=í´ë” 추가 (Automatic Translation) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=í´ë” ì´ë™ (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=문서 추가 (Automatic Translation) -add-child-article=하위 문서 추가 (Automatic Translation) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=문서 파ì¼ì˜ ìˆ«ìž ì ‘ë‘사 우선순위 ì ìš© ë©ë‹ˆë‹¤. (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=ZIP 파ì¼ì—서 모든 기사 가능 하다 ë©´ ê·¸ë“¤ì˜ íŒŒì¼ì˜ íŒŒì¼ ê²½ë¡œ, ìˆ«ìž ì ‘ë‘ì‚¬ì— ë”°ë¼ ìš°ì„  순위를 할당 ë©ë‹ˆë‹¤. ê° ì†Œê°œ 문서는 ZIP 파ì¼ì— ì†í•œ í´ë” ì´ë¦„ì˜ ìˆ«ìž ì ‘ë‘ì‚¬ì— ë”°ë¼ ìš°ì„  순위를 할당 ë©ë‹ˆë‹¤. ê° í•˜ìœ„ 문서는 ZIP 파ì¼ì—서 ê·¸ê²ƒì˜ íŒŒì¼ì˜ ìˆ«ìž ì ‘ë‘ì‚¬ì— ë”°ë¼ ìš°ì„  순위를 할당 ë©ë‹ˆë‹¤. ìš°ì„  순위 ìˆ«ìž ì ‘ë‘사가 다른 ìš°ì„  순위를 대체합니다. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=ë‹¹ì‹ ì€ ì„ íƒ ëœ ê¸°ì‚¬ë¥¼ ì‚­ì œ 하 시겠습니까? (Automatic Translation) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=기사 전시 ìž‘í’ (Automatic Translation) -article-or-folder=문서 ë˜ëŠ” í´ë” (Automatic Translation) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=기본 문서 (Automatic Translation) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=코멘트 (Automatic Translation) -content-root-prefix=콘í…츠 루트 ì ‘ë‘사 (Automatic Translation) -did-you-like-this-article=ì´ ê¸°ì‚¬ ë´¤ ì–´? (Automatic Translation) -do-you-have-any-suggestions=ë‹¹ì‹ ì€ ì–´ë–¤ ë°©ë²•ì´ ìžˆë‚˜ìš”? (Automatic Translation) -edit-on-github=GitHubì— íŽ¸ì§‘ (Automatic Translation) -enable-description=Enable Description (Automatic Copy) -enable-history=기ë¡ì„ 사용 하ë„ë¡ ì„¤ì • (Automatic Translation) -enable-subscriptions=êµ¬ë… í™œì„±í™” (Automatic Translation) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=보기 횟수 ì¦ê°€ 사용 하ë„ë¡ ì„¤ì • (Automatic Translation) -help-us-improve-it=ê·¸ê²ƒì„ ê°œì„  하는 ë° ë„움ì´. (Automatic Translation) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=기술 ìžë£Œ (Automatic Translation) -javax.portlet.title.2_WAR_knowledgebaseportlet=기술 ìžë£Œ ë””ìŠ¤í”Œë ˆì´ (Automatic Translation) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=ì§€ì‹ ê¸°ì¤€ ë‹¨ë©´ë„ (Automatic Translation) -javax.portlet.title.5_WAR_knowledgebaseportlet=ì§€ì‹ ê¸°ì¤€ 수색 (Automatic Translation) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=기술 ìžë£Œ (Automatic Translation) -model.resource.com.liferay.knowledgebase.display=기술 ìžë£Œ ë””ìŠ¤í”Œë ˆì´ (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=기술 ìžë£Œ í´ë” (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=대중 (Automatic Translation) -most-recent=최근 (Automatic Translation) -move-to-in-progress=ì§„í–‰ ì¤‘ì¸ ì´ë™ (Automatic Translation) -move-to-new=새로운 ì´ë™ (Automatic Translation) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=슬래쉬로 시작 하 ì—¬ ì˜ìˆ«ìž 문ìž, 대시 ë° ë°‘ì¤„ í¬í•¨ 친화ì ì¸ URLì„ ìž…ë ¥ í•´ 주시기 ë°”ëžë‹ˆë‹¤. (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=올바른 í´ë” ì´ë¦„ì„ ìž…ë ¥ 하십시오. (Automatic Translation) -please-enter-a-valid-source-url=유효한 소스 URLì„ ìž…ë ¥ í•´ 주시기 ë°”ëžë‹ˆë‹¤. (Automatic Translation) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=ì ì–´ë„ 1ê°œì˜ ë‹¨ë©´ë„를 선정하십시오. (Automatic Translation) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=ìš°ì„  ì „ëžµ (Automatic Translation) -recent-articles=Recent Articles (Automatic Copy) -resolve=í•´ê²° (Automatic Translation) -saved-attachments=저장 ëœ ì²¨ë¶€ íŒŒì¼ (Automatic Translation) -search-articles=Search Articles (Automatic Copy) -sections=ë‹¨ë©´ë„ (Automatic Translation) -select-parent=부모 ì„ íƒ (Automatic Translation) -show-asset-entries=쇼 ìžì‚° 입장 (Automatic Translation) -show-author-column=쇼 ì €ìž ëž€ (Automatic Translation) -show-create-date-column=쇼는 ë‚ ì§œ ëž€ì„ ì°½ì¡°í•œë‹¤ (Automatic Translation) -show-modified-date-column=쇼는 ë‚ ì§œ ëž€ì„ ë³€ê²½í–ˆë‹¤ (Automatic Translation) -show-pagination=쇼 쪽매김 (Automatic Translation) -show-priority-column=쇼 ìš°ì„ ê¶Œ 란 (Automatic Translation) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=쇼는 ì œëª©ì„ êµ¬ë¶„í•œë‹¤ (Automatic Translation) -show-status-column=쇼 ìƒíƒœ 란 (Automatic Translation) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=쇼는 ëž€ì„ ì „ë§í•œë‹¤ (Automatic Translation) -source-url=ì›ë³¸ URL (Automatic Translation) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=ì„œì‹ íŒŒì¼ (Automatic Translation) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=코멘트 ë‚´ìš© (Automatic Translation) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=코멘트 작성 ë‚ ì§œ (Automatic Translation) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=선정한 기사는 ë” ì´ìƒ 존재하지 않는다. (Automatic Translation) -the-site-name-associated-with-the-article=위치 ì´ë¦„ì€ ê¸°ì‚¬ì™€ 관련시켰다 (Automatic Translation) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=사용ìžëŠ” 기사를 좋아하지 않았다. (Automatic Translation) -the-user-liked-the-article=사용ìžëŠ” 기사를 좋아 했습니다. (Automatic Translation) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=아니 기사 있습니다. (Automatic Translation) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=한 가지 제안ì´ìž…니다. (Automatic Translation) -upload-your-zip-file=ZIP 파ì¼ì„ 업로드 (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=별 ë“±ê¸‰ì„ ì‚¬ìš© 하 ì—¬ (Automatic Translation) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=사용 ì—„ì§€ì†ê°€ë½/아래 ì—„ì§€ì†ê°€ë½ (Automatic Translation) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=ë‹¹ì‹ ì€ ê°€ìž¥ ë¬´ì—‡ì„ ì¢‹ì•„ 했습니까? ë‹¹ì‹ ì€ ì–´ë–¤ 개선 하는 것? (Automatic Translation) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=당신ì´ì´ ê¸°ì‚¬ì— ëŒ€ 한 한 가지 ì œì•ˆì„ ë³´ëƒˆìŠµë‹ˆë‹¤. (Automatic Translation) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lo.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lo.properties deleted file mode 100644 index 153ffa9a61..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lo.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base Template (Automatic Copy) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lt.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lt.properties deleted file mode 100644 index 153ffa9a61..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lt.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base Template (Automatic Copy) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nb.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nb.properties deleted file mode 100644 index ce77260a53..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nb.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Legg til artikkel -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Legg til mal -action.ADMINISTRATOR=Administrator -action.DELETE_KB_ARTICLES=Slett artikler -action.DELETE_KB_TEMPLATES=Slett maler -action.MOVE_KB_ARTICLE=Flytt artikler -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Oppdater artikkelprioriteter -action.VIEW_KB_TEMPLATES=Vis maler -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Legg til artikkel -add-child-article=Legg til en underordnet artikkel -all-comments-x=Alle kommentarer ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Artikkel la til e-post -article-display-style=Artikkelvisningstil -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Artikkel oppdatert e-post -article-window-state=Artikkelvindumodus -articles=Artikler -articles-with-tag-x=Artikkel med tagg {0}. -articles-with-x-x=Artikler med {0} {1}. -articles-with-x-x-and-tag-x=Artikler med {0} {1} og tagg {2}. -basic-article=Basic Article (Automatic Copy) -between=Mellom -child-articles-display-style=Underordnet artikkelvisningstil -child-articles-for-x=Underordnede artikler for {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Aktiver beskrivelse -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Kunnskapsbasen tilbyr mulighet for Ã¥ samle, organisere og ta frem innhold vedrørende produktdokumentasjon og support. Administratorer kan tilby brukere med tilgang til maler Ã¥ legge til rette for kunnskapsbaseartikler. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Kunnskapsbaseartikkel -javax.portlet.title.4_WAR_knowledgebaseportlet=Kunnskapsbaseseksjon -javax.portlet.title.5_WAR_knowledgebaseportlet=Kunnskapsbasesøk -kb-articles-kb-templates-and-kb-comments=Artikler, maler og kommentarer -knowledge-base-home=Kunnskapsbaseforside -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Kunnskapsbaseartikkel -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Kunnskapsbasemal -most-popular=Mest populære -most-recent=Siste -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Ny artikkel -no-articles-were-found=Ingen artikler ble funnet. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Ingen abonnement ble funnet. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Overordnet artikkel -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Vennligst angi en prioritet høyere enn {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Vennligst angi en kommaseparert liste med ord for portletinnstillingen {0} for Ã¥ aktivere dette portletet. -please-select-at-least-one-section=Vennligst velg minst en seksjon. -portlet-configuration-page-x-instance-id-x=Portletkonfigurasjon (Side - {0}, Instans-ID - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Nylige artikler -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Søk artikler -sections=Seksjoner -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Vis ressursinnlegg -show-author-column=Vis forfatterkolonne -show-create-date-column=Vis opprettetdatokolonne -show-modified-date-column=Vis modifisertdatokolonne -show-pagination=Vis paginering -show-priority-column=Vis prioritetkolonne -show-ratings=Vis rangeringer -show-sections-title=Vis seksjonstittel -show-status-column=Vis statuskolonne -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Vis antallvisingkolonne -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Artikkelens vedleggfilnavn -the-article-content=Artikkelinnholdet -the-article-content-diff=Artikkelens innholdsdifferanse -the-article-could-not-be-found=Artikkelen ble ikke funnet. -the-article-title=Artikkeltittelen -the-article-title-diff=Artikkeltitteldifferansen -the-article-url=Artikkel-URL-en -the-article-version=Artikkelversjonen -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Kommentaren ble ikke funnet. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=Firma-ID-en assosiert med artikkelen -the-company-mx-associated-with-the-article=Firma-MX assosiert med artikkelen -the-company-name-associated-with-the-article=Firmanavnet assosiert med artikkelen -the-email-address-of-the-user-who-added-the-article=Epostadressen til brukeren som la til artikkelen -the-selected-article-no-longer-exists=Den valgte artikkelen eksisterer ikke lenger. -the-site-name-associated-with-the-article=Nettstedsnavnet assosiert med artikkelen -the-subscription-could-not-be-found=Abonnementet ble ikke funnet. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Brukeren som la til artikkelen -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Det finnes ingen artikler med taggen {0}. -there-are-no-articles-with-x-x=Det finnes ingen artikler med {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Det finnes ingen artikler med {0} {1} og tagg {2}. -there-are-no-attachments=Det finnes ingen vedlegg. -there-are-no-child-articles-for-x=Det finnes ingen underordnede artikler under {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Bruk denne malen -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=Vis artikler med tagg {0}. -view-articles-with-x-x=Vis artikler med {0} {1}. -view-articles-with-x-x-and-tag-x=Vis artikler med {0} {1} og tagg {2}. -was-this-information-helpful=Var denne informasjonen til hjelp? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl.properties deleted file mode 100644 index 970826caf1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Artikel toevoegen -action.ADD_KB_FOLDER=Map toevoegen (Automatic Translation) -action.ADD_KB_TEMPLATE=Sjabloon toevoegen -action.ADMINISTRATOR=Beheerder -action.DELETE_KB_ARTICLES=Artikelen verwijderen -action.DELETE_KB_TEMPLATES=Sjablonen verwijderen -action.MOVE_KB_ARTICLE=Artikel verplaatsen -action.MOVE_KB_FOLDER=Map verplaatsen (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Artikelprioriteiten bijwerken -action.VIEW_KB_TEMPLATES=Templates bekijken -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Artikel toevoegen -add-child-article=Onderliggend artikel toevoegen -all-comments-x=Alle reacties ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Numerieke voorvoegsels van artikel bestanden toepassen als prioriteiten. (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=Alle artikelen in het ZIP-bestand worden toegewezen prioriteiten volgens de numerieke voorvoegsels van hun bestanden of bestandspaden, indien mogelijk. Elk artikel Inleiding is een prioriteit op basis van de numerieke voorvoegsel van de naam van de map waartoe het behoort in het ZIP-bestand. Elk kind-artikel is toegewezen een prioriteit op basis van de numerieke voorvoegsel van de bestandsnaam in het ZIP-bestand. Prioritering door numerieke voorvoegsel heeft voorrang boven alle andere prioriteiten. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=Weet u zeker dat u wilt verwijderen van de geselecteerde artikelen? (Automatic Translation) -article-added-email=E-mail: 'Artikel toegevoegd' -article-display-style=Weergavestijl voor artikel -article-or-folder=Artikel of map (Automatic Translation) -article-updated-email=E-mail: 'Artikel bijgewerkt' -article-window-state=Status van artikelvenster -articles=Artikelen -articles-with-tag-x=Artikelen met label {0}. -articles-with-x-x=Artikelen met {0} {1}. -articles-with-x-x-and-tag-x=Artikelen met {0} {1} en label {2}. -basic-article=Artikel basale (Automatic Translation) -between=Tussen -child-articles-display-style=Weergavestijl van onderliggend artikel -child-articles-for-x=Onderliggende artikelen voor {0}. -comments=Opmerkingen (Automatic Translation) -content-root-prefix=Inhoud Root voorvoegsel (Automatic Translation) -did-you-like-this-article=Heeft u net als dit artikel? (Automatic Translation) -do-you-have-any-suggestions=Hebt u suggesties? (Automatic Translation) -edit-on-github=Bewerken op GitHub (Automatic Translation) -enable-description=Beschrijving inschakelen -enable-history=Inschakelen van geschiedenis (Automatic Translation) -enable-subscriptions=Abonnementen inschakelen (Automatic Translation) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=View Count Increment inschakelen (Automatic Translation) -help-us-improve-it=Help ons te verbeteren. (Automatic Translation) -javax.portlet.description.1_WAR_knowledgebaseportlet=Met de kennisbank kunt u kennis verzamelen, organiseren en inzichtelijk maken. Een beheerder kan gebruikers toegang geven tot sjablonen om kennisbankartikelen te maken. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Translation) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Translation) -javax.portlet.title.3_WAR_knowledgebaseportlet=Artikel in kennisbank -javax.portlet.title.4_WAR_knowledgebaseportlet=Sectie in kennisbank -javax.portlet.title.5_WAR_knowledgebaseportlet=Zoeken in kennisbank -kb-articles-kb-templates-and-kb-comments=Artikelen, sjablonen en reacties -knowledge-base-home=Kennisbank Home -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Translation) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBArticle=Artikel in kennisbank -model.resource.com.liferay.knowledgebase.model.KBFolder=Map Kennisbank (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Sjabloon in kennisbank -most-popular=Populair -most-recent=Meest recente -move-to-in-progress=Verhuizen naar in vooruitgang (Automatic Translation) -move-to-new=Verplaatsen naar nieuwe (Automatic Translation) -new-article=Nieuw artikel -no-articles-were-found=Er zijn geen artikelen gevonden. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Er zijn geen inschrijvingen gevonden. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Bovenliggend artikel -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Voer een vriendelijke URL die begint met een slash en bevat alfanumerieke tekens, streepjes en onderstrepingstekens. (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Geef een prioriteit op die hoger is dan {0}. -please-enter-a-valid-folder-name=Voer de naam van een geldige map. (Automatic Translation) -please-enter-a-valid-source-url=Voer een geldige bron URL. (Automatic Translation) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Geef een kommagescheiden lijst op voor portleteigenschap {0} om deze portlet te activeren. -please-select-at-least-one-section=Selecteer minstens één sectie. -portlet-configuration-page-x-instance-id-x=Portletconfiguratie (pagina - {0}, instantie-ID - {1}) -prioritization-strategy=Prioritering strategie (Automatic Translation) -recent-articles=Recente artikelen -resolve=Oplossen (Automatic Translation) -saved-attachments=Opgeslagen bijlagen (Automatic Translation) -search-articles=Artikelen zoeken -sections=Secties -select-parent=Selecteer bovenliggende (Automatic Translation) -show-asset-entries=Content tonen -show-author-column=Auteurkolom tonen -show-create-date-column=Aanmaakdatumkolom tonen -show-modified-date-column=Wijzigingsdatumkolom tonen -show-pagination=Paginering tonen -show-priority-column=Prioriteitkolom tonen -show-ratings=Waarderingen tonen -show-sections-title=Sectietitel tonen -show-status-column=Statuskolom tonen -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Weergavenkolom tonen -source-url=Bron-URL (Automatic Translation) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Sjablonen (Automatic Translation) -the-article-attachments-file-names=De namen van bijlagen van het artikel -the-article-content=De inhoud van het artikel -the-article-content-diff=De inhoudsverschillen tussen de artikelen. -the-article-could-not-be-found=Het artikel kon niet worden gevonden. -the-article-title=Artikeltitel -the-article-title-diff=De verschillen tussen de artikeltitels -the-article-url=Artikel-URL -the-article-version=Artikelversie -the-comment-content=De inhoud van de commentaar (Automatic Translation) -the-comment-could-not-be-found=De reactie kon niet worden gevonden. -the-comment-create-date=De opmerking aanmaakdatum (Automatic Translation) -the-company-id-associated-with-the-article=De bedrijfs-ID die is gekoppeld aan het artikel -the-company-mx-associated-with-the-article=De bedrijfs-MX die is gekoppeld aan het artikel -the-company-name-associated-with-the-article=De bedrijfsnaam die is gekoppeld aan het artikel -the-email-address-of-the-user-who-added-the-article=Het e-mailadres van de gebruiker die het artikel heeft toegevoegd -the-selected-article-no-longer-exists=Het geselecteerde artikel bestaat niet meer. -the-site-name-associated-with-the-article=De sitenaam die is gekoppeld aan het artikel -the-subscription-could-not-be-found=Het inschrijving kon niet worden gevonden. -the-user-did-not-like-the-article=De gebruiker hield niet van het artikel. (Automatic Translation) -the-user-liked-the-article=De gebruiker vond het artikel. (Automatic Translation) -the-user-who-added-the-article=De gebruiker die het artikel heeft toegevoegd -there-are-no-articles=Er zijn geen artikelen. (Automatic Translation) -there-are-no-articles-with-tag-x=Er zijn geen artikelen met label {0}. -there-are-no-articles-with-x-x=Er zijn geen artikelen met {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Er zijn geen artikelen met {0} {1} en het label {2}. -there-are-no-attachments=Er zijn geen bijlagen. -there-are-no-child-articles-for-x=Er zijn geen onderliggende artikelen voor {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=Er is één suggestie. (Automatic Translation) -upload-your-zip-file=Upload uw ZIP-bestand (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Sterclassificaties gebruiken (Automatic Translation) -use-this-template=Deze sjabloon gebruiken -use-thumbs-up-thumbs-down=Gebruik duimen omhoog / duim omlaag (Automatic Translation) -view-articles-with-tag-x=Artikelen met het label {0} bekijken. -view-articles-with-x-x=Artikelen met {0} {1} bekijken. -view-articles-with-x-x-and-tag-x=Artikelen met {0} {1} en label {2} bekijken. -was-this-information-helpful=Was deze informatie nuttig? -what-did-you-like-the-most-what-would-you-improve=Wat beviel u het meest? Wat zou u verbeteren? (Automatic Translation) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=Stuurde u een suggestie voor dit artikel. (Automatic Translation) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl_BE.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl_BE.properties deleted file mode 100644 index 5bba914bdf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl_BE.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Map toevoegen (Automatic Translation) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Map verplaatsen (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Numerieke voorvoegsels van artikel bestanden toepassen als prioriteiten. (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=Alle artikelen in het ZIP-bestand worden toegewezen prioriteiten volgens de numerieke voorvoegsels van hun bestanden of bestandspaden, indien mogelijk. Elk artikel Inleiding is een prioriteit op basis van de numerieke voorvoegsel van de naam van de map waartoe het behoort in het ZIP-bestand. Elk kind-artikel is toegewezen een prioriteit op basis van de numerieke voorvoegsel van de bestandsnaam in het ZIP-bestand. Prioritering door numerieke voorvoegsel heeft voorrang boven alle andere prioriteiten. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=Weet u zeker dat u wilt verwijderen van de geselecteerde artikelen? (Automatic Translation) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Artikel of map (Automatic Translation) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Artikel basale (Automatic Translation) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Opmerkingen (Automatic Translation) -content-root-prefix=Inhoud Root voorvoegsel (Automatic Translation) -did-you-like-this-article=Heeft u net als dit artikel? (Automatic Translation) -do-you-have-any-suggestions=Hebt u suggesties? (Automatic Translation) -edit-on-github=Bewerken op GitHub (Automatic Translation) -enable-description=Enable Description (Automatic Copy) -enable-history=Inschakelen van geschiedenis (Automatic Translation) -enable-subscriptions=Abonnementen inschakelen (Automatic Translation) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=View Count Increment inschakelen (Automatic Translation) -help-us-improve-it=Help ons te verbeteren. (Automatic Translation) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Translation) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Translation) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Translation) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Map Kennisbank (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base Template (Automatic Copy) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Verhuizen naar in vooruitgang (Automatic Translation) -move-to-new=Verplaatsen naar nieuwe (Automatic Translation) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Voer een vriendelijke URL die begint met een slash en bevat alfanumerieke tekens, streepjes en onderstrepingstekens. (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Voer de naam van een geldige map. (Automatic Translation) -please-enter-a-valid-source-url=Voer een geldige bron URL. (Automatic Translation) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritering strategie (Automatic Translation) -recent-articles=Recent Articles (Automatic Copy) -resolve=Oplossen (Automatic Translation) -saved-attachments=Opgeslagen bijlagen (Automatic Translation) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Selecteer bovenliggende (Automatic Translation) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Bron-URL (Automatic Translation) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Sjablonen (Automatic Translation) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=De inhoud van de commentaar (Automatic Translation) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=De opmerking aanmaakdatum (Automatic Translation) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=Het geselecteerde artikel bestaat niet meer. (Automatic Translation) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=De gebruiker hield niet van het artikel. (Automatic Translation) -the-user-liked-the-article=De gebruiker vond het artikel. (Automatic Translation) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=Er zijn geen artikelen. (Automatic Translation) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=Er is één suggestie. (Automatic Translation) -upload-your-zip-file=Upload uw ZIP-bestand (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Sterclassificaties gebruiken (Automatic Translation) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Gebruik duimen omhoog / duim omlaag (Automatic Translation) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=Wat beviel u het meest? Wat zou u verbeteren? (Automatic Translation) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=Stuurde u een suggestie voor dit artikel. (Automatic Translation) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pl.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pl.properties deleted file mode 100644 index 0dd8faad45..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pl.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Dodaj artykuÅ‚ -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Dodaj szablon -action.ADMINISTRATOR=Administrator -action.DELETE_KB_ARTICLES=UsuÅ„ artykuÅ‚y -action.DELETE_KB_TEMPLATES=UsuÅ„ szablony -action.MOVE_KB_ARTICLE=PrzenieÅ› artykuÅ‚ -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Aktualizuj priorytet artykuÅ‚u -action.VIEW_KB_TEMPLATES=PodglÄ…d szablonów -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Dodaj artykuÅ‚ -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Powiadomienie email o dodaniu artykuÅ‚u -article-display-style=Styl wyÅ›wietlania artykuÅ‚u -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Powiadomienie email o aktualizacji artykuÅ‚u -article-window-state=Okno stanu artykuÅ‚u -articles=ArtykuÅ‚y -articles-with-tag-x=ArtykuÅ‚y oznaczone tagiem {0}. -articles-with-x-x=ArtykuÅ‚y z {0} {1}. -articles-with-x-x-and-tag-x=ArtykuÅ‚y oznaczone tagiem {0} {1} i tagiem {2}. -basic-article=Basic Article (Automatic Copy) -between=MiÄ™dzy -child-articles-display-style=Styl wyÅ›wietlania artykułów podrzÄ™dnych -child-articles-for-x=ArtykuÅ‚y podrzÄ™dne dla {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Włącz opis -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Baza wiedzy dostarcza Å›rodków do zbierania, organizowania i pobierania treÅ›ci dotyczÄ…cych dokumentacji produktów i wsparcia. Administratorzy mogÄ… dawać użytkownikom dostÄ™p do szablonów aby umożliwić im tworzenie artykułów z bazy wiedzy. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=ArtykuÅ‚ Bazy wiedzy -javax.portlet.title.4_WAR_knowledgebaseportlet=Sekcja bazy wiedzy -javax.portlet.title.5_WAR_knowledgebaseportlet=Przeszukiwanie bazy wiedzy -kb-articles-kb-templates-and-kb-comments=ArtykuÅ‚y, szablony i komentarze -knowledge-base-home=Strona główna bazy wiedzy -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=ArtykuÅ‚ bazy wiedzy -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Szablon bazy wiedzy -most-popular=Najpopularniejsze -most-recent=Najnowsze -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Nowy artykuÅ‚ -no-articles-were-found=Nie znaleziono artykułów. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Nie znaleziono subskrypcji. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=ArtykuÅ‚ nadrzÄ™dny -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Wprowadź priorytet wiÄ™kszy niż {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Wprowadź listÄ™ słów oddzielonych przecinkami do wÅ‚aÅ›ciwoÅ›ci portletu {0} aby włączyć ten portlet. -please-select-at-least-one-section=Wprowadź przynajmniej jednÄ… sekcjÄ™. -portlet-configuration-page-x-instance-id-x=Konfiguracja portletu (strona - {0}, ID instancji - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Najnowsze artykuÅ‚y -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Przeszukaj artykuÅ‚y -sections=Sekcje -select-parent=Select Parent (Automatic Copy) -show-asset-entries=WyÅ›wietl treÅ›ci -show-author-column=Pokaż kolumnÄ™ Autor -show-create-date-column=Pokaż kolumnÄ™ Data utworzenia -show-modified-date-column=Pokaż kolumnÄ™ Data modyfikacji -show-pagination=Pokaż stronicowanie -show-priority-column=Pokaż kolumnÄ™ Priorytet -show-ratings=Pokaż ratingi -show-sections-title=Pokaż tytuÅ‚y sekcji -show-status-column=Pokaż kolumnÄ™ Status -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Pokaż kolumnÄ™ Obejrzano -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Nazwy plików załączników artykuÅ‚u. -the-article-content=Zawartość artykuÅ‚u -the-article-content-diff=Lista różnic zawartoÅ›ci artykuÅ‚u -the-article-could-not-be-found=Nie znaleziono artykuÅ‚u. -the-article-title=TytuÅ‚ artykuÅ‚u -the-article-title-diff=Lista różnic tytuÅ‚u artykuÅ‚u -the-article-url=URL artykuÅ‚u -the-article-version=Wersja artykuÅ‚u -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Nie znaleziono komentarza. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=ID firmy skojarzone z artykuÅ‚em -the-company-mx-associated-with-the-article=MX firmy skojarzone z artykuÅ‚em -the-company-name-associated-with-the-article=Nazwa firmy skojarzona z artykuÅ‚em -the-email-address-of-the-user-who-added-the-article=Adres email użytkownika który dodaÅ‚ artykuÅ‚ -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=Nazwa witryny skojarzonej z artykuÅ‚em -the-subscription-could-not-be-found=Nie znaleziono subskrypcji. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Użytkownik który dodaÅ‚ artykuÅ‚ -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Nie ma artykułów oznaczonych tagiem {0}. -there-are-no-articles-with-x-x=Nie ma artykułów oznaczonych tagiem {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Nie ma artykułów oznaczonych tagiem {0} {1} i tagiem {2}. -there-are-no-attachments=Brak załączników. -there-are-no-child-articles-for-x=Brak artykułów podrzÄ™dnych dla {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Użyj tego szablonu. -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=PrzeglÄ…daj artykuÅ‚y oznaczone tagiem {0}. -view-articles-with-x-x=PrzeglÄ…daj artykuÅ‚y oznaczone tagiem {0} {1} . -view-articles-with-x-x-and-tag-x=PrzeglÄ…daj artykuÅ‚y oznaczone tagiem {0} {1} i tagiem {2}. -was-this-information-helpful=Czy te informacje okazaÅ‚y siÄ™ pomocne? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_BR.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_BR.properties deleted file mode 100644 index ccd8f125e3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_BR.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Adicionar artigo -action.ADD_KB_FOLDER=Adicionar pasta (Automatic Translation) -action.ADD_KB_TEMPLATE=Adicionar template -action.ADMINISTRATOR=Administrador -action.DELETE_KB_ARTICLES=Deletar artigos -action.DELETE_KB_TEMPLATES=Deletar templates -action.MOVE_KB_ARTICLE=Mover artigo -action.MOVE_KB_FOLDER=Mover pasta (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Atualizar prioridades de artigos -action.VIEW_KB_TEMPLATES=Visualizar templates -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Adicionar artigo -add-child-article=Adicionar um artigo filho -all-comments-x=Todos os comentários ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Aplica prefixos numéricos de artigo arquivos como prioridades. (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=Todos os artigos no arquivo ZIP são atribuídos prioridades de acordo com os prefixos numéricos de seus arquivos ou caminhos de arquivo, se possível. Cada artigo de introdução é atribuído uma prioridade com base no prefixo numérico do nome da pasta à qual ele pertence no arquivo ZIP. Cada artigo de criança é atribuído uma prioridade com base no prefixo numérico de seu nome de arquivo no arquivo ZIP. Priorização pelo prefixo numérico substitui todos os outra priorização. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=Tem certeza que deseja excluir os artigos selecionados? (Automatic Translation) -article-added-email=E-mail adicionado ao artigo -article-display-style=Estilo de exibição do artigo -article-or-folder=Artigo ou pasta (Automatic Translation) -article-updated-email=E-mail de artigo atualizado -article-window-state=Estado da Janela do artigo -articles=Artigos -articles-with-tag-x=Artigos com a tag {0}. -articles-with-x-x=Artigos com {0} {1}. -articles-with-x-x-and-tag-x=Artigos com as tags {0} {1} {2}. -basic-article=Artigo básico (Automatic Translation) -between=Entre -child-articles-display-style=Estilo de exibição dos artigos filhos -child-articles-for-x=Artigos folhos para {0}. -comments=Comentários (Automatic Translation) -content-root-prefix=Prefixo de conteúdo raiz (Automatic Translation) -did-you-like-this-article=Você gostou deste artigo? (Automatic Translation) -do-you-have-any-suggestions=Você tem alguma sugestão? (Automatic Translation) -edit-on-github=Editar no GitHub (Automatic Translation) -enable-description=Habilitar descrição -enable-history=Habilitar a história (Automatic Translation) -enable-subscriptions=Habilitar assinaturas (Automatic Translation) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Habilitar View Count Increment (Automatic Translation) -help-us-improve-it=Ajude-na melhorá-lo. (Automatic Translation) -javax.portlet.description.1_WAR_knowledgebaseportlet=A Base de Conhecimento fornece meios para a coleta, organização e recuperação de conteúdos relativos à documentação do produto e suporte. Os administradores podem fornecer aos usuários o acesso a modelos para facilitar a criação de artigos da base de conhecimento. -javax.portlet.title.1_WAR_knowledgebaseportlet=Base de conhecimento (Automatic Translation) -javax.portlet.title.2_WAR_knowledgebaseportlet=Exibir Base de conhecimento (Automatic Translation) -javax.portlet.title.3_WAR_knowledgebaseportlet=Artigo da Base de Conhecimento -javax.portlet.title.4_WAR_knowledgebaseportlet=Seção da Base de Conhecimento -javax.portlet.title.5_WAR_knowledgebaseportlet=Busca na Base de Conhecimento -kb-articles-kb-templates-and-kb-comments=Artigos, modelos e comentários -knowledge-base-home=Início da Base de Conhecimento -model.resource.com.liferay.knowledgebase.admin=Base de conhecimento (Automatic Translation) -model.resource.com.liferay.knowledgebase.display=Exibir Base de conhecimento (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBArticle=Artigo da Base de Conhecimento -model.resource.com.liferay.knowledgebase.model.KBFolder=Pasta de Base de conhecimento (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Modelo da Base de Conhecimento -most-popular=Mais popular -most-recent=Mais recente -move-to-in-progress=Mover para em andamento (Automatic Translation) -move-to-new=Mover para o novo (Automatic Translation) -new-article=Novo artigo -no-articles-were-found=Nenhum artigo foi encontrado. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Nenhuma subscrição foi encontrada. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Artigo pai -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Por favor, digite uma URL amigável que começa com uma barra e contém caracteres alfanuméricos, hífens e sublinhados. (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Por favor entre uma prioridade maior que {0}. -please-enter-a-valid-folder-name=Por favor insira um nome de pasta válido. (Automatic Translation) -please-enter-a-valid-source-url=Introduza um URL válido fonte. (Automatic Translation) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Por favor coloque uma lista de palavras separadas por vírgula para a propriedade do portlet {0} para habilitar este portlet. -please-select-at-least-one-section=Por favor selecione ao menos uma seção. -portlet-configuration-page-x-instance-id-x=Configuração do Portlet (Página - {0}, Instância - {1}) -prioritization-strategy=Estratégia de priorização (Automatic Translation) -recent-articles=Artigos recentes -resolve=Resolver (Automatic Translation) -saved-attachments=Anexos salvos (Automatic Translation) -search-articles=Buscar artigos -sections=Seções -select-parent=Selecione pais (Automatic Translation) -show-asset-entries=Mostrar conteúdos -show-author-column=Mostrar coluna autor -show-create-date-column=Mostrar coluna Data de Criação -show-modified-date-column=Mostrar coluna Data de Modificação -show-pagination=Mostrar paginação -show-priority-column=Mostrar coluna Prioridade -show-ratings=Mostrar Classificações -show-sections-title=Mostrar título das seções -show-status-column=Mostrar coluna Status -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Mostrar coluna Visualização -source-url=URL da fonte (Automatic Translation) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Modelos (Automatic Translation) -the-article-attachments-file-names=Nomes dos anexos ao artigo -the-article-content=Conteúdo do artigo -the-article-content-diff=Diferença no conteúdo do artigo -the-article-could-not-be-found=O artigo não pode ser encontrado. -the-article-title=Título do artigo -the-article-title-diff=Diferenças no título do artigo -the-article-url=URL do artigo -the-article-version=Versão do artigo -the-comment-content=O conteúdo do comentário (Automatic Translation) -the-comment-could-not-be-found=O comentário não pôde ser encontrado. -the-comment-create-date=O comentário criar data (Automatic Translation) -the-company-id-associated-with-the-article=ID da companhia associada ao artigo -the-company-mx-associated-with-the-article=MX da companhia associada ao artigo -the-company-name-associated-with-the-article=Nome da companhia associada ao artigo -the-email-address-of-the-user-who-added-the-article=E-mail do usuário que adicionou o artigo -the-selected-article-no-longer-exists=O artigo selecionado não existe mais. -the-site-name-associated-with-the-article=Nome do site associado ao artigo -the-subscription-could-not-be-found=A subscrição não pode ser encontrada. -the-user-did-not-like-the-article=O usuário não gostou do artigo. (Automatic Translation) -the-user-liked-the-article=O usuário gostou do artigo. (Automatic Translation) -the-user-who-added-the-article=Usuário que adicionou o artigo -there-are-no-articles=Não existem artigos. (Automatic Translation) -there-are-no-articles-with-tag-x=Não há artigos com a tag {0}. -there-are-no-articles-with-x-x=Não há artigos com {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Não há artigos com {0} {1} e a tag {2}. -there-are-no-attachments=Não há anexos. -there-are-no-child-articles-for-x=Não há artigos filhos para {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=Há uma sugestão. (Automatic Translation) -upload-your-zip-file=O upload do arquivo ZIP (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Usar a classificação por estrelas (Automatic Translation) -use-this-template=Utilize este Modelo -use-thumbs-up-thumbs-down=Uso Thumbs Up / polegares para baixo (Automatic Translation) -view-articles-with-tag-x=Ver artigos com a tag {0}. -view-articles-with-x-x=Ver artigos com {1} {2}. -view-articles-with-x-x-and-tag-x=Ver artigos com {1} {2} e a tag {2}. -was-this-information-helpful=Foi útil essa informação? -what-did-you-like-the-most-what-would-you-improve=O que você gostou mais? O que você melhoraria? (Automatic Translation) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=Você enviou uma sugestão para este artigo. (Automatic Translation) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_PT.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_PT.properties deleted file mode 100644 index 526176bd43..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_PT.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Adicionar Artigo -action.ADD_KB_FOLDER=Adicionar pasta (Automatic Translation) -action.ADD_KB_TEMPLATE=Adicionar Modelo -action.ADMINISTRATOR=Administrador -action.DELETE_KB_ARTICLES=Remover Artigos -action.DELETE_KB_TEMPLATES=Remover Modelos -action.MOVE_KB_ARTICLE=Mover Artigo -action.MOVE_KB_FOLDER=Mover pasta (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=Actualizar Prioridades de Artigos -action.VIEW_KB_TEMPLATES=Visualizar Modelos -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Adicionar Artigo -add-child-article=Adicionar artigo filho (Automatic Translation) -all-comments-x=Todos os Comentários ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Aplica prefixos numéricos de artigo arquivos como prioridades. (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=Todos os artigos no arquivo ZIP são atribuídos prioridades de acordo com os prefixos numéricos de seus arquivos ou caminhos de arquivo, se possível. Cada artigo de introdução é atribuído uma prioridade com base no prefixo numérico do nome da pasta à qual ele pertence no arquivo ZIP. Cada artigo de criança é atribuído uma prioridade com base no prefixo numérico de seu nome de arquivo no arquivo ZIP. Priorização pelo prefixo numérico substitui todos os outra priorização. (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=Tem certeza que deseja excluir os artigos selecionados? (Automatic Translation) -article-added-email=Endereço de Correio Adicionado a Artigo -article-display-style=Estilo do Artigo -article-or-folder=Artigo ou pasta (Automatic Translation) -article-updated-email=Endereço de Correio Actualizado no Artigo -article-window-state=Estado da Janela do Artigo -articles=Artigos -articles-with-tag-x=Artigos Etiquetados {0}. -articles-with-x-x=Artigos com {0} {1}. -articles-with-x-x-and-tag-x=Artigos com {0} {1} e Etiqueta {2}. -basic-article=Artigo básico (Automatic Translation) -between=Entre -child-articles-display-style=Estilo dos Artigos Descendentes -child-articles-for-x=Articos Descendentes de {0}. -comments=Comentários (Automatic Translation) -content-root-prefix=Prefixo de conteúdo raiz (Automatic Translation) -did-you-like-this-article=Você gostou deste artigo? (Automatic Translation) -do-you-have-any-suggestions=Você tem alguma sugestão? (Automatic Translation) -edit-on-github=Editar no GitHub (Automatic Translation) -enable-description=Activar Descrição -enable-history=Habilitar a história (Automatic Translation) -enable-subscriptions=Habilitar assinaturas (Automatic Translation) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Habilitar View Count Increment (Automatic Translation) -help-us-improve-it=Ajude-na melhorá-lo. (Automatic Translation) -javax.portlet.description.1_WAR_knowledgebaseportlet=A Base de Conhecimento é uma forma de coleccionar, organizar, e obter conteúdo relacionado com a documentação de produtos e informação relacionada com Suporte. Os administradores podem conceder a utilizadores o acesso a modelos que facilitem a criação de artigos na Base de Conhecimento. -javax.portlet.title.1_WAR_knowledgebaseportlet=Base de conhecimento (Automatic Translation) -javax.portlet.title.2_WAR_knowledgebaseportlet=Exibir Base de conhecimento (Automatic Translation) -javax.portlet.title.3_WAR_knowledgebaseportlet=Artigo da Base de Conhecimento -javax.portlet.title.4_WAR_knowledgebaseportlet=Secção da Base de Conhecimento -javax.portlet.title.5_WAR_knowledgebaseportlet=Pesquisa da Base de Conhecimento -kb-articles-kb-templates-and-kb-comments=Artigos, Modelos e Comentários -knowledge-base-home=Página Inicial da Base de Conhecimento -model.resource.com.liferay.knowledgebase.admin=Base de conhecimento (Automatic Translation) -model.resource.com.liferay.knowledgebase.display=Exibir Base de conhecimento (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBArticle=Artigo da Base de Conhecimento -model.resource.com.liferay.knowledgebase.model.KBFolder=Pasta de Base de conhecimento (Automatic Translation) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Modelo da Base de Conhecimento -most-popular=Mais Popular -most-recent=Mais Recente -move-to-in-progress=Mover para em andamento (Automatic Translation) -move-to-new=Mover para o novo (Automatic Translation) -new-article=Novo Artigo -no-articles-were-found=Não foram encontrados artigos. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=Não foram encontradas subscrições. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Artigo de Origem -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Por favor, digite uma URL amigável que começa com uma barra e contém caracteres alfanuméricos, hífens e sublinhados. (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=Por favor indique uma prioridade superior a {0}. -please-enter-a-valid-folder-name=Por favor insira um nome de pasta válido. (Automatic Translation) -please-enter-a-valid-source-url=Introduza um URL válido fonte. (Automatic Translation) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Por favor insira uma lista de palavras separadas por vírgulas para a propriedade {0} do portlet, para que possa activar este portlet -please-select-at-least-one-section=Por favor seleccione pelo menos uma secção. -portlet-configuration-page-x-instance-id-x=Configuração do Portlet (Página - {0}, ID da Instância - {1}) -prioritization-strategy=Estratégia de priorização (Automatic Translation) -recent-articles=Artigos Recentes -resolve=Resolver (Automatic Translation) -saved-attachments=Anexos salvos (Automatic Translation) -search-articles=Pesquisar Artigos -sections=Secções -select-parent=Selecione pais (Automatic Translation) -show-asset-entries=Mostrar Entradas -show-author-column=Mostrar Coluna de Autores -show-create-date-column=Mostrar Coluna Data de Criação -show-modified-date-column=Mostra Coluna Data de Alteração -show-pagination=Mostrar Paginação -show-priority-column=Mostrar Coluna Prioridade -show-ratings=Mostrar Classificações -show-sections-title=Mostrar Título de Secções -show-status-column=Mostrar Coluna de Estado -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Mostrar Coluna de Visualizações -source-url=URL da fonte (Automatic Translation) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Modelos (Automatic Translation) -the-article-attachments-file-names=O nome dos ficheiros anexos ao artigo -the-article-content=O conteúdo do artigo -the-article-content-diff=A diferença no conteúdo do artigo -the-article-could-not-be-found=O artigo não foi encontrado -the-article-title=O título do artigo -the-article-title-diff=A diferença no título do artigo -the-article-url=O URL do artigo -the-article-version=A versão do artigo -the-comment-content=O conteúdo do comentário (Automatic Translation) -the-comment-could-not-be-found=O comentário não foi encontrado. -the-comment-create-date=O comentário criar data (Automatic Translation) -the-company-id-associated-with-the-article=O ID da companhia associado ao artigo -the-company-mx-associated-with-the-article=O MX da companhia associado ao artigo -the-company-name-associated-with-the-article=O nome da companhia associada ao artigo -the-email-address-of-the-user-who-added-the-article=O endereço de correio do utilizador que adicionou o artigo -the-selected-article-no-longer-exists=O artigo seleccionado não existe. -the-site-name-associated-with-the-article=O nome do Site associado ao artigo -the-subscription-could-not-be-found=A subscrição não foi encontrada. -the-user-did-not-like-the-article=O usuário não gostou do artigo. (Automatic Translation) -the-user-liked-the-article=O usuário gostou do artigo. (Automatic Translation) -the-user-who-added-the-article=O utilizador que adicionou o artigo -there-are-no-articles=Não existem artigos. (Automatic Translation) -there-are-no-articles-with-tag-x=Não há artigos com a etiqueta {0}. -there-are-no-articles-with-x-x=Não há artigos com {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Não há artigos com {0} {1} e a etiqueta {2}. -there-are-no-attachments=Não há anexos. -there-are-no-child-articles-for-x=Não há artigos descendentes para {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=Há uma sugestão. (Automatic Translation) -upload-your-zip-file=O upload do arquivo ZIP (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Usar a classificação por estrelas (Automatic Translation) -use-this-template=Utilize este Modelo -use-thumbs-up-thumbs-down=Uso Thumbs Up / polegares para baixo (Automatic Translation) -view-articles-with-tag-x=Visualizar artigos com etiqueta {0}. -view-articles-with-x-x=Visualizar artigos com {0} {1}. -view-articles-with-x-x-and-tag-x=Visualizar artigos com {0} {1} e etiqueta {2}. -was-this-information-helpful=Esta informação foi útil? -what-did-you-like-the-most-what-would-you-improve=O que você gostou mais? O que você melhoraria? (Automatic Translation) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=Você enviou uma sugestão para este artigo. (Automatic Translation) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ro.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ro.properties deleted file mode 100644 index 4e07922464..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ro.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ru.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ru.properties deleted file mode 100644 index 3e0b90d9ec..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ru.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Добавить Ñтатью -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Добавить шаблон -action.ADMINISTRATOR=ÐдминиÑтратор -action.DELETE_KB_ARTICLES=Удалить Ñтатьи -action.DELETE_KB_TEMPLATES=Удалить шаблоны -action.MOVE_KB_ARTICLE=ПеремеÑтить Ñтатью -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Обновить приоритет Ñтатей -action.VIEW_KB_TEMPLATES=ПроÑмотр шаблонов -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Добавить Ñтатью -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=Ð’Ñе комментарии ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Оповещение о добавлении Ñтатьи -article-display-style=Стиль Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñтатьи -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Оповещение об изменении Ñтатьи -article-window-state=СоÑтоÑние окна Статьи -articles=Статьи -articles-with-tag-x=Статьи Ñ Ñ‚Ñгом {0}. -articles-with-x-x=Статьи Ñ {0} {1}. -articles-with-x-x-and-tag-x=Статьи Ñ {0} {1} и тегом {2}. -basic-article=Basic Article (Automatic Copy) -between=Между -child-articles-display-style=Стиль Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ ÑвÑзанных Ñтатей -child-articles-for-x=СвÑзанные Ñтатьи Ð´Ð»Ñ {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Включить опиÑание -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=База знаний предаÑтавлÑет ÑредÑтво Ð´Ð»Ñ Ñбора, организации и Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ ÐºÐ¾Ð½Ñ‚ÐµÐ½Ñ‚Ð°, ÑвÑзанного Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°Ñ†Ð¸ÐµÐ¹ продукта и поддержкой. ÐдминиÑтраторы могут предоÑтавлÑть пользователÑм доÑтуп к шаблонам Ð´Ð»Ñ ÑƒÐ¿Ñ€Ð¾Ñ‰ÐµÐ½Ð¸Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñтатей базы знаний. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Ð¡Ñ‚Ð°Ñ‚ÑŒÑ Ð±Ð°Ð·Ñ‹ знаний -javax.portlet.title.4_WAR_knowledgebaseportlet=Раздел базы знаний -javax.portlet.title.5_WAR_knowledgebaseportlet=ПоиÑк по базе знаний -kb-articles-kb-templates-and-kb-comments=Статьи, шаблоны и комментарии -knowledge-base-home=ДомашнÑÑ Ñтраница базы знаний -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Ð¡Ñ‚Ð°Ñ‚ÑŒÑ Ð±Ð°Ð·Ñ‹ знаний -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Шаблон базы знаний -most-popular=ПопулÑрные -most-recent=ПоÑледние -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=ÐÐ¾Ð²Ð°Ñ ÑÑ‚Ð°Ñ‚ÑŒÑ -no-articles-were-found=Статьи не найдены. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=ПодпиÑок не найдено. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=РодительÑÐºÐ°Ñ ÑÑ‚Ð°Ñ‚ÑŒÑ -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=ПожалуйÑта, введите приоритет выше, чем {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=ПожалуйÑта, введите ÑпиÑок Ñлов разделенных запÑтыми, Ð´Ð»Ñ ÑвойÑтва {0} портлета, чтобы его включить. -please-select-at-least-one-section=ПожалуйÑта, выберите Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ одну Ñекцию. -portlet-configuration-page-x-instance-id-x=Страница наÑтройки портлета (Страница - {0}, ID ÑкземплÑра - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=ПоÑледние Ñтатьи -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=ИÑкать Ñтатьи -sections=Секции -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Показать материалы -show-author-column=Показать колонку автора -show-create-date-column=Показать колонку Ð²Ñ€ÐµÐ¼Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ -show-modified-date-column=Показать колонку Ð²Ñ€ÐµÐ¼Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ -show-pagination=Показать поÑтраничный проÑмотр -show-priority-column=Показать колонку приоритета -show-ratings=Показать рейтинги -show-sections-title=Показать заголовок Ñекций -show-status-column=Показать колонку ÑтатуÑа -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Показать колонку проÑмотров -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=ÐÐ°Ð·Ð²Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² вложений Ñтатьи -the-article-content=Содержание Ñтатьи -the-article-content-diff=Разница ÑÐ¾Ð´ÐµÑ€Ð¶Ð°Ð½Ð¸Ñ Ñтатьи -the-article-could-not-be-found=Ð¡Ñ‚Ð°Ñ‚ÑŒÑ Ð½Ðµ может быть найдена. -the-article-title=Заголовок Ñтатьи -the-article-title-diff=Разница заголовка Ñтатьи -the-article-url=СÑылка на Ñтатью (URL) -the-article-version=ВерÑÐ¸Ñ Ñтатьи -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Комментарий не найден. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=ID компании ÑвÑзанной Ñ Ñтой Ñтатьей -the-company-mx-associated-with-the-article=MX компании ÑвÑзанной Ñ Ñтой Ñтатьей -the-company-name-associated-with-the-article=Ðазвание компании ÑвÑзанной Ñ Ñтой Ñтатьей -the-email-address-of-the-user-who-added-the-article=Email Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸Ð²ÑˆÐµÐ³Ð¾ Ñтатью -the-selected-article-no-longer-exists=Ð’Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ ÑÑ‚Ð°Ñ‚ÑŒÑ Ð±Ð¾Ð»ÑŒÑˆÐµ не ÑущеÑтвует. -the-site-name-associated-with-the-article=Ðазвание Ñайта ÑвÑзанного Ñ Ñтой Ñтатьей -the-subscription-could-not-be-found=ПодпиÑка не найдена. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Пользователь добавивший Ñтатью -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=Ðет Ñтатей Ñ Ñ‚ÐµÐ³Ð¾Ð¼ {0}. -there-are-no-articles-with-x-x=Ðет Ñтатей Ñ {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Ðет Ñтатей Ñ {0} {1} и тегом {2}. -there-are-no-attachments=Ðет вложений. -there-are-no-child-articles-for-x=Ðет дочерних Ñтатей Ð´Ð»Ñ {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=ИÑпользовать Ñтот шаблон -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=ПроÑмотреть Ñтатьи Ñ Ñ‚ÐµÐ³Ð¾Ð¼ {0}. -view-articles-with-x-x=ПроÑмотреть Ñтатьи Ñ {0} {1}. -view-articles-with-x-x-and-tag-x=ПроÑмотреть Ñтатьи Ñ {0} {1} и тегом {2}. -was-this-information-helpful=Эта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð±Ñ‹Ð»Ð° полезна? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sk.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sk.properties deleted file mode 100644 index e1e9234971..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sk.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=PridaÅ¥ Älánok -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=PridaÅ¥ Å¡ablónu -action.ADMINISTRATOR=Správca -action.DELETE_KB_ARTICLES=VymazaÅ¥ Älánky -action.DELETE_KB_TEMPLATES=VymazaÅ¥ Å¡ablóny -action.MOVE_KB_ARTICLE=Presunúť Älánky -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=AktualizovaÅ¥ priority Älánkov -action.VIEW_KB_TEMPLATES=ZobraziÅ¥ Å¡ablóny -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=PridaÅ¥ Älánok -add-child-article=PridaÅ¥ detský Älánok -all-comments-x=VÅ¡etky komentáre ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=E-mail o pridaní Älánku -article-display-style=Å týl zobrazenia Älánku -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=E-mail o aktualizácii Älánku -article-window-state=Stav okna Älánku -articles=ÄŒlánky -articles-with-tag-x=ÄŒlánky so znaÄkou {0}. -articles-with-x-x=ÄŒlánky s {0} {1}. -articles-with-x-x-and-tag-x=ÄŒlánky s {0} {1} znaÄkou {2}. -basic-article=Basic Article (Automatic Copy) -between=Medzi -child-articles-display-style=Å týl zobrazenia potomkov Älánku -child-articles-for-x=Potomkovia Älánku {0}. -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=PovoliÅ¥ popis -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Znalostná báza poskytuje prostriedky na zhromažÄovanie, organizovanie a získavanie obsahu týkajúceho sa dokumentácie k produktu a podpory. Správcovia môžu poskytnúť používateľom prístup k Å¡ablónam, aby sa uľahÄilo vytváranie Älánkov znalostnej bázy. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=ÄŒlánok znalostnej bázy -javax.portlet.title.4_WAR_knowledgebaseportlet=Sekcia znalostnej bázy -javax.portlet.title.5_WAR_knowledgebaseportlet=Vyhľadávanie v znalostnej báze -kb-articles-kb-templates-and-kb-comments=ÄŒlánky, Å¡ablóny a komentáre -knowledge-base-home=Úvodná stránka znalostnej bázy -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=ÄŒlánok znalostnej bázy -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Å ablóna znalostnej bázy -most-popular=NajobľúbenejÅ¡ie -most-recent=NajnovÅ¡ie -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Nový Älánok -no-articles-were-found=NenaÅ¡li sa žiadne Älánky. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=NenaÅ¡li sa žiadne prihlásenia k odberu. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=RodiÄovský Älánok -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Zadajte, prosím, prioritu, ktorá je väÄÅ¡ia ako {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Pre spustenie tohoto portletu, zadajte, prosím, zoznam slov oddelených Äiarkou do vlastnosti {0}. -please-select-at-least-one-section=Vyberte aspoň jednu sekciu. -portlet-configuration-page-x-instance-id-x=Nastavenie portletu (Stránka - {0}, ID inÅ¡tancie - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Nedávne Älánky -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=VyhľadaÅ¥ Älánky -sections=Sekcie -select-parent=Select Parent (Automatic Copy) -show-asset-entries=ZobraziÅ¥ príspevky -show-author-column=ZobraziÅ¥ stĺpec Autor -show-create-date-column=ZobraziÅ¥ stĺpec Dátum vytvorenia -show-modified-date-column=ZobraziÅ¥ stĺpec Dátum úpravy -show-pagination=ZobraziÅ¥ stránkovanie -show-priority-column=ZobraziÅ¥ stĺpec Priorita -show-ratings=ZobraziÅ¥ hodnotenie -show-sections-title=ZobraziÅ¥ nadpis sekcií -show-status-column=ZobraziÅ¥ stĺpec Stav -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=ZobraziÅ¥ stĺpec PoÄet zobrazení -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=Názvy súborov príloh k Älánku -the-article-content=Obsah Älánku -the-article-content-diff=Porovnanie obsahu Älánku -the-article-could-not-be-found=ÄŒlánok sa nenaÅ¡iel. -the-article-title=Nadpis Älánku -the-article-title-diff=Porovnanie nadpisu Älánku -the-article-url=URL Älánku -the-article-version=Verzia Älánku -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Komentár sa nenaÅ¡iel. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=ID spoloÄnosti spojenej s Älánkom -the-company-mx-associated-with-the-article=MX spoloÄnosti spojenej s Älánkom -the-company-name-associated-with-the-article=Názov spoloÄnosti spojenej s Älánkom -the-email-address-of-the-user-who-added-the-article=E-mailová adresa používateľa, ktorý Älánok pridal -the-selected-article-no-longer-exists=Vybraný Älánok už neexistuje. -the-site-name-associated-with-the-article=Názov sídla spojeného s Älánkom -the-subscription-could-not-be-found=Prihlásenie k odberu sa nenaÅ¡lo. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=Používateľ, ktorý pridal Älánok -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=NenaÅ¡li sa žiadne Älánky so znaÄkou {0}. -there-are-no-articles-with-x-x=NenaÅ¡li sa žiadne Älánky s {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=NenaÅ¡li sa žiadne Älánky s {0} {1} znaÄkou {2}. -there-are-no-attachments=NenaÅ¡li sa žiadne prílohy. -there-are-no-child-articles-for-x=NenaÅ¡li sa žiadni potomkovia Älánku {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=PoužiÅ¥ túto Å¡ablónu -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=ZobraziÅ¥ Älánky so znaÄkou {0}. -view-articles-with-x-x=ZobraziÅ¥ Älánky s {0} {1}. -view-articles-with-x-x-and-tag-x=ZobraziÅ¥ Älánky s {0} {1} znaÄkou {2}. -was-this-information-helpful=Bola táto informácia užitoÄná? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sl.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sl.properties deleted file mode 100644 index 4e07922464..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sl.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS.properties deleted file mode 100644 index 77f35d9795..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Додај артикал -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Додај темплејт -action.ADMINISTRATOR=ÐдминиÑтратор -action.DELETE_KB_ARTICLES=Обриши чланак -action.DELETE_KB_TEMPLATES=Обриши темплејт -action.MOVE_KB_ARTICLE=ИзмеÑти чланак -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Уреди приоритете чланака -action.VIEW_KB_TEMPLATES=Прикажи темплејте -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=Додај чланак -add-child-article=Додај подчланак -all-comments-x=Сви Коментари ({0}) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Чланак додат Емејл -article-display-style=Чланак Прикажи Стил -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Чланак измењен Емејл -article-window-state=Чланак прозор Ñтање -articles=Чланци -articles-with-tag-x=Чланак Ñа ознаком {0}. -articles-with-x-x=Чланак Ñа {0} {1}. -articles-with-x-x-and-tag-x=Чланак Ñа {0} {1} и ознака {2}. -basic-article=Basic Article (Automatic Copy) -between=Између -child-articles-display-style=Дете чканак прикажи Ñтил -child-articles-for-x=Дете чланак за {0}. -comments=Коментари -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Омогући Ð¾Ð¿Ð¸Ñ -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Омогући Ð¾Ð¿Ð¸Ñ -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=База Знања пружа ÑредÑтва за прикупљање, организовање и преузимање Ñадржаја који Ñе одноÑи на производну документацију и подршку. ÐдминиÑтратори могу да обезбеде кориÑницима приÑтуп темплејтима како би Ñе олакшало Ñтварање чланака базе знања. -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=База знања чланак -javax.portlet.title.4_WAR_knowledgebaseportlet=База знања претрага -javax.portlet.title.5_WAR_knowledgebaseportlet=База знања претрага -kb-articles-kb-templates-and-kb-comments=Чланци, темплејти и коментари -knowledge-base-home=База знања наÑловна -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=База знања чланак -model.resource.com.liferay.knowledgebase.model.KBFolder=База знања наÑловна -model.resource.com.liferay.knowledgebase.model.KBTemplate=База знања темплејт -most-popular=Ðајпопуларнији -most-recent=Ðајновији -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=Ðови чланак -no-articles-were-found=ÐиÑу пронађени чланци. -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=ÐиÑу пронађене претплате. -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Чланак родитељ -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Молимо унеÑите приоритет да је веће него {0}. -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Молимо Ð²Ð°Ñ Ð½Ð°Ð²ÐµÐ´Ð¸Ñ‚Ðµ лиÑту речи зарезима раздвојене за портлет ÑвојÑтва {0} да омогући овом портлету. -please-select-at-least-one-section=Молимо Ð’Ð°Ñ Ð´Ð° одаберете бар једну Ñекцију. -portlet-configuration-page-x-instance-id-x=Конфигурација портлета (Страница - {0}, ИД ИнÑтанце - {1}) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Скорији чланци -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Претрага чланака -sections=Секције -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Прикажи уноÑе имовине -show-author-column=Прикажи аутор колону -show-create-date-column=Прикажи датум креирања колоне -show-modified-date-column=Прикажи датум модификовања колоне -show-pagination=Прикажи пагинацију -show-priority-column=Прикажи приоритет колона -show-ratings=Прикажи рејтинге -show-sections-title=Прикажи наÑлове Ñекција -show-status-column=Прикажи ÑтатуÑе колона -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Прикажи поглед колоне -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Темплејти -the-article-attachments-file-names=Имена датотека прилога чланка -the-article-content=Садржај чланка -the-article-content-diff=Разлике Садржаја Чланка -the-article-could-not-be-found=Чланак није пронађен. -the-article-title=ÐаÑлов чланка -the-article-title-diff=ÐаÑлов чланака разлика -the-article-url=УРЛ чланка -the-article-version=Верзија чланка -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=Коментар није пронађен. -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=КомпанијÑки ИД у вези Ñа чланком -the-company-mx-associated-with-the-article=КомпанијÑки МХ у вези Ñа чланком -the-company-name-associated-with-the-article=КомпанијÑко име у вези Ñа чланком -the-email-address-of-the-user-who-added-the-article=Емејл адреÑа кориÑника који је додао чланак -the-selected-article-no-longer-exists=Изабрани чланак не поÑтоји већ дуже време. -the-site-name-associated-with-the-article=Име Ñајта у вези Ñа чланком -the-subscription-could-not-be-found=Претплата није пронађена. -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=КориÑник који је додао чланак -there-are-no-articles=Ðе поÑтоје прилози. -there-are-no-articles-with-tag-x=Ðе поÑтоје чланци Ñа ознаком {0}. -there-are-no-articles-with-x-x=Ðе поÑтоје чланци Ñа {0} {1}. -there-are-no-articles-with-x-x-and-tag-x=Ðе поÑтоје чланци Ñа {0} {1} и ознаком {2}. -there-are-no-attachments=Ðе поÑтоје прилози. -there-are-no-child-articles-for-x=Ðе поÑтоје деца чланци за {0}. -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=КориÑти овај темплејт -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=Погледај артикле Ñа ознаком {0}. -view-articles-with-x-x=Погледај артикле Ñа {0} {1}. -view-articles-with-x-x-and-tag-x=Погледај артикле Ñа {0} {1} и ознаком {2}. -was-this-information-helpful=Да ли је ова информација била кориÑна? -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS_latin.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS_latin.properties deleted file mode 100644 index 153ffa9a61..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS_latin.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base Template (Automatic Copy) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sv.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sv.properties deleted file mode 100644 index 4e07922464..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sv.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_tr.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_tr.properties deleted file mode 100644 index 4e07922464..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_tr.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_uk.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_uk.properties deleted file mode 100644 index 4e07922464..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_uk.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_vi.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_vi.properties deleted file mode 100644 index 4e07922464..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_vi.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=Add Article (Automatic Copy) -action.ADD_KB_FOLDER=Add Folder (Automatic Copy) -action.ADD_KB_TEMPLATE=Add Template (Automatic Copy) -action.ADMINISTRATOR=Administrator (Automatic Copy) -action.DELETE_KB_ARTICLES=Delete Articles (Automatic Copy) -action.DELETE_KB_TEMPLATES=Delete Templates (Automatic Copy) -action.MOVE_KB_ARTICLE=Move Article (Automatic Copy) -action.MOVE_KB_FOLDER=Move Folder (Automatic Copy) -action.UPDATE_KB_ARTICLES_PRIORITIES=Update Articles Priorities (Automatic Copy) -action.VIEW_KB_TEMPLATES=View Templates (Automatic Copy) -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. (Automatic Copy) -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. (Automatic Copy) -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. (Automatic Copy) -add-article=Add Article (Automatic Copy) -add-child-article=Add Child Article (Automatic Copy) -all-comments-x=All Comments ({0}) (Automatic Copy) -an-unexpected-error-occurred-while-importing-articles-x=An unexpected error occurred while importing articles: {0}. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities=Apply numerical prefixes of article files as priorities. (Automatic Copy) -apply-numerical-prefixes-of-article-files-as-priorities-help=All articles in the ZIP file are assigned priorities according to the numerical prefixes of their files or file paths, if possible. Each introduction article is assigned a priority based on the numerical prefix of the name of the folder to which it belongs in the ZIP file. Each child article is assigned a priority based on the numerical prefix of its filename in the ZIP file. Prioritization by numerical prefix supersedes all other prioritization. (Automatic Copy) -are-you-sure-you-want-to-delete-the-selected-articles=Are you sure you want to delete the selected articles? (Automatic Copy) -article-added-email=Article Added Email (Automatic Copy) -article-display-style=Article Display Style (Automatic Copy) -article-or-folder=Article or Folder (Automatic Copy) -article-updated-email=Article Updated Email (Automatic Copy) -article-window-state=Article Window State (Automatic Copy) -articles=Articles (Automatic Copy) -articles-with-tag-x=Articles with tag {0}. (Automatic Copy) -articles-with-x-x=Articles with {0} {1}. (Automatic Copy) -articles-with-x-x-and-tag-x=Articles with {0} {1} and tag {2}. (Automatic Copy) -basic-article=Basic Article (Automatic Copy) -between=Between (Automatic Copy) -child-articles-display-style=Child Articles Display Style (Automatic Copy) -child-articles-for-x=Child Articles for {0}. (Automatic Copy) -comments=Comments (Automatic Copy) -content-root-prefix=Content Root Prefix (Automatic Copy) -did-you-like-this-article=Did you like this article? (Automatic Copy) -do-you-have-any-suggestions=Do you have any suggestions? (Automatic Copy) -edit-on-github=Edit on GitHub (Automatic Copy) -enable-description=Enable Description (Automatic Copy) -enable-history=Enable History (Automatic Copy) -enable-subscriptions=Enable Subscriptions (Automatic Copy) -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=Enable View Count Increment (Automatic Copy) -help-us-improve-it=Help us improve it. (Automatic Copy) -javax.portlet.description.1_WAR_knowledgebaseportlet=Knowledge Base provides a means for collecting, organizing, and retrieving of content pertaining to product documentation and support. Administrators can provide users with access to templates to facilitate the creation of knowledge base articles. (Automatic Copy) -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base (Automatic Copy) -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display (Automatic Copy) -javax.portlet.title.3_WAR_knowledgebaseportlet=Knowledge Base Article (Automatic Copy) -javax.portlet.title.4_WAR_knowledgebaseportlet=Knowledge Base Section (Automatic Copy) -javax.portlet.title.5_WAR_knowledgebaseportlet=Knowledge Base Search (Automatic Copy) -kb-articles-kb-templates-and-kb-comments=Articles, Templates and Comments (Automatic Copy) -knowledge-base-home=Knowledge Base Home (Automatic Copy) -model.resource.com.liferay.knowledgebase.admin=Knowledge Base (Automatic Copy) -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBArticle=Knowledge Base Article (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBFolder=Knowledge Base Folder (Automatic Copy) -model.resource.com.liferay.knowledgebase.model.KBTemplate=Knowledge Base (Display) -most-popular=Most Popular (Automatic Copy) -most-recent=Most Recent (Automatic Copy) -move-to-in-progress=Move to in Progress (Automatic Copy) -move-to-new=Move to New (Automatic Copy) -new-article=New Article (Automatic Copy) -no-articles-were-found=No articles were found. (Automatic Copy) -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. (Automatic Copy) -no-completed-suggestion-was-found=No completed suggestion was found. (Automatic Copy) -no-in-progress-suggestion-was-found=No in progress suggestion was found. (Automatic Copy) -no-new-suggestion-was-found=No new suggestion was found. (Automatic Copy) -no-subscriptions-were-found=No subscriptions were found. (Automatic Copy) -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=Parent Article (Automatic Copy) -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=Please enter a friendly URL that starts with a slash and contains alphanumeric characters, dashes, and underscores. (Automatic Copy) -please-enter-a-priority-that-is-greater-than-x=Please enter a priority that is greater than {0}. (Automatic Copy) -please-enter-a-valid-folder-name=Please enter a valid folder name. (Automatic Copy) -please-enter-a-valid-source-url=Please enter a valid source URL. (Automatic Copy) -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=Please input a list of comma delimited words for portlet property {0} to enable this portlet. (Automatic Copy) -please-select-at-least-one-section=Please select at least one section. (Automatic Copy) -portlet-configuration-page-x-instance-id-x=Portlet Configuration (Page - {0}, Instance ID - {1}) (Automatic Copy) -prioritization-strategy=Prioritization Strategy (Automatic Copy) -recent-articles=Recent Articles (Automatic Copy) -resolve=Resolve (Automatic Copy) -saved-attachments=Saved Attachments (Automatic Copy) -search-articles=Search Articles (Automatic Copy) -sections=Sections (Automatic Copy) -select-parent=Select Parent (Automatic Copy) -show-asset-entries=Show Asset Entries (Automatic Copy) -show-author-column=Show Author Column (Automatic Copy) -show-create-date-column=Show Create Date Column (Automatic Copy) -show-modified-date-column=Show Modified Date Column (Automatic Copy) -show-pagination=Show Pagination (Automatic Copy) -show-priority-column=Show Priority Column (Automatic Copy) -show-ratings=Show Ratings (Automatic Copy) -show-sections-title=Show Sections Title (Automatic Copy) -show-status-column=Show Status Column (Automatic Copy) -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=Show Views Column (Automatic Copy) -source-url=Source URL (Automatic Copy) -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=Suggestion status updated successfully. (Automatic Copy) -templates=Templates (Automatic Copy) -the-article-attachments-file-names=The article attachments' file names (Automatic Copy) -the-article-content=The article content (Automatic Copy) -the-article-content-diff=The article content diff (Automatic Copy) -the-article-could-not-be-found=The article could not be found. (Automatic Copy) -the-article-title=The article title (Automatic Copy) -the-article-title-diff=The article title diff (Automatic Copy) -the-article-url=The article URL (Automatic Copy) -the-article-version=The article version (Automatic Copy) -the-comment-content=The comment content (Automatic Copy) -the-comment-could-not-be-found=The comment could not be found. (Automatic Copy) -the-comment-create-date=The comment create date (Automatic Copy) -the-company-id-associated-with-the-article=The company ID associated with the article (Automatic Copy) -the-company-mx-associated-with-the-article=The company MX associated with the article (Automatic Copy) -the-company-name-associated-with-the-article=The company name associated with the article (Automatic Copy) -the-email-address-of-the-user-who-added-the-article=The email address of the user who added the article (Automatic Copy) -the-selected-article-no-longer-exists=The selected article no longer exists. (Automatic Copy) -the-site-name-associated-with-the-article=The site name associated with the article (Automatic Copy) -the-subscription-could-not-be-found=The subscription could not be found. (Automatic Copy) -the-user-did-not-like-the-article=The user did not like the article. (Automatic Copy) -the-user-liked-the-article=The user liked the article. (Automatic Copy) -the-user-who-added-the-article=The user who added the article (Automatic Copy) -there-are-no-articles=There are no articles. (Automatic Copy) -there-are-no-articles-with-tag-x=There are no articles with tag {0}. (Automatic Copy) -there-are-no-articles-with-x-x=There are no articles with {0} {1}. (Automatic Copy) -there-are-no-articles-with-x-x-and-tag-x=There are no articles with {0} {1} and tag {2}. (Automatic Copy) -there-are-no-attachments=There are no attachments. (Automatic Copy) -there-are-no-child-articles-for-x=There are no child articles for {0}. (Automatic Copy) -there-are-x-suggestions=There are {0} suggestions. (Automatic Copy) -there-is-one-suggestion=There is one suggestion. (Automatic Copy) -upload-your-zip-file=Upload Your ZIP File (Automatic Copy) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=Use Star Ratings (Automatic Copy) -use-this-template=Use This Template (Automatic Copy) -use-thumbs-up-thumbs-down=Use Thumbs Up/Thumbs Down (Automatic Copy) -view-articles-with-tag-x=View articles with tag {0}. (Automatic Copy) -view-articles-with-x-x=View articles with {0} {1}. (Automatic Copy) -view-articles-with-x-x-and-tag-x=View articles with {0} {1} and tag {2}. (Automatic Copy) -was-this-information-helpful=Was this information helpful? (Automatic Copy) -what-did-you-like-the-most-what-would-you-improve=What did you like the most? What would you improve? (Automatic Copy) -x-pending={0} Pending (Automatic Copy) -you-sent-one-suggestion-for-this-article=You sent one suggestion for this article. (Automatic Copy) -you-sent-x-suggestions-for-this-article=You sent {0} suggestions for this article. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_CN.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_CN.properties deleted file mode 100644 index 09e94db154..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_CN.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=总共导入{0}篇文章 。 -action.ADD_KB_ARTICLE=添加文章 -action.ADD_KB_FOLDER=添加文件夹 -action.ADD_KB_TEMPLATE=æ·»åŠ æ¨¡æ¿ -action.ADMINISTRATOR=管ç†å‘˜ -action.DELETE_KB_ARTICLES=删除文章 -action.DELETE_KB_TEMPLATES=åˆ é™¤æ¨¡æ¿ -action.MOVE_KB_ARTICLE=移动文章 -action.MOVE_KB_FOLDER=移动文件夹 -action.UPDATE_KB_ARTICLES_PRIORITIES=更新文章优先级 -action.VIEW_KB_TEMPLATES=æŸ¥çœ‹æ¨¡æ¿ -action.VIEW_SUGGESTIONS=查看建议 -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=添加文章 -add-child-article=æ·»åŠ å­æ–‡ç«  -all-comments-x=所有评论({0}) -an-unexpected-error-occurred-while-importing-articles-x=导入文章 {0}时,å‘生异常错误。 -apply-numerical-prefixes-of-article-files-as-priorities=作为优先事项适用数值å‰ç¼€çš„æ–‡ä»¶ä¸€æ–‡ã€‚ (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=ZIP æ–‡ä»¶ä¸­çš„æ‰€æœ‰æ¡æ¬¾å¦‚æžœå¯èƒ½éƒ½åˆ†é…æ ¹æ®ä»–们的文件或文件路径的数值的å‰ç¼€çš„优先事项。æ¯ä¸ªä»‹ç»æ–‡ç« åˆ†é…基于它在 ZIP 文件中属于该文件夹的å称的数字å‰ç¼€çš„一个优先事项。æ¯ä¸ªå­©å­æ¡åˆ†é…基于其文件åçš„ ZIP 文件中的数字å‰ç¼€çš„一个优先事项。优先级由数值的å‰ç¼€å°†å–代所有其他优先次åºã€‚ (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=您确定è¦åˆ é™¤æ‰€é€‰æ–‡ç« å—? -article-added-email=添加文章的电å­é‚®ä»¶ -article-display-style=文章显示风格 -article-or-folder=文章或文件夹 -article-updated-email=邮件的文章已更新 -article-window-state=æ–‡ç« çª—å£æ¨¡å¼ -articles=文章 -articles-with-tag-x=åŒ…å«æ ‡ç­¾{0}的文章。 -articles-with-x-x=包å«{0} {1}的文章。 -articles-with-x-x-and-tag-x=包å«{0} {1}和标签{2}的文章。 -basic-article=基础文章 -between=在……与……之间 -child-articles-display-style=å­æ–‡ç« æ˜¾ç¤ºæ ·å¼ -child-articles-for-x={0}çš„å­æ–‡ç« ã€‚ -comments=评论 -content-root-prefix=内容根å‰ç¼€ -did-you-like-this-article=您喜欢这篇文章å—? -do-you-have-any-suggestions=您有什么建议å—? -edit-on-github=在GitHub上编辑 -enable-description=å¼€å¯è¯´æ˜Ž -enable-history=å¯ç”¨åŽ†å² -enable-subscriptions=å¼€å¯è®¢é˜… -enable-suggestions=å¯ç”¨å»ºè®® -enable-view-count-increment=å¯ç”¨è§†å›¾è®¡æ•°å¢žé‡ (Automatic Translation) -help-us-improve-it=帮助我们改善。 -javax.portlet.description.1_WAR_knowledgebaseportlet=知识库æä¾›ä¸€ç§æ–¹æ³•,使得与文献与支æŒç›¸å…³çš„内容的整åˆã€ç»„ç»‡ä»¥åŠæ£€ç´¢èƒ½å¤Ÿæœ‰æœºç»“åˆã€‚管ç†å‘˜å¯ä»¥ç»™äºˆç”¨æˆ·æƒé™è®¿é—®æ¨¡æ¿è¿›è€Œä¼˜åŒ–知识库文章。 -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=知识库文章 -javax.portlet.title.4_WAR_knowledgebaseportlet=知识部分 -javax.portlet.title.5_WAR_knowledgebaseportlet=知识库查找 -kb-articles-kb-templates-and-kb-comments=æ–‡ç« ã€æ¨¡æ¿ä»¥åŠè¯„论 -knowledge-base-home=知识库首页 -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=知识库文章 -model.resource.com.liferay.knowledgebase.model.KBFolder=知识库首页 -model.resource.com.liferay.knowledgebase.model.KBTemplate=çŸ¥è¯†åº“æ¨¡æ¿ -most-popular=æœ€å—æ¬¢è¿Ž -most-recent=最新 -move-to-in-progress=移动至处ç†ä¸­ -move-to-new=移动至全新 -new-article=新文章 -no-articles-were-found=没有找到相应文章。 -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=没有找到已完æˆå»ºè®®ã€‚ -no-in-progress-suggestion-was-found=没有找到处ç†ä¸­çš„建议。 -no-new-suggestion-was-found=没有找到新的建议。 -no-subscriptions-were-found=没有找到相关订阅。 -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=无导入文章。在所支æŒçš„æ‰©å±•{0}中,未找到任何文章。 -parent-article=æ¯æ–‡ç«  -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=请输入å‹å¥½URL,起始于斜线,包括数字ã€å­—æ¯ã€ç ´æŠ˜å·ä»¥åŠä¸‹åˆ’线。 -please-enter-a-priority-that-is-greater-than-x=请输入高于{0}çš„é‡è¦ç­‰çº§ã€‚ -please-enter-a-valid-folder-name=请输入有效文件夹å称。 -please-enter-a-valid-source-url=请输入有效æºURL。 -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=请输入portlet {0} 并由逗å·åˆ†éš”的列表激活此portlet 。 -please-select-at-least-one-section=请至少选择一个区域。 -portlet-configuration-page-x-instance-id-x=portlet é…置(页-{0},实例 ID-{1}) -prioritization-strategy=优先战略 (Automatic Translation) -recent-articles=近期文章 -resolve=解决 -saved-attachments=附件已ä¿å­˜ -search-articles=æœç´¢æ–‡ç«  -sections=部分 -select-parent=é€‰æ‹©æ¯æ–‡ä»¶å¤¹ -show-asset-entries=显示Asset Entries -show-author-column=æ˜¾ç¤ºä½œè€…æ  -show-create-date-column=æ˜¾ç¤ºåˆ›å»ºæ—¥æœŸæ  -show-modified-date-column=æ˜¾ç¤ºä¿®æ”¹æ—¥æœŸæ  -show-pagination=æ˜¾ç¤ºé¡µç  -show-priority-column=显示é‡è¦çº§åˆ«æ  -show-ratings=显示级别 -show-sections-title=显示章节标题 -show-status-column=æ˜¾ç¤ºçŠ¶æ€æ  -show-suggestions=显示建议 -show-views-column=æ˜¾ç¤ºé¢„è§ˆæ  -source-url=æºURL -suggestion-deleted-successfully=æˆåŠŸåˆ é™¤å»ºè®®ã€‚ -suggestion-in-progress-email=建议处ç†é‚®ä»¶ -suggestion-received-email=建议收到邮件 -suggestion-resolved-email=建议解决邮件 -suggestion-saved-successfully=建议已æˆåŠŸä¿å­˜ã€‚ -suggestion-status-updated-successfully=建议状æ€å·²æˆåŠŸæ›´æ–°ã€‚ -templates=æ¨¡æ¿ -the-article-attachments-file-names=文章附件å -the-article-content=文章内容 -the-article-content-diff=这篇文章的内容比较 -the-article-could-not-be-found=找ä¸åˆ°ç›¸åº”文章。 -the-article-title=文章标题 -the-article-title-diff=文章标题ä¸åŒ -the-article-url=文章的URL -the-article-version=文章版本 -the-comment-content=注释内容 (Automatic Translation) -the-comment-could-not-be-found=找ä¸åˆ°ç›¸å…³è¯„论。 -the-comment-create-date=注释创建日期 (Automatic Translation) -the-company-id-associated-with-the-article=与文章相关的公å¸ID -the-company-mx-associated-with-the-article=与文章相关的公å¸MX -the-company-name-associated-with-the-article=与文章相关的公å¸å -the-email-address-of-the-user-who-added-the-article=æ·»åŠ æ­¤æ–‡ç« çš„ç”¨æˆ·çš„é‚®ç®±åœ°å€ -the-selected-article-no-longer-exists=所选文章ä¸å­˜åœ¨ã€‚ -the-site-name-associated-with-the-article=与文章相关的站点å -the-subscription-could-not-be-found=找ä¸åˆ°ç›¸å…³è®¢é˜…。 -the-user-did-not-like-the-article=用户ä¸å–œæ¬¢æ­¤æ–‡ç« ã€‚ -the-user-liked-the-article=用户喜欢此文章。 -the-user-who-added-the-article=添加此文章的用户 -there-are-no-articles=没有附件。 -there-are-no-articles-with-tag-x=æ²¡æœ‰åŒ…å«æ ‡è®° {0} 的文章。 -there-are-no-articles-with-x-x=没有包å«{0} {1} 的文章。 -there-are-no-articles-with-x-x-and-tag-x=没有包å«{0} {1} 和标记{2} 的文章。 -there-are-no-attachments=没有附件。 -there-are-no-child-articles-for-x=没有{0} çš„å­æ–‡ç« ã€‚ -there-are-x-suggestions=有{0}æ¡å»ºè®®ã€‚ -there-is-one-suggestion=有一æ¡å»ºè®®ã€‚ -upload-your-zip-file=上传您的 ZIP 文件 (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=使用星评价 -use-this-template=ä½¿ç”¨æ­¤æ¨¡æ¿ -use-thumbs-up-thumbs-down=使用赞æˆ/ä¸èµžæˆ -view-articles-with-tag-x=æµè§ˆåŒ…嫿 ‡è®° {0} 的文章。 -view-articles-with-x-x=æµè§ˆåŒ…å« {0} {1} 的文章。 -view-articles-with-x-x-and-tag-x=æµè§ˆåŒ…å« {0} {1} 和标记 {2} 的文章。 -was-this-information-helpful=这些信æ¯å¯¹æ‚¨æœ‰å¸®åŠ©å—? -what-did-you-like-the-most-what-would-you-improve=æ‚¨æœ€å–œæ¬¢å“ªä¸ªï¼Ÿæ‚¨æƒ³è¦æ”¹å–„什么? -x-pending={0}等待中 -you-sent-one-suggestion-for-this-article=æ‚¨å‘æ­¤æ–‡ç« å‘é€äº†ä¸€æ¡å»ºè®®ã€‚ -you-sent-x-suggestions-for-this-article=æ‚¨å‘æ­¤æ–‡ç« å‘é€äº† {0} æ¡å»ºè®®ã€‚ \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_TW.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_TW.properties deleted file mode 100644 index 184c84ed52..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_TW.properties +++ /dev/null @@ -1,158 +0,0 @@ -a-total-of-x-articles-have-been-imported=A total of {0} articles were imported. (Automatic Copy) -action.ADD_KB_ARTICLE=增加文章 -action.ADD_KB_FOLDER=添加資料夾 (Automatic Translation) -action.ADD_KB_TEMPLATE=增加版型 -action.ADMINISTRATOR=系統管ç†å“¡ -action.DELETE_KB_ARTICLES=刪除文章 -action.DELETE_KB_TEMPLATES=刪除版型 -action.MOVE_KB_ARTICLE=æ¬ç§»æ–‡ç«  -action.MOVE_KB_FOLDER=移動資料夾 (Automatic Translation) -action.UPDATE_KB_ARTICLES_PRIORITIES=更新文章優先權 -action.VIEW_KB_TEMPLATES=檢視版型 -action.VIEW_SUGGESTIONS=View Suggestions (Automatic Copy) -activity-knowledge-base-admin-add-kb-article={1} wrote a new article, {2}. -activity-knowledge-base-admin-add-kb-article-in={1} wrote a new article, {2}, in {0}. -activity-knowledge-base-admin-add-kb-comment={1} wrote a new comment, {2}. -activity-knowledge-base-admin-add-kb-comment-in={1} wrote a new comment, {2}, in {0}. -activity-knowledge-base-admin-add-kb-template={1} wrote a new template, {2}. -activity-knowledge-base-admin-add-kb-template-in={1} wrote a new template, {2}, in {0}. -activity-knowledge-base-admin-move-kb-article={1} moved an article, {2}. -activity-knowledge-base-admin-move-kb-article-in={1} moved an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-article={1} updated an article, {2}. -activity-knowledge-base-admin-update-kb-article-in={1} updated an article, {2}, in {0}. -activity-knowledge-base-admin-update-kb-comment={1} updated a comment, {2}. -activity-knowledge-base-admin-update-kb-comment-in={1} updated a comment, {2}, in {0}. -activity-knowledge-base-admin-update-kb-template={1} updated a template, {2}. -activity-knowledge-base-admin-update-kb-template-in={1} updated a template, {2}, in {0}. -add-article=增加文章 -add-child-article=åŠ å…¥å­æ–‡ç«  -all-comments-x=所有評論({0}) -an-unexpected-error-occurred-while-importing-articles-x=䏀個頿œŸå¤–的錯誤發生當匯入文章:{0}。 -apply-numerical-prefixes-of-article-files-as-priorities=作為優先事項é©ç”¨æ•¸å€¼é¦–碼的檔一文。 (Automatic Translation) -apply-numerical-prefixes-of-article-files-as-priorities-help=ZIP æª”ä¸­çš„æ‰€æœ‰æ¢æ¬¾å¦‚æžœå¯èƒ½éƒ½åˆ†é…根據他們的檔或檔路徑的數值的首碼的優先事項。æ¯å€‹ä»‹ç´¹æ–‡ç« åˆ†é…基於它在 ZIP 檔中屬於該資料夾的å稱的數ä½é¦–碼的一個優先事項。æ¯å€‹å­©å­æ¢åˆ†é…基於其檔案åçš„ ZIP 檔中的數ä½é¦–碼的一個優先事項。優先順åºç”±æ•¸å€¼çš„首碼將å–代所有其他優先次åºã€‚ (Automatic Translation) -are-you-sure-you-want-to-delete-the-selected-articles=您確定想è¦åˆªé™¤è¢«é¸å–文章? -article-added-email=加入電å­éƒµä»¶çš„æ–‡ç«  -article-display-style=æ–‡ç« é¡¯ç¤ºæ¨£å¼ -article-or-folder=文章或資料夾 (Automatic Translation) -article-updated-email=æ›´æ–°é›»å­éƒµä»¶çš„æ–‡ç«  -article-window-state=文章視窗狀態 -articles=文章 -articles-with-tag-x=文章使用標籤 {0}。 -articles-with-x-x=文章使用 {0} {1}。 -articles-with-x-x-and-tag-x=文章使用 {0} {1} 與標籤 {2}。 -basic-article=基本文章 -between=介於 -child-articles-display-style=å­æ–‡ç« é¡¯ç¤ºæ¨£å¼ -child-articles-for-x={0} çš„å­æ–‡ç« ã€‚ -comments=è©•è«– -content-root-prefix=內容根首碼 (Automatic Translation) -did-you-like-this-article=您喜歡這文章嗎? -do-you-have-any-suggestions=您有任何建議嗎? -edit-on-github=在GitHub編輯 -enable-description=啟用æè¿° -enable-history=å•Ÿç”¨æ­·å² -enable-subscriptions=啟用訂閱 -enable-suggestions=Enable Suggestions (Automatic Copy) -enable-view-count-increment=å•Ÿç”¨è¦–åœ–è¨ˆæ•¸å¢žé‡ (Automatic Translation) -help-us-improve-it=幫助我們改善它。 -javax.portlet.description.1_WAR_knowledgebaseportlet=知識庫å°ç”¢å“文件與支æ´åœ¨æ”¶é›†ã€çµ„織與檢索內容上æä¾›äº†ä¸€å€‹æ–¹æ³•。系統管ç†å“¡èƒ½æä¾›ä½¿ç”¨è€…å°ç‰ˆåž‹çš„å­˜å–以促進知識庫文章的創作。 -javax.portlet.title.1_WAR_knowledgebaseportlet=Knowledge Base -javax.portlet.title.2_WAR_knowledgebaseportlet=Knowledge Base Display -javax.portlet.title.3_WAR_knowledgebaseportlet=知識庫文章 -javax.portlet.title.4_WAR_knowledgebaseportlet=知識庫部分 -javax.portlet.title.5_WAR_knowledgebaseportlet=知識庫æœå°‹ -kb-articles-kb-templates-and-kb-comments=文章ã€ç‰ˆåž‹èˆ‡è©•è«– -knowledge-base-home=çŸ¥è­˜åº«é¦–é  -model.resource.com.liferay.knowledgebase.admin=Knowledge Base -model.resource.com.liferay.knowledgebase.display=Knowledge Base Display -model.resource.com.liferay.knowledgebase.model.KBArticle=知識庫文章 -model.resource.com.liferay.knowledgebase.model.KBFolder=çŸ¥è­˜åº«é¦–é  -model.resource.com.liferay.knowledgebase.model.KBTemplate=知識庫版型 -most-popular=最熱門 -most-recent=最近 -move-to-in-progress=æ¬ç§»åˆ°é€²è¡Œä¸­ -move-to-new=æ¬ç§»åˆ°æ–°çš„ -new-article=新增文章 -no-articles-were-found=找ä¸åˆ°æ–‡ç« ã€‚ -no-articles-were-found-that-matched-the-keywords-x=No articles were found that matched the keywords: {0}. -no-completed-suggestion-was-found=找ä¸åˆ°è™•ç†ä¸­çš„回應。 -no-in-progress-suggestion-was-found=找ä¸åˆ°è™•ç†ä¸­çš„回應。 -no-new-suggestion-was-found=找ä¸åˆ°è™•ç†ä¸­çš„回應。 -no-subscriptions-were-found=找ä¸åˆ°è¨‚閱。 -nothing-was-imported-no-articles-were-found-with-one-of-the-supported-extensions-x=Nothing was imported. No articles were found with one of the supported extensions: {0}. (Automatic Copy) -parent-article=上層文章 -please-enter-a-friendly-url-that-starts-with-a-slash-and-contains-alphanumeric-characters-dashes-and-underscores=請輸入一個å‹å¥½çš„ URL,以一個正斜æ é–‹é ­ä¸¦åŒ…å«å­—æ¯æ•¸ä½å­—元〠劃線和底線。 (Automatic Translation) -please-enter-a-priority-that-is-greater-than-x=請輸入優先權大於 {0}。 -please-enter-a-valid-folder-name=請輸入一個有效的資料夾å稱。 (Automatic Translation) -please-enter-a-valid-source-url=請輸入正確來æºç¶²å€ã€‚ -please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet=請輸入以逗號分隔的portlet屬性字串以啟動這個portlet。 -please-select-at-least-one-section=è«‹é¸æ“‡è‡³å°‘一個部分。 -portlet-configuration-page-x-instance-id-x=Portlet 設定(é  - {0}, 實體 ID - {1}) -prioritization-strategy=優先戰略 (Automatic Translation) -recent-articles=最近文章 -resolve=解決 -saved-attachments=已儲存附件 -search-articles=æœå°‹æ–‡ç«  -sections=部分 -select-parent=鏿“‡çˆ¶ (Automatic Translation) -show-asset-entries=顯示財產æ¢ç›® -show-author-column=顯示作者欄 -show-create-date-column=顯示創建日期欄 -show-modified-date-column=顯示修改日期欄 -show-pagination=顯示é ç¢¼ -show-priority-column=顯示優先權欄 -show-ratings=顯示評等 -show-sections-title=顯示部分標題 -show-status-column=顯示狀態欄 -show-suggestions=Show Suggestions (Automatic Copy) -show-views-column=顯示檢視欄 -source-url=來æºç¶²å€ -suggestion-deleted-successfully=Suggestion deleted successfully. (Automatic Copy) -suggestion-in-progress-email=Suggestion in Progress Email (Automatic Copy) -suggestion-received-email=Suggestion Received Email (Automatic Copy) -suggestion-resolved-email=Suggestion Resolved Email (Automatic Copy) -suggestion-saved-successfully=Suggestion saved successfully. (Automatic Copy) -suggestion-status-updated-successfully=回應狀態已æˆåŠŸæ›´æ–°ã€‚ -templates=版型 -the-article-attachments-file-names=文章附件檔案å -the-article-content=文章內容 -the-article-content-diff=文章內容差異 -the-article-could-not-be-found=找ä¸åˆ°é€™ç¯‡æ–‡ç«  -the-article-title=文章標題 -the-article-title-diff=文章標題差異 -the-article-url=æ–‡ç« ç¶²å€ -the-article-version=文章版本 -the-comment-content=注釋內容 (Automatic Translation) -the-comment-could-not-be-found=找ä¸åˆ°è©•論。 -the-comment-create-date=注釋創建日期 (Automatic Translation) -the-company-id-associated-with-the-article=與文章關è¯çš„å…¬å¸ID -the-company-mx-associated-with-the-article=與文章關è¯çš„å…¬å¸MX -the-company-name-associated-with-the-article=與文章關è¯çš„å…¬å¸å稱 -the-email-address-of-the-user-who-added-the-article=被加入文章的使用者電å­éƒµä»¶ä½å€ -the-selected-article-no-longer-exists=被é¸å–文章ä¸å†å­˜åœ¨ã€‚ -the-site-name-associated-with-the-article=與文章關è¯çš„ç«™å -the-subscription-could-not-be-found=找ä¸åˆ°è¨‚閱。 -the-user-did-not-like-the-article=使用者ä¸å–œæ­¡é€™æ–‡ä»¶ã€‚ -the-user-liked-the-article=使用者喜歡這文件。 -the-user-who-added-the-article=被加入文章的使用者 -there-are-no-articles=沒有附件。 -there-are-no-articles-with-tag-x=沒有文章使用標籤 {0}。 -there-are-no-articles-with-x-x=沒有文章使用 {0} {1}。 -there-are-no-articles-with-x-x-and-tag-x=沒有文章使用 {0} {1} 與標籤 {2}。 -there-are-no-attachments=沒有附件。 -there-are-no-child-articles-for-x={0} æ²’æœ‰å­æ–‡ç« ã€‚ -there-are-x-suggestions=有 {0} 個建議。 -there-is-one-suggestion=有一個建議。 -upload-your-zip-file=上傳您的 ZIP 檔 (Automatic Translation) -upload-your-zip-file-help=Any file inside the ZIP file that matches one of the supported extensions ({0}) will be imported into the current folder as a Knowledge Base article. (Automatic Copy) -use-star-ratings=使用星號評等 -use-this-template=使用此模版 -use-thumbs-up-thumbs-down=使用讚/éœ -view-articles-with-tag-x=檢視使用標籤 {0} 的文章。 -view-articles-with-x-x=檢視使用 {0} {1} 的文章。 -view-articles-with-x-x-and-tag-x=檢視使用 {0} {1} 與標籤 {2} 的文章。 -was-this-information-helpful=這個資訊是有用的嗎? -what-did-you-like-the-most-what-would-you-improve=您最喜歡哪一個?您將改善哪一個? -x-pending={0} 個待決中 -you-sent-one-suggestion-for-this-article=您å°é€™æ–‡ä»¶é€å‡ºä¸€å€‹å»ºè­°ã€‚ -you-sent-x-suggestions-for-this-article=您å°é€™æ–‡ä»¶é€å‡º {0} 個建議。 \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/custom-sql/default.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/custom-sql/default.xml deleted file mode 100644 index 9f7a41aa3f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/custom-sql/default.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - SELECT - count(*) - FROM - KBArticle - INNER JOIN - KBFolder - ON - (KBArticle.kbFolderId = KBFolder.kbFolderId AND - KBArticle.groupId = KBFolder.groupId) - WHERE - KBArticle.groupId = ? AND - KBArticle.urlTitle = ? AND - KBFolder.urlTitle = ? AND - KBArticle.status IN ([$WORKFLOW_STATUS$]) - - - SELECT - KBArticle.* - FROM - KBArticle - INNER JOIN - KBFolder - ON - (KBArticle.kbFolderId = KBFolder.kbFolderId AND - KBArticle.groupId = KBFolder.groupId) - WHERE - KBArticle.groupId = ? AND - KBArticle.urlTitle = ? AND - KBFolder.urlTitle = ? AND - KBArticle.status IN ([$WORKFLOW_STATUS$]) - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portal.properties deleted file mode 100644 index 6657e108e7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portal.properties +++ /dev/null @@ -1,19 +0,0 @@ - -#comment - -m=\ - foo, - bar - -application.startup.events=com.liferay.google.docs.hook.event.AddGoogleDocsFileEntryTypeAction - -company.settings.form.miscellaneous=google-docs - -foo.bar=test - -users.last.name.required=true -convert.processes=com.liferay.portal.convert.ConvertDatabase - -breadcrumb.display.style.default=horizontal - -breadcrumb.display.style.options=horizontal,vertical \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portlet.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portlet.properties deleted file mode 100644 index 1f25a74fbc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portlet.properties +++ /dev/null @@ -1,60 +0,0 @@ -include-and-override=portlet-ext.properties - -admin.email.from.name= -admin.email.from.address= - -admin.email.kb.article.added.enabled=true -admin.email.kb.article.added.subject=com/liferay/knowledgebase/admin/dependencies/email_kb_article_added_subject.tmpl -admin.email.kb.article.added.body=com/liferay/knowledgebase/admin/dependencies/email_kb_article_added_body.tmpl - -admin.email.kb.article.suggestion.in.progress.enabled=true -admin.email.kb.article.suggestion.in.progress.subject=com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_in_progress_subject.tmpl -admin.email.kb.article.suggestion.in.progress.body=com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_in_progress_body.tmpl - -admin.email.kb.article.suggestion.received.enabled=true -admin.email.kb.article.suggestion.received.subject=com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_received_subject.tmpl -admin.email.kb.article.suggestion.received.body=com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_received_body.tmpl - -admin.email.kb.article.suggestion.resolved.enabled=true -admin.email.kb.article.suggestion.resolved.subject=com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_resolved_subject.tmpl -admin.email.kb.article.suggestion.resolved.body=com/liferay/knowledgebase/admin/dependencies/email_kb_suggestion_resolved_body.tmpl - -admin.email.kb.article.updated.enabled=true -admin.email.kb.article.updated.subject=com/liferay/knowledgebase/admin/dependencies/email_kb_article_updated_subject.tmpl -admin.email.kb.article.updated.body=com/liferay/knowledgebase/admin/dependencies/email_kb_article_updated_body.tmpl - -admin.kb.article.increment.priority.enabled=true - -admin.kb.article.sections= -admin.kb.article.default.sections= - -knowledge.base.display.selector[com.liferay.knowledgebase.model.KBArticle]=com.liferay.knowledgebase.display.selector.KBArticleKBArticleSelector -knowledge.base.display.selector[com.liferay.knowledgebase.model.KBFolder]=com.liferay.knowledgebase.display.selector.KBFolderKBArticleSelector - -# -# Set the maximum number of stars for ratings. -# -# Do not set this property unless you are either upgrading the portlet and would -# like to keep the previous maximum number of stars of 10, or this is the -# portlet does not have existing articles with ratings. -# -# If you choose to set this property even though there are existing articles -# with ratings, then those ratings for existing articles will remain. For -# example, a bad article with a 5 star rating out of 10 stars will continue to -# have 5 stars and may lead others to think it is a great article when it is -# not. -# -#knowledge.base.ratings.number.of.stars=10 - -knowledge.base.social.bookmarks.display.style=menu - -knowledge.base.source.url.edit.message.key=edit-on-github -knowledge.base.source.url.enabled=false - -markdown.importer.article.extensions=.markdown,.md -markdown.importer.article.intro=intro.markdown - -markdown.importer.image.file.extensions=.bmp,.gif,.jpeg,.jpg,.png -markdown.importer.image.folder=images/ - -resource.actions.configs=resource-actions/default.xml \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/resource-actions/default.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/resource-actions/default.xml deleted file mode 100644 index 4f570a0670..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/resource-actions/default.xml +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - 1 - - - ACCESS_IN_CONTROL_PANEL - CONFIGURATION - VIEW - - - - - ACCESS_IN_CONTROL_PANEL - CONFIGURATION - VIEW - - - - - 2 - - - ADD_TO_PAGE - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - CONFIGURATION - - - - - 3 - - - ADD_TO_PAGE - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - CONFIGURATION - - - - - 4 - - - ADD_TO_PAGE - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - CONFIGURATION - - - - - 5 - - - ADD_TO_PAGE - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - CONFIGURATION - - - - - com.liferay.knowledgebase.admin - - 1 - - - - ADD_KB_ARTICLE - ADD_KB_FOLDER - ADD_KB_TEMPLATE - DELETE_KB_ARTICLES - DELETE_KB_TEMPLATES - PERMISSIONS - SUBSCRIBE - UPDATE_KB_ARTICLES_PRIORITIES - VIEW_KB_TEMPLATES - VIEW_SUGGESTIONS - - - SUBSCRIBE - - - - ADD_KB_ARTICLE - ADD_KB_FOLDER - ADD_KB_TEMPLATE - DELETE_KB_ARTICLES - DELETE_KB_TEMPLATES - PERMISSIONS - SUBSCRIBE - UPDATE_KB_ARTICLES_PRIORITIES - VIEW_KB_TEMPLATES - VIEW_SUGGESTIONS - - - - - com.liferay.knowledgebase.display - - 2 - - - - ADD_KB_ARTICLE - ADD_KB_TEMPLATE - ADMINISTRATOR - PERMISSIONS - SUBSCRIBE - VIEW_KB_TEMPLATES - - - SUBSCRIBE - - - - ADD_KB_ARTICLE - ADD_KB_TEMPLATE - ADMINISTRATOR - PERMISSIONS - SUBSCRIBE - VIEW_KB_TEMPLATES - - - - - com.liferay.knowledgebase.model.KBArticle - - 1 - - - - DELETE - MOVE_KB_ARTICLE - PERMISSIONS - SUBSCRIBE - UPDATE - VIEW - - - SUBSCRIBE - VIEW - - - VIEW - - - DELETE - MOVE_KB_ARTICLE - PERMISSIONS - SUBSCRIBE - UPDATE - - - - - com.liferay.knowledgebase.model.KBFolder - - 1 - - - - ADD_KB_ARTICLE - ADD_KB_FOLDER - DELETE - MOVE_KB_FOLDER - PERMISSIONS - UPDATE - VIEW - - - VIEW - - - VIEW - - - ADD_KB_ARTICLE - ADD_KB_FOLDER - DELETE - MOVE_KB_FOLDER - PERMISSIONS - UPDATE - - - - - com.liferay.knowledgebase.model.KBTemplate - - 1 - - - - DELETE - PERMISSIONS - UPDATE - VIEW - - - VIEW - - - VIEW - - - DELETE - PERMISSIONS - UPDATE - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/service-ext.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/service-ext.properties deleted file mode 100644 index 35a4e088e9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/service-ext.properties +++ /dev/null @@ -1 +0,0 @@ -build.auto.upgrade=true \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/service.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/service.properties deleted file mode 100644 index 689d398646..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/service.properties +++ /dev/null @@ -1,41 +0,0 @@ -## -## 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=KB - build.number=15 - build.date=1423136031621 - 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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/web.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/web.xml deleted file mode 100644 index 4a9b228684..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - http://java.sun.com/jsp/jstl/core - /WEB-INF/tld/c.tld - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_action.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_action.jsp deleted file mode 100644 index c8a23a19e2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_action.jsp +++ /dev/null @@ -1,145 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -String mvcPath = ParamUtil.getString(request, "mvcPath"); - -ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); - -KBArticle kbArticle = (KBArticle)row.getObject(); - -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); -%> - - - - <% - PortletURL viewURL = kbArticleURLHelper.createViewWithRedirectURL(kbArticle, currentURL); - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_asset_entries.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_asset_entries.jsp deleted file mode 100644 index bf98b4a1b7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_asset_entries.jsp +++ /dev/null @@ -1,123 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); -%> - - - - <% - long[] groupIds = KBArticleAssetEntriesUtil.getGroupIds(company.getGroup(), kbArticle); - long[] assetTagIds = KBArticleAssetEntriesUtil.getAssetTagIds(groupIds, kbArticle); - %> - - - - <% - long[] classNameIds = new long[] {ClassNameLocalServiceUtil.getClassNameId(BlogsEntry.class), ClassNameLocalServiceUtil.getClassNameId(JournalArticle.class), ClassNameLocalServiceUtil.getClassNameId(KBArticle.class), ClassNameLocalServiceUtil.getClassNameId(MBMessage.class), ClassNameLocalServiceUtil.getClassNameId(WikiPage.class)}; - - List mostPopularAssetEntries = KBArticleAssetEntriesUtil.getAssetEntries(groupIds, classNameIds, assetTagIds, kbArticle.getResourcePrimKey(), 0, 10, "viewCount"); - List mostRecentAssetEntries = KBArticleAssetEntriesUtil.getAssetEntries(groupIds, classNameIds, assetTagIds, kbArticle.getResourcePrimKey(), 0, 10, "modifiedDate"); - %> - - -
    -
    - - - - -
    -
    - -
    - - - - - - <% - for (AssetEntry assetEntry : mostRecentAssetEntries) { - AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(assetEntry.getClassName()); - - AssetRenderer assetRenderer = assetRendererFactory.getAssetRenderer(assetEntry.getClassPK()); - %> - -
    - - - <%= dateFormatDate.format(assetEntry.getModifiedDate()) %> -
    - - <% - } - %> - -
    - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_asset_links.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_asset_links.jsp deleted file mode 100644 index 418adee44a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_asset_links.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); -%> - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_assets.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_assets.jsp deleted file mode 100644 index 54796846b8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_assets.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); -%> - - - - - - - - -
    - <%= html %> -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_child.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_child.jsp deleted file mode 100644 index 5dafd90272..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_child.jsp +++ /dev/null @@ -1,67 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -int status = (Integer)request.getAttribute(WebKeys.KNOWLEDGE_BASE_STATUS); - -List childKBArticles = KBArticleServiceUtil.getKBArticles(scopeGroupId, kbArticle.getResourcePrimKey(), status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new KBArticlePriorityComparator(true)); - -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); -%> - - -
    -
    - - <% - for (KBArticle childrenKBArticle : childKBArticles) { - %> - -
    -

    - - <% - PortletURL viewKBArticleURL = kbArticleURLHelper.createViewURL(childrenKBArticle); - %> - - <%= childrenKBArticle.getTitle() %> -

    - -
    - - - <%= childrenKBArticle.getDescription() %> - - -

    <%= StringUtil.shorten(HtmlUtil.extractText(childrenKBArticle.getContent()), 200) %>

    - - -
    -
    -
    -
    - - <% - } - %> - -
    -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_comment.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_comment.jsp deleted file mode 100644 index 5aca69fd55..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_comment.jsp +++ /dev/null @@ -1,122 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -KBComment kbComment = (KBComment)request.getAttribute("article_comment.jsp-kb_comment"); - -KBSuggestionListDisplayContext kbSuggestionListDisplayContext = (KBSuggestionListDisplayContext)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_SUGGESTION_LIST_DISPLAY_CONTEXT); - -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); -%> - -
    - - - - - -
    - - - - <% - PortletURL viewKBArticleURL = kbArticleURLHelper.createViewWithRedirectURL(kbArticle, currentURL); - %> - - -

    <%= HtmlUtil.escape(kbArticle.getTitle()) %>

    -
    - -
    - <%= HtmlUtil.replaceNewLine(HtmlUtil.escape(kbComment.getContent())) %> -
    - -
    - - - - - - - - - - - - -
    - -
    - - <% - DateSearchEntry dateSearchEntry = new DateSearchEntry(); - - dateSearchEntry.setDate(kbComment.getModifiedDate()); - - int suggestionStatus = kbComment.getStatus(); - %> - - <%= dateSearchEntry.getName(pageContext) %> - - - - -
    - - <% - int previousStatus = KnowledgeBaseUtil.getPreviousStatus(suggestionStatus); - int nextStatus = KnowledgeBaseUtil.getNextStatus(suggestionStatus); - %> - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_icons.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_icons.jsp deleted file mode 100644 index bee70a1260..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_icons.jsp +++ /dev/null @@ -1,122 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute("article_icons.jsp-kb_article"); - -int status = (Integer)request.getAttribute(WebKeys.KNOWLEDGE_BASE_STATUS); - -long resourcePrimKey = ParamUtil.getLong(request, "resourcePrimKey"); -%> - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_ratings.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_ratings.jsp deleted file mode 100644 index 3581a6cb02..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_ratings.jsp +++ /dev/null @@ -1,253 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -boolean showAdminSuggestionView = SuggestionPermission.contains(permissionChecker, scopeGroupId, kbArticle, ActionKeys.VIEW_SUGGESTIONS); - -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); -%> - - - - <% - int kbCommentsCount = 0; - int pendingKBCommentsCount = 0; - - if (showAdminSuggestionView) { - kbCommentsCount = KBCommentLocalServiceUtil.getKBCommentsCount(KBArticle.class.getName(), kbArticle.getClassPK()); - - pendingKBCommentsCount = KBCommentLocalServiceUtil.getKBCommentsCount(KBArticle.class.getName(), kbArticle.getClassPK(), new int[]{KBCommentConstants.STATUS_IN_PROGRESS, KBCommentConstants.STATUS_NEW}); - } - else { - kbCommentsCount = KBCommentLocalServiceUtil.getKBCommentsCount(themeDisplay.getUserId(), KBArticle.class.getName(), kbArticle.getClassPK()); - } - %> - - - - -
    - - - - - - - | - - - - - - - - () - - - - - - - - - - | - - - - - - - - () - - - - - - - - - -
    - - - -
    - - <% - PortletURL viewKBArticleURL = kbArticleURLHelper.createViewWithCommentsURL(kbArticle); - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - <% - boolean expanded = ParamUtil.getBoolean(request, "expanded"); - %> - - - - - <% - String navItem = ParamUtil.getString(request, "navItem", "viewNewSuggestions"); - - KBSuggestionListDisplayContext kbSuggestionListDisplayContext = new KBSuggestionListDisplayContext(kbArticle, navItem); - - request.setAttribute(WebKeys.KNOWLEDGE_BASE_KB_SUGGESTION_LIST_DISPLAY_CONTEXT, kbSuggestionListDisplayContext); - %> - -
    - -
    -
    - -
    - - - - - - - - - - -
    -

    - <%= kbComment.getContent() %> -

    - - -
    -
    - - -
    -
    -
    -
    -
    - - - A.one('#additionalSuggestionActionsContainer').delegate( - 'click', - function(event) { - var showNode = A.one('#' + event.currentTarget.getData('show-node-id')); - - showNode.toggleView(); - - var content = showNode.one('#content'); - - if (content) { - content.focus(); - } - }, - 'a' - ); - - A.one('#cancelSuggestion').on( - 'click', - function(event) { - var container = this.ancestor('#suggestionContainer'); - - container.hide(); - - var content = container.one('#content'); - - if (content) { - content.val(''); - } - } - ); - -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_search.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_search.jsp deleted file mode 100644 index b07ce9b942..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_search.jsp +++ /dev/null @@ -1,75 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticleDisplayTerms displayTerms = (KBArticleDisplayTerms)request.getAttribute("view.jsp-displayTerms"); -%> - - - -
    - - - - - - - - - - -
    - - - - - - - - - - - - - -
    -
    - - - Liferay.Util.toggleSelectBox('<%= displayTerms.ANYTIME %>', '<%= false %>', 'datesOptions'); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_search_results.jspf b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_search_results.jspf deleted file mode 100644 index 9c859c4a42..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_search_results.jspf +++ /dev/null @@ -1,49 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<% -List results = new ArrayList(); - -if (!searchTerms.hasSearchTerms()) { - total = KBArticleServiceUtil.getKBArticlesCount(scopeGroupId, parentResourcePrimKey, WorkflowConstants.STATUS_ANY); - - searchContainer.setTotal(total); - - results = KBArticleServiceUtil.getKBArticles(scopeGroupId, parentResourcePrimKey, WorkflowConstants.STATUS_ANY, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()); -} -else if (searchTerms.isAdvancedSearch()) { - KBArticleSearchDisplay kbArticleSearchDisplay = KBArticleServiceUtil.getKBArticleSearchDisplay(scopeGroupId, searchTerms.getTitle(), searchTerms.getContent(), searchTerms.getStatus(), searchTerms.getStartDate(timeZone), searchTerms.getEndDate(timeZone), searchTerms.isAndOperator(), searchTerms.getCurStartValues(), searchContainer.getCur(), searchContainer.getDelta(), searchContainer.getOrderByComparator()); - - iteratorURL.setParameter(searchTerms.CUR_START_VALUES, StringUtil.merge(kbArticleSearchDisplay.getCurStartValues())); - - results = kbArticleSearchDisplay.getResults(); - total = kbArticleSearchDisplay.getTotal(); - - searchContainer.setTotal(total); -} -else { - KBArticleSearchDisplay kbArticleSearchDisplay = KBArticleServiceUtil.getKBArticleSearchDisplay(scopeGroupId, searchTerms.getKeywords(), searchTerms.getKeywords(), WorkflowConstants.STATUS_ANY, null, null, false, searchTerms.getCurStartValues(), searchContainer.getCur(), searchContainer.getDelta(), searchContainer.getOrderByComparator()); - - iteratorURL.setParameter(searchTerms.CUR_START_VALUES, StringUtil.merge(kbArticleSearchDisplay.getCurStartValues())); - - results = kbArticleSearchDisplay.getResults(); - total = kbArticleSearchDisplay.getTotal(); - - searchContainer.setTotal(total); -} - -searchContainer.setResults(results); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_siblings.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_siblings.jsp deleted file mode 100644 index 7bae451f27..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_siblings.jsp +++ /dev/null @@ -1,72 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -KBArticle[] previousAndNextKBArticles = KBArticleLocalServiceUtil.getPreviousAndNextKBArticles(kbArticle.getKbArticleId()); - -KBArticle previousKBArticle = previousAndNextKBArticles[0]; -KBArticle nextKBArticle = previousAndNextKBArticles[2]; - -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); -%> - -
    - - - - <% - PortletURL previousKBArticleURL = kbArticleURLHelper.createViewURL(previousKBArticle); - %> - - - - - <%= HtmlUtil.escape(previousKBArticle.getTitle()) %> - - - - - - - - - - - - - - <% - PortletURL nextKBArticleURL = kbArticleURLHelper.createViewURL(nextKBArticle); - %> - - - <%= HtmlUtil.escape(nextKBArticle.getTitle()) %> - - - - - - - - - - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_social_bookmarks.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_social_bookmarks.jsp deleted file mode 100644 index 2dce007bae..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_social_bookmarks.jsp +++ /dev/null @@ -1,34 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); - -PortletURL viewKBArticleURL = kbArticleURLHelper.createViewURL(kbArticle); -%> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_tools.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_tools.jsp deleted file mode 100644 index a4b4783f30..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/article_tools.jsp +++ /dev/null @@ -1,115 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -int status = (Integer)request.getAttribute(WebKeys.KNOWLEDGE_BASE_STATUS); -%> - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - String taglibURL = "javascript:var printKBArticleWindow = window.open('" + printURL + "', 'printKBArticle', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680'); void(''); printKBArticleWindow.focus();"; - %> - - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/asset/full_content.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/asset/full_content.jsp deleted file mode 100644 index adc042660d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/asset/full_content.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); -%> - -<%= kbArticle.getContent() %> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/attachments.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/attachments.jsp deleted file mode 100644 index f00efa483c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/attachments.jsp +++ /dev/null @@ -1,139 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -long resourcePrimKey = BeanParamUtil.getLong(kbArticle, request, "resourcePrimKey"); - -List attachmentsFileEntries = new ArrayList(); - -if (kbArticle != null) { - attachmentsFileEntries = kbArticle.getAttachmentsFileEntries(); -} -%> - -
    - - -
    -
    -
    - - - -
    - -
    - - -

    - -
    - - <% - for (FileEntry fileEntry : attachmentsFileEntries) { - %> - -
    - - - - - - - <% - String taglibURL = "javascript:" + renderResponse.getNamespace() + "deleteFileEntry('" + fileEntry.getFileEntryId() + "');"; - %> - - -
    - - <% - } - %> - -
    -
    -
    - -<% -Date expirationDate = new Date(System.currentTimeMillis() + GetterUtil.getInteger(PropsUtil.get(PropsKeys.SESSION_TIMEOUT)) * Time.MINUTE); - -Ticket ticket = TicketLocalServiceUtil.addTicket(user.getCompanyId(), User.class.getName(), user.getUserId(), TicketConstants.TYPE_IMPERSONATE, null, expirationDate, new ServiceContext()); -%> - - - new Liferay.Upload( - { - boundingBox: '#fileUpload', - deleteFile: '&ticketKey=<%= ticket.getKey() %>', - fileDescription: '<%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA)) %>', - maxFileSize: '<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE) %> B', - metadataContainer: '#selectedFileNameMetadataContainer', - metadataExplanationContainer: '#metadataExplanationContainer', - namespace: '', - tempFileURL: { - method: Liferay.Service.bind('/knowledge-base-portlet.kbarticle/get-temp-attachment-names'), - params: { - groupId: <%= scopeGroupId %>, - tempFolderName: 'com.liferay.knowledgebase.admin.portlet.AdminPortlet' - } - }, - uploadFile: '&ticketKey=<%= ticket.getKey() %>' - } - ); - - - - Liferay.provide( - window, - 'deleteFileEntry', - function(fileEntryId) { - var A = AUI(); - - var removeFileEntryIdsInput = A.one('#removeFileEntryIds'); - - var fileEntries = removeFileEntryIdsInput.val(); - - if (fileEntries.length) { - fileEntries += ','; - } - - fileEntries += fileEntryId; - - removeFileEntryIdsInput.val(fileEntries); - - var fileEntryIdWrapper = A.one('#fileEntryIdWrapper' + fileEntryId); - - if (fileEntryIdWrapper) { - fileEntryIdWrapper.hide(); - } - }, - ['aui-base'] - ); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/add_article_button.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/add_article_button.jsp deleted file mode 100644 index 12cfabee5a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/add_article_button.jsp +++ /dev/null @@ -1,71 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -List kbTemplates = KBTemplateServiceUtil.getGroupKBTemplates(scopeGroupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, OrderByComparatorFactoryUtil.create("KBTemplate", "title", false)); - -long parentResourceClassNameId = ParamUtil.getLong(request, "parentResourceClassNameId", PortalUtil.getClassNameId(KBFolderConstants.getClassName())); -long parentResourcePrimKey = ParamUtil.getLong(request, "parentResourcePrimKey", KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); -%> - - - - - - - - - - - - - - - - <% - for (KBTemplate kbTemplate : kbTemplates) { - %> - - - - - - - - - - - - <% - } - %> - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/add_folder_button.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/add_folder_button.jsp deleted file mode 100644 index b6facae53b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/add_folder_button.jsp +++ /dev/null @@ -1,34 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -long parentResourcePrimKey = ParamUtil.getLong(request, "parentResourcePrimKey", KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); -%> - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/edit_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/edit_article.jsp deleted file mode 100644 index b2bb40fc00..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/edit_article.jsp +++ /dev/null @@ -1,297 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -KBTemplate kbTemplate = (KBTemplate)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_TEMPLATE); - -long resourcePrimKey = BeanParamUtil.getLong(kbArticle, request, "resourcePrimKey"); -long parentResourceClassNameId = BeanParamUtil.getLong(kbArticle, request, "parentResourceClassNameId", PortalUtil.getClassNameId(KBFolderConstants.getClassName())); -long parentResourcePrimKey = BeanParamUtil.getLong(kbArticle, request, "parentResourcePrimKey", KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - -String content = BeanParamUtil.getString(kbArticle, request, "content", BeanPropertiesUtil.getString(kbTemplate, "content")); -String[] sections = AdminUtil.unescapeSections(BeanPropertiesUtil.getString(kbArticle, "sections", StringUtil.merge(PortletPropsValues.ADMIN_KB_ARTICLE_DEFAULT_SECTIONS))); -%> - - - - - - - - - - - - - - - - - - - - - <% - long fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE); - - if (fileMaxSize == 0) { - fileMaxSize = PrefsPropsUtil.getLong(PropsKeys.UPLOAD_SERVLET_REQUEST_IMPL_MAX_SIZE); - } - - fileMaxSize /= 1024; - %> - - - - - - - - - - - - - - - - -
    - -
    -
    - -
    - -
    -
    -
    - - - - - - - - - - - - - <% - StringBundler sb = new StringBundler(); - - sb.append("/-/"); - - Portlet portlet = PortletLocalServiceUtil.getPortletById(portletDisplay.getId()); - - sb.append(portlet.getFriendlyURLMapping()); - - long kbFolderId = KnowledgeBaseUtil.getKBFolderId(parentResourceClassNameId, parentResourcePrimKey); - - if (kbFolderId != KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) { - KBFolder kbFolder = KBFolderLocalServiceUtil.getKBFolder(kbFolderId); - - sb.append(StringPool.SLASH); - sb.append(kbFolder.getUrlTitle()); - } - %> - - - - - - - - - - - - - - - - - - - - - - - - - - <% - Map sectionsMap = new TreeMap(); - - for (String section : PortletPropsValues.ADMIN_KB_ARTICLE_SECTIONS) { - sectionsMap.put(LanguageUtil.get(pageContext, section), section); - } - - for (Map.Entry entry : sectionsMap.entrySet()) { - %> - - - - <% - } - %> - - - - - - - - - - - - - - -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - function initEditor() { - return '<%= UnicodeFormatter.toString(content) %>'; - } - - - - var form = A.one('#fm'); - var titleInput = A.one('#title'); - var urlTitleInput = A.one('#urlTitle'); - - var publishButton = form.one('#publish'); - - var urlTitleCustomized = false; - - titleInput.on( - 'input', - function(event) { - if (!urlTitleCustomized) { - var urlTitle = titleInput.val(); - - urlTitle = urlTitle.replace(/[^a-zA-Z0-9_-]/g, '-'); - - if (urlTitle[0] === '-') { - urlTitle = urlTitle.replace(/^-+/, ''); - } - - urlTitle = urlTitle.replace(/--+/g, '-'); - - urlTitleInput.val('/' + urlTitle.toLowerCase()); - } - } - ); - - urlTitleInput.on( - 'input', - function() { - urlTitleCustomized = true; - } - ); - - publishButton.on( - 'click', - function() { - var workflowActionInput = form.one('#workflowAction'); - - if (workflowActionInput) { - workflowActionInput.val('<%= WorkflowConstants.ACTION_PUBLISH %>'); - } - } - ); - - form.on( - 'submit', - function() { - var contentInput = form.one('#content'); - - if (contentInput) { - contentInput.val(editor.getHTML()); - } - - updateMultipleKBArticleAttachments(); - } - ); - - var updateMultipleKBArticleAttachments = function() { - var Lang = A.Lang; - - var selectedFileNameContainer = A.one('#selectedFileNameContainer'); - - var TPL_INPUT = ''; - - var values = A.all('input[name=selectUploadedFileCheckbox]:checked').val(); - - var buffer = []; - - for (var i = 0; i < values.length; i++) { - buffer[i] = Lang.sub( - TPL_INPUT, - { - id: i, - value: values[i] - } - ); - } - - selectedFileNameContainer.html(buffer.join('')); - }; - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/edit_folder.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/edit_folder.jsp deleted file mode 100644 index 366fe62c3b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/edit_folder.jsp +++ /dev/null @@ -1,77 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -long kbFolderId = ParamUtil.getLong(request, "kbFolderId"); - -KBFolder kbFolder = null; - -if (kbFolderId != 0) { - kbFolder = KBFolderServiceUtil.getKBFolder(kbFolderId); -} - -long defaultParentResourcePrimKey = KBFolderConstants.DEFAULT_PARENT_FOLDER_ID; - -if (kbFolder != null) { - defaultParentResourcePrimKey = kbFolder.getParentKBFolderId(); -} - -long parentResourcePrimKey = ParamUtil.getLong(request, "parentResourcePrimKey", defaultParentResourcePrimKey); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/edit_template.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/edit_template.jsp deleted file mode 100644 index e163dee99e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/edit_template.jsp +++ /dev/null @@ -1,81 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBTemplate kbTemplate = (KBTemplate)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_TEMPLATE); - -long kbTemplateId = BeanParamUtil.getLong(kbTemplate, request, "kbTemplateId"); - -String content = BeanParamUtil.getString(kbTemplate, request, "content"); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - function initEditor() { - return '<%= UnicodeFormatter.toString(content) %>'; - } - - function updateKBTemplate() { - document.fm.<%= Constants.CMD %>.value = '<%= (kbTemplate == null) ? Constants.ADD : Constants.UPDATE %>'; - document.fm.content.value = window.editor.getHTML(); - submitForm(document.fm); - } - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/error.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/error.jsp deleted file mode 100644 index 88ffdf0d4e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/error.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/history.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/history.jsp deleted file mode 100644 index 81819a1411..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/history.jsp +++ /dev/null @@ -1,306 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -int status = (Integer)request.getAttribute(WebKeys.KNOWLEDGE_BASE_STATUS); - -int sourceVersion = ParamUtil.getInteger(request, "sourceVersion", kbArticle.getVersion() - 1); -int targetVersion = ParamUtil.getInteger(request, "targetVersion", kbArticle.getVersion()); - -String orderByCol = ParamUtil.getString(request, "orderByCol", "version"); -String orderByType = ParamUtil.getString(request, "orderByType", "desc"); - -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); -%> - - - - - - - - - - - - - - - <% - RowChecker rowChecker = new RowChecker(renderResponse); - - rowChecker.setAllRowIds(null); - - int selStatus = KBArticlePermission.contains(permissionChecker, kbArticle, ActionKeys.UPDATE) ? WorkflowConstants.STATUS_ANY : status; - %> - - - - - - - - - - - - - - - - - - - - - <%= curKBArticle.getVersion() %> - - - - () - - - () - - - () - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - revertURL.setParameter("section", AdminUtil.unescapeSections(curKBArticle.getSections())); - %> - - - - - - -
    -
    - -
    - -
    - - <% - PortletURL viewKBArticleURL = kbArticleURLHelper.createViewURL(kbArticle); - %> - - -
    -
    - -
    - -
    - - - - - - -
    -
    -
    - - - Liferay.provide( - window, - 'compare', - function() { - var A = AUI(); - - var rowIds = A.all('input[name=rowIds]:checked'); - - var sourceVersion = A.one('input[name="sourceVersion"]'); - var targetVersion = A.one('input[name="targetVersion"]'); - - var rowIdsSize = rowIds.size(); - - if (rowIdsSize === 1) { - if (sourceVersion) { - sourceVersion.val(rowIds.item(0).val()); - } - } - else if (rowIdsSize == 2) { - if (sourceVersion) { - sourceVersion.val(rowIds.item(1).val()); - } - - if (targetVersion) { - targetVersion.val(rowIds.item(0).val()); - } - } - - submitForm(document.fm); - }, - ['aui-base', 'selector-css3'] - ); - - Liferay.provide( - window, - 'initRowsChecked', - function() { - var A = AUI(); - - var rowIds = A.all('input[name=rowIds]'); - - rowIds.each( - function(item, index, collection) { - if (index >= 2) { - item.attr('checked', false); - } - } - ); - }, - ['aui-base'] - ); - - Liferay.provide( - window, - 'updateRowsChecked', - function(element) { - var A = AUI(); - - var rowsChecked = A.all('input[name=rowIds]:checked'); - - if (rowsChecked.size() > 2) { - var index = 2; - - if (rowsChecked.item(2).compareTo(element)) { - index = 1; - } - - rowsChecked.item(index).attr('checked', false); - } - }, - ['aui-base', 'selector-css3'] - ); - - - - initRowsChecked(); - - A.all('input[name=rowIds]').on( - 'click', - function(event) { - updateRowsChecked(event.currentTarget); - } - ); - - -<%! -private static String _removeXMLDeclaration(String string) { - if (string.startsWith(""); - - string = string.substring(index + 2); - } - - return string; -} -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/move_object.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/move_object.jsp deleted file mode 100644 index db4b36cc59..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/move_object.jsp +++ /dev/null @@ -1,82 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -int status = (Integer)request.getAttribute(WebKeys.KNOWLEDGE_BASE_STATUS); - -long kbArticleClassNameId = PortalUtil.getClassNameId(KBArticleConstants.getClassName()); - -long resourceClassNameId = ParamUtil.getLong(request, "resourceClassNameId"); -long resourcePrimKey = ParamUtil.getLong(request, "resourcePrimKey"); -long parentResourceClassNameId = ParamUtil.getLong(request, "parentResourceClassNameId"); -long parentResourcePrimKey = ParamUtil.getLong(request, "parentResourcePrimKey"); - -String title = null; -String parentTitle = null; -double priority = KBArticleConstants.DEFAULT_PRIORITY; - -if (resourceClassNameId == kbArticleClassNameId) { - KBArticle kbArticle = KBArticleServiceUtil.fetchLatestKBArticle(resourcePrimKey, status); - - title = kbArticle.getTitle(); - parentTitle = kbArticle.getParentTitle(locale, status); - priority = kbArticle.getPriority(); -} -else { - KBFolder kbFolder = KBFolderServiceUtil.getKBFolder(resourcePrimKey); - - title = kbFolder.getName(); - parentTitle = kbFolder.getParentTitle(locale); -} -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/print_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/print_article.jsp deleted file mode 100644 index a97ea1e4a8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/print_article.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); -%> - -
    -
    - <%= kbArticle.getTitle() %> -
    - -
    - -
    -
    - -
    - <%= kbArticle.getContent() %> -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/print_template.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/print_template.jsp deleted file mode 100644 index b86bf6c3cf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/print_template.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBTemplate kbTemplate = (KBTemplate)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_TEMPLATE); -%> - -
    -
    - <%= kbTemplate.getTitle() %> -
    - -
    - -
    -
    - -
    - <%= kbTemplate.getContent() %> -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/select_parent.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/select_parent.jsp deleted file mode 100644 index 95bfb652cf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/select_parent.jsp +++ /dev/null @@ -1,272 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -int status = (Integer)request.getAttribute(WebKeys.KNOWLEDGE_BASE_STATUS); - -long kbFolderClassNameId = PortalUtil.getClassNameId(KBFolderConstants.getClassName()); - -long resourceClassNameId = ParamUtil.getLong(request, "resourceClassNameId"); -long resourcePrimKey = ParamUtil.getLong(request, "resourcePrimKey"); -long parentResourceClassNameId = ParamUtil.getLong(request, "parentResourceClassNameId", kbFolderClassNameId); -long parentResourcePrimKey = ParamUtil.getLong(request, "parentResourcePrimKey", KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); -long originalParentResourceClassNameId = ParamUtil.getLong(request, "originalParentResourceClassNameId"); -long originalParentResourcePrimKey = ParamUtil.getLong(request, "originalParentResourcePrimKey"); - -String orderByCol = ParamUtil.getString(request, "orderByCol", "priority"); -String orderByType = ParamUtil.getString(request, "orderByType", "desc"); -%> - - - - - - - - - <% - KBFolder oldParentKBFolder = KBFolderServiceUtil.getKBFolder(originalParentResourcePrimKey); - %> - - - - - - - - - <% - Map data = new HashMap(); - - data.put("priority", KBArticleConstants.DEFAULT_PRIORITY); - data.put("resourceClassNameId", kbFolderClassNameId); - data.put("resourcePrimKey", KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - data.put("title", StringPool.BLANK); - %> - - - - -
    -
    - - <% - KnowledgeBaseUtil.addPortletBreadcrumbEntries(originalParentResourceClassNameId, originalParentResourcePrimKey, parentResourceClassNameId, parentResourcePrimKey, "/admin/common/select_parent.jsp", request, renderResponse); - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%= kbFolder.getName() %> - - - - - - - - - - - - <% - Map data = new HashMap(); - - data.put("priority", KBArticleConstants.DEFAULT_PRIORITY); - data.put("resourceClassNameId", kbFolder.getClassNameId()); - data.put("resourcePrimKey", kbFolder.getKbFolderId()); - data.put("title", kbFolder.getName()); - %> - - - - - - - - - - - - - - - - - - - - - - - - - - <% - if ((curKBArticle.getResourcePrimKey() == resourcePrimKey) || (KBArticleServiceUtil.getKBArticlesCount(scopeGroupId, curKBArticle.getResourcePrimKey(), status) == 0)) { - rowURL = null; - } - %> - - - - - - - - - - <% - Map data = new HashMap(); - - data.put("priority", curKBArticle.getPriority()); - data.put("resourceClassNameId", curKBArticle.getClassNameId()); - data.put("resourcePrimKey", curKBArticle.getResourcePrimKey()); - data.put("title", curKBArticle.getTitle()); - %> - - - - - - - -
    -
    - - - var Util = Liferay.Util; - - A.one('#fm').delegate( - 'click', - function(event) { - var result = Util.getAttributes(event.currentTarget, 'data-'); - - Util.getOpener().Liferay.fire('selectKBObject', result); - - Util.getWindow().hide(); - }, - '.selector-button' - ); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/view_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/view_article.jsp deleted file mode 100644 index 25f7499f80..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/view_article.jsp +++ /dev/null @@ -1,92 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -if (enableKBArticleViewCountIncrement && !kbArticle.isDraft() && !kbArticle.isPending()) { - KBArticle latestKBArticle = KBArticleLocalServiceUtil.getLatestKBArticle(kbArticle.getResourcePrimKey(), WorkflowConstants.STATUS_APPROVED); - - KBArticleLocalServiceUtil.updateViewCount(themeDisplay.getUserId(), kbArticle.getResourcePrimKey(), latestKBArticle.getViewCount() + 1); - - AssetEntryServiceUtil.incrementViewCounter(KBArticle.class.getName(), latestKBArticle.getClassPK()); -} -%> - - - - - - - -
    - -
    - - -
    - -
    -
    - -
    - -

    - <%= HtmlUtil.escape(kbArticle.getTitle()) %> -

    - - -
    - - - -
    -
    -
    -
    -
    - -<% -request.setAttribute("article_icons.jsp-kb_article", kbArticle); -%> - - - -
    -
    - <%= kbArticle.getContent() %> -
    - - - - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/view_suggestions_by_status.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/view_suggestions_by_status.jsp deleted file mode 100644 index 2a5f8bde32..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/view_suggestions_by_status.jsp +++ /dev/null @@ -1,76 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBSuggestionListDisplayContext kbSuggestionListDisplayContext = (KBSuggestionListDisplayContext)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_SUGGESTION_LIST_DISPLAY_CONTEXT); - -String navItem = kbSuggestionListDisplayContext.getSelectedNavItem(); -%> - - - - - <% - int newKBCommentsCount = kbSuggestionListDisplayContext.getNewKBCommentsCount(); - - String newKBCommentsLabel = String.format("%s (%s)", LanguageUtil.get(pageContext, "new"), newKBCommentsCount); - %> - - - - <% - int inProgressKBCommentsCount = kbSuggestionListDisplayContext.getInProgressKBCommentsCount(); - - String inProgressKBCommentsLabel = String.format("%s (%s)", LanguageUtil.get(pageContext, "in-progress"), inProgressKBCommentsCount); - %> - - - - <% - int completedKBCommentsCount = kbSuggestionListDisplayContext.getCompletedKBCommentsCount(); - - String completedLabel = String.format("%s (%s)", LanguageUtil.get(pageContext, "resolved"), completedKBCommentsCount); - %> - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/view_template.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/view_template.jsp deleted file mode 100644 index 64e1de22e8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/common/view_template.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBTemplate kbTemplate = (KBTemplate)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_TEMPLATE); -%> - -
    -
    - <%= HtmlUtil.escape(kbTemplate.getTitle()) %> -
    - -
    - -
    -
    - -
    - - <% - request.setAttribute("template_icons.jsp-kb_template", kbTemplate); - %> - - - - <%= kbTemplate.getContent() %> - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/configuration.jsp deleted file mode 100644 index 7c3223366d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/configuration.jsp +++ /dev/null @@ -1,433 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -String tabs2 = ParamUtil.getString(request, "tabs2", "general"); -String tabs3 = ParamUtil.getString(request, "tabs3", "article"); - -String emailFromName = ParamUtil.getString(request, "emailFromName", AdminUtil.getEmailFromName(portletPreferences, company.getCompanyId())); -String emailFromAddress = ParamUtil.getString(request, "emailFromAddress", AdminUtil.getEmailFromAddress(portletPreferences, company.getCompanyId())); - -boolean emailKBArticleAddedEnabled = ParamUtil.getBoolean(request, "emailKBArticleAddedEnabled", AdminUtil.getEmailKBArticleAddedEnabled(portletPreferences)); -String emailKBArticleAddedSubject = ParamUtil.getString(request, "emailKBArticleAddedSubject", AdminUtil.getEmailKBArticleAddedSubject(portletPreferences)); -String emailKBArticleAddedBody = ParamUtil.getString(request, "emailKBArticleAddedBody", AdminUtil.getEmailKBArticleAddedBody(portletPreferences)); - -boolean emailKBArticleSuggestionInProgressEnabled = ParamUtil.getBoolean(request, "emailKBArticleSuggestionInProgressEnabled", AdminUtil.getEmailKBArticleSuggestionInProgressEnabled(portletPreferences)); -String emailKBArticleSuggestionInProgressSubject = ParamUtil.getString(request, "emailKBArticleSuggestionInProgressSubject", AdminUtil.getEmailKBArticleSuggestionInProgressSubject(portletPreferences)); -String emailKBArticleSuggestionInProgressBody = ParamUtil.getString(request, "emailKBArticleSuggestionInProgressBody", AdminUtil.getEmailKBArticleSuggestionInProgressBody(portletPreferences)); - -boolean emailKBArticleSuggestionReceivedEnabled = ParamUtil.getBoolean(request, "emailKBArticleSuggestionReceivedEnabled", AdminUtil.getEmailKBArticleSuggestionReceivedEnabled(portletPreferences)); -String emailKBArticleSuggestionReceivedSubject = ParamUtil.getString(request, "emailKBArticleSuggestionReceivedSubject", AdminUtil.getEmailKBArticleSuggestionReceivedSubject(portletPreferences)); -String emailKBArticleSuggestionReceivedBody = ParamUtil.getString(request, "emailKBArticleSuggestionReceivedBody", AdminUtil.getEmailKBArticleSuggestionReceivedBody(portletPreferences)); - -boolean emailKBArticleSuggestionResolvedEnabled = ParamUtil.getBoolean(request, "emailKBArticleSuggestionResolvedEnabled", AdminUtil.getEmailKBArticleSuggestionResolvedEnabled(portletPreferences)); -String emailKBArticleSuggestionResolvedSubject = ParamUtil.getString(request, "emailKBArticleSuggestionResolvedSubject", AdminUtil.getEmailKBArticleSuggestionResolvedSubject(portletPreferences)); -String emailKBArticleSuggestionResolvedBody = ParamUtil.getString(request, "emailKBArticleSuggestionResolvedBody", AdminUtil.getEmailKBArticleSuggestionResolvedBody(portletPreferences)); - -boolean emailKBArticleUpdatedEnabled = ParamUtil.getBoolean(request, "emailKBArticleUpdatedEnabled", AdminUtil.getEmailKBArticleUpdatedEnabled(portletPreferences)); -String emailKBArticleUpdatedSubject = ParamUtil.getString(request, "emailKBArticleUpdatedSubject", AdminUtil.getEmailKBArticleUpdatedSubject(portletPreferences)); -String emailKBArticleUpdatedBody = ParamUtil.getString(request, "emailKBArticleUpdatedBody", AdminUtil.getEmailKBArticleUpdatedBody(portletPreferences)); - -String editorParam = StringPool.BLANK; -String editorBody = StringPool.BLANK; - -if (tabs2.equals("article-added-email")) { - editorParam = "emailKBArticleAddedBody"; - editorBody = emailKBArticleAddedBody; -} -else if (tabs2.equals("article-updated-email")) { - editorParam = "emailKBArticleUpdatedBody"; - editorBody = emailKBArticleUpdatedBody; -} -else if (tabs2.equals("suggestion-in-progress-email")) { - editorParam = "emailKBArticleSuggestionInProgressBody"; - editorBody = emailKBArticleSuggestionInProgressBody; -} -else if (tabs2.equals("suggestion-received-email")) { - editorParam = "emailKBArticleSuggestionReceivedBody"; - editorBody = emailKBArticleSuggestionReceivedBody; -} -else if (tabs2.equals("suggestion-resolved-email")) { - editorParam = "emailKBArticleSuggestionResolvedBody"; - editorBody = emailKBArticleSuggestionResolvedBody; -} -%> - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - -
    -
    - - - - - -
    -

    - -
    -
    - [$ARTICLE_USER_ADDRESS$] -
    -
    - -
    -
    - [$ARTICLE_USER_NAME$] -
    -
    - -
    -
    - [$CATEGORY_TITLE$] -
    -
    - -
    -
    - [$COMPANY_ID$] -
    -
    - -
    -
    - [$COMPANY_MX$] -
    -
    - -
    -
    - [$COMPANY_NAME$] -
    -
    - -
    -
    - [$SITE_NAME$] -
    -
    - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    -

    - -
    -
    - [$ARTICLE_ATTACHMENTS$] -
    -
    - -
    -
    - [$ARTICLE_CONTENT$] -
    -
    - -
    -
    - [$ARTICLE_CONTENT_DIFF$] -
    -
    - -
    -
    - [$ARTICLE_TITLE$] -
    -
    - -
    -
    - [$ARTICLE_TITLE_DIFF$] -
    -
    - -
    -
    - [$ARTICLE_URL$] -
    -
    - -
    -
    - [$ARTICLE_USER_ADDRESS$] -
    -
    - -
    -
    - [$ARTICLE_USER_NAME$] -
    -
    - -
    -
    - [$ARTICLE_VERSION$] -
    -
    - -
    -
    - [$CATEGORY_TITLE$] -
    -
    - -
    -
    - [$COMPANY_ID$] -
    -
    - -
    -
    - [$COMPANY_MX$] -
    -
    - -
    -
    - [$COMPANY_NAME$] -
    -
    - -
    -
    - [$FROM_ADDRESS$] -
    -
    - <%= HtmlUtil.escape(emailFromAddress) %> -
    -
    - [$FROM_NAME$] -
    -
    - <%= HtmlUtil.escape(emailFromName) %> -
    -
    - [$PORTAL_URL$] -
    -
    - <%= PortalUtil.getPortalURL(themeDisplay) %> -
    -
    - [$SITE_NAME$] -
    -
    - -
    -
    - [$TO_ADDRESS$] -
    -
    - -
    -
    - [$TO_NAME$] -
    -
    - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - -
    -
    - [$ARTICLE_CONTENT$] -
    -
    - -
    -
    - [$ARTICLE_TITLE$] -
    -
    - -
    -
    - [$ARTICLE_URL$] -
    -
    - -
    -
    - [$COMMENT_CONTENT$] -
    -
    - -
    -
    - [$COMMENT_CREATE_DATE$] -
    -
    - -
    -
    - [$TO_ADDRESS$] -
    -
    - -
    -
    - [$TO_NAME$] -
    -
    - -
    -
    -
    -
    - - - - - - - - - -
    - - -
    - - - - - - -
    - - - - - -
    -
    -
    - - - - -
    -
    - - - - Liferay.Util.toggleBoxes('enableKBArticleRatingsCheckbox', 'ratingsType'); - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/css/common.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/css/common.css deleted file mode 100644 index a63d997808..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/css/common.css +++ /dev/null @@ -1,449 +0,0 @@ -@import "compass"; -@import "mixins"; - -/* ---------- Configuration ---------- */ - -.portlet-configuration { - .kb-block-labels .field-label { - display: block; - } - - .kb-field-wrapper { - margin: 10px 0; - - .field-wrapper-content { - margin: 0; - } - } - - .kb-ratings-type { - margin-left: 15px; - } - - .kb-submit-buttons { - margin: 0; - padding: 10px 0 0; - } - - .social-boomarks-options { - margin-left: 15px; - } -} - -/* ---------- Portal ---------- */ - -.controls-hidden .kb-article-icons { - display: none; -} - -.knowledge-base-portlet { - .field-inline { - display: inline-block; - } - - .fieldset { - padding: 0; - - .lfr-search-container .field-content { - margin: 0; - } - } - - .table-cell .control-group { - margin-bottom: 0; - - .field { - margin-bottom: 0; - } - } - - .tagselector-content { - margin-bottom: 0; - } - - .taglib-page-iterator { - .search-pages .page-links { - padding-top: 5px; - } - - .search-results { - padding-top: 6px; - } - } - - .taglib-ratings.stars { - margin: 15px 0 0; - padding: 0; - } - - /* ---------- Portlet ---------- */ - - .kb-add-article-button { - font-weight: normal; - } - - .kb-article-child { - margin: 15px 0 0; - - @include respond-to(desktop) { - .kb-elements .kb-element { - display: inline-table; - margin: 1% 2%; - padding: 0 2%; - width: 41%; - } - } - - .kb-element-header { - font-size: 21px; - line-height: 25px; - margin-bottom: 15px; - - a { - display: block; - } - } - - .kb-element-body a { - display: block; - margin-top: 5px; - } - } - - .kb-article-comment { - border-top: 1px dotted; - margin: 20px; - padding: 10px; - - .lfr-table { - vertical-align: top; - width: 100%; - - .kb-article-comment-body { - word-break: normal; - } - - .kb-article-comment-user { - text-align: center; - width: 30%; - } - } - } - - .kb-article-previous-comments { - clear: both; - margin-left: 15px; - - .kb-article-add-comment { - margin: 10px 25px; - } - - .kb-suggestion-actions { - margin: 10px 0; - } - } - - .kb-article-suggestion { - clear: both; - - textarea { - min-width: 98%; - padding: 1%; - width: 98%; - } - - div.control-group { - margin-bottom: 5px; - } - } - - @include respond-to(desktop) { - .kb-article-suggestion { - margin-left: 25px; - - textarea { - max-width: 500px; - } - } - } - - .kb-article-suggestion-actions { - clear: both; - display: inline-block; - padding: 10px 20px; - } - - .kb-article-siblings { - overflow: auto; - padding: 1em 0; - width: 100%; - - .kb-article-next, .kb-article-previous { - position: relative; - width: 45%; - - .icon { - line-height: inherit; - position: absolute; - top: 0; - - &.icon-circle-arrow-right { - right: 0; - } - - &.icon-circle-arrow-left { - left: 0; - } - } - - .title { - display: block; - - @include ellipsis; - } - } - - .kb-article-next { - float: right; - text-align: right; - - .title { - padding-right: 15px; - } - } - - .kb-article-previous { - float: left; - text-align: left; - - .title { - padding-left: 15px; - } - } - } - - .kb-article-comment-date, .kb-article-comment-helpful { - margin-top: 10px; - } - - .kb-article-tools { - float: right; - margin: 5px 0 5px; - } - - .kb-attachments { - margin: 5px 0 0; - } - - .kb-block-labels .field-label { - display: block; - } - - .kb-bulk-action-button-holder { - margin-bottom: 15px; - margin-top: 15px; - } - - .kb-column-no-wrap { - white-space: nowrap; - } - - .kb-column-score { - width: 85px; - } - - .kb-edit-link { - margin: 5px 0 0; - } - - .kb-entity-body { - padding: 0 7px; - - .kb-article-asset-entries { - margin: 15px 0 0; - - .kb-info { - padding-left: 5px; - } - - .kb-most-popular-column { - padding: 0 0 0 20px; - width: 40%; - - .kb-header { - margin: 0 -7px 0 -27px; - padding: 0 7px; - } - } - - .kb-most-recent-column { - padding: 0 20px; - width: 60%; - - .kb-header { - margin: 0 0 0 -27px; - padding: 0 7px; - } - } - - .kb-title { - display: inline; - margin: 5px 0 0; - - a { - margin: 0 0 0 -20px; - } - } - } - - .kb-article-assets, .kb-article-attachments { - margin: 10px 0 0; - } - - .kb-article-comments, .kb-template-comments { - margin-top: 15px; - - .field-content { - margin: 0; - } - - .kb-all-comments { - margin: 0 10px 10px; - } - - .kb-helpful-container { - margin: 25px, 0, 25px, 5px; - - .kb-suggestion-title { - padding: 0; - } - } - - .kb-helpful-inputs { - margin: 4px 5px 0; - } - - .kb-helpful-text { - margin: 0 10px 0 0; - } - } - - .kb-article-icons, .kb-template-icons { - padding: 0 0 5px; - } - } - - .kb-entity-footer { - margin: 10px 0 0; - } - - .kb-entity-header { - margin: 5px 0 5px 0; - padding: 0 5px 3px; - - .kb-article-source-url { - margin-right: 10px; - } - } - - .kb-field-wrapper { - margin: 15px 15px 0 15px; - - .field-wrapper-content { - margin: 0; - } - } - - .kb-panel-separator { - margin-bottom: 15px; - } - - .kb-priority { - padding-left: 10px; - } - - .kb-select-article-breadcrumbs { - margin: 0 0 5px; - } - - .kb-submit-buttons { - margin-top: 0; - padding-top: 10px; - } -} - -/* Skin */ - -.knowledge-base-portlet { - .lfr-panel-container { - border-width: 0; - } - - .kb-article-siblings { - .kb-article-next, .kb-article-previous { - .icon { - text-decoration: none; - } - } - } - - .kb-entity-body { - .kb-article-asset-entries { - .kb-info { - color: #7D7D7D; - } - - .kb-most-popular-column .kb-header { - border-bottom: 1px solid #CCC; - color: #555; - font-weight: bold; - } - - .kb-title { - a { - font-weight: bold; - } - } - } - - .kb-article-assets { - color: #7D7D7D; - } - - .kb-article-comments, .kb-template-comments { - .kb-all-comments { - color: #7D7D7D; - font-weight: bold; - } - - .kb-helpful-container .kb-suggestion-title { - font-size: 1.2em; - font-weight: bold; - } - - .kb-helpful-inputs label { - font-weight: normal; - } - - .kb-no { - color: red; - } - - .kb-question { - color: #999; - } - - .kb-yes { - color: green; - } - } - } - - .kb-entity-header { - border-bottom: 1px solid #CCC; - - .kb-title { - font-weight: bold; - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/css/main.css deleted file mode 100644 index 1636a55f43..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/css/main.css +++ /dev/null @@ -1,29 +0,0 @@ -/* ---------- Portal ---------- */ - -#main-content .knowledge-base-portlet-admin .lfr-panel-container .lfr-panel, -#main-content .knowledge-base-portlet-admin .lfr-panel-container .lfr-panel .lfr-panel-content { - background: none; -} - -#main-content .knowledge-base-portlet-admin .lfr-panel-container .lfr-panel .lfr-panel-titlebar { - border-bottom: none; -} - -/* ---------- Portlet ---------- */ - -.knowledge-base-portlet-admin .kb-admin-tools { - padding: 5px 5px 0 0; - text-align: right; -} - -.knowledge-base-portlet-admin .kb-suggestion-actions { - margin-top: 1em; -} - -.knowledge-base-portlet-admin .kb-search-toggle .kb-date-field { - float: left; -} - -.knowledge-base-portlet-admin input.kb-article-priority { - width: inherit; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/edit_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/edit_article.jsp deleted file mode 100644 index fa10bc46f0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/edit_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/edit_template.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/edit_template.jsp deleted file mode 100644 index 4f1367e70b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/edit_template.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/error.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/error.jsp deleted file mode 100644 index ce885c809d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/error.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/folder_action.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/folder_action.jsp deleted file mode 100644 index cca4d4cf7d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/folder_action.jsp +++ /dev/null @@ -1,86 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); - -KBFolder kbFolder = (KBFolder)row.getObject(); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/history.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/history.jsp deleted file mode 100644 index dfa0095cf5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/history.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/import.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/import.jsp deleted file mode 100644 index 9d00a4e0e1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/import.jsp +++ /dev/null @@ -1,68 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -long parentKBFolderId = ParamUtil.getLong(request, "parentKBFolderId"); -%> - - - - - - - - - - - - <% - KBArticleImportException kbaie = (KBArticleImportException)errorException; - %> - - <%= LanguageUtil.format(locale, "an-unexpected-error-occurred-while-importing-articles-x", kbaie.getLocalizedMessage()) %> - - - - -
    - -
    -
    - - -
    - - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/import_articles_button.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/import_articles_button.jsp deleted file mode 100644 index 48bf7c40f5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/import_articles_button.jsp +++ /dev/null @@ -1,33 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -long parentResourcePrimKey = ParamUtil.getLong(request, "parentResourcePrimKey"); -%> - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/init.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/init.jsp deleted file mode 100644 index e640f1d03b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/init.jsp +++ /dev/null @@ -1,58 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<%@ page import="com.liferay.knowledgebase.admin.search.KBArticleDisplayTerms" %><%@ -page import="com.liferay.knowledgebase.admin.search.KBArticleSearch" %><%@ -page import="com.liferay.knowledgebase.admin.search.KBArticleSearchTerms" %><%@ -page import="com.liferay.knowledgebase.admin.search.KBTemplateDisplayTerms" %><%@ -page import="com.liferay.knowledgebase.admin.search.KBTemplateSearch" %><%@ -page import="com.liferay.knowledgebase.admin.search.KBTemplateSearchTerms" %><%@ -page import="com.liferay.knowledgebase.admin.util.AdminUtil" %><%@ -page import="com.liferay.knowledgebase.admin.util.KBArticleAssetEntriesUtil" %><%@ -page import="com.liferay.knowledgebase.model.KBCommentConstants" %><%@ -page import="com.liferay.knowledgebase.util.KBSuggestionListDisplayContext" %><%@ -page import="com.liferay.portal.kernel.servlet.SessionMessages" %><%@ -page import="com.liferay.portal.model.Portlet" %><%@ -page import="com.liferay.portal.service.PortletLocalServiceUtil" %> - -<% -String kbArticlesOrderByCol = portletPreferences.getValue("kbArticlesOrderByCol", StringPool.BLANK); -String kbArticlesOrderByType = portletPreferences.getValue("kbArticlesOrderByType", StringPool.BLANK); - -boolean enableKBArticleDescription = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleDescription", null)); -boolean enableKBArticleRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleRatings", null)); -String kbArticleRatingsType = GetterUtil.getString(portletPreferences.getValue("kbArticleRatingsType", null), "thumbs"); -boolean showKBArticleAssetEntries = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticleAssetEntries", null)); -boolean enableKBArticleAssetLinks = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleAssetLinks", null), true); -boolean enableKBArticleViewCountIncrement = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleViewCountIncrement", null)); -boolean enableKBArticleSubscriptions = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleSubscriptions", null), true); -boolean enableKBArticleHistory = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleHistory", null), true); -boolean enableKBArticlePrint = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticlePrint", null), true); -boolean enableSocialBookmarks = GetterUtil.getBoolean(portletPreferences.getValue("enableSocialBookmarks", null), false); -String socialBookmarksDisplayStyle = portletPreferences.getValue("socialBookmarksDisplayStyle", PortletPropsValues.KNOWLEDGE_BASE_SOCIAL_BOOKMARKS_DISPLAY_STYLE); -String socialBookmarksDisplayPosition = portletPreferences.getValue("socialBookmarksDisplayPosition", "bottom"); -String socialBookmarksTypes = portletPreferences.getValue("socialBookmarksTypes", PropsUtil.get(PropsKeys.SOCIAL_BOOKMARK_TYPES)); - -boolean enableKBTemplateKBComments = GetterUtil.getBoolean(portletPreferences.getValue("enableKBTemplateKBComments", null)); -boolean showKBTemplateKBComments = GetterUtil.getBoolean(portletPreferences.getValue("showKBTemplateKBComments", null)); - -boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true); -int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA); -String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_FULL_CONTENT); -String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/move_object.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/move_object.jsp deleted file mode 100644 index 25f1d7ecc3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/move_object.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/new_parent.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/new_parent.jsp deleted file mode 100644 index c11ac59b1b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/new_parent.jsp +++ /dev/null @@ -1,94 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -int status = (Integer)request.getAttribute(WebKeys.KNOWLEDGE_BASE_STATUS); - -long kbArticleClassNameId = PortalUtil.getClassNameId(KBArticleConstants.getClassName()); - -long resourceClassNameId = ParamUtil.getLong(request, "resourceClassNameId"); -long resourcePrimKey = ParamUtil.getLong(request, "resourcePrimKey"); -long parentResourceClassNameId = PortalUtil.getClassNameId(KBFolderConstants.getClassName()); -long parentResourcePrimKey = KBFolderConstants.DEFAULT_PARENT_FOLDER_ID; - -double priority = KBArticleConstants.DEFAULT_PRIORITY; - -String parentTitle = null; - -if (resourceClassNameId == kbArticleClassNameId) { - KBArticle kbArticle = KBArticleServiceUtil.getLatestKBArticle(resourcePrimKey, status); - - parentResourceClassNameId = kbArticle.getParentResourceClassNameId(); - parentResourcePrimKey = kbArticle.getParentResourcePrimKey(); - parentTitle = kbArticle.getParentTitle(locale, status); - priority = kbArticle.getPriority(); -} -else { - KBFolder kbFolder = KBFolderServiceUtil.getKBFolder(resourcePrimKey); - - parentResourcePrimKey = kbFolder.getParentKBFolderId(); - parentTitle = kbFolder.getParentTitle(locale); -} -%> - - -
    - - - -
    - - -
    - - - - - - - - - - - - - - A.one('#selectKBObjectButton').on( - 'click', - function(event) { - Liferay.Util.selectEntity( - { - dialog: { - constrain: true, - destroyOnHide: true, - modal: true - }, - id: 'selectKBObject', - title: '', - uri: '<%= selectKBObjectURL %>' - }, - function(event) { - document.fm.parentPriority.value = event.priority; - document.fm.parentResourceClassNameId.value = event.resourceclassnameid; - document.fm.parentResourcePrimKey.value = event.resourceprimkey; - document.fm.parentTitle.value = A.Lang.String.unescapeEntities(event.title); - } - ); - } - ); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/print_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/print_article.jsp deleted file mode 100644 index bbaedb02f1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/print_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/print_template.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/print_template.jsp deleted file mode 100644 index d24b4efd41..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/print_template.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/select_parent.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/select_parent.jsp deleted file mode 100644 index 2b9d57008a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/select_parent.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_action.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_action.jsp deleted file mode 100644 index c0f1d3b720..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_action.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -String mvcPath = ParamUtil.getString(request, "mvcPath"); - -ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); - -KBTemplate kbTemplate = (KBTemplate)row.getObject(); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_comment.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_comment.jsp deleted file mode 100644 index 4a90f42ff3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_comment.jsp +++ /dev/null @@ -1,78 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBTemplate kbTemplate = (KBTemplate)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_TEMPLATE); - -KBComment kbComment = (KBComment)request.getAttribute("template_comment.jsp-kb_comment"); -%> - -
    - - - - - -
    - - -
    - - - - - - - - - - -
    - -
    - -
    - <%= kbComment.getContent() %> -
    - -
    - -
    - <%= LanguageUtil.format(pageContext, "posted-on-x", dateFormatDateTime.format(kbComment.getModifiedDate()), false) %> -
    - - -
    - - <% - String deleteURL = "javascript:" + renderResponse.getNamespace() + "deleteKBComment(" + kbComment.getKbCommentId() + ");"; - %> - - -
    -
    - -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_comments.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_comments.jsp deleted file mode 100644 index cf422e4d43..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_comments.jsp +++ /dev/null @@ -1,135 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBTemplate kbTemplate = (KBTemplate)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_TEMPLATE); - -KBComment kbComment = null; - -try { - kbComment = KBCommentLocalServiceUtil.getKBComment(user.getUserId(), KBTemplate.class.getName(), kbTemplate.getKbTemplateId()); -} -catch (NoSuchCommentException nsce) { -} - -long kbCommentId = BeanParamUtil.getLong(kbComment, request, "kbCommentId"); - -boolean helpful = BeanParamUtil.getBoolean(kbComment, request, "helpful", true); -%> - - -
    - - - - - - - - - - - - - - - - - <% - request.setAttribute("template_comment.jsp-kb_comment", kbComment); - %> - - - - - - -
    - - - - - -
    - - - - -
    -
    -
    - - - - - - - - - - - -
    - -
    - <%= LanguageUtil.format(pageContext, "all-comments-x", total, false) %> -
    -
    - - <% - for (KBComment curKBComment : (List)searchContainer.getResults()) { - %> - - <% - request.setAttribute("template_comment.jsp-kb_comment", curKBComment); - %> - - - - <% - } - %> - - -
    - -
    -
    -
    -
    -
    -
    -
    - - - function deleteKBComment(kbCommentId) { - document.fm.kbCommentId.value = kbCommentId; - submitForm(document.fm, ''); - } - - function updateKBComment() { - document.fm.<%= Constants.CMD %>.value = '<%= (kbComment == null) ? Constants.ADD : Constants.UPDATE %>'; - submitForm(document.fm, ''); - } - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_icons.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_icons.jsp deleted file mode 100644 index 22a43aef39..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_icons.jsp +++ /dev/null @@ -1,105 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBTemplate kbTemplate = (KBTemplate)request.getAttribute("template_icons.jsp-kb_template"); - -long kbTemplateId = ParamUtil.getLong(request, "kbTemplateId"); -%> - - -
    - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_search.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_search.jsp deleted file mode 100644 index 1cbd91674b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_search.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBTemplateSearch searchContainer = (KBTemplateSearch)request.getAttribute("liferay-ui:search:searchContainer"); - -KBTemplateDisplayTerms displayTerms = (KBTemplateDisplayTerms)searchContainer.getDisplayTerms(); -%> - - - -
    - - - -
    - - - - - - - - - - - - - -
    -
    - - - Liferay.Util.toggleSelectBox('<%= displayTerms.ANYTIME %>', '<%= false %>', 'datesOptions'); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_search_results.jspf b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_search_results.jspf deleted file mode 100644 index 7325017448..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_search_results.jspf +++ /dev/null @@ -1,49 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<% -List results = new ArrayList(); - -if (!searchTerms.hasSearchTerms()) { - total = KBTemplateServiceUtil.getGroupKBTemplatesCount(scopeGroupId); - - searchContainer.setTotal(total); - - results = KBTemplateServiceUtil.getGroupKBTemplates(scopeGroupId, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator()); -} -else if (searchTerms.isAdvancedSearch()) { - KBTemplateSearchDisplay kbTemplateSearchDisplay = KBTemplateServiceUtil.getKBTemplateSearchDisplay(scopeGroupId, searchTerms.getTitle(), searchTerms.getContent(), searchTerms.getStartDate(timeZone), searchTerms.getEndDate(timeZone), searchTerms.isAndOperator(), searchTerms.getCurStartValues(), searchContainer.getCur(), searchContainer.getDelta(), searchContainer.getOrderByComparator()); - - iteratorURL.setParameter(searchTerms.CUR_START_VALUES, StringUtil.merge(kbTemplateSearchDisplay.getCurStartValues())); - - results = kbTemplateSearchDisplay.getResults(); - total = kbTemplateSearchDisplay.getTotal(); - - searchContainer.setTotal(total); -} -else { - KBTemplateSearchDisplay kbTemplateSearchDisplay = KBTemplateServiceUtil.getKBTemplateSearchDisplay(scopeGroupId, searchTerms.getKeywords(), searchTerms.getKeywords(), null, null, false, searchTerms.getCurStartValues(), searchContainer.getCur(), searchContainer.getDelta(), searchContainer.getOrderByComparator()); - - iteratorURL.setParameter(searchTerms.CUR_START_VALUES, StringUtil.merge(kbTemplateSearchDisplay.getCurStartValues())); - - results = kbTemplateSearchDisplay.getResults(); - total = kbTemplateSearchDisplay.getTotal(); - - searchContainer.setTotal(total); -} - -searchContainer.setResults(results); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_tools.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_tools.jsp deleted file mode 100644 index e97a8a1418..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/template_tools.jsp +++ /dev/null @@ -1,45 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -KBTemplate kbTemplate = (KBTemplate)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_TEMPLATE); -%> - -
    - - - - -
    - - - - - - <% - String taglibURL = "javascript:var printKBTemplateWindow = window.open('" + printURL + "', 'printKBTemplate', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680'); void(''); printKBTemplateWindow.focus();"; - %> - - -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/top_tabs.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/top_tabs.jsp deleted file mode 100644 index 80a9f6021b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/top_tabs.jsp +++ /dev/null @@ -1,69 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -String mvcPath = ParamUtil.getString(request, "mvcPath"); -%> - - - - <% - List names = new ArrayList(); - List urls = new ArrayList(); - String value = null; - - if (PortletPermissionUtil.contains(permissionChecker, plid, portletDisplay.getId(), ActionKeys.VIEW)) { - PortletURL kbArticlesURL = renderResponse.createRenderURL(); - - kbArticlesURL.setParameter("mvcPath", "/admin/view.jsp"); - - names.add("articles"); - urls.add(kbArticlesURL.toString()); - value = names.get(names.size() - 1); - } - - if (AdminPermission.contains(permissionChecker, scopeGroupId, ActionKeys.VIEW_KB_TEMPLATES)) { - PortletURL kbTemplatesURL = renderResponse.createRenderURL(); - - kbTemplatesURL.setParameter("mvcPath", "/admin/view_templates.jsp"); - - names.add("templates"); - urls.add(kbTemplatesURL.toString()); - value = mvcPath.contains("template") ? names.get(names.size() - 1) : value; - } - - if (AdminPermission.contains(permissionChecker, scopeGroupId, ActionKeys.VIEW_SUGGESTIONS)) { - PortletURL kbSuggestionsURL = renderResponse.createRenderURL(); - - kbSuggestionsURL.setParameter("mvcPath", "/admin/view_suggestions.jsp"); - - names.add("suggestions"); - urls.add(kbSuggestionsURL.toString()); - value = mvcPath.contains("suggestions") ? names.get(names.size() - 1) : value; - } - %> - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view.jsp deleted file mode 100644 index 0c0e1d108f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view.jsp +++ /dev/null @@ -1,448 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -long kbFolderClassNameId = PortalUtil.getClassNameId(KBFolderConstants.getClassName()); - -long parentResourceClassNameId = ParamUtil.getLong(request, "parentResourceClassNameId", kbFolderClassNameId); -long parentResourcePrimKey = ParamUtil.getLong(request, "parentResourcePrimKey", KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); -%> - - - - - - - - - - - - - - - - <% - int importedKBArticlesCount = GetterUtil.getInteger(SessionMessages.get(renderRequest, "importedKBArticlesCount")); - %> - - - -
    - - - -
    -
    - -
    - -
    -
    -
    -
    - - - - - - - - <% - boolean hasDeleteKBArticlesPermission = AdminPermission.contains(permissionChecker, scopeGroupId, ActionKeys.DELETE_KB_ARTICLES); - boolean hasUpdateKBArticlesPrioritiesPermission = AdminPermission.contains(permissionChecker, scopeGroupId, ActionKeys.UPDATE_KB_ARTICLES_PRIORITIES); - %> - - - - - - - - - - - - - - - - - <% - boolean hasAddKBArticlePermission = false; - boolean hasAddKBFolderPermission = false; - - if (parentResourceClassNameId == kbFolderClassNameId) { - hasAddKBArticlePermission = KBFolderPermission.contains(permissionChecker, scopeGroupId, parentResourcePrimKey, ActionKeys.ADD_KB_ARTICLE); - hasAddKBFolderPermission = KBFolderPermission.contains(permissionChecker, scopeGroupId, parentResourcePrimKey, ActionKeys.ADD_KB_FOLDER); - } - else { - hasAddKBArticlePermission = AdminPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_KB_ARTICLE); - } - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - request.setAttribute("view.jsp-displayTerms", new KBArticleDisplayTerms(renderRequest)); - %> - - - - - - <% - KnowledgeBaseUtil.addPortletBreadcrumbEntries(parentResourceClassNameId, parentResourcePrimKey, "/admin/view.jsp", request, renderResponse); - %> - - - - -
    - - - - - - - - - - - - - - - - -
    -
    - - - - - <% - searchContainer.setResults(KBFolderServiceUtil.getKBFolders(scopeGroupId, parentResourcePrimKey, searchContainer.getStart(), searchContainer.getEnd())); - %> - - - - - - - - - - - - <%= kbFolder.getName() %> - - - - - - - - - - - - - - - - - - - <% - KBArticleSearchTerms searchTerms = (KBArticleSearchTerms)searchContainer.getSearchTerms(); - %> - - <%@ include file="/admin/article_search_results.jspf" %> - - - - - - - - - <% - if (KBArticleServiceUtil.getKBArticlesCount(scopeGroupId, kbArticle.getResourcePrimKey(), WorkflowConstants.STATUS_ANY) == 0) { - rowURL = null; - } - %> - - - - - - - - <%= BigDecimal.valueOf(kbArticle.getPriority()).toPlainString() %> - - - - - - - - - - - - - - - - - - - - - - - - <% - searchContainer.setEmptyResultsMessage(null); - %> - -
    - - <% - KBArticle parentKBArticle = KBArticleServiceUtil.getLatestKBArticle(parentResourcePrimKey, WorkflowConstants.STATUS_ANY); - - PortletURL viewKBArticleURL = kbArticleURLHelper.createViewURL(parentKBArticle); - - StringBundler sb = new StringBundler(5); - - sb.append(""); - sb.append(BeanPropertiesUtil.getString(parentKBArticle, "title")); - sb.append(""); - %> - - - - <%= LanguageUtil.format(pageContext, "child-articles-for-x", sb.toString(), false) %> - - - <%= LanguageUtil.format(pageContext, "there-are-no-child-articles-for-x", sb.toString(), false) %> - - -
    -
    - - -
    -
    -
    - - - var deleteKBArticles = A.one('#deleteKBArticles'); - var kbArticlesAdminSearchContainer = A.one('#kbArticlesAdminSearchContainer'); - var updateKBArticlesPriorities = A.one('#updateKBArticlesPriorities'); - - if (updateKBArticlesPriorities) { - updateKBArticlesPriorities.on( - 'click', - function() { - document.fm.method = 'post'; - - submitForm(document.fm, ''); - } - ); - } - - if (deleteKBArticles) { - deleteKBArticles.on( - 'click', - function() { - if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-articles") %>')) { - document.fm.method = 'post'; - document.fm.resourcePrimKeys.value = Liferay.Util.listCheckedExcept(document.fm, 'allRowIds'); - - submitForm(document.fm, ''); - } - } - ); - } - - kbArticlesAdminSearchContainer.delegate( - 'click', - function() { - var hide = (Liferay.Util.listCheckedExcept(document.fm, '<%= RowChecker.ALL_ROW_IDS %>').length == 0); - - var actionsButton = A.one('#actionsButton'); - - if (actionsButton) { - actionsButton.toggle(!hide); - } - }, - 'input[type=checkbox]' - ); - - kbArticlesAdminSearchContainer.delegate( - 'key', - function() { - var parentTr = this.ancestor('tr'); - - var rowIdsNode = parentTr.one('input[type="checkbox"]'); - - rowIdsNode.attr('checked', true); - - document.fm.method = 'post'; - - submitForm(document.fm, ''); - }, - 'enter', - 'input[type=text]' - ); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_article.jsp deleted file mode 100644 index 4fa3d0cddf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_article.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_completed_suggestions.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_completed_suggestions.jsp deleted file mode 100644 index ce5e6ef010..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_completed_suggestions.jsp +++ /dev/null @@ -1,25 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -String emptyResultsMessage = "no-completed-suggestion-was-found"; -String navItem = "viewCompletedSuggestions"; -int suggestionStatus = KBCommentConstants.STATUS_COMPLETED; -%> - -<%@ include file="/admin/view_suggestions_in_state.jspf" %> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_in_progress_suggestions.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_in_progress_suggestions.jsp deleted file mode 100644 index cae96b101a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_in_progress_suggestions.jsp +++ /dev/null @@ -1,25 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -String emptyResultsMessage = "no-in-progress-suggestion-was-found"; -String navItem = "viewInProgressSuggestions"; -int suggestionStatus = KBCommentConstants.STATUS_IN_PROGRESS; -%> - -<%@ include file="/admin/view_suggestions_in_state.jspf" %> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_new_suggestions.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_new_suggestions.jsp deleted file mode 100644 index 1194b3df13..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_new_suggestions.jsp +++ /dev/null @@ -1,25 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - -<% -String emptyResultsMessage = "no-new-suggestion-was-found"; -String navItem = "viewNewSuggestions"; -int suggestionStatus = KBCommentConstants.STATUS_NEW; -%> - -<%@ include file="/admin/view_suggestions_in_state.jspf" %> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_suggestions.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_suggestions.jsp deleted file mode 100644 index f4c1f1a8df..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_suggestions.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - - - - - - - - -<% -String navItem = ParamUtil.getString(request, "navItem", "viewNewSuggestions"); - -KBSuggestionListDisplayContext kbSuggestionListDisplayContext = new KBSuggestionListDisplayContext(scopeGroupId, navItem); - -request.setAttribute(WebKeys.KNOWLEDGE_BASE_KB_SUGGESTION_LIST_DISPLAY_CONTEXT, kbSuggestionListDisplayContext); -%> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_suggestions_in_state.jspf b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_suggestions_in_state.jspf deleted file mode 100644 index 7633b5becb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_suggestions_in_state.jspf +++ /dev/null @@ -1,69 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<% -KBSuggestionListDisplayContext kbSuggestionListDisplayContext = (KBSuggestionListDisplayContext)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_SUGGESTION_LIST_DISPLAY_CONTEXT); -%> - - - - - -<% -kbSuggestionListDisplayContext.getViewSuggestionURL(iteratorURL, navItem); -%> - -
    - - - - - - <% - request.setAttribute("article_comment.jsp-kb_comment", kbComment); - - KBArticle kbArticle = KBArticleServiceUtil.getLatestKBArticle(kbComment.getClassPK(), WorkflowConstants.STATUS_ANY); - - request.setAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE, kbArticle); - %> - - - - - - -
    - - - A.one('#kbArticleCommentsWrapper').delegate( - 'click', - function(e) { - if (confirm('')) { - location.href = this.getData('href'); - } - }, - '.kb-suggestion-actions .kb-suggestion-delete' - ); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_template.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_template.jsp deleted file mode 100644 index 6698de20de..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_template.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_templates.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_templates.jsp deleted file mode 100644 index 798140c711..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/admin/view_templates.jsp +++ /dev/null @@ -1,157 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/admin/init.jsp" %> - - - - - - - - - - - - - - - - - - - <% - KBTemplateSearchTerms searchTerms = (KBTemplateSearchTerms)searchContainer.getSearchTerms(); - %> - - <%@ include file="/admin/template_search_results.jspf" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - var deleteKBTemplates = A.one('#deleteKBTemplates'); - - if (deleteKBTemplates) { - deleteKBTemplates.on( - 'click', - function() { - if (confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-the-selected-templates") %>')) { - document.fm.method = 'post'; - document.fm.kbTemplateIds.value = Liferay.Util.listCheckedExcept(document.fm, 'allRowIds'); - - submitForm(document.fm, ''); - } - } - ); - } - - A.one('#kbTemplateAdminSearchContainer').delegate( - 'click', - function() { - var hide = (Liferay.Util.listCheckedExcept(document.fm, '<%= RowChecker.ALL_ROW_IDS %>').length == 0); - - var deleteKBTemplates = A.one('#deleteKBTemplates'); - - if (deleteKBTemplates) { - deleteKBTemplates.toggle(!hide); - } - }, - 'input[type=checkbox]' - ); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/configuration.jsp deleted file mode 100644 index e638e3d67b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/configuration.jsp +++ /dev/null @@ -1,164 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - -<% -String tabs2 = ParamUtil.getString(request, "tabs2", Validator.equals(portletResource, PortletKeys.KNOWLEDGE_BASE_ARTICLE_DEFAULT_INSTANCE) ? "display-settings" : "general"); - -String tabs2Names = Validator.equals(portletResource, PortletKeys.KNOWLEDGE_BASE_ARTICLE_DEFAULT_INSTANCE) ? "display-settings" : "general,display-settings"; - -if (PortalUtil.isRSSFeedsEnabled()) { - tabs2Names += ",rss"; -} -%> - - - - - - - - - - - - - - - - - -
    - - - <% - KBArticle kbArticle = KBArticleLocalServiceUtil.fetchLatestKBArticle(resourcePrimKey, WorkflowConstants.STATUS_APPROVED); - %> - - - - - - - - <% - String taglibOnClick = "var selectConfigurationKBArticleWindow = window.open('" + selectConfigurationKBArticleURL + "&" + HtmlUtil.escapeJS(PortalUtil.getPortletNamespace(portletResource)) + "&selResourcePrimKey=' + document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "resourcePrimKey.value, 'selectConfigurationKBArticle', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680'); void(''); selectConfigurationKBArticleWindow.focus();"; - %> - - - -
    -
    - - - - - -
    - - -
    - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - - -
    -
    - - - - - function selectConfigurationKBArticle(resourcePrimKey, title) { - document.fm.resourcePrimKey.value = resourcePrimKey; - document.getElementById('configurationKBArticle').value = title; - } - - - - - Liferay.Util.toggleBoxes('enableKBArticleRatingsCheckbox', 'ratingsType'); - Liferay.Util.toggleBoxes('enableSocialBookmarksCheckbox','socialBookmarksOptions'); - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/css/main.css deleted file mode 100644 index d27e31622c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/css/main.css +++ /dev/null @@ -1,5 +0,0 @@ -/* ---------- Configuration ---------- */ - -.portlet-configuration .kb-edit-link { - margin: 5px 0 0; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/edit_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/edit_article.jsp deleted file mode 100644 index d8988f6c77..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/edit_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/error.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/error.jsp deleted file mode 100644 index 1d514f2f27..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/error.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/history.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/history.jsp deleted file mode 100644 index 22237e375f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/history.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/init.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/init.jsp deleted file mode 100644 index 2eab1d1761..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/init.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -String portletResource = ParamUtil.getString(request, "portletResource"); - -long resourcePrimKey = GetterUtil.getLong(portletPreferences.getValue("resourcePrimKey", null)); - -boolean enableKBArticleDescription = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleDescription", null)); -boolean enableKBArticleRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleRatings", null)); -String kbArticleRatingsType = GetterUtil.getString(portletPreferences.getValue("kbArticleRatingsType", null), "thumbs"); -boolean showKBArticleAssetEntries = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticleAssetEntries", null)); -boolean enableKBArticleAssetLinks = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleAssetLinks", null), true); -boolean enableKBArticleViewCountIncrement = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleViewCountIncrement", null)); -boolean enableKBArticleSubscriptions = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleSubscriptions", null), true); -boolean enableKBArticleHistory = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleHistory", null), true); -boolean enableKBArticlePrint = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticlePrint", null), true); -boolean enableSocialBookmarks = GetterUtil.getBoolean(portletPreferences.getValue("enableSocialBookmarks", null), false); -String socialBookmarksDisplayStyle = portletPreferences.getValue("socialBookmarksDisplayStyle", PortletPropsValues.KNOWLEDGE_BASE_SOCIAL_BOOKMARKS_DISPLAY_STYLE); -String socialBookmarksDisplayPosition = portletPreferences.getValue("socialBookmarksDisplayPosition", "bottom"); -String socialBookmarksTypes = portletPreferences.getValue("socialBookmarksTypes", PropsUtil.get(PropsKeys.SOCIAL_BOOKMARK_TYPES)); - -boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true); -int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA); -String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_DEFAULT); -String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/move_object.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/move_object.jsp deleted file mode 100644 index c56c1c2241..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/move_object.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/print_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/print_article.jsp deleted file mode 100644 index 5a4d986d29..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/print_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/select_configuration_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/select_configuration_article.jsp deleted file mode 100644 index ce1311aaef..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/select_configuration_article.jsp +++ /dev/null @@ -1,142 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - -<% -long selResourcePrimKey = ParamUtil.getLong(request, "selResourcePrimKey"); - -String orderByCol = ParamUtil.getString(request, "orderByCol", "modified-date"); -String orderByType = ParamUtil.getString(request, "orderByType", "desc"); -%> - - - - - - - - - - - - - - - - - <% - rowURL = "javascript:var printKBArticleWindow = window.open('" + rowURL + "', 'printKBArticle', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=680'); void(''); printKBArticleWindow.focus();"; - %> - - - - - - - - - - - - - - - - <% - String taglibOnClick = "opener." + PortalUtil.getPortletNamespace(PortletKeys.PORTLET_CONFIGURATION) + "selectConfigurationKBArticle('" + kbArticle.getResourcePrimKey() + "', '" + UnicodeFormatter.toString(kbArticle.getTitle()) + "'); window.close();"; - %> - - - - - - - - <% - KBArticle selKBArticle = KBArticleLocalServiceUtil.fetchLatestKBArticle(selResourcePrimKey, WorkflowConstants.STATUS_APPROVED); - %> - - - - <%= selKBArticle.getTitle() %> - - <% - String taglibOnClick = "opener." + PortalUtil.getPortletNamespace(PortletKeys.PORTLET_CONFIGURATION) + "selectConfigurationKBArticle('0', ''); window.close();"; - %> - - - - -
    -
    -
    - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/select_parent.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/select_parent.jsp deleted file mode 100644 index 8b8fa6ce55..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/select_parent.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/view.jsp deleted file mode 100644 index 34e4af0adc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/view.jsp +++ /dev/null @@ -1,37 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); -%> - - - - - - - - <% - renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE); - %> - -
    - -
    -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/view_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/view_article.jsp deleted file mode 100644 index 3b807256f5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/article/view_article.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/article/init.jsp" %> - -
    - - -
    - -
    -
    - -
    - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/configuration.jsp deleted file mode 100644 index 19d2730514..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/configuration.jsp +++ /dev/null @@ -1,204 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - -<% -String tabs2 = ParamUtil.getString(request, "tabs2", Validator.equals(portletResource, PortletKeys.KNOWLEDGE_BASE_ARTICLE_DEFAULT_INSTANCE) ? "display-settings" : "general"); - -String tabs2Names = Validator.equals(portletResource, PortletKeys.KNOWLEDGE_BASE_ARTICLE_DEFAULT_INSTANCE) ? "display-settings" : "general,display-settings"; - -if (PortalUtil.isRSSFeedsEnabled()) { - tabs2Names += ",rss"; -} - -long kbFolderClassNameId = PortalUtil.getClassNameId(KBFolderConstants.getClassName()); -%> - - - - - - - - - - - - - - - - - - -
    - - - <% - String title = StringPool.BLANK; - - if (resourceClassNameId != kbFolderClassNameId) { - KBArticle kbArticle = KBArticleLocalServiceUtil.fetchLatestKBArticle(resourcePrimKey, WorkflowConstants.STATUS_APPROVED); - - if (kbArticle != null) { - title = kbArticle.getTitle(); - } - } - else { - KBFolder kbFolder = KBFolderLocalServiceUtil.fetchKBFolder(resourcePrimKey); - - if (kbFolder != null) { - title = kbFolder.getName(); - } - } - %> - - - - - -
    -
    - - - - - - -
    - - -
    - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - -
    - - - - -
    -
    - - - - - - - - - - - A.one('#selectKBObjectButton').on( - 'click', - function(event) { - Liferay.Util.selectEntity( - { - dialog: { - constrain: true, - destroyOnHide: true, - modal: true - }, - id: 'selectConfigurationKBObject', - title: '', - uri: '<%= selectConfigurationKBObjectURL %>' - }, - function(event) { - document.fm.resourceClassNameId.value = event.resourceclassnameid; - document.fm.resourcePrimKey.value = event.resourceprimkey; - document.getElementById('configurationKBObject').value = event.title; - } - ); - } - ); - - - - - Liferay.Util.toggleBoxes('enableKBArticleRatingsCheckbox', 'ratingsType'); - Liferay.Util.toggleBoxes('enableSocialBookmarksCheckbox','socialBookmarksOptions'); - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/content_root_selector.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/content_root_selector.jsp deleted file mode 100644 index 8c1fa65377..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/content_root_selector.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -KBNavigationDisplayContext kbNavigationDisplayContext = (KBNavigationDisplayContext)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_NAVIGATION_DISPLAY_CONTEXT); - -String currentKBFolderURLTitle = kbNavigationDisplayContext.getCurrentKBFolderURLTitle(); - -List kbFolders = KnowledgeBaseUtil.getAlternateRootKBFolders(scopeGroupId, resourcePrimKey); -%> - - - - - - - - -
    - - - - <% - for (KBFolder kbFolder : kbFolders) { - %> - - - <%= contentRootPrefix + " " + kbFolder.getName() %> - - - <% - } - %> - - - -
    - - - var updateRootKBFolderIdFm = A.one('#updateRootKBFolderIdFm'); - var rootKBFolderIdSelect = A.one('#rootKBFolderId'); - - rootKBFolderIdSelect.on( - 'change', - function() { - updateRootKBFolderIdFm.submit(); - } - ); - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/css/main.css deleted file mode 100644 index 2487f28d16..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/css/main.css +++ /dev/null @@ -1,36 +0,0 @@ -/* ---------- Configuration ---------- */ - -.portlet-configuration .kb-edit-link { - margin: 5px 0 0; -} - -/* ---------- Portlet ---------- */ - -.knowledge-base-portlet-display { - .kbarticle-navigation { - li { - line-height: inherit; - margin: 15px 0; - } - - li, ul { - list-style: none; - } - - .kbarticle-expanded { - font-weight: bold; - } - - .kbarticle-root-selector { - select { - display: inline; - width: inherit; - } - } - - .kbarticle-selected { - color: #555; - font-weight: bold; - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/edit_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/edit_article.jsp deleted file mode 100644 index a8cceb6601..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/edit_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/error.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/error.jsp deleted file mode 100644 index dbde6f0815..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/error.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/history.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/history.jsp deleted file mode 100644 index 1f6728af6d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/history.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/init.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/init.jsp deleted file mode 100644 index efe9f0e536..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/init.jsp +++ /dev/null @@ -1,46 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -PortalPreferences portalPreferences = PortletPreferencesFactoryUtil.getPortalPreferences(liferayPortletRequest); - -String portletResource = ParamUtil.getString(request, "portletResource"); - -long resourceClassNameId = GetterUtil.getLong(portletPreferences.getValue("resourceClassNameId", null), PortalUtil.getClassNameId(KBFolderConstants.getClassName())); -long resourcePrimKey = GetterUtil.getLong(portletPreferences.getValue("resourcePrimKey", null)); - -boolean enableKBArticleDescription = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleDescription", null)); -boolean enableKBArticleRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleRatings", null)); -String kbArticleRatingsType = GetterUtil.getString(portletPreferences.getValue("kbArticleRatingsType", null), "thumbs"); -boolean showKBArticleAssetEntries = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticleAssetEntries", null)); -boolean enableKBArticleAssetLinks = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleAssetLinks", null), true); -boolean enableKBArticleViewCountIncrement = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleViewCountIncrement", null)); -boolean enableKBArticleSubscriptions = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleSubscriptions", null), true); -boolean enableKBArticleHistory = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleHistory", null), true); -boolean enableKBArticlePrint = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticlePrint", null), true); -boolean enableSocialBookmarks = GetterUtil.getBoolean(portletPreferences.getValue("enableSocialBookmarks", null), false); -String socialBookmarksDisplayStyle = portletPreferences.getValue("socialBookmarksDisplayStyle", PortletPropsValues.KNOWLEDGE_BASE_SOCIAL_BOOKMARKS_DISPLAY_STYLE); -String socialBookmarksDisplayPosition = portletPreferences.getValue("socialBookmarksDisplayPosition", "bottom"); -String socialBookmarksTypes = portletPreferences.getValue("socialBookmarksTypes", PropsUtil.get(PropsKeys.SOCIAL_BOOKMARK_TYPES)); -String contentRootPrefix = GetterUtil.getString(portletPreferences.getValue("contentRootPrefix", null)); - -boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true); -int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA); -String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_DEFAULT); -String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/move_object.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/move_object.jsp deleted file mode 100644 index 668b9fb5c8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/move_object.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/print_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/print_article.jsp deleted file mode 100644 index 4239d8df06..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/print_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/select_configuration_object.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/select_configuration_object.jsp deleted file mode 100644 index 4fcf70ee66..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/select_configuration_object.jsp +++ /dev/null @@ -1,263 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - -<% -long kbFolderClassNameId = PortalUtil.getClassNameId(KBFolderConstants.getClassName()); - -long parentResourceClassNameId = ParamUtil.getLong(request, "parentResourceClassNameId", kbFolderClassNameId); -long parentResourcePrimKey = ParamUtil.getLong(request, "parentResourcePrimKey", KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - -String orderByCol = ParamUtil.getString(request, "orderByCol", "modified-date"); -String orderByType = ParamUtil.getString(request, "orderByType", "desc"); - -String eventName = PortalUtil.getPortletNamespace(PortletKeys.PORTLET_CONFIGURATION) + "selectConfigurationKBObject"; -%> - -
    - - - - - - - - - - - - <% - Map data = new HashMap(); - - data.put("resourceClassNameId", kbFolderClassNameId); - data.put("resourcePrimKey", KBFolderConstants.DEFAULT_PARENT_FOLDER_ID); - data.put("title", StringPool.BLANK); - %> - - - - -
    -
    - - <% - KnowledgeBaseUtil.addPortletBreadcrumbEntries(parentResourceClassNameId, parentResourcePrimKey, "/display/select_configuration_object.jsp", request, renderResponse); - %> - - - - - - - - - - - - - - - - - - - <%= kbFolder.getName() %> - - - - - - - - - - - - <% - Map data = new HashMap(); - - data.put("priority", KBArticleConstants.DEFAULT_PRIORITY); - data.put("resourceClassNameId", kbFolder.getClassNameId()); - data.put("resourcePrimKey", kbFolder.getKbFolderId()); - data.put("title", kbFolder.getName()); - %> - - - - - - - - - - - - - - - - - - - - - - - - - - <% - if (KBArticleServiceUtil.getKBArticlesCount(scopeGroupId, kbArticle.getResourcePrimKey(), WorkflowConstants.STATUS_APPROVED) == 0) { - rowURL = null; - } - %> - - - - - - - - - - - - - - - - <% - Map data = new HashMap(); - - data.put("resourceClassNameId", kbArticle.getClassNameId()); - data.put("resourcePrimKey", kbArticle.getResourcePrimKey()); - data.put("title", kbArticle.getTitle()); - %> - - - - - - - -
    - - - var Util = Liferay.Util; - - A.one('.kb-select-article-search-containers').delegate( - 'click', - function(event) { - var result = Util.getAttributes(event.currentTarget, 'data-'); - - Util.getOpener().Liferay.fire('<%= HtmlUtil.escapeJS(eventName) %>', result); - - Util.getWindow().hide(); - }, - '.selector-button' - ); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/select_parent.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/select_parent.jsp deleted file mode 100644 index 975471090c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/select_parent.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/view.jsp deleted file mode 100644 index 6d9ffee079..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/view.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -KBNavigationDisplayContext kbNavigationDisplayContext = new KBNavigationDisplayContext(renderRequest, portalPreferences, portletPreferences, kbArticle); - -request.setAttribute(WebKeys.KNOWLEDGE_BASE_KB_NAVIGATION_DISPLAY_CONTEXT, kbNavigationDisplayContext); -%> - - - -
    - -
    - -
    -
    - -
    - -
    - -
    -
    - - -
    -
    -
    - - - <% - renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE); - %> - -
    - -
    -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/view_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/view_article.jsp deleted file mode 100644 index 1c1ba5565e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/view_article.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - -
    - - -
    - -
    -
    - -
    - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/view_navigation.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/view_navigation.jsp deleted file mode 100644 index 163ecd7384..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/display/view_navigation.jsp +++ /dev/null @@ -1,139 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/display/init.jsp" %> - -<% -KBArticle kbArticle = (KBArticle)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_ARTICLE); - -KBNavigationDisplayContext kbNavigationDisplayContext = (KBNavigationDisplayContext)request.getAttribute(WebKeys.KNOWLEDGE_BASE_KB_NAVIGATION_DISPLAY_CONTEXT); - -List ancestorResourcePrimaryKeys = kbNavigationDisplayContext.getAncestorResourcePrimaryKeys(); - -long kbFolderClassNameId = PortalUtil.getClassNameId(KBFolderConstants.getClassName()); - -long rootResourcePrimKey = kbNavigationDisplayContext.getRootResourcePrimKey(); - -String pageTitle = kbNavigationDisplayContext.getPageTitle(); - -if (Validator.isNotNull(pageTitle)) { - PortalUtil.setPageTitle(pageTitle, request); -} - -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); -%> - -
    - - - - - <% - List kbArticles = KBArticleLocalServiceUtil.getKBArticles(themeDisplay.getScopeGroupId(), rootResourcePrimKey, WorkflowConstants.STATUS_APPROVED, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new KBArticlePriorityComparator(true)); - - for (KBArticle curKBArticle : kbArticles) { - PortletURL viewURL = kbArticleURLHelper.createViewURL(curKBArticle); - %> - -
      -
    • - - <% - boolean kbArticleExpanded = false; - - if ((ancestorResourcePrimaryKeys.size() > 0) && (curKBArticle.getResourcePrimKey() == ancestorResourcePrimaryKeys.get(0))) { - kbArticleExpanded = true; - } - - String kbArticleClass = StringPool.BLANK; - - if (curKBArticle.getResourcePrimKey() == kbArticle.getResourcePrimKey()) { - kbArticleClass = "kbarticle-selected"; - } - else if (kbArticleExpanded) { - kbArticleClass = "kbarticle-expanded"; - } - %> - - <%= HtmlUtil.escape(curKBArticle.getTitle()) %> - - - - <% - List childKBArticles = KBArticleLocalServiceUtil.getKBArticles(themeDisplay.getScopeGroupId(), curKBArticle.getResourcePrimKey(), WorkflowConstants.STATUS_APPROVED, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new KBArticlePriorityComparator(true)); - - for (KBArticle childKBArticle : childKBArticles) { - PortletURL viewChildURL = kbArticleURLHelper.createViewURL(childKBArticle); - %> - -
        -
      • - - <% - boolean childKBArticleExpanded = false; - - if ((ancestorResourcePrimaryKeys.size() > 1) && (childKBArticle.getResourcePrimKey() == ancestorResourcePrimaryKeys.get(1))) { - childKBArticleExpanded = true; - } - - String childKBArticleClass = StringPool.BLANK; - - if (childKBArticle.getResourcePrimKey() == kbArticle.getResourcePrimKey()) { - childKBArticleClass = "kbarticle-selected"; - } - else if (childKBArticleExpanded) { - childKBArticleClass = "kbarticle-expanded"; - } - %> - - <%= HtmlUtil.escape(childKBArticle.getTitle()) %> - - - - <% - List allDescendantKBArticles = KBArticleLocalServiceUtil.getAllDescendantKBArticles(childKBArticle.getResourcePrimKey(), WorkflowConstants.STATUS_APPROVED, new KBArticlePriorityComparator(true)); - - for (KBArticle descendantKBArticle : allDescendantKBArticles) { - PortletURL viewCurKBArticleURL = kbArticleURLHelper.createViewURL(descendantKBArticle); - %> - - - - <% - } - %> - - -
      • -
      - - <% - } - %> - -
      -
    • -
    - - <% - } - %> - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/admin.png b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/admin.png deleted file mode 100644 index 222c343a04..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/admin.png and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/article.png b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/article.png deleted file mode 100644 index 222c343a04..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/article.png and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/display.png b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/display.png deleted file mode 100644 index 222c343a04..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/display.png and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/search.png b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/search.png deleted file mode 100644 index 29283bb33d..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/search.png and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/section.png b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/section.png deleted file mode 100644 index 222c343a04..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/icons/section.png and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/init.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/init.jsp deleted file mode 100644 index b943ea5137..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/init.jsp +++ /dev/null @@ -1,179 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - -<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %> -<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> -<%@ taglib uri="http://liferay.com/tld/security" prefix="liferay-security" %> -<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %> -<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> -<%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %> - -<%@ page import="com.liferay.compat.portal.kernel.util.ArrayUtil" %><%@ -page import="com.liferay.knowledgebase.DuplicateKBArticleUrlTitleException" %><%@ -page import="com.liferay.knowledgebase.DuplicateKBFolderNameException" %><%@ -page import="com.liferay.knowledgebase.InvalidKBArticleUrlTitleException" %><%@ -page import="com.liferay.knowledgebase.InvalidKBFolderNameException" %><%@ -page import="com.liferay.knowledgebase.KBArticleContentException" %><%@ -page import="com.liferay.knowledgebase.KBArticleImportException" %><%@ -page import="com.liferay.knowledgebase.KBArticlePriorityException" %><%@ -page import="com.liferay.knowledgebase.KBArticleSourceURLException" %><%@ -page import="com.liferay.knowledgebase.KBArticleTitleException" %><%@ -page import="com.liferay.knowledgebase.KBCommentContentException" %><%@ -page import="com.liferay.knowledgebase.KBTemplateContentException" %><%@ -page import="com.liferay.knowledgebase.KBTemplateTitleException" %><%@ -page import="com.liferay.knowledgebase.NoSuchArticleException" %><%@ -page import="com.liferay.knowledgebase.NoSuchCommentException" %><%@ -page import="com.liferay.knowledgebase.NoSuchTemplateException" %><%@ -page import="com.liferay.knowledgebase.model.KBArticle" %><%@ -page import="com.liferay.knowledgebase.model.KBArticleConstants" %><%@ -page import="com.liferay.knowledgebase.model.KBArticleSearchDisplay" %><%@ -page import="com.liferay.knowledgebase.model.KBComment" %><%@ -page import="com.liferay.knowledgebase.model.KBFolder" %><%@ -page import="com.liferay.knowledgebase.model.KBFolderConstants" %><%@ -page import="com.liferay.knowledgebase.model.KBTemplate" %><%@ -page import="com.liferay.knowledgebase.model.KBTemplateSearchDisplay" %><%@ -page import="com.liferay.knowledgebase.service.KBArticleLocalServiceUtil" %><%@ -page import="com.liferay.knowledgebase.service.KBArticleServiceUtil" %><%@ -page import="com.liferay.knowledgebase.service.KBCommentLocalServiceUtil" %><%@ -page import="com.liferay.knowledgebase.service.KBFolderLocalServiceUtil" %><%@ -page import="com.liferay.knowledgebase.service.KBFolderServiceUtil" %><%@ -page import="com.liferay.knowledgebase.service.KBTemplateServiceUtil" %><%@ -page import="com.liferay.knowledgebase.service.permission.AdminPermission" %><%@ -page import="com.liferay.knowledgebase.service.permission.DisplayPermission" %><%@ -page import="com.liferay.knowledgebase.service.permission.KBArticlePermission" %><%@ -page import="com.liferay.knowledgebase.service.permission.KBCommentPermission" %><%@ -page import="com.liferay.knowledgebase.service.permission.KBFolderPermission" %><%@ -page import="com.liferay.knowledgebase.service.permission.KBTemplatePermission" %><%@ -page import="com.liferay.knowledgebase.service.permission.SuggestionPermission" %><%@ -page import="com.liferay.knowledgebase.util.ActionKeys" %><%@ -page import="com.liferay.knowledgebase.util.KBArticleURLHelper" %><%@ -page import="com.liferay.knowledgebase.util.KBNavigationDisplayContext" %><%@ -page import="com.liferay.knowledgebase.util.KnowledgeBaseUtil" %><%@ -page import="com.liferay.knowledgebase.util.PortletKeys" %><%@ -page import="com.liferay.knowledgebase.util.PortletPropsValues" %><%@ -page import="com.liferay.knowledgebase.util.WebKeys" %><%@ -page import="com.liferay.knowledgebase.util.comparator.KBArticlePriorityComparator" %><%@ -page import="com.liferay.portal.NoSuchSubscriptionException" %><%@ -page import="com.liferay.portal.kernel.bean.BeanParamUtil" %><%@ -page import="com.liferay.portal.kernel.bean.BeanPropertiesUtil" %><%@ -page import="com.liferay.portal.kernel.dao.orm.QueryUtil" %><%@ -page import="com.liferay.portal.kernel.dao.search.DateSearchEntry" %><%@ -page import="com.liferay.portal.kernel.dao.search.ResultRow" %><%@ -page import="com.liferay.portal.kernel.dao.search.RowChecker" %><%@ -page import="com.liferay.portal.kernel.dao.search.SearchContainer" %><%@ -page import="com.liferay.portal.kernel.language.LanguageUtil" %><%@ -page import="com.liferay.portal.kernel.language.UnicodeLanguageUtil" %><%@ -page import="com.liferay.portal.kernel.portlet.LiferayWindowState" %><%@ -page import="com.liferay.portal.kernel.repository.model.FileEntry" %><%@ -page import="com.liferay.portal.kernel.search.Document" %><%@ -page import="com.liferay.portal.kernel.search.Field" %><%@ -page import="com.liferay.portal.kernel.search.Hits" %><%@ -page import="com.liferay.portal.kernel.search.Indexer" %><%@ -page import="com.liferay.portal.kernel.search.IndexerRegistryUtil" %><%@ -page import="com.liferay.portal.kernel.search.SearchContext" %><%@ -page import="com.liferay.portal.kernel.search.SearchContextFactory" %><%@ -page import="com.liferay.portal.kernel.util.Constants" %><%@ -page import="com.liferay.portal.kernel.util.FastDateFormatConstants" %><%@ -page import="com.liferay.portal.kernel.util.FastDateFormatFactoryUtil" %><%@ -page import="com.liferay.portal.kernel.util.GetterUtil" %><%@ -page import="com.liferay.portal.kernel.util.HtmlUtil" %><%@ -page import="com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil" %><%@ -page import="com.liferay.portal.kernel.util.ParamUtil" %><%@ -page import="com.liferay.portal.kernel.util.PrefsPropsUtil" %><%@ -page import="com.liferay.portal.kernel.util.PropsKeys" %><%@ -page import="com.liferay.portal.kernel.util.PropsUtil" %><%@ -page import="com.liferay.portal.kernel.util.StringBundler" %><%@ -page import="com.liferay.portal.kernel.util.StringPool" %><%@ -page import="com.liferay.portal.kernel.util.StringUtil" %><%@ -page import="com.liferay.portal.kernel.util.TextFormatter" %><%@ -page import="com.liferay.portal.kernel.util.Time" %><%@ -page import="com.liferay.portal.kernel.util.Tuple" %><%@ -page import="com.liferay.portal.kernel.util.UnicodeFormatter" %><%@ -page import="com.liferay.portal.kernel.util.Validator" %><%@ -page import="com.liferay.portal.kernel.workflow.WorkflowConstants" %><%@ -page import="com.liferay.portal.model.Ticket" %><%@ -page import="com.liferay.portal.model.TicketConstants" %><%@ -page import="com.liferay.portal.model.User" %><%@ -page import="com.liferay.portal.security.auth.PrincipalException" %><%@ -page import="com.liferay.portal.service.ClassNameLocalServiceUtil" %><%@ -page import="com.liferay.portal.service.ServiceContext" %><%@ -page import="com.liferay.portal.service.SubscriptionLocalServiceUtil" %><%@ -page import="com.liferay.portal.service.TicketLocalServiceUtil" %><%@ -page import="com.liferay.portal.service.WorkflowDefinitionLinkLocalServiceUtil" %><%@ -page import="com.liferay.portal.service.permission.GroupPermissionUtil" %><%@ -page import="com.liferay.portal.service.permission.PortletPermissionUtil" %><%@ -page import="com.liferay.portal.util.PortalUtil" %><%@ -page import="com.liferay.portlet.PortalPreferences" %><%@ -page import="com.liferay.portlet.PortletPreferencesFactoryUtil" %><%@ -page import="com.liferay.portlet.asset.AssetRendererFactoryRegistryUtil" %><%@ -page import="com.liferay.portlet.asset.model.AssetCategory" %><%@ -page import="com.liferay.portlet.asset.model.AssetEntry" %><%@ -page import="com.liferay.portlet.asset.model.AssetRenderer" %><%@ -page import="com.liferay.portlet.asset.model.AssetRendererFactory" %><%@ -page import="com.liferay.portlet.asset.model.AssetVocabulary" %><%@ -page import="com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil" %><%@ -page import="com.liferay.portlet.asset.service.AssetEntryServiceUtil" %><%@ -page import="com.liferay.portlet.asset.service.AssetVocabularyLocalServiceUtil" %><%@ -page import="com.liferay.portlet.asset.service.persistence.AssetEntryQuery" %><%@ -page import="com.liferay.portlet.blogs.model.BlogsEntry" %><%@ -page import="com.liferay.portlet.documentlibrary.DuplicateFileException" %><%@ -page import="com.liferay.portlet.documentlibrary.FileNameException" %><%@ -page import="com.liferay.portlet.documentlibrary.FileSizeException" %><%@ -page import="com.liferay.portlet.documentlibrary.NoSuchFileException" %><%@ -page import="com.liferay.portlet.journal.model.JournalArticle" %><%@ -page import="com.liferay.portlet.messageboards.model.MBMessage" %><%@ -page import="com.liferay.portlet.wiki.model.WikiPage" %><%@ -page import="com.liferay.util.RSSUtil" %> - -<%@ page import="java.math.BigDecimal" %> - -<%@ page import="java.text.Format" %> - -<%@ page import="java.util.ArrayList" %><%@ -page import="java.util.Arrays" %><%@ -page import="java.util.Collections" %><%@ -page import="java.util.Date" %><%@ -page import="java.util.HashMap" %><%@ -page import="java.util.List" %><%@ -page import="java.util.Map" %><%@ -page import="java.util.TreeMap" %> - -<%@ page import="javax.portlet.PortletURL" %><%@ -page import="javax.portlet.WindowState" %> - - - - - -<% -WindowState windowState = renderRequest.getWindowState(); - -String currentURL = PortalUtil.getCurrentURL(request); - -String redirect = ParamUtil.getString(request, "redirect", currentURL); - -String rootPortletId = portletDisplay.getRootPortletId(); - -String templatePath = portletConfig.getInitParameter("template-path"); - -Format dateFormatDate = FastDateFormatFactoryUtil.getDate(FastDateFormatConstants.LONG, locale, timeZone); -Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(FastDateFormatConstants.LONG, FastDateFormatConstants.SHORT, locale, timeZone); -Format dateFormatTime = FastDateFormatFactoryUtil.getTime(locale, timeZone); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/configuration.jsp deleted file mode 100644 index 926103048f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/configuration.jsp +++ /dev/null @@ -1,140 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - -<% -String tabs2 = ParamUtil.getString(request, "tabs2", "general"); - -String tabs2Names = "general,display-settings"; - -if (PortalUtil.isRSSFeedsEnabled()) { - tabs2Names += ",rss"; -} -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - - -
    -
    - - - - Liferay.Util.toggleBoxes('enableKBArticleRatingsCheckbox', 'ratingsType'); - Liferay.Util.toggleBoxes('enableSocialBookmarksCheckbox','socialBookmarksOptions'); - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/edit_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/edit_article.jsp deleted file mode 100644 index 3eb62b49dc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/edit_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/error.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/error.jsp deleted file mode 100644 index a3f6058092..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/error.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/history.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/history.jsp deleted file mode 100644 index 7b4337c826..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/history.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/init.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/init.jsp deleted file mode 100644 index 141dd8c2b4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/init.jsp +++ /dev/null @@ -1,43 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -boolean showKBArticleAuthorColumn = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticleAuthorColumn", null)); -boolean showKBArticleCreateDateColumn = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticleCreateDateColumn", null)); -boolean showKBArticleModifiedDateColumn = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticleModifiedDateColumn", null)); -boolean showKBArticleViewsColumn = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticleViewsColumn", null)); - -boolean enableKBArticleDescription = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleDescription", null)); -boolean enableKBArticleRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleRatings", null)); -String kbArticleRatingsType = GetterUtil.getString(portletPreferences.getValue("kbArticleRatingsType", null), "thumbs"); -boolean showKBArticleAssetEntries = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticleAssetEntries", null)); -boolean enableKBArticleAssetLinks = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleAssetLinks", null), true); -boolean enableKBArticleViewCountIncrement = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleViewCountIncrement", null)); -boolean enableKBArticleSubscriptions = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleSubscriptions", null), true); -boolean enableKBArticleHistory = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleHistory", null), true); -boolean enableKBArticlePrint = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticlePrint", null), true); -boolean enableSocialBookmarks = GetterUtil.getBoolean(portletPreferences.getValue("enableSocialBookmarks", null), false); -String socialBookmarksDisplayStyle = portletPreferences.getValue("socialBookmarksDisplayStyle", PortletPropsValues.KNOWLEDGE_BASE_SOCIAL_BOOKMARKS_DISPLAY_STYLE); -String socialBookmarksDisplayPosition = portletPreferences.getValue("socialBookmarksDisplayPosition", "bottom"); -String socialBookmarksTypes = portletPreferences.getValue("socialBookmarksTypes", PropsUtil.get(PropsKeys.SOCIAL_BOOKMARK_TYPES)); - -boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true); -int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA); -String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_DEFAULT); -String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/move_object.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/move_object.jsp deleted file mode 100644 index a2406b835d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/move_object.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/print_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/print_article.jsp deleted file mode 100644 index a3928ce72f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/print_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/search.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/search.jsp deleted file mode 100644 index a8bb358fb0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/search.jsp +++ /dev/null @@ -1,149 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - -<% -String keywords = ParamUtil.getString(request, "keywords"); - -String orderByCol = ParamUtil.getString(request, "orderByCol", "score"); -String orderByType = ParamUtil.getString(request, "orderByType", "desc"); -%> - -
    - -
    - - - - - - - - - <% - SearchContext searchContext = SearchContextFactory.getInstance(request); - - searchContext.setAttribute("paginationType", "regular"); - searchContext.setEnd(searchContainer.getEnd()); - searchContext.setKeywords(keywords); - searchContext.setStart(searchContainer.getStart()); - searchContext.setSorts(KnowledgeBaseUtil.getKBArticleSorts(orderByCol, orderByType)); - - Indexer indexer = IndexerRegistryUtil.getIndexer(KBArticle.class); - - Hits hits = indexer.search(searchContext); - - List tuples = new ArrayList(); - - for (int i = 0; i < hits.getDocs().length; i++) { - Object[] array = new Object[5]; - - Document document = hits.doc(i); - - array[0] = document.get(Field.ENTRY_CLASS_PK); - array[1] = document.get(Field.TITLE); - - long userId = GetterUtil.getLong(document.get(Field.USER_ID)); - String userName = document.get(Field.USER_NAME); - - array[2] = PortalUtil.getUserName(userId, userName); - - array[3] = document.getDate(Field.CREATE_DATE); - array[4] = document.getDate(Field.MODIFIED_DATE); - - tuples.add(new Tuple(array)); - } - - searchContainer.setResults(tuples); - searchContainer.setTotal(hits.getLength()); - %> - - - - - - - - - - - - - - - - - - - - - - - - - - <% - KBArticle kbArticle = KBArticleLocalServiceUtil.fetchLatestKBArticle(GetterUtil.getLong((String)tuple.getObject(0)), WorkflowConstants.STATUS_APPROVED); - - int viewCount = (kbArticle != null) ? kbArticle.getViewCount() : 0; - - buffer.append(viewCount); - buffer.append(StringPool.SPACE); - buffer.append((viewCount == 1) ? LanguageUtil.get(pageContext, "view") : LanguageUtil.get(pageContext, "views")); - %> - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/select_parent.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/select_parent.jsp deleted file mode 100644 index ae1c8ed9ac..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/select_parent.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/view.jsp deleted file mode 100644 index eb407a498a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/view.jsp +++ /dev/null @@ -1,33 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/view_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/view_article.jsp deleted file mode 100644 index 67b32e1fe1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/view_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/view_prp_articles.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/view_prp_articles.jsp deleted file mode 100644 index 843a47e078..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/search/view_prp_articles.jsp +++ /dev/null @@ -1,177 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/search/init.jsp" %> - -<% -long assetCategoryId = ParamUtil.getLong(request, "categoryId"); -String assetTagName = ParamUtil.getString(request, "tag"); - -String orderByCol = ParamUtil.getString(request, "orderByCol"); -String orderByType = ParamUtil.getString(request, "orderByType", "desc"); -%> - -
    - -
    - - - - - - - - - - <% - AssetEntryQuery assetEntryQuery = new AssetEntryQuery(KBArticle.class.getName(), searchContainer); - - searchContainer.setTotal(AssetEntryServiceUtil.getEntriesCount(assetEntryQuery)); - - assetEntryQuery.setEnd(searchContainer.getEnd()); - assetEntryQuery.setStart(searchContainer.getStart()); - - searchContainer.setResults(AssetEntryServiceUtil.getEntries(assetEntryQuery)); - %> - - - - - - - - - - - - - - - - - - - - - - - - - - <% - KBArticle kbArticle = KBArticleLocalServiceUtil.fetchLatestKBArticle(assetEntry.getClassPK(), WorkflowConstants.STATUS_APPROVED); - - int viewCount = (kbArticle != null) ? kbArticle.getViewCount() : 0; - - buffer.append(viewCount); - buffer.append(StringPool.SPACE); - buffer.append((viewCount == 1) ? LanguageUtil.get(pageContext, "view") : LanguageUtil.get(pageContext, "views")); - %> - - - - - - -
    - - - - <% - AssetCategory assetCategory = AssetCategoryLocalServiceUtil.getAssetCategory(assetCategoryId); - - assetCategory = assetCategory.toEscapedModel(); - - AssetVocabulary assetVocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(assetCategory.getVocabularyId()); - - assetVocabulary = assetVocabulary.toEscapedModel(); - %> - - - - - - <%= LanguageUtil.format(pageContext, "articles-with-x-x-and-tag-x", new String[] {assetVocabulary.getTitle(locale), assetCategory.getTitle(locale), assetTagName}, false) %> - - - <%= LanguageUtil.format(pageContext, "there-are-no-articles-with-x-x-and-tag-x", new String[] {assetVocabulary.getTitle(locale), assetCategory.getTitle(locale), assetTagName}, false) %> - - - - - - - <%= LanguageUtil.format(pageContext, "articles-with-x-x", new String[] {assetVocabulary.getTitle(locale), assetCategory.getTitle(locale)}, false) %> - - - <%= LanguageUtil.format(pageContext, "there-are-no-articles-with-x-x", new String[] {assetVocabulary.getTitle(locale), assetCategory.getTitle(locale)}, false) %> - - - - - - - - - <%= LanguageUtil.format(pageContext, "articles-with-tag-x", assetTagName, false) %> - - - <%= LanguageUtil.format(pageContext, "there-are-no-articles-with-tag-x", assetTagName, false) %> - - - - -
    -
    - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/configuration.jsp deleted file mode 100644 index 4b79c883e4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/configuration.jsp +++ /dev/null @@ -1,201 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/section/init.jsp" %> - -<% -String tabs2 = ParamUtil.getString(request, "tabs2", "general"); - -String tabs2Names = "general,display-settings"; - -if (PortalUtil.isRSSFeedsEnabled()) { - tabs2Names += ",rss"; -} -%> - - - - - - - - - - - - - - - - - - - - - - - <% - Map sectionsMap = new TreeMap(); - - for (String section : PortletPropsValues.ADMIN_KB_ARTICLE_SECTIONS) { - sectionsMap.put(LanguageUtil.get(pageContext, section), section); - } - - for (Map.Entry entry : sectionsMap.entrySet()) { - %> - - - - <% - } - %> - - - - - - - - - - - - - -
    - - - - - - - - - - - - -
    - - - - <% - int[] pageDeltaValues = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.SEARCH_CONTAINER_PAGE_DELTA_VALUES)); - - Arrays.sort(pageDeltaValues); - - for (int pageDeltaValue : pageDeltaValues) { - %> - - - - <% - } - %> - - - - -
    - - - - - -
    - - -
    - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - - -
    -
    - - - - Liferay.Util.toggleBoxes('enableKBArticleRatingsCheckbox', 'ratingsType'); - Liferay.Util.toggleBoxes('enableSocialBookmarksCheckbox','socialBookmarksOptions'); - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/css/main.css deleted file mode 100644 index b3efb28761..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/css/main.css +++ /dev/null @@ -1,28 +0,0 @@ -/* ---------- Portlet ---------- */ - -.knowledge-base-portlet-section { - .kb-article-content, .kb-article-title { - margin: 5px 0 0; - } - - .kb-article-title a { - font-weight: bold; - margin: 0 0 0 -20px; - } - - .kb-article-title-first { - margin-top: 0; - } - - .kb-articles { - padding: 0 0 0 20px; - } - - .kb-articles-sections-title { - border-bottom: 1px solid #CCC; - font-size: 1.2em; - font-weight: bold; - margin: 0 -5px 5px; - padding: 0 5px 3px; - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/edit_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/edit_article.jsp deleted file mode 100644 index dcab6cf25a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/edit_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/section/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/error.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/error.jsp deleted file mode 100644 index 6165c7f045..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/error.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/section/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/history.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/history.jsp deleted file mode 100644 index df8b66cb8d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/history.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/section/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/init.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/init.jsp deleted file mode 100644 index 78c34e0dbe..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/init.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<%@ page import="com.liferay.knowledgebase.section.search.KBArticleSearch" %> - -<% -boolean showKBArticlesSectionsTitle = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticlesSectionsTitle", null)); -String[] kbArticlesSections = portletPreferences.getValues("kbArticlesSections", new String[0]); -String kbArticleDisplayStyle = portletPreferences.getValue("kbArticleDisplayStyle", StringPool.BLANK); -String kbArticleWindowState = portletPreferences.getValue("kbArticleWindowState", StringPool.BLANK); -String kbArticlesOrderByCol = portletPreferences.getValue("kbArticlesOrderByCol", StringPool.BLANK); -String kbArticlesOrderByType = portletPreferences.getValue("kbArticlesOrderByType", StringPool.BLANK); -int kbArticlesDelta = GetterUtil.getInteger(portletPreferences.getValue("kbArticlesDelta", null)); -boolean showKBArticlesPagination = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticlesPagination", null)); - -boolean enableKBArticleDescription = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleDescription", null)); -boolean enableKBArticleRatings = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleRatings", null)); -String kbArticleRatingsType = GetterUtil.getString(portletPreferences.getValue("kbArticleRatingsType", null), "thumbs"); -boolean showKBArticleAssetEntries = GetterUtil.getBoolean(portletPreferences.getValue("showKBArticleAssetEntries", null)); -boolean enableKBArticleAssetLinks = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleAssetLinks", null), true); -boolean enableKBArticleViewCountIncrement = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleViewCountIncrement", null)); -boolean enableKBArticleSubscriptions = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleSubscriptions", null), true); -boolean enableKBArticleHistory = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticleHistory", null), true); -boolean enableKBArticlePrint = GetterUtil.getBoolean(portletPreferences.getValue("enableKBArticlePrint", null), true); -boolean enableSocialBookmarks = GetterUtil.getBoolean(portletPreferences.getValue("enableSocialBookmarks", null), false); -String socialBookmarksDisplayStyle = portletPreferences.getValue("socialBookmarksDisplayStyle", PortletPropsValues.KNOWLEDGE_BASE_SOCIAL_BOOKMARKS_DISPLAY_STYLE); -String socialBookmarksDisplayPosition = portletPreferences.getValue("socialBookmarksDisplayPosition", "bottom"); -String socialBookmarksTypes = portletPreferences.getValue("socialBookmarksTypes", PropsUtil.get(PropsKeys.SOCIAL_BOOKMARK_TYPES)); - -boolean enableRSS = !PortalUtil.isRSSFeedsEnabled() ? false : GetterUtil.getBoolean(portletPreferences.getValue("enableRss", null), true); -int rssDelta = GetterUtil.getInteger(portletPreferences.getValue("rssDelta", StringPool.BLANK), SearchContainer.DEFAULT_DELTA); -String rssDisplayStyle = portletPreferences.getValue("rssDisplayStyle", RSSUtil.DISPLAY_STYLE_DEFAULT); -String rssFeedType = portletPreferences.getValue("rssFeedType", RSSUtil.FEED_TYPE_DEFAULT); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/move_object.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/move_object.jsp deleted file mode 100644 index e010362a33..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/move_object.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/section/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/print_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/print_article.jsp deleted file mode 100644 index 429530e6a0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/print_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/section/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/select_parent.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/select_parent.jsp deleted file mode 100644 index c5504becb2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/select_parent.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/section/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/view.jsp deleted file mode 100644 index 46d4a432f5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/view.jsp +++ /dev/null @@ -1,116 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/section/init.jsp" %> - -<% -KBArticleURLHelper kbArticleURLHelper = new KBArticleURLHelper(renderRequest, renderResponse, templatePath); -%> - - - - - - - - - - - - - <% - List titles = new ArrayList(); - - for (String kbArticlesSection : kbArticlesSections) { - titles.add(LanguageUtil.get(pageContext, kbArticlesSection)); - } - - Collections.sort(titles); - %> - -
    - <%= StringUtil.merge(titles, StringPool.COMMA_AND_SPACE) %> -
    -
    - - - - - -
    - - <% - for (int i = 0; i < results.size(); i++) { - KBArticle kbArticle = (KBArticle)results.get(i); - %> - -
    "> - - <% - PortletURL viewKBArticleURL = kbArticleURLHelper.createViewURL(kbArticle); - %> - - -
    - - -
    - - - <%= kbArticle.getDescription() %> - - - <%= StringUtil.shorten(HtmlUtil.extractText(kbArticle.getContent()), 500) %> - - -
    -
    - - <% - } - %> - -
    - - -
    - -
    -
    -
    -
    - - - <% - renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.TRUE); - %> - -
    - <%= LanguageUtil.format(pageContext, "please-input-a-list-of-comma-delimited-words-for-portlet-property-x-to-enable-this-portlet", "admin.kb.article.sections", false) %> -
    -
    -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/view_article.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/view_article.jsp deleted file mode 100644 index d74ba68658..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/knowledge-base-portlet-6.2.x/docroot/section/view_article.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/section/init.jsp" %> - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-display.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index 87dd0d4494..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-plugin-package.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 43d8d2f154..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,11 +0,0 @@ -name=Legacy Apis Ant -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+ \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index bba248d9f1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - legacy-apis-ant - /icon.png - site_administration.users - /css/main.css - /js/main.js - legacy-apis-ant-portlet - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 493deeea40..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - legacy-apis-ant - Legacy Apis Ant - com.liferay.LegacyAPIsAntPortlet - - view-template - /view.jsp - - 0 - - text/html - - - Legacy Apis Ant - Legacy Apis Ant - Legacy Apis Ant - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/CalendarPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/CalendarPortlet.java deleted file mode 100644 index 05bbec852d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/CalendarPortlet.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.calendar.CalendarBookingDurationException; -import com.liferay.calendar.CalendarBookingRecurrenceException; -import com.liferay.calendar.CalendarNameException; -import com.liferay.calendar.CalendarResourceCodeException; -import com.liferay.calendar.CalendarResourceNameException; -import com.liferay.calendar.DuplicateCalendarResourceException; -import com.liferay.calendar.NoSuchResourceException; -import com.liferay.calendar.model.Calendar; -import com.liferay.calendar.model.CalendarBooking; -import com.liferay.calendar.model.CalendarBookingConstants; -import com.liferay.calendar.model.CalendarNotificationTemplate; -import com.liferay.calendar.model.CalendarNotificationTemplateConstants; -import com.liferay.calendar.model.CalendarResource; -import com.liferay.calendar.notification.NotificationTemplateContextFactory; -import com.liferay.calendar.notification.NotificationTemplateType; -import com.liferay.calendar.notification.NotificationType; -import com.liferay.calendar.recurrence.Frequency; -import com.liferay.calendar.recurrence.PositionalWeekday; -import com.liferay.calendar.recurrence.Recurrence; -import com.liferay.calendar.recurrence.RecurrenceSerializer; -import com.liferay.calendar.recurrence.Weekday; -import com.liferay.calendar.service.CalendarBookingLocalServiceUtil; -import com.liferay.calendar.service.CalendarBookingServiceUtil; -import com.liferay.calendar.service.CalendarLocalServiceUtil; -import com.liferay.calendar.service.CalendarNotificationTemplateServiceUtil; -import com.liferay.calendar.service.CalendarResourceServiceUtil; -import com.liferay.calendar.service.CalendarServiceUtil; -import com.liferay.calendar.service.permission.CalendarPermission; -import com.liferay.calendar.util.ActionKeys; -import com.liferay.calendar.util.CalendarDataFormat; -import com.liferay.calendar.util.CalendarDataHandler; -import com.liferay.calendar.util.CalendarDataHandlerFactory; -import com.liferay.calendar.util.CalendarResourceUtil; -import com.liferay.calendar.util.CalendarSearcher; -import com.liferay.calendar.util.CalendarUtil; -import com.liferay.calendar.util.JCalendarUtil; -import com.liferay.calendar.util.PortletKeys; -import com.liferay.calendar.util.RSSUtil; -import com.liferay.calendar.util.WebKeys; -import com.liferay.calendar.workflow.CalendarBookingWorkflowConstants; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.dao.search.SearchContainer; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSONArray; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.portlet.PortletResponseUtil; -import com.liferay.portal.kernel.search.Document; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.search.Hits; -import com.liferay.portal.kernel.search.Indexer; -import com.liferay.portal.kernel.search.SearchContext; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.upload.UploadPortletRequest; -import com.liferay.portal.kernel.util.CharPool; -import com.liferay.portal.kernel.util.Constants; -import com.liferay.portal.kernel.util.ContentTypes; -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.HttpUtil; -import com.liferay.portal.kernel.util.LocalizationUtil; -import com.liferay.portal.kernel.util.MimeTypesUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Time; -import com.liferay.portal.kernel.util.TimeZoneUtil; -import com.liferay.portal.kernel.util.UnicodeProperties; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.User; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.service.GroupLocalServiceUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.service.SubscriptionLocalServiceUtil; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.util.comparator.UserFirstNameComparator; -import com.liferay.portlet.messageboards.model.MBMessage; -import com.liferay.portlet.messageboards.service.MBMessageServiceUtil; -import com.liferay.util.bridges.mvc.MVCPortlet; -import com.liferay.util.dao.orm.CustomSQLUtil; - -import java.io.File; -import java.io.IOException; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; -import java.util.TimeZone; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletException; -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequest; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.ResourceRequest; -import javax.portlet.ResourceResponse; - -/** - * @author Eduardo Lundgren - * @author Fabio Pezzutto - * @author Andrea Di Giorgi - * @author Marcellus Tavares - * @author Bruno Basto - * @author Pier Paolo Ramon - */ -public class CalendarPortlet extends MVCPortlet { - - protected void addCalendar( - PortletRequest portletRequest, Set calendarsSet, - long classNameId, long classPK) - throws PortalException, SystemException { - - CalendarResource calendarResource = - CalendarResourceUtil.getCalendarResource( - portletRequest, classNameId, classPK); - - if (calendarResource == null) { - return; - } - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - List calendars = - CalendarLocalServiceUtil.getCalendarResourceCalendars( - calendarResource.getGroupId(), - calendarResource.getCalendarResourceId()); - - for (Calendar calendar : calendars) { - if (!CalendarPermission.contains( - permissionChecker, calendar, ActionKeys.VIEW)) { - - continue; - } - - calendarsSet.add(calendar); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/CartAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/CartAction.java deleted file mode 100644 index 0c9f33967c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/CartAction.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.util.Constants; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.struts.PortletAction; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.shopping.CartMinQuantityException; -import com.liferay.portlet.shopping.CouponActiveException; -import com.liferay.portlet.shopping.CouponEndDateException; -import com.liferay.portlet.shopping.CouponStartDateException; -import com.liferay.portlet.shopping.NoSuchCouponException; -import com.liferay.portlet.shopping.NoSuchItemException; -import com.liferay.portlet.shopping.model.ShoppingCart; -import com.liferay.portlet.shopping.model.ShoppingItem; -import com.liferay.portlet.shopping.service.ShoppingCartLocalServiceUtil; -import com.liferay.portlet.shopping.service.ShoppingItemLocalServiceUtil; -import com.liferay.portlet.shopping.util.ShoppingUtil; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import org.apache.struts.action.ActionForm; -import org.apache.struts.action.ActionForward; -import org.apache.struts.action.ActionMapping; - -/** - * @author Brian Wing Shun Chan - */ -public class CartAction extends PortletAction { - - @Override - public void processAction( - ActionMapping actionMapping, ActionForm actionForm, - PortletConfig portletConfig, ActionRequest actionRequest, - ActionResponse actionResponse) - throws Exception { - - try { - updateCart(actionRequest, actionResponse); - - String redirect = PortalUtil.escapeRedirect( - ParamUtil.getString(actionRequest, "redirect")); - - if (Validator.isNotNull(redirect)) { - actionResponse.sendRedirect(redirect); - } - } - catch (Exception e) { - if (e instanceof NoSuchItemException || - e instanceof PrincipalException) { - - SessionErrors.add(actionRequest, e.getClass()); - - setForward(actionRequest, "portlet.shopping.error"); - } - else if (e instanceof CartMinQuantityException || - e instanceof CouponActiveException || - e instanceof CouponEndDateException || - e instanceof CouponStartDateException || - e instanceof NoSuchCouponException) { - - SessionErrors.add(actionRequest, e.getClass(), e); - } - else { - throw e; - } - } - } - - @Override - public ActionForward render( - ActionMapping actionMapping, ActionForm actionForm, - PortletConfig portletConfig, RenderRequest renderRequest, - RenderResponse renderResponse) - throws Exception { - - return actionMapping.findForward( - getForward(renderRequest, "portlet.shopping.cart")); - } - - protected void updateCart( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - - ShoppingCart cart = ShoppingUtil.getCart(actionRequest); - - if (cmd.equals(Constants.ADD)) { - long itemId = ParamUtil.getLong(actionRequest, "itemId"); - - String fields = ParamUtil.getString(actionRequest, "fields"); - - if (Validator.isNotNull(fields)) { - fields = "|" + fields; - } - - ShoppingItem item = ShoppingItemLocalServiceUtil.getItem(itemId); - - if (item.getMinQuantity() > 0) { - for (int i = 0; i < item.getMinQuantity(); i++) { - cart.addItemId(itemId, fields); - } - } - else { - cart.addItemId(itemId, fields); - } - } - else { - String itemIds = ParamUtil.getString(actionRequest, "itemIds"); - String couponCodes = ParamUtil.getString( - actionRequest, "couponCodes"); - int altShipping = ParamUtil.getInteger( - actionRequest, "altShipping"); - boolean insure = ParamUtil.getBoolean(actionRequest, "insure"); - - cart.setItemIds(itemIds); - cart.setCouponCodes(couponCodes); - cart.setAltShipping(altShipping); - cart.setInsure(insure); - } - - ShoppingCartLocalServiceUtil.updateCart( - cart.getUserId(), cart.getGroupId(), cart.getItemIds(), - cart.getCouponCodes(), cart.getAltShipping(), cart.isInsure()); - - if (cmd.equals(Constants.ADD) || cmd.equals(Constants.UPDATE)) { - addSuccessMessage(actionRequest, actionResponse); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/DLFileNameBackgroundTaskServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/DLFileNameBackgroundTaskServiceImpl.java deleted file mode 100644 index 08f66fc6f4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/DLFileNameBackgroundTaskServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.portal.kernel.util.ProxyUtil; -import com.liferay.portal.service.BackgroundTaskService; -import com.liferay.portal.service.BackgroundTaskServiceWrapper; - -/** - * @author Preston Crary - */ -public class DLFileNameBackgroundTaskServiceImpl - extends BackgroundTaskServiceWrapper { - - public DLFileNameBackgroundTaskServiceImpl( - BackgroundTaskService backgroundTaskService) { - - super(backgroundTaskService); - - Class clazz = getClass(); - - ClassLoader classLoader = clazz.getClassLoader(); - - backgroundTaskService = - (BackgroundTaskService)ProxyUtil.newProxyInstance( - classLoader, new Class[] {BackgroundTaskService.class}, - new DLFileNameInvocationHandler(backgroundTaskService)); - - setWrappedService(backgroundTaskService); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/EditLayoutsAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/EditLayoutsAction.java deleted file mode 100644 index 110b884e92..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/EditLayoutsAction.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.portal.model.ColorScheme; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.Layout; -import com.liferay.portal.model.LayoutConstants; -import com.liferay.portal.model.LayoutPrototype; -import com.liferay.portal.model.LayoutRevision; -import com.liferay.portal.model.LayoutSet; -import com.liferay.portal.model.LayoutSetBranch; -import com.liferay.portal.model.LayoutTypePortlet; -import com.liferay.portal.model.Theme; -import com.liferay.portal.model.ThemeSetting; -import com.liferay.portal.model.User; -import com.liferay.portal.model.impl.ThemeSettingImpl; -import com.liferay.portal.util.LayoutSettings; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.util.PropsValues; -import com.liferay.portal.util.WebKeys; -import com.liferay.portlet.mobiledevicerules.model.MDRAction; -import com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance; -import com.liferay.portlet.mobiledevicerules.service.MDRActionLocalServiceUtil; -import com.liferay.portlet.mobiledevicerules.service.MDRActionServiceUtil; -import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalServiceUtil; -import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceServiceUtil; -import com.liferay.portlet.sites.action.ActionUtil; -import com.liferay.portlet.sites.util.SitesUtil; - -public class EditLayoutsAction extends PortletAction { - - protected void inheritMobileRuleGroups( - Layout layout, ServiceContext serviceContext) - throws PortalException, SystemException { - - List parentMDRRuleGroupInstances = - MDRRuleGroupInstanceLocalServiceUtil.getRuleGroupInstances( - Layout.class.getName(), layout.getParentPlid()); - - for (MDRRuleGroupInstance parentMDRRuleGroupInstance : - parentMDRRuleGroupInstances) { - - MDRRuleGroupInstance mdrRuleGroupInstance = - MDRRuleGroupInstanceServiceUtil.addRuleGroupInstance( - layout.getGroupId(), Layout.class.getName(), - layout.getPlid(), - parentMDRRuleGroupInstance.getRuleGroupId(), - parentMDRRuleGroupInstance.getPriority(), serviceContext); - - List parentMDRActions = - MDRActionLocalServiceUtil.getActions( - parentMDRRuleGroupInstance.getRuleGroupInstanceId()); - - for (MDRAction mdrAction : parentMDRActions) { - MDRActionServiceUtil.addAction( - mdrRuleGroupInstance.getRuleGroupInstanceId(), - mdrAction.getNameMap(), mdrAction.getDescriptionMap(), - mdrAction.getType(), mdrAction.getTypeSettings(), - serviceContext); - } - } - } - - private static final boolean _CHECK_METHOD_ON_PROCESS_ACTION = false; - - private static Log _log = LogFactoryUtil.getLog(EditLayoutsAction.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/EditRecordAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/EditRecordAction.java deleted file mode 100644 index b1d03955e7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/EditRecordAction.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.upload.UploadPortletRequest; -import com.liferay.portal.kernel.util.Constants; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.struts.PortletAction; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.FileSizeException; -import com.liferay.portlet.dynamicdatalists.NoSuchRecordException; -import com.liferay.portlet.dynamicdatalists.model.DDLRecord; -import com.liferay.portlet.dynamicdatalists.service.DDLRecordServiceUtil; -import com.liferay.portlet.dynamicdatalists.util.DDLUtil; -import com.liferay.portlet.dynamicdatamapping.StorageFieldRequiredException; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import org.apache.struts.action.ActionForm; -import org.apache.struts.action.ActionForward; -import org.apache.struts.action.ActionMapping; - -/** - * @author Marcellus Tavares - * @author Eduardo Lundgren - */ -public class EditRecordAction extends PortletAction { - - @Override - public void processAction( - ActionMapping actionMapping, ActionForm actionForm, - PortletConfig portletConfig, ActionRequest actionRequest, - ActionResponse actionResponse) - throws Exception { - - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - - try { - if (cmd.equals(Constants.ADD) || cmd.equals(Constants.UPDATE)) { - updateRecord(actionRequest); - } - else if (cmd.equals(Constants.DELETE)) { - deleteRecord(actionRequest); - } - else if (cmd.equals(Constants.REVERT)) { - revertRecordVersion(actionRequest); - } - else if (cmd.equals(Constants.TRANSLATE)) { - updateRecord(actionRequest); - - setForward( - actionRequest, - "portlet.dynamic_data_lists.update_translation_redirect"); - } - - if (Validator.isNotNull(cmd) && !cmd.equals(Constants.TRANSLATE)) { - sendRedirect(actionRequest, actionResponse); - } - } - catch (Exception e) { - if (e instanceof NoSuchRecordException || - e instanceof PrincipalException) { - - SessionErrors.add(actionRequest, e.getClass()); - - setForward(actionRequest, "portlet.dynamic_data_lists.error"); - } - else if (e instanceof FileSizeException || - e instanceof StorageFieldRequiredException) { - - SessionErrors.add(actionRequest, e.getClass()); - } - else { - throw e; - } - } - } - - @Override - public ActionForward render( - ActionMapping actionMapping, ActionForm actionForm, - PortletConfig portletConfig, RenderRequest renderRequest, - RenderResponse renderResponse) - throws Exception { - - try { - ActionUtil.getRecord(renderRequest); - } - catch (Exception e) { - if (e instanceof NoSuchRecordException || - e instanceof PrincipalException) { - - SessionErrors.add(renderRequest, e.getClass()); - - return actionMapping.findForward( - "portlet.dynamic_data_lists.error"); - } - else { - throw e; - } - } - - return actionMapping.findForward( - getForward( - renderRequest, "portlet.dynamic_data_lists.edit_record")); - } - - protected void deleteRecord(ActionRequest actionRequest) throws Exception { - long recordId = ParamUtil.getLong(actionRequest, "recordId"); - - DDLRecordServiceUtil.deleteRecord(recordId); - } - - protected void revertRecordVersion(ActionRequest actionRequest) - throws Exception { - - long recordId = ParamUtil.getLong(actionRequest, "recordId"); - - String version = ParamUtil.getString(actionRequest, "version"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - DDLRecord.class.getName(), actionRequest); - - DDLRecordServiceUtil.revertRecordVersion( - recordId, version, serviceContext); - } - - protected DDLRecord updateRecord(ActionRequest actionRequest) - throws Exception { - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(actionRequest); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - DDLRecord.class.getName(), uploadPortletRequest); - - long recordId = ParamUtil.getLong(serviceContext, "recordId"); - - long recordSetId = ParamUtil.getLong(serviceContext, "recordSetId"); - - return DDLUtil.updateRecord( - recordId, recordSetId, true, serviceContext); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/GroupModelListener.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/GroupModelListener.java deleted file mode 100644 index 2dec1febb2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/GroupModelListener.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.portal.ModelListenerException; -import com.liferay.portal.model.BaseModelListener; -import com.liferay.portal.model.Group; -import com.liferay.socialnetworking.service.WallEntryLocalServiceUtil; - -/** - * @author Brian Wing Shun Chan - */ -public class GroupModelListener extends BaseModelListener { - - @Override - public void onBeforeRemove(Group group) throws ModelListenerException { - try { - if (group.isUser()) { - WallEntryLocalServiceUtil.deleteWallEntries(group.getGroupId()); - } - } - catch (Exception e) { - throw new ModelListenerException(e); - } - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/JournalArticleAssetRendererFactory.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/JournalArticleAssetRendererFactory.java deleted file mode 100644 index 4f12e40ff1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/JournalArticleAssetRendererFactory.java +++ /dev/null @@ -1,264 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.language.LanguageUtil; -import com.liferay.portal.kernel.portlet.LiferayPortletRequest; -import com.liferay.portal.kernel.portlet.LiferayPortletResponse; -import com.liferay.portal.kernel.portlet.LiferayPortletURL; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ListUtil; -import com.liferay.portal.kernel.util.Tuple; -import com.liferay.portal.kernel.workflow.WorkflowConstants; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.util.PortletKeys; -import com.liferay.portal.util.WebKeys; -import com.liferay.portlet.asset.model.AssetRenderer; -import com.liferay.portlet.asset.model.BaseAssetRendererFactory; -import com.liferay.portlet.dynamicdatamapping.model.DDMStructure; -import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil; -import com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil; -import com.liferay.portlet.dynamicdatamapping.service.permission.DDMStructurePermission; -import com.liferay.portlet.journal.NoSuchArticleException; -import com.liferay.portlet.journal.model.JournalArticle; -import com.liferay.portlet.journal.model.JournalArticleResource; -import com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil; -import com.liferay.portlet.journal.service.JournalArticleResourceLocalServiceUtil; -import com.liferay.portlet.journal.service.JournalArticleServiceUtil; -import com.liferay.portlet.journal.service.permission.JournalArticlePermission; -import com.liferay.portlet.journal.service.permission.JournalPermission; - -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; - -import javax.portlet.PortletRequest; -import javax.portlet.PortletURL; -import javax.portlet.WindowState; -import javax.portlet.WindowStateException; - -/** - * @author Julio Camarero - * @author Juan Fernández - * @author Raymond Augé - * @author Sergio González - */ -public class JournalArticleAssetRendererFactory - extends BaseAssetRendererFactory { - - public static final String TYPE = "content"; - - @Override - public AssetRenderer getAssetRenderer(long classPK, int type) - throws PortalException, SystemException { - - JournalArticle article = null; - - try { - article = JournalArticleLocalServiceUtil.getArticle(classPK); - } - catch (NoSuchArticleException nsae1) { - JournalArticleResource articleResource = - JournalArticleResourceLocalServiceUtil.getArticleResource( - classPK); - - boolean approvedArticleAvailable = true; - - if (type == TYPE_LATEST_APPROVED) { - try { - article = JournalArticleLocalServiceUtil.getDisplayArticle( - articleResource.getGroupId(), - articleResource.getArticleId()); - } - catch (NoSuchArticleException nsae2) { - approvedArticleAvailable = false; - } - } - - if ((type != TYPE_LATEST_APPROVED) || !approvedArticleAvailable) { - article = JournalArticleLocalServiceUtil.getLatestArticle( - articleResource.getGroupId(), - articleResource.getArticleId(), - WorkflowConstants.STATUS_ANY); - } - } - - JournalArticleAssetRenderer journalArticleAssetRenderer = - new JournalArticleAssetRenderer(article); - - journalArticleAssetRenderer.setAssetRendererType(type); - - return journalArticleAssetRenderer; - } - - @Override - public AssetRenderer getAssetRenderer(long groupId, String urlTitle) - throws PortalException, SystemException { - - JournalArticle article = - JournalArticleServiceUtil.getDisplayArticleByUrlTitle( - groupId, urlTitle); - - return new JournalArticleAssetRenderer(article); - } - - @Override - public String getClassName() { - return JournalArticle.class.getName(); - } - - @Override - public List getClassTypeFieldNames( - long classTypeId, Locale locale, int start, int end) - throws Exception { - - DDMStructure ddmStructure = - DDMStructureLocalServiceUtil.getDDMStructure(classTypeId); - - List fieldNames = getDDMStructureFieldNames( - ddmStructure, locale); - - return ListUtil.subList(fieldNames, start, end); - } - - @Override - public int getClassTypeFieldNamesCount(long classTypeId, Locale locale) - throws Exception { - - DDMStructure ddmStructure = - DDMStructureLocalServiceUtil.getDDMStructure(classTypeId); - - List fieldNames = getDDMStructureFieldNames( - ddmStructure, locale); - - return fieldNames.size(); - } - - @Override - public Map getClassTypes(long[] groupIds, Locale locale) - throws Exception { - - Map classTypes = new HashMap(); - - List ddmStructures = - DDMStructureServiceUtil.getStructures( - groupIds, - PortalUtil.getClassNameId(JournalArticle.class.getName())); - - for (DDMStructure ddmStructure : ddmStructures) { - classTypes.put( - ddmStructure.getStructureId(), ddmStructure.getName(locale)); - } - - return classTypes; - } - - @Override - public String getType() { - return TYPE; - } - - @Override - public String getTypeName(Locale locale, boolean hasSubtypes) { - if (hasSubtypes) { - return LanguageUtil.get(locale, "basic-web-content"); - } - - return super.getTypeName(locale, hasSubtypes); - } - - @Override - public PortletURL getURLAdd( - LiferayPortletRequest liferayPortletRequest, - LiferayPortletResponse liferayPortletResponse) - throws PortalException, SystemException { - - ThemeDisplay themeDisplay = - (ThemeDisplay)liferayPortletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - if (!JournalPermission.contains( - themeDisplay.getPermissionChecker(), - themeDisplay.getScopeGroupId(), ActionKeys.ADD_ARTICLE)) { - - return null; - } - - long classTypeId = GetterUtil.getLong( - liferayPortletRequest.getAttribute( - WebKeys.ASSET_RENDERER_FACTORY_CLASS_TYPE_ID)); - - if ((classTypeId > 0) && - !DDMStructurePermission.contains( - themeDisplay.getPermissionChecker(), classTypeId, - ActionKeys.VIEW)) { - - return null; - } - - PortletURL portletURL = liferayPortletResponse.createRenderURL( - PortletKeys.JOURNAL); - - portletURL.setParameter("struts_action", "/journal/edit_article"); - - return portletURL; - } - - @Override - public PortletURL getURLView( - LiferayPortletResponse liferayPortletResponse, - WindowState windowState) { - - LiferayPortletURL liferayPortletURL = - liferayPortletResponse.createLiferayPortletURL( - PortletKeys.JOURNAL, PortletRequest.RENDER_PHASE); - - try { - liferayPortletURL.setWindowState(windowState); - } - catch (WindowStateException wse) { - } - - return liferayPortletURL; - } - - @Override - public boolean hasPermission( - PermissionChecker permissionChecker, long classPK, String actionId) - throws Exception { - - return JournalArticlePermission.contains( - permissionChecker, classPK, actionId); - } - - @Override - public boolean isLinkable() { - return _LINKABLE; - } - - @Override - protected String getIconPath(ThemeDisplay themeDisplay) { - return themeDisplay.getPathThemeImages() + "/common/history.png"; - } - - private static final boolean _LINKABLE = true; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/LegacyAPIsAntPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/LegacyAPIsAntPortlet.java deleted file mode 100644 index 2639bb99eb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/LegacyAPIsAntPortlet.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * 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 com.liferay; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.journal.service.JournalArticleLocalService; -import com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil; -import com.liferay.util.bridges.mvc.MVCPortlet; - -import java.io.IOException; - -import javax.portlet.PortletException; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - - -public class LegacyAPIsAntPortlet extends MVCPortlet -{ - - @Override - public void doView( RenderRequest renderRequest, RenderResponse renderResponse ) throws IOException, - PortletException - { - try - { - long groupId = PortalUtil.getScopeGroupId( renderRequest ); - int count = JournalArticleLocalServiceUtil.getArticlesCount( groupId ); - - renderRequest.setAttribute( "groupJournalArticlesCount", count ); - - JournalArticleLocalService service = JournalArticleLocalServiceUtil.getService(); - - int journalArticlesCount = service.getJournalArticlesCount(); - renderRequest.setAttribute( "journalArticlesCount", journalArticlesCount ); - } - catch( PortalException | SystemException e ) - { - e.printStackTrace(); - } - - super.doView( renderRequest, renderResponse ); - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/LockProtectedAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/LockProtectedAction.java deleted file mode 100644 index 7e464dfbcc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/LockProtectedAction.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.portal.kernel.exception.PortalException; -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.model.Lock; -import com.liferay.portal.service.LockLocalServiceUtil; - -import java.util.Date; - -public class LockProtectedAction { - - public LockProtectedAction( - Class clazz, String lockKey, long timeout, long retryDelay) { - - _className = clazz.getName(); - _lockKey = lockKey; - _timeout = timeout; - _retryDelay = retryDelay; - } - - public T getReturnValue() { - return _returnValue; - } - - public void performAction() throws PortalException, SystemException { - Lock lock = null; - - while (true) { - try { - lock = LockLocalServiceUtil.lock( - _className, _lockKey, _lockKey); - } - catch (Exception e) { - if (_log.isWarnEnabled()) { - _log.warn("Unable to acquire lock. Retrying."); - } - - continue; - } - - if (lock.isNew()) { - try { - _returnValue = performProtectedAction(); - } - finally { - LockLocalServiceUtil.unlock(_className, _lockKey, _lockKey); - } - - break; - } - - Date createDate = lock.getCreateDate(); - - if ((System.currentTimeMillis() - createDate.getTime()) >= - _timeout) { - - LockLocalServiceUtil.unlock( - _className, _lockKey, lock.getOwner()); - - if (_log.isWarnEnabled()) { - _log.warn("Removed lock " + lock + " due to timeout"); - } - } - else { - try { - Thread.sleep(_retryDelay); - } - catch (InterruptedException ie) { - if (_log.isWarnEnabled()) { - _log.warn( - "Interrupted while waiting to reacquire lock", ie); - } - } - } - } - } - - @SuppressWarnings("unused") - protected T performProtectedAction() - throws PortalException, SystemException { - - return null; - } - - private static Log _log = LogFactoryUtil.getLog(LockProtectedAction.class); - - private String _className; - private String _lockKey; - private long _retryDelay; - private T _returnValue; - private long _timeout; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MarketplaceMessageListener.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MarketplaceMessageListener.java deleted file mode 100644 index 24eb5cc91e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MarketplaceMessageListener.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.marketplace.model.App; -import com.liferay.marketplace.service.AppLocalServiceUtil; -import com.liferay.marketplace.service.ModuleLocalServiceUtil; -import com.liferay.portal.kernel.messaging.BaseMessageListener; -import com.liferay.portal.kernel.messaging.Message; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.PropertiesUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; - -import java.util.Properties; - -/** - * @author Ryan Park - * @author Joan Kim - */ -public class MarketplaceMessageListener extends BaseMessageListener { - - @Override - protected void doReceive(Message message) throws Exception { - String command = message.getString("command"); - - if (!command.equals("deploy")) { - return; - } - - Properties properties = PropertiesUtil.load( - message.getString("properties")); - - long remoteAppId = GetterUtil.getLong( - properties.getProperty("remote-app-id")); - String version = properties.getProperty("version"); - - if ((remoteAppId <= 0) || Validator.isNull(version)) { - return; - } - - String title = properties.getProperty("title"); - String description = properties.getProperty("description"); - String category = properties.getProperty("category"); - String iconURL = properties.getProperty("icon-url"); - - App app = AppLocalServiceUtil.updateApp( - 0, remoteAppId, title, description, category, iconURL, version, - null); - - String[] bundles = StringUtil.split(properties.getProperty("bundles")); - - for (String bundle : bundles) { - String[] bundleParts = StringUtil.split(bundle, StringPool.POUND); - - String bundleSymbolicName = bundleParts[0]; - String bundleVersion = bundleParts[1]; - String contextName = bundleParts[2]; - - ModuleLocalServiceUtil.addModule( - 0, app.getAppId(), bundleSymbolicName, bundleVersion, - contextName); - } - - String[] contextNames = StringUtil.split( - properties.getProperty("context-names")); - - for (String contextName : contextNames) { - ModuleLocalServiceUtil.addModule( - 0, app.getAppId(), StringPool.BLANK, StringPool.BLANK, - contextName); - } - - AppLocalServiceUtil.processMarketplaceProperties(properties); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MeetupsPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MeetupsPortlet.java deleted file mode 100644 index 82d971223b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MeetupsPortlet.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * 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 com.liferay; - -import com.liferay.portal.kernel.upload.UploadPortletRequest; -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.socialnetworking.service.MeetupsEntryLocalServiceUtil; -import com.liferay.socialnetworking.service.MeetupsRegistrationLocalServiceUtil; -import com.liferay.util.bridges.mvc.MVCPortlet; - -import java.io.File; - -import java.util.Calendar; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; - -/** - * @author Brian Wing Shun Chan - */ -public class MeetupsPortlet extends MVCPortlet { - - public void deleteMeetupsEntry( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - if (!permissionChecker.isCompanyAdmin()) { - return; - } - - long meetupsEntryId = ParamUtil.getLong( - actionRequest, "meetupsEntryId"); - - MeetupsEntryLocalServiceUtil.deleteMeetupsEntry(meetupsEntryId); - } - - public void updateMeetupsEntry( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - UploadPortletRequest uploadPortletRequest = - PortalUtil.getUploadPortletRequest(actionRequest); - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - if (!permissionChecker.isCompanyAdmin()) { - return; - } - - long meetupsEntryId = ParamUtil.getLong( - uploadPortletRequest, "meetupsEntryId"); - - String title = ParamUtil.getString(uploadPortletRequest, "title"); - String description = ParamUtil.getString( - uploadPortletRequest, "description"); - - int startDateMonth = ParamUtil.getInteger( - uploadPortletRequest, "startDateMonth"); - int startDateDay = ParamUtil.getInteger( - uploadPortletRequest, "startDateDay"); - int startDateYear = ParamUtil.getInteger( - uploadPortletRequest, "startDateYear"); - int startDateHour = ParamUtil.getInteger( - uploadPortletRequest, "startDateHour"); - int startDateMinute = ParamUtil.getInteger( - uploadPortletRequest, "startDateMinute"); - int startDateAmPm = ParamUtil.getInteger( - uploadPortletRequest, "startDateAmPm"); - - if (startDateAmPm == Calendar.PM) { - startDateHour += 12; - } - - int endDateMonth = ParamUtil.getInteger( - uploadPortletRequest, "endDateMonth"); - int endDateDay = ParamUtil.getInteger( - uploadPortletRequest, "endDateDay"); - int endDateYear = ParamUtil.getInteger( - uploadPortletRequest, "endDateYear"); - int endDateHour = ParamUtil.getInteger( - uploadPortletRequest, "endDateHour"); - int endDateMinute = ParamUtil.getInteger( - uploadPortletRequest, "endDateMinute"); - int endDateAmPm = ParamUtil.getInteger( - uploadPortletRequest, "endDateAmPm"); - - if (endDateAmPm == Calendar.PM) { - endDateHour += 12; - } - - int totalAttendees = ParamUtil.getInteger( - uploadPortletRequest, "totalAttendees"); - int maxAttendees = ParamUtil.getInteger( - uploadPortletRequest, "maxAttendees"); - double price = ParamUtil.getDouble(uploadPortletRequest, "price"); - - File file = uploadPortletRequest.getFile("fileName"); - byte[] bytes = FileUtil.getBytes(file); - - if (meetupsEntryId <= 0) { - MeetupsEntryLocalServiceUtil.addMeetupsEntry( - themeDisplay.getUserId(), title, description, startDateMonth, - startDateDay, startDateYear, startDateHour, startDateMinute, - endDateMonth, endDateDay, endDateYear, endDateHour, - endDateMinute, totalAttendees, maxAttendees, price, bytes); - } - else { - MeetupsEntryLocalServiceUtil.updateMeetupsEntry( - themeDisplay.getUserId(), meetupsEntryId, title, description, - startDateMonth, startDateDay, startDateYear, startDateHour, - startDateMinute, endDateMonth, endDateDay, endDateYear, - endDateHour, endDateMinute, totalAttendees, maxAttendees, price, - bytes); - } - } - - public void updateMeetupsRegistration( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long meetupsEntryId = ParamUtil.getLong( - actionRequest, "meetupsEntryId"); - int status = ParamUtil.getInteger(actionRequest, "status"); - String comments = ParamUtil.getString(actionRequest, "comments"); - - MeetupsRegistrationLocalServiceUtil.updateMeetupsRegistration( - themeDisplay.getUserId(), meetupsEntryId, status, comments); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MicroblogsPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MicroblogsPortlet.java deleted file mode 100644 index eeeb309382..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MicroblogsPortlet.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * This file is part of Liferay Social Office. Liferay Social Office is free - * software: you can redistribute it and/or modify it under the terms of the GNU - * Affero General Public License as published by the Free Software Foundation, - * either version 3 of the License, or (at your option) any later version. - * - * Liferay Social Office 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 Affero General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along with - * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html. - */ - -package com.liferay; - -import com.liferay.compat.util.bridges.mvc.MVCPortlet; -import com.liferay.microblogs.model.MicroblogsEntry; -import com.liferay.microblogs.service.MicroblogsEntryServiceUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.theme.ThemeDisplay; - -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; - -public class MicroblogsPortlet extends MVCPortlet { - - public void deleteMicroblogsEntry( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - long microblogsEntryId = ParamUtil.getLong( - actionRequest, "microblogsEntryId"); - - MicroblogsEntryServiceUtil.deleteMicroblogsEntry(microblogsEntryId); - } - - public void updateMicroblogsEntry( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long microblogsEntryId = ParamUtil.getLong( - actionRequest, "microblogsEntryId"); - - String content = ParamUtil.getString(actionRequest, "content"); - int type = ParamUtil.getInteger(actionRequest, "type"); - long receiverUserId = ParamUtil.getLong( - actionRequest, "receiverUserId"); - long receiverMicroblogsEntryId = ParamUtil.getLong( - actionRequest, "receiverMicroblogsEntryId"); - int socialRelationType = ParamUtil.getInteger( - actionRequest, "socialRelationType"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - MicroblogsEntry.class.getName(), actionRequest); - - String[] assetTagNames = getAssetTagNames(content); - - serviceContext.setAssetTagNames(assetTagNames); - - if (microblogsEntryId > 0) { - MicroblogsEntryServiceUtil.updateMicroblogsEntry( - microblogsEntryId, content, socialRelationType, serviceContext); - } - else { - MicroblogsEntryServiceUtil.addMicroblogsEntry( - themeDisplay.getUserId(), content, type, receiverUserId, - receiverMicroblogsEntryId, socialRelationType, serviceContext); - } - } - - protected String[] getAssetTagNames(String content) { - List assetTagNames = new ArrayList(); - - Matcher matcher = _assetTagPattern.matcher(content); - - while (matcher.find()) { - String assetTagName = matcher.group(); - - assetTagName = assetTagName.substring(1); - - assetTagNames.add(assetTagName); - } - - matcher = _userTagPattern.matcher(content); - - while (matcher.find()) { - String assetTagName = matcher.group(); - - assetTagName = assetTagName.replace("[@", StringPool.BLANK); - assetTagName = assetTagName.replace("]", StringPool.BLANK); - - assetTagNames.add(assetTagName); - } - - return assetTagNames.toArray(new String[assetTagNames.size()]); - } - - private Pattern _assetTagPattern = Pattern.compile("\\#\\S*"); - private Pattern _userTagPattern = Pattern.compile("\\[\\@\\S*\\]"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/web.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/web.xml deleted file mode 100644 index 1aa8cdb8d7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/view.jsp deleted file mode 100644 index f575912a9d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/legacy-apis-ant-portlet/docroot/view.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<% -/** - * 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. - */ -%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - - - - -There are <%=request.getAttribute( "groupJournalArticlesCount" ) %> journal articles in the current group.
    -There are <%=request.getAttribute( "journalArticlesCount" ) %> journal articles.
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/.gitignore b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/.gitignore deleted file mode 100644 index 0bf710b7a5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/tld \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-display.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index b208727b2f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-hook.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-hook.xml deleted file mode 100644 index 308d3f9a4d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-hook.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - portal.properties - content/Language*.properties - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-plugin-package.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 564cd6392d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,14 +0,0 @@ -name=OpenSocial Gadget -module-group-id=liferay -module-incremental-version=4 -tags=gadget, opensocial, social, widget -short-description= -long-description=OpenSocial is a framework designed for creating applications, called gadgets that function on any social networking site that supports them. There are many existing gadgets available, and anyone can create their own gadgets. With this app, you can integrate any OpenSocial gadget directly into a Liferay page, and you can easily manage which gadgets are currently in use or available. You can also create your own OpenSocial Gadget using the Liferay's OpenSocial development environment. Gadgets can be integrated into your portal like a portlet to be added or removed by users as desired. The OpenSocial Gadget portlet also allows you to change the permissions for who can view or edit the portlet, as well as options to share the contents of the portlet, just like you can with any other Liferay portlet. For more details about OpenSocial and Liferay, consult the "OpenSocial Integration" section of the Liferay User Guide. The Liferay User Guide can be found at http://liferay.com/documentation.

    This app will appear in your Application menu once installed. -change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=LGPL -liferay-versions=6.2.0+ - -portal-dependency-tlds=\ - c.tld \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index 8d63b54347..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - 1 - /icon.png - com.liferay.opensocial.admin.lar.AdminPortletDataHandler - com.liferay.opensocial.admin.lar.GadgetStagedModelDataHandler - apps - /admin/css/main.css - opensocial-portlet-admin - - - 2 - com.liferay.opensocial.gadget.action.ConfigurationActionImpl - /gadget/css/main.css - /gadgets/js/shindig-container:pubsub-2.js?c=1 - /gadget/js/OpenAjax_Hub_2.0.5_r1293/src/containers/inline/inline.js - /gadget/js/main.js - opensocial-portlet-gadget - - - 3 - /icon.png - com.liferay.opensocial.adhocgadget.action.ConfigurationActionImpl - true - /gadget/css/main.css - /gadgets/js/shindig-container:pubsub-2.js?c=1 - /gadget/js/OpenAjax_Hub_2.0.5_r1293/src/containers/inline/inline.js - /gadget/js/main.js - opensocial-portlet-gadget - - - 4 - /editor.png - site_administration.content - /editor/css/main.css - /gadgets/js/shindig-container:pubsub-2.js?c=1&debug=1&nocache=1 - /gadget/js/main.js - /gadget/js/OpenAjax_Hub_2.0.5_r1293/src/containers/inline/inline.js - /editor/js/gadget-editor-tabs.js - /editor/js/gadget-editor-tree.js - /editor/js/main.js - opensocial-portlet-editor - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog deleted file mode 100644 index 51883aa76f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog +++ /dev/null @@ -1,19 +0,0 @@ -# -# Module Incremental Version 1 -# -c963f942b6ec873cc7ed9ca15d9c2ad000368ca8^..98f9ca2060df0a3ad6732e8b102a51eac5928be9=LPS-10988 LPS-21488 LPS-25730 LPS-27530 LPS-30514 LPS-30588 LPS-30661 LPS-30665 LPS-30787 LPS-30799 LPS-30860 LPS-30885 LPS-30936 LPS-31033 LPS-31133 LPS-31353 LPS-31362 LPS-31519 LPS-31802 LPS-31997 LPS-32066 LPS-32141 LPS-32185 LPS-32218 LPS-32713 LPS-32861 LPS-33400 LPS-33594 LPS-33626 LPS-33847 LPS-34098 LPS-34174 LPS-34686 LPS-34868 LPS-34937 LPS-35004 LPS-35118 LPS-35131 LPS-35230 LPS-35256 LPS-35257 LPS-35335 LPS-35598 LPS-35643 LPS-35647 LPS-36310 LPS-36341 LPS-36603 LPS-36872 LPS-37543 LPS-37550 LPS-37928 LPS-38283 LPS-38401 LPS-38632 LPS-38689 LPS-39625 LPS-40334 LPS-40384 LPS-40599 LPS-40605 LPS-40752 LPS-40805 LPS-40866 LPS-41715 - -# -# Module Incremental Version 2 -# -98f9ca2060df0a3ad6732e8b102a51eac5928be9^..44fb20d6f004b99e3fb0652af667283113bff2e3=LPS-35716 LPS-36241 LPS-40913 LPS-41825 LPS-42501 LPS-42790 LPS-42924 LPS-43258 - -# -# Module Incremental Version 3 -# -44fb20d6f004b99e3fb0652af667283113bff2e3^..a2a4d325e51f0c122bca4a743c60ddbc74999b4b=LPS-43599 - -# -# Module Incremental Version 4 -# -a2a4d325e51f0c122bca4a743c60ddbc74999b4b^..67b440b07148f1dccca1ef84a963c734a0736b52=LPS-40606 LPS-41300 LPS-43589 LPS-43927 LPS-43994 LPS-44451 LPS-44790 LPS-44847 LPS-45092 LPS-45794 LPS-46070 LPS-46304 LPS-46730 LPS-46997 LPS-47019 LPS-49717 LPS-52011 LPS-52760 SOS-2228 \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog.md5 b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog.md5 deleted file mode 100644 index d6c1616484..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-releng.changelog.md5 +++ /dev/null @@ -1 +0,0 @@ -9d40e6220a1718fe3e3ff80ee4dea1bf \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-releng.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-releng.properties deleted file mode 100644 index bc5592556b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/liferay-releng.properties +++ /dev/null @@ -1,9 +0,0 @@ -bundle=true -category=Communication -demo-url= -dependent-apps= -labs=false -marketplace=true -public=true -support-url= -supported=false \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 2c7f6b3bb3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - 1 - OpenSocial Admin - com.liferay.opensocial.admin.portlet.AdminPortlet - - copy-request-parameters - true - - - view-template - /admin/view.jsp - - 0 - - text/html - - content.Language - - OpenSocial Gadget Publisher - OpenSocial Gadget Publisher - OpenSocial Gadget Publisher - - - administrator - - - - 2 - OpenSocial Gadget - com.liferay.opensocial.gadget.portlet.GadgetPortlet - - copy-request-parameters - true - - - view-template - /gadget/view.jsp - - 0 - - text/html - - content.Language - - OpenSocial Gadget - OpenSocial Gadget - OpenSocial Gadget - - - administrator - - - guest - - - power-user - - - user - - - - 3 - OpenSocial Gadget - com.liferay.opensocial.adhocgadget.portlet.AdhocGadgetPortlet - - copy-request-parameters - true - - - view-template - /adhoc_gadget/view.jsp - - 0 - - text/html - - content.Language - - OpenSocial Gadget - OpenSocial Gadget - OpenSocial Gadget - - - administrator - - - guest - - - power-user - - - user - - - - 4 - OpenSocial Gadget Editor - com.liferay.opensocial.editor.portlet.EditorPortlet - - copy-request-parameters - true - - - view-template - /editor/view.jsp - - 0 - - text/html - - content.Language - - OpenSocial Gadget Editor - OpenSocial Gadget Editor - OpenSocial Gadget Editor - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/server-config.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/server-config.wsdd deleted file mode 100644 index 7edb7f4257..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/server-config.wsdd +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service.xml deleted file mode 100644 index 9db08afc45..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - OpenSocial - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DuplicateGadgetURL - GadgetPortletCategoryNames - GadgetURL - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/DuplicateGadgetURLException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/DuplicateGadgetURLException.java deleted file mode 100644 index be05f997e9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/DuplicateGadgetURLException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.opensocial; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class DuplicateGadgetURLException extends PortalException { - - public DuplicateGadgetURLException() { - super(); - } - - public DuplicateGadgetURLException(String msg) { - super(msg); - } - - public DuplicateGadgetURLException(String msg, Throwable cause) { - super(msg, cause); - } - - public DuplicateGadgetURLException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/GadgetPortletCategoryNamesException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/GadgetPortletCategoryNamesException.java deleted file mode 100644 index dd35bd70dc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/GadgetPortletCategoryNamesException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.opensocial; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class GadgetPortletCategoryNamesException extends PortalException { - - public GadgetPortletCategoryNamesException() { - super(); - } - - public GadgetPortletCategoryNamesException(String msg) { - super(msg); - } - - public GadgetPortletCategoryNamesException(String msg, Throwable cause) { - super(msg, cause); - } - - public GadgetPortletCategoryNamesException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/GadgetURLException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/GadgetURLException.java deleted file mode 100644 index a3db4000a5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/GadgetURLException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.opensocial; - -import com.liferay.portal.kernel.exception.PortalException; - -/** - * @author Brian Wing Shun Chan - */ -public class GadgetURLException extends PortalException { - - public GadgetURLException() { - super(); - } - - public GadgetURLException(String msg) { - super(msg); - } - - public GadgetURLException(String msg, Throwable cause) { - super(msg, cause); - } - - public GadgetURLException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/NoSuchGadgetException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/NoSuchGadgetException.java deleted file mode 100644 index 37a4baa4f4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/NoSuchGadgetException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.opensocial; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Brian Wing Shun Chan - */ -public class NoSuchGadgetException extends NoSuchModelException { - - public NoSuchGadgetException() { - super(); - } - - public NoSuchGadgetException(String msg) { - super(msg); - } - - public NoSuchGadgetException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchGadgetException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/NoSuchOAuthConsumerException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/NoSuchOAuthConsumerException.java deleted file mode 100644 index 5f11730faa..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/NoSuchOAuthConsumerException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.opensocial; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Brian Wing Shun Chan - */ -public class NoSuchOAuthConsumerException extends NoSuchModelException { - - public NoSuchOAuthConsumerException() { - super(); - } - - public NoSuchOAuthConsumerException(String msg) { - super(msg); - } - - public NoSuchOAuthConsumerException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchOAuthConsumerException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/NoSuchOAuthTokenException.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/NoSuchOAuthTokenException.java deleted file mode 100644 index ca50efab32..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/NoSuchOAuthTokenException.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.opensocial; - -import com.liferay.portal.NoSuchModelException; - -/** - * @author Brian Wing Shun Chan - */ -public class NoSuchOAuthTokenException extends NoSuchModelException { - - public NoSuchOAuthTokenException() { - super(); - } - - public NoSuchOAuthTokenException(String msg) { - super(msg); - } - - public NoSuchOAuthTokenException(String msg, Throwable cause) { - super(msg, cause); - } - - public NoSuchOAuthTokenException(Throwable cause) { - super(cause); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/Gadget.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/Gadget.java deleted file mode 100644 index ff52a442c9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/Gadget.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the Gadget service. Represents a row in the "OpenSocial_Gadget" database table, with each column mapped to a property of this class. - * - * @author Brian Wing Shun Chan - * @see GadgetModel - * @see com.liferay.opensocial.model.impl.GadgetImpl - * @see com.liferay.opensocial.model.impl.GadgetModelImpl - * @generated - */ -public interface Gadget extends GadgetModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link com.liferay.opensocial.model.impl.GadgetImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetClp.java deleted file mode 100644 index 48dd7163a7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetClp.java +++ /dev/null @@ -1,534 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -import com.liferay.opensocial.service.ClpSerializer; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.StagedModelType; -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 java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Brian Wing Shun Chan - */ -public class GadgetClp extends BaseModelImpl implements Gadget { - public GadgetClp() { - } - - @Override - public Class getModelClass() { - return Gadget.class; - } - - @Override - public String getModelClassName() { - return Gadget.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _gadgetId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setGadgetId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _gadgetId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("gadgetId", getGadgetId()); - attributes.put("companyId", getCompanyId()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("name", getName()); - attributes.put("url", getUrl()); - attributes.put("portletCategoryNames", getPortletCategoryNames()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long gadgetId = (Long)attributes.get("gadgetId"); - - if (gadgetId != null) { - setGadgetId(gadgetId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Date createDate = (Date)attributes.get("createDate"); - - if (createDate != null) { - setCreateDate(createDate); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - String url = (String)attributes.get("url"); - - if (url != null) { - setUrl(url); - } - - String portletCategoryNames = (String)attributes.get( - "portletCategoryNames"); - - if (portletCategoryNames != null) { - setPortletCategoryNames(portletCategoryNames); - } - } - - @Override - public String getUuid() { - return _uuid; - } - - @Override - public void setUuid(String uuid) { - _uuid = uuid; - - if (_gadgetRemoteModel != null) { - try { - Class clazz = _gadgetRemoteModel.getClass(); - - Method method = clazz.getMethod("setUuid", String.class); - - method.invoke(_gadgetRemoteModel, uuid); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getGadgetId() { - return _gadgetId; - } - - @Override - public void setGadgetId(long gadgetId) { - _gadgetId = gadgetId; - - if (_gadgetRemoteModel != null) { - try { - Class clazz = _gadgetRemoteModel.getClass(); - - Method method = clazz.getMethod("setGadgetId", long.class); - - method.invoke(_gadgetRemoteModel, gadgetId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_gadgetRemoteModel != null) { - try { - Class clazz = _gadgetRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_gadgetRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_gadgetRemoteModel != null) { - try { - Class clazz = _gadgetRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_gadgetRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_gadgetRemoteModel != null) { - try { - Class clazz = _gadgetRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_gadgetRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getName() { - return _name; - } - - @Override - public void setName(String name) { - _name = name; - - if (_gadgetRemoteModel != null) { - try { - Class clazz = _gadgetRemoteModel.getClass(); - - Method method = clazz.getMethod("setName", String.class); - - method.invoke(_gadgetRemoteModel, name); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getUrl() { - return _url; - } - - @Override - public void setUrl(String url) { - _url = url; - - if (_gadgetRemoteModel != null) { - try { - Class clazz = _gadgetRemoteModel.getClass(); - - Method method = clazz.getMethod("setUrl", String.class); - - method.invoke(_gadgetRemoteModel, url); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getPortletCategoryNames() { - return _portletCategoryNames; - } - - @Override - public void setPortletCategoryNames(String portletCategoryNames) { - _portletCategoryNames = portletCategoryNames; - - if (_gadgetRemoteModel != null) { - try { - Class clazz = _gadgetRemoteModel.getClass(); - - Method method = clazz.getMethod("setPortletCategoryNames", - String.class); - - method.invoke(_gadgetRemoteModel, portletCategoryNames); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Gadget.class.getName())); - } - - public BaseModel getGadgetRemoteModel() { - return _gadgetRemoteModel; - } - - public void setGadgetRemoteModel(BaseModel gadgetRemoteModel) { - _gadgetRemoteModel = gadgetRemoteModel; - } - - 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 = _gadgetRemoteModel.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(_gadgetRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - GadgetLocalServiceUtil.addGadget(this); - } - else { - GadgetLocalServiceUtil.updateGadget(this); - } - } - - @Override - public Gadget toEscapedModel() { - return (Gadget)ProxyUtil.newProxyInstance(Gadget.class.getClassLoader(), - new Class[] { Gadget.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - GadgetClp clone = new GadgetClp(); - - clone.setUuid(getUuid()); - clone.setGadgetId(getGadgetId()); - clone.setCompanyId(getCompanyId()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setName(getName()); - clone.setUrl(getUrl()); - clone.setPortletCategoryNames(getPortletCategoryNames()); - - return clone; - } - - @Override - public int compareTo(Gadget gadget) { - int value = 0; - - value = getName().compareTo(gadget.getName()); - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof GadgetClp)) { - return false; - } - - GadgetClp gadget = (GadgetClp)obj; - - long primaryKey = gadget.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(17); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", gadgetId="); - sb.append(getGadgetId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", name="); - sb.append(getName()); - sb.append(", url="); - sb.append(getUrl()); - sb.append(", portletCategoryNames="); - sb.append(getPortletCategoryNames()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(28); - - sb.append(""); - sb.append("com.liferay.opensocial.model.Gadget"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "gadgetId"); - sb.append( - "companyId"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "name"); - sb.append( - "url"); - sb.append( - "portletCategoryNames"); - - sb.append(""); - - return sb.toString(); - } - - private String _uuid; - private long _gadgetId; - private long _companyId; - private Date _createDate; - private Date _modifiedDate; - private String _name; - private String _url; - private String _portletCategoryNames; - private BaseModel _gadgetRemoteModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetModel.java deleted file mode 100644 index cb0157e36d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetModel.java +++ /dev/null @@ -1,243 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -import com.liferay.portal.kernel.bean.AutoEscape; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.StagedModel; -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 Gadget service. Represents a row in the "OpenSocial_Gadget" database table, with each column mapped to a property of this class. - * - *

    - * This interface and its corresponding implementation {@link com.liferay.opensocial.model.impl.GadgetModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.opensocial.model.impl.GadgetImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see Gadget - * @see com.liferay.opensocial.model.impl.GadgetImpl - * @see com.liferay.opensocial.model.impl.GadgetModelImpl - * @generated - */ -public interface GadgetModel extends BaseModel, StagedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a gadget model instance should use the {@link Gadget} interface instead. - */ - - /** - * Returns the primary key of this gadget. - * - * @return the primary key of this gadget - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this gadget. - * - * @param primaryKey the primary key of this gadget - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the uuid of this gadget. - * - * @return the uuid of this gadget - */ - @AutoEscape - @Override - public String getUuid(); - - /** - * Sets the uuid of this gadget. - * - * @param uuid the uuid of this gadget - */ - @Override - public void setUuid(String uuid); - - /** - * Returns the gadget ID of this gadget. - * - * @return the gadget ID of this gadget - */ - public long getGadgetId(); - - /** - * Sets the gadget ID of this gadget. - * - * @param gadgetId the gadget ID of this gadget - */ - public void setGadgetId(long gadgetId); - - /** - * Returns the company ID of this gadget. - * - * @return the company ID of this gadget - */ - @Override - public long getCompanyId(); - - /** - * Sets the company ID of this gadget. - * - * @param companyId the company ID of this gadget - */ - @Override - public void setCompanyId(long companyId); - - /** - * Returns the create date of this gadget. - * - * @return the create date of this gadget - */ - @Override - public Date getCreateDate(); - - /** - * Sets the create date of this gadget. - * - * @param createDate the create date of this gadget - */ - @Override - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this gadget. - * - * @return the modified date of this gadget - */ - @Override - public Date getModifiedDate(); - - /** - * Sets the modified date of this gadget. - * - * @param modifiedDate the modified date of this gadget - */ - @Override - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the name of this gadget. - * - * @return the name of this gadget - */ - @AutoEscape - public String getName(); - - /** - * Sets the name of this gadget. - * - * @param name the name of this gadget - */ - public void setName(String name); - - /** - * Returns the url of this gadget. - * - * @return the url of this gadget - */ - @AutoEscape - public String getUrl(); - - /** - * Sets the url of this gadget. - * - * @param url the url of this gadget - */ - public void setUrl(String url); - - /** - * Returns the portlet category names of this gadget. - * - * @return the portlet category names of this gadget - */ - @AutoEscape - public String getPortletCategoryNames(); - - /** - * Sets the portlet category names of this gadget. - * - * @param portletCategoryNames the portlet category names of this gadget - */ - public void setPortletCategoryNames(String portletCategoryNames); - - @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(Gadget gadget); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public Gadget toEscapedModel(); - - @Override - public Gadget toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetSoap.java deleted file mode 100644 index 02111e81e3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetSoap.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * 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 com.liferay.opensocial.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 com.liferay.opensocial.service.http.GadgetServiceSoap}. - * - * @author Brian Wing Shun Chan - * @see com.liferay.opensocial.service.http.GadgetServiceSoap - * @generated - */ -public class GadgetSoap implements Serializable { - public static GadgetSoap toSoapModel(Gadget model) { - GadgetSoap soapModel = new GadgetSoap(); - - soapModel.setUuid(model.getUuid()); - soapModel.setGadgetId(model.getGadgetId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setName(model.getName()); - soapModel.setUrl(model.getUrl()); - soapModel.setPortletCategoryNames(model.getPortletCategoryNames()); - - return soapModel; - } - - public static GadgetSoap[] toSoapModels(Gadget[] models) { - GadgetSoap[] soapModels = new GadgetSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static GadgetSoap[][] toSoapModels(Gadget[][] models) { - GadgetSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new GadgetSoap[models.length][models[0].length]; - } - else { - soapModels = new GadgetSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static GadgetSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (Gadget model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new GadgetSoap[soapModels.size()]); - } - - public GadgetSoap() { - } - - public long getPrimaryKey() { - return _gadgetId; - } - - public void setPrimaryKey(long pk) { - setGadgetId(pk); - } - - public String getUuid() { - return _uuid; - } - - public void setUuid(String uuid) { - _uuid = uuid; - } - - public long getGadgetId() { - return _gadgetId; - } - - public void setGadgetId(long gadgetId) { - _gadgetId = gadgetId; - } - - public long getCompanyId() { - return _companyId; - } - - public void setCompanyId(long companyId) { - _companyId = companyId; - } - - public Date getCreateDate() { - return _createDate; - } - - public void setCreateDate(Date createDate) { - _createDate = createDate; - } - - public Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public String getName() { - return _name; - } - - public void setName(String name) { - _name = name; - } - - public String getUrl() { - return _url; - } - - public void setUrl(String url) { - _url = url; - } - - public String getPortletCategoryNames() { - return _portletCategoryNames; - } - - public void setPortletCategoryNames(String portletCategoryNames) { - _portletCategoryNames = portletCategoryNames; - } - - private String _uuid; - private long _gadgetId; - private long _companyId; - private Date _createDate; - private Date _modifiedDate; - private String _name; - private String _url; - private String _portletCategoryNames; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetWrapper.java deleted file mode 100644 index b441b285bf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/GadgetWrapper.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -import com.liferay.portal.kernel.lar.StagedModelType; -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 Gadget}. - *

    - * - * @author Brian Wing Shun Chan - * @see Gadget - * @generated - */ -public class GadgetWrapper implements Gadget, ModelWrapper { - public GadgetWrapper(Gadget gadget) { - _gadget = gadget; - } - - @Override - public Class getModelClass() { - return Gadget.class; - } - - @Override - public String getModelClassName() { - return Gadget.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("gadgetId", getGadgetId()); - attributes.put("companyId", getCompanyId()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("name", getName()); - attributes.put("url", getUrl()); - attributes.put("portletCategoryNames", getPortletCategoryNames()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long gadgetId = (Long)attributes.get("gadgetId"); - - if (gadgetId != null) { - setGadgetId(gadgetId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Date createDate = (Date)attributes.get("createDate"); - - if (createDate != null) { - setCreateDate(createDate); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - String url = (String)attributes.get("url"); - - if (url != null) { - setUrl(url); - } - - String portletCategoryNames = (String)attributes.get( - "portletCategoryNames"); - - if (portletCategoryNames != null) { - setPortletCategoryNames(portletCategoryNames); - } - } - - /** - * Returns the primary key of this gadget. - * - * @return the primary key of this gadget - */ - @Override - public long getPrimaryKey() { - return _gadget.getPrimaryKey(); - } - - /** - * Sets the primary key of this gadget. - * - * @param primaryKey the primary key of this gadget - */ - @Override - public void setPrimaryKey(long primaryKey) { - _gadget.setPrimaryKey(primaryKey); - } - - /** - * Returns the uuid of this gadget. - * - * @return the uuid of this gadget - */ - @Override - public java.lang.String getUuid() { - return _gadget.getUuid(); - } - - /** - * Sets the uuid of this gadget. - * - * @param uuid the uuid of this gadget - */ - @Override - public void setUuid(java.lang.String uuid) { - _gadget.setUuid(uuid); - } - - /** - * Returns the gadget ID of this gadget. - * - * @return the gadget ID of this gadget - */ - @Override - public long getGadgetId() { - return _gadget.getGadgetId(); - } - - /** - * Sets the gadget ID of this gadget. - * - * @param gadgetId the gadget ID of this gadget - */ - @Override - public void setGadgetId(long gadgetId) { - _gadget.setGadgetId(gadgetId); - } - - /** - * Returns the company ID of this gadget. - * - * @return the company ID of this gadget - */ - @Override - public long getCompanyId() { - return _gadget.getCompanyId(); - } - - /** - * Sets the company ID of this gadget. - * - * @param companyId the company ID of this gadget - */ - @Override - public void setCompanyId(long companyId) { - _gadget.setCompanyId(companyId); - } - - /** - * Returns the create date of this gadget. - * - * @return the create date of this gadget - */ - @Override - public java.util.Date getCreateDate() { - return _gadget.getCreateDate(); - } - - /** - * Sets the create date of this gadget. - * - * @param createDate the create date of this gadget - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _gadget.setCreateDate(createDate); - } - - /** - * Returns the modified date of this gadget. - * - * @return the modified date of this gadget - */ - @Override - public java.util.Date getModifiedDate() { - return _gadget.getModifiedDate(); - } - - /** - * Sets the modified date of this gadget. - * - * @param modifiedDate the modified date of this gadget - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _gadget.setModifiedDate(modifiedDate); - } - - /** - * Returns the name of this gadget. - * - * @return the name of this gadget - */ - @Override - public java.lang.String getName() { - return _gadget.getName(); - } - - /** - * Sets the name of this gadget. - * - * @param name the name of this gadget - */ - @Override - public void setName(java.lang.String name) { - _gadget.setName(name); - } - - /** - * Returns the url of this gadget. - * - * @return the url of this gadget - */ - @Override - public java.lang.String getUrl() { - return _gadget.getUrl(); - } - - /** - * Sets the url of this gadget. - * - * @param url the url of this gadget - */ - @Override - public void setUrl(java.lang.String url) { - _gadget.setUrl(url); - } - - /** - * Returns the portlet category names of this gadget. - * - * @return the portlet category names of this gadget - */ - @Override - public java.lang.String getPortletCategoryNames() { - return _gadget.getPortletCategoryNames(); - } - - /** - * Sets the portlet category names of this gadget. - * - * @param portletCategoryNames the portlet category names of this gadget - */ - @Override - public void setPortletCategoryNames(java.lang.String portletCategoryNames) { - _gadget.setPortletCategoryNames(portletCategoryNames); - } - - @Override - public boolean isNew() { - return _gadget.isNew(); - } - - @Override - public void setNew(boolean n) { - _gadget.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _gadget.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _gadget.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _gadget.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _gadget.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _gadget.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _gadget.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _gadget.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _gadget.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _gadget.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new GadgetWrapper((Gadget)_gadget.clone()); - } - - @Override - public int compareTo(com.liferay.opensocial.model.Gadget gadget) { - return _gadget.compareTo(gadget); - } - - @Override - public int hashCode() { - return _gadget.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _gadget.toCacheModel(); - } - - @Override - public com.liferay.opensocial.model.Gadget toEscapedModel() { - return new GadgetWrapper(_gadget.toEscapedModel()); - } - - @Override - public com.liferay.opensocial.model.Gadget toUnescapedModel() { - return new GadgetWrapper(_gadget.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _gadget.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _gadget.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _gadget.persist(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof GadgetWrapper)) { - return false; - } - - GadgetWrapper gadgetWrapper = (GadgetWrapper)obj; - - if (Validator.equals(_gadget, gadgetWrapper._gadget)) { - return true; - } - - return false; - } - - @Override - public StagedModelType getStagedModelType() { - return _gadget.getStagedModelType(); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public Gadget getWrappedGadget() { - return _gadget; - } - - @Override - public Gadget getWrappedModel() { - return _gadget; - } - - @Override - public void resetOriginalValues() { - _gadget.resetOriginalValues(); - } - - private Gadget _gadget; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumer.java deleted file mode 100644 index f152b9a30a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumer.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the OAuthConsumer service. Represents a row in the "OpenSocial_OAuthConsumer" database table, with each column mapped to a property of this class. - * - * @author Brian Wing Shun Chan - * @see OAuthConsumerModel - * @see com.liferay.opensocial.model.impl.OAuthConsumerImpl - * @see com.liferay.opensocial.model.impl.OAuthConsumerModelImpl - * @generated - */ -public interface OAuthConsumer extends OAuthConsumerModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link com.liferay.opensocial.model.impl.OAuthConsumerImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - public java.lang.String getKeyName(); - - public void setKeyName(java.lang.String keyName); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerClp.java deleted file mode 100644 index 09b8ab06df..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerClp.java +++ /dev/null @@ -1,600 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -import com.liferay.opensocial.service.ClpSerializer; -import com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil; - -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 java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Brian Wing Shun Chan - */ -public class OAuthConsumerClp extends BaseModelImpl - implements OAuthConsumer { - public OAuthConsumerClp() { - } - - @Override - public Class getModelClass() { - return OAuthConsumer.class; - } - - @Override - public String getModelClassName() { - return OAuthConsumer.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _oAuthConsumerId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setOAuthConsumerId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _oAuthConsumerId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("oAuthConsumerId", getOAuthConsumerId()); - attributes.put("companyId", getCompanyId()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("gadgetKey", getGadgetKey()); - attributes.put("serviceName", getServiceName()); - attributes.put("consumerKey", getConsumerKey()); - attributes.put("consumerSecret", getConsumerSecret()); - attributes.put("keyType", getKeyType()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - Long oAuthConsumerId = (Long)attributes.get("oAuthConsumerId"); - - if (oAuthConsumerId != null) { - setOAuthConsumerId(oAuthConsumerId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Date createDate = (Date)attributes.get("createDate"); - - if (createDate != null) { - setCreateDate(createDate); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String gadgetKey = (String)attributes.get("gadgetKey"); - - if (gadgetKey != null) { - setGadgetKey(gadgetKey); - } - - String serviceName = (String)attributes.get("serviceName"); - - if (serviceName != null) { - setServiceName(serviceName); - } - - String consumerKey = (String)attributes.get("consumerKey"); - - if (consumerKey != null) { - setConsumerKey(consumerKey); - } - - String consumerSecret = (String)attributes.get("consumerSecret"); - - if (consumerSecret != null) { - setConsumerSecret(consumerSecret); - } - - String keyType = (String)attributes.get("keyType"); - - if (keyType != null) { - setKeyType(keyType); - } - } - - @Override - public long getOAuthConsumerId() { - return _oAuthConsumerId; - } - - @Override - public void setOAuthConsumerId(long oAuthConsumerId) { - _oAuthConsumerId = oAuthConsumerId; - - if (_oAuthConsumerRemoteModel != null) { - try { - Class clazz = _oAuthConsumerRemoteModel.getClass(); - - Method method = clazz.getMethod("setOAuthConsumerId", long.class); - - method.invoke(_oAuthConsumerRemoteModel, oAuthConsumerId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_oAuthConsumerRemoteModel != null) { - try { - Class clazz = _oAuthConsumerRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_oAuthConsumerRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_oAuthConsumerRemoteModel != null) { - try { - Class clazz = _oAuthConsumerRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_oAuthConsumerRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_oAuthConsumerRemoteModel != null) { - try { - Class clazz = _oAuthConsumerRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_oAuthConsumerRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getGadgetKey() { - return _gadgetKey; - } - - @Override - public void setGadgetKey(String gadgetKey) { - _gadgetKey = gadgetKey; - - if (_oAuthConsumerRemoteModel != null) { - try { - Class clazz = _oAuthConsumerRemoteModel.getClass(); - - Method method = clazz.getMethod("setGadgetKey", String.class); - - method.invoke(_oAuthConsumerRemoteModel, gadgetKey); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getServiceName() { - return _serviceName; - } - - @Override - public void setServiceName(String serviceName) { - _serviceName = serviceName; - - if (_oAuthConsumerRemoteModel != null) { - try { - Class clazz = _oAuthConsumerRemoteModel.getClass(); - - Method method = clazz.getMethod("setServiceName", String.class); - - method.invoke(_oAuthConsumerRemoteModel, serviceName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getConsumerKey() { - return _consumerKey; - } - - @Override - public void setConsumerKey(String consumerKey) { - _consumerKey = consumerKey; - - if (_oAuthConsumerRemoteModel != null) { - try { - Class clazz = _oAuthConsumerRemoteModel.getClass(); - - Method method = clazz.getMethod("setConsumerKey", String.class); - - method.invoke(_oAuthConsumerRemoteModel, consumerKey); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getConsumerSecret() { - return _consumerSecret; - } - - @Override - public void setConsumerSecret(String consumerSecret) { - _consumerSecret = consumerSecret; - - if (_oAuthConsumerRemoteModel != null) { - try { - Class clazz = _oAuthConsumerRemoteModel.getClass(); - - Method method = clazz.getMethod("setConsumerSecret", - String.class); - - method.invoke(_oAuthConsumerRemoteModel, consumerSecret); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getKeyType() { - return _keyType; - } - - @Override - public void setKeyType(String keyType) { - _keyType = keyType; - - if (_oAuthConsumerRemoteModel != null) { - try { - Class clazz = _oAuthConsumerRemoteModel.getClass(); - - Method method = clazz.getMethod("setKeyType", String.class); - - method.invoke(_oAuthConsumerRemoteModel, keyType); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public void setKeyName(java.lang.String keyName) { - try { - String methodName = "setKeyName"; - - Class[] parameterTypes = new Class[] { java.lang.String.class }; - - Object[] parameterValues = new Object[] { keyName }; - - invokeOnRemoteModel(methodName, parameterTypes, parameterValues); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - @Override - public java.lang.String getKeyName() { - try { - String methodName = "getKeyName"; - - Class[] parameterTypes = new Class[] { }; - - Object[] parameterValues = new Object[] { }; - - java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, - parameterTypes, parameterValues); - - return returnObj; - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - - public BaseModel getOAuthConsumerRemoteModel() { - return _oAuthConsumerRemoteModel; - } - - public void setOAuthConsumerRemoteModel( - BaseModel oAuthConsumerRemoteModel) { - _oAuthConsumerRemoteModel = oAuthConsumerRemoteModel; - } - - 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 = _oAuthConsumerRemoteModel.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(_oAuthConsumerRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - OAuthConsumerLocalServiceUtil.addOAuthConsumer(this); - } - else { - OAuthConsumerLocalServiceUtil.updateOAuthConsumer(this); - } - } - - @Override - public OAuthConsumer toEscapedModel() { - return (OAuthConsumer)ProxyUtil.newProxyInstance(OAuthConsumer.class.getClassLoader(), - new Class[] { OAuthConsumer.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - OAuthConsumerClp clone = new OAuthConsumerClp(); - - clone.setOAuthConsumerId(getOAuthConsumerId()); - clone.setCompanyId(getCompanyId()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setGadgetKey(getGadgetKey()); - clone.setServiceName(getServiceName()); - clone.setConsumerKey(getConsumerKey()); - clone.setConsumerSecret(getConsumerSecret()); - clone.setKeyType(getKeyType()); - - return clone; - } - - @Override - public int compareTo(OAuthConsumer oAuthConsumer) { - int value = 0; - - value = getServiceName().compareTo(oAuthConsumer.getServiceName()); - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof OAuthConsumerClp)) { - return false; - } - - OAuthConsumerClp oAuthConsumer = (OAuthConsumerClp)obj; - - long primaryKey = oAuthConsumer.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(19); - - sb.append("{oAuthConsumerId="); - sb.append(getOAuthConsumerId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", gadgetKey="); - sb.append(getGadgetKey()); - sb.append(", serviceName="); - sb.append(getServiceName()); - sb.append(", consumerKey="); - sb.append(getConsumerKey()); - sb.append(", consumerSecret="); - sb.append(getConsumerSecret()); - sb.append(", keyType="); - sb.append(getKeyType()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(31); - - sb.append(""); - sb.append("com.liferay.opensocial.model.OAuthConsumer"); - sb.append(""); - - sb.append( - "oAuthConsumerId"); - sb.append( - "companyId"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "gadgetKey"); - sb.append( - "serviceName"); - sb.append( - "consumerKey"); - sb.append( - "consumerSecret"); - sb.append( - "keyType"); - - sb.append(""); - - return sb.toString(); - } - - private long _oAuthConsumerId; - private long _companyId; - private Date _createDate; - private Date _modifiedDate; - private String _gadgetKey; - private String _serviceName; - private String _consumerKey; - private String _consumerSecret; - private String _keyType; - private BaseModel _oAuthConsumerRemoteModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerConstants.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerConstants.java deleted file mode 100644 index b51f5fc2dd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerConstants.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -/** - * @author Brian Wing Shun Chan - */ -public class OAuthConsumerConstants { - - public static final String KEY_TYPE_HMAC_SYMMETRIC = "HMAC_SYMMETRIC"; - - public static final String KEY_TYPE_PLAINTEXT = "PLAINTEXT"; - - public static final String KEY_TYPE_RSA_PRIVATE = "RSA_PRIVATE"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerModel.java deleted file mode 100644 index 034ed87b29..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerModel.java +++ /dev/null @@ -1,249 +0,0 @@ -/** - * 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 com.liferay.opensocial.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 OAuthConsumer service. Represents a row in the "OpenSocial_OAuthConsumer" database table, with each column mapped to a property of this class. - * - *

    - * This interface and its corresponding implementation {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.opensocial.model.impl.OAuthConsumerImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthConsumer - * @see com.liferay.opensocial.model.impl.OAuthConsumerImpl - * @see com.liferay.opensocial.model.impl.OAuthConsumerModelImpl - * @generated - */ -public interface OAuthConsumerModel extends BaseModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a o auth consumer model instance should use the {@link OAuthConsumer} interface instead. - */ - - /** - * Returns the primary key of this o auth consumer. - * - * @return the primary key of this o auth consumer - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this o auth consumer. - * - * @param primaryKey the primary key of this o auth consumer - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the o auth consumer ID of this o auth consumer. - * - * @return the o auth consumer ID of this o auth consumer - */ - public long getOAuthConsumerId(); - - /** - * Sets the o auth consumer ID of this o auth consumer. - * - * @param oAuthConsumerId the o auth consumer ID of this o auth consumer - */ - public void setOAuthConsumerId(long oAuthConsumerId); - - /** - * Returns the company ID of this o auth consumer. - * - * @return the company ID of this o auth consumer - */ - public long getCompanyId(); - - /** - * Sets the company ID of this o auth consumer. - * - * @param companyId the company ID of this o auth consumer - */ - public void setCompanyId(long companyId); - - /** - * Returns the create date of this o auth consumer. - * - * @return the create date of this o auth consumer - */ - public Date getCreateDate(); - - /** - * Sets the create date of this o auth consumer. - * - * @param createDate the create date of this o auth consumer - */ - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this o auth consumer. - * - * @return the modified date of this o auth consumer - */ - public Date getModifiedDate(); - - /** - * Sets the modified date of this o auth consumer. - * - * @param modifiedDate the modified date of this o auth consumer - */ - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the gadget key of this o auth consumer. - * - * @return the gadget key of this o auth consumer - */ - @AutoEscape - public String getGadgetKey(); - - /** - * Sets the gadget key of this o auth consumer. - * - * @param gadgetKey the gadget key of this o auth consumer - */ - public void setGadgetKey(String gadgetKey); - - /** - * Returns the service name of this o auth consumer. - * - * @return the service name of this o auth consumer - */ - @AutoEscape - public String getServiceName(); - - /** - * Sets the service name of this o auth consumer. - * - * @param serviceName the service name of this o auth consumer - */ - public void setServiceName(String serviceName); - - /** - * Returns the consumer key of this o auth consumer. - * - * @return the consumer key of this o auth consumer - */ - @AutoEscape - public String getConsumerKey(); - - /** - * Sets the consumer key of this o auth consumer. - * - * @param consumerKey the consumer key of this o auth consumer - */ - public void setConsumerKey(String consumerKey); - - /** - * Returns the consumer secret of this o auth consumer. - * - * @return the consumer secret of this o auth consumer - */ - @AutoEscape - public String getConsumerSecret(); - - /** - * Sets the consumer secret of this o auth consumer. - * - * @param consumerSecret the consumer secret of this o auth consumer - */ - public void setConsumerSecret(String consumerSecret); - - /** - * Returns the key type of this o auth consumer. - * - * @return the key type of this o auth consumer - */ - @AutoEscape - public String getKeyType(); - - /** - * Sets the key type of this o auth consumer. - * - * @param keyType the key type of this o auth consumer - */ - public void setKeyType(String keyType); - - @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(OAuthConsumer oAuthConsumer); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public OAuthConsumer toEscapedModel(); - - @Override - public OAuthConsumer toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerSoap.java deleted file mode 100644 index 7a27e2a477..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerSoap.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * 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 com.liferay.opensocial.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. - * - * @author Brian Wing Shun Chan - * @generated - */ -public class OAuthConsumerSoap implements Serializable { - public static OAuthConsumerSoap toSoapModel(OAuthConsumer model) { - OAuthConsumerSoap soapModel = new OAuthConsumerSoap(); - - soapModel.setOAuthConsumerId(model.getOAuthConsumerId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setGadgetKey(model.getGadgetKey()); - soapModel.setServiceName(model.getServiceName()); - soapModel.setConsumerKey(model.getConsumerKey()); - soapModel.setConsumerSecret(model.getConsumerSecret()); - soapModel.setKeyType(model.getKeyType()); - - return soapModel; - } - - public static OAuthConsumerSoap[] toSoapModels(OAuthConsumer[] models) { - OAuthConsumerSoap[] soapModels = new OAuthConsumerSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static OAuthConsumerSoap[][] toSoapModels(OAuthConsumer[][] models) { - OAuthConsumerSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new OAuthConsumerSoap[models.length][models[0].length]; - } - else { - soapModels = new OAuthConsumerSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static OAuthConsumerSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (OAuthConsumer model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new OAuthConsumerSoap[soapModels.size()]); - } - - public OAuthConsumerSoap() { - } - - public long getPrimaryKey() { - return _oAuthConsumerId; - } - - public void setPrimaryKey(long pk) { - setOAuthConsumerId(pk); - } - - public long getOAuthConsumerId() { - return _oAuthConsumerId; - } - - public void setOAuthConsumerId(long oAuthConsumerId) { - _oAuthConsumerId = oAuthConsumerId; - } - - public long getCompanyId() { - return _companyId; - } - - public void setCompanyId(long companyId) { - _companyId = companyId; - } - - public Date getCreateDate() { - return _createDate; - } - - public void setCreateDate(Date createDate) { - _createDate = createDate; - } - - public Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public String getGadgetKey() { - return _gadgetKey; - } - - public void setGadgetKey(String gadgetKey) { - _gadgetKey = gadgetKey; - } - - public String getServiceName() { - return _serviceName; - } - - public void setServiceName(String serviceName) { - _serviceName = serviceName; - } - - public String getConsumerKey() { - return _consumerKey; - } - - public void setConsumerKey(String consumerKey) { - _consumerKey = consumerKey; - } - - public String getConsumerSecret() { - return _consumerSecret; - } - - public void setConsumerSecret(String consumerSecret) { - _consumerSecret = consumerSecret; - } - - public String getKeyType() { - return _keyType; - } - - public void setKeyType(String keyType) { - _keyType = keyType; - } - - private long _oAuthConsumerId; - private long _companyId; - private Date _createDate; - private Date _modifiedDate; - private String _gadgetKey; - private String _serviceName; - private String _consumerKey; - private String _consumerSecret; - private String _keyType; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerWrapper.java deleted file mode 100644 index 492fe732a3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthConsumerWrapper.java +++ /dev/null @@ -1,475 +0,0 @@ -/** - * 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 com.liferay.opensocial.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 OAuthConsumer}. - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthConsumer - * @generated - */ -public class OAuthConsumerWrapper implements OAuthConsumer, - ModelWrapper { - public OAuthConsumerWrapper(OAuthConsumer oAuthConsumer) { - _oAuthConsumer = oAuthConsumer; - } - - @Override - public Class getModelClass() { - return OAuthConsumer.class; - } - - @Override - public String getModelClassName() { - return OAuthConsumer.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("oAuthConsumerId", getOAuthConsumerId()); - attributes.put("companyId", getCompanyId()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("gadgetKey", getGadgetKey()); - attributes.put("serviceName", getServiceName()); - attributes.put("consumerKey", getConsumerKey()); - attributes.put("consumerSecret", getConsumerSecret()); - attributes.put("keyType", getKeyType()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - Long oAuthConsumerId = (Long)attributes.get("oAuthConsumerId"); - - if (oAuthConsumerId != null) { - setOAuthConsumerId(oAuthConsumerId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Date createDate = (Date)attributes.get("createDate"); - - if (createDate != null) { - setCreateDate(createDate); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String gadgetKey = (String)attributes.get("gadgetKey"); - - if (gadgetKey != null) { - setGadgetKey(gadgetKey); - } - - String serviceName = (String)attributes.get("serviceName"); - - if (serviceName != null) { - setServiceName(serviceName); - } - - String consumerKey = (String)attributes.get("consumerKey"); - - if (consumerKey != null) { - setConsumerKey(consumerKey); - } - - String consumerSecret = (String)attributes.get("consumerSecret"); - - if (consumerSecret != null) { - setConsumerSecret(consumerSecret); - } - - String keyType = (String)attributes.get("keyType"); - - if (keyType != null) { - setKeyType(keyType); - } - } - - /** - * Returns the primary key of this o auth consumer. - * - * @return the primary key of this o auth consumer - */ - @Override - public long getPrimaryKey() { - return _oAuthConsumer.getPrimaryKey(); - } - - /** - * Sets the primary key of this o auth consumer. - * - * @param primaryKey the primary key of this o auth consumer - */ - @Override - public void setPrimaryKey(long primaryKey) { - _oAuthConsumer.setPrimaryKey(primaryKey); - } - - /** - * Returns the o auth consumer ID of this o auth consumer. - * - * @return the o auth consumer ID of this o auth consumer - */ - @Override - public long getOAuthConsumerId() { - return _oAuthConsumer.getOAuthConsumerId(); - } - - /** - * Sets the o auth consumer ID of this o auth consumer. - * - * @param oAuthConsumerId the o auth consumer ID of this o auth consumer - */ - @Override - public void setOAuthConsumerId(long oAuthConsumerId) { - _oAuthConsumer.setOAuthConsumerId(oAuthConsumerId); - } - - /** - * Returns the company ID of this o auth consumer. - * - * @return the company ID of this o auth consumer - */ - @Override - public long getCompanyId() { - return _oAuthConsumer.getCompanyId(); - } - - /** - * Sets the company ID of this o auth consumer. - * - * @param companyId the company ID of this o auth consumer - */ - @Override - public void setCompanyId(long companyId) { - _oAuthConsumer.setCompanyId(companyId); - } - - /** - * Returns the create date of this o auth consumer. - * - * @return the create date of this o auth consumer - */ - @Override - public java.util.Date getCreateDate() { - return _oAuthConsumer.getCreateDate(); - } - - /** - * Sets the create date of this o auth consumer. - * - * @param createDate the create date of this o auth consumer - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _oAuthConsumer.setCreateDate(createDate); - } - - /** - * Returns the modified date of this o auth consumer. - * - * @return the modified date of this o auth consumer - */ - @Override - public java.util.Date getModifiedDate() { - return _oAuthConsumer.getModifiedDate(); - } - - /** - * Sets the modified date of this o auth consumer. - * - * @param modifiedDate the modified date of this o auth consumer - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _oAuthConsumer.setModifiedDate(modifiedDate); - } - - /** - * Returns the gadget key of this o auth consumer. - * - * @return the gadget key of this o auth consumer - */ - @Override - public java.lang.String getGadgetKey() { - return _oAuthConsumer.getGadgetKey(); - } - - /** - * Sets the gadget key of this o auth consumer. - * - * @param gadgetKey the gadget key of this o auth consumer - */ - @Override - public void setGadgetKey(java.lang.String gadgetKey) { - _oAuthConsumer.setGadgetKey(gadgetKey); - } - - /** - * Returns the service name of this o auth consumer. - * - * @return the service name of this o auth consumer - */ - @Override - public java.lang.String getServiceName() { - return _oAuthConsumer.getServiceName(); - } - - /** - * Sets the service name of this o auth consumer. - * - * @param serviceName the service name of this o auth consumer - */ - @Override - public void setServiceName(java.lang.String serviceName) { - _oAuthConsumer.setServiceName(serviceName); - } - - /** - * Returns the consumer key of this o auth consumer. - * - * @return the consumer key of this o auth consumer - */ - @Override - public java.lang.String getConsumerKey() { - return _oAuthConsumer.getConsumerKey(); - } - - /** - * Sets the consumer key of this o auth consumer. - * - * @param consumerKey the consumer key of this o auth consumer - */ - @Override - public void setConsumerKey(java.lang.String consumerKey) { - _oAuthConsumer.setConsumerKey(consumerKey); - } - - /** - * Returns the consumer secret of this o auth consumer. - * - * @return the consumer secret of this o auth consumer - */ - @Override - public java.lang.String getConsumerSecret() { - return _oAuthConsumer.getConsumerSecret(); - } - - /** - * Sets the consumer secret of this o auth consumer. - * - * @param consumerSecret the consumer secret of this o auth consumer - */ - @Override - public void setConsumerSecret(java.lang.String consumerSecret) { - _oAuthConsumer.setConsumerSecret(consumerSecret); - } - - /** - * Returns the key type of this o auth consumer. - * - * @return the key type of this o auth consumer - */ - @Override - public java.lang.String getKeyType() { - return _oAuthConsumer.getKeyType(); - } - - /** - * Sets the key type of this o auth consumer. - * - * @param keyType the key type of this o auth consumer - */ - @Override - public void setKeyType(java.lang.String keyType) { - _oAuthConsumer.setKeyType(keyType); - } - - @Override - public boolean isNew() { - return _oAuthConsumer.isNew(); - } - - @Override - public void setNew(boolean n) { - _oAuthConsumer.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _oAuthConsumer.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _oAuthConsumer.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _oAuthConsumer.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _oAuthConsumer.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _oAuthConsumer.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _oAuthConsumer.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _oAuthConsumer.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _oAuthConsumer.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _oAuthConsumer.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new OAuthConsumerWrapper((OAuthConsumer)_oAuthConsumer.clone()); - } - - @Override - public int compareTo( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) { - return _oAuthConsumer.compareTo(oAuthConsumer); - } - - @Override - public int hashCode() { - return _oAuthConsumer.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _oAuthConsumer.toCacheModel(); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer toEscapedModel() { - return new OAuthConsumerWrapper(_oAuthConsumer.toEscapedModel()); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer toUnescapedModel() { - return new OAuthConsumerWrapper(_oAuthConsumer.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _oAuthConsumer.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _oAuthConsumer.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _oAuthConsumer.persist(); - } - - @Override - public java.lang.String getKeyName() { - return _oAuthConsumer.getKeyName(); - } - - @Override - public void setKeyName(java.lang.String keyName) { - _oAuthConsumer.setKeyName(keyName); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof OAuthConsumerWrapper)) { - return false; - } - - OAuthConsumerWrapper oAuthConsumerWrapper = (OAuthConsumerWrapper)obj; - - if (Validator.equals(_oAuthConsumer, oAuthConsumerWrapper._oAuthConsumer)) { - return true; - } - - return false; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public OAuthConsumer getWrappedOAuthConsumer() { - return _oAuthConsumer; - } - - @Override - public OAuthConsumer getWrappedModel() { - return _oAuthConsumer; - } - - @Override - public void resetOriginalValues() { - _oAuthConsumer.resetOriginalValues(); - } - - private OAuthConsumer _oAuthConsumer; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthToken.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthToken.java deleted file mode 100644 index f9458fa875..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthToken.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the OAuthToken service. Represents a row in the "OpenSocial_OAuthToken" database table, with each column mapped to a property of this class. - * - * @author Brian Wing Shun Chan - * @see OAuthTokenModel - * @see com.liferay.opensocial.model.impl.OAuthTokenImpl - * @see com.liferay.opensocial.model.impl.OAuthTokenModelImpl - * @generated - */ -public interface OAuthToken extends OAuthTokenModel, PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link com.liferay.opensocial.model.impl.OAuthTokenImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenClp.java deleted file mode 100644 index b65dc8f904..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenClp.java +++ /dev/null @@ -1,767 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -import com.liferay.opensocial.service.ClpSerializer; -import com.liferay.opensocial.service.OAuthTokenLocalServiceUtil; - -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 java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Brian Wing Shun Chan - */ -public class OAuthTokenClp extends BaseModelImpl - implements OAuthToken { - public OAuthTokenClp() { - } - - @Override - public Class getModelClass() { - return OAuthToken.class; - } - - @Override - public String getModelClassName() { - return OAuthToken.class.getName(); - } - - @Override - public long getPrimaryKey() { - return _oAuthTokenId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setOAuthTokenId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _oAuthTokenId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("oAuthTokenId", getOAuthTokenId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("gadgetKey", getGadgetKey()); - attributes.put("serviceName", getServiceName()); - attributes.put("moduleId", getModuleId()); - attributes.put("accessToken", getAccessToken()); - attributes.put("tokenName", getTokenName()); - attributes.put("tokenSecret", getTokenSecret()); - attributes.put("sessionHandle", getSessionHandle()); - attributes.put("expiration", getExpiration()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - Long oAuthTokenId = (Long)attributes.get("oAuthTokenId"); - - if (oAuthTokenId != null) { - setOAuthTokenId(oAuthTokenId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String gadgetKey = (String)attributes.get("gadgetKey"); - - if (gadgetKey != null) { - setGadgetKey(gadgetKey); - } - - String serviceName = (String)attributes.get("serviceName"); - - if (serviceName != null) { - setServiceName(serviceName); - } - - Long moduleId = (Long)attributes.get("moduleId"); - - if (moduleId != null) { - setModuleId(moduleId); - } - - String accessToken = (String)attributes.get("accessToken"); - - if (accessToken != null) { - setAccessToken(accessToken); - } - - String tokenName = (String)attributes.get("tokenName"); - - if (tokenName != null) { - setTokenName(tokenName); - } - - String tokenSecret = (String)attributes.get("tokenSecret"); - - if (tokenSecret != null) { - setTokenSecret(tokenSecret); - } - - String sessionHandle = (String)attributes.get("sessionHandle"); - - if (sessionHandle != null) { - setSessionHandle(sessionHandle); - } - - Long expiration = (Long)attributes.get("expiration"); - - if (expiration != null) { - setExpiration(expiration); - } - } - - @Override - public long getOAuthTokenId() { - return _oAuthTokenId; - } - - @Override - public void setOAuthTokenId(long oAuthTokenId) { - _oAuthTokenId = oAuthTokenId; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setOAuthTokenId", long.class); - - method.invoke(_oAuthTokenRemoteModel, oAuthTokenId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setCompanyId", long.class); - - method.invoke(_oAuthTokenRemoteModel, companyId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _userId = userId; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserId", long.class); - - method.invoke(_oAuthTokenRemoteModel, 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 (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setUserName", String.class); - - method.invoke(_oAuthTokenRemoteModel, userName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setCreateDate", Date.class); - - method.invoke(_oAuthTokenRemoteModel, createDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setModifiedDate", Date.class); - - method.invoke(_oAuthTokenRemoteModel, modifiedDate); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getGadgetKey() { - return _gadgetKey; - } - - @Override - public void setGadgetKey(String gadgetKey) { - _gadgetKey = gadgetKey; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setGadgetKey", String.class); - - method.invoke(_oAuthTokenRemoteModel, gadgetKey); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getServiceName() { - return _serviceName; - } - - @Override - public void setServiceName(String serviceName) { - _serviceName = serviceName; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setServiceName", String.class); - - method.invoke(_oAuthTokenRemoteModel, serviceName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getModuleId() { - return _moduleId; - } - - @Override - public void setModuleId(long moduleId) { - _moduleId = moduleId; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setModuleId", long.class); - - method.invoke(_oAuthTokenRemoteModel, moduleId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getAccessToken() { - return _accessToken; - } - - @Override - public void setAccessToken(String accessToken) { - _accessToken = accessToken; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setAccessToken", String.class); - - method.invoke(_oAuthTokenRemoteModel, accessToken); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getTokenName() { - return _tokenName; - } - - @Override - public void setTokenName(String tokenName) { - _tokenName = tokenName; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setTokenName", String.class); - - method.invoke(_oAuthTokenRemoteModel, tokenName); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getTokenSecret() { - return _tokenSecret; - } - - @Override - public void setTokenSecret(String tokenSecret) { - _tokenSecret = tokenSecret; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setTokenSecret", String.class); - - method.invoke(_oAuthTokenRemoteModel, tokenSecret); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public String getSessionHandle() { - return _sessionHandle; - } - - @Override - public void setSessionHandle(String sessionHandle) { - _sessionHandle = sessionHandle; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setSessionHandle", String.class); - - method.invoke(_oAuthTokenRemoteModel, sessionHandle); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getExpiration() { - return _expiration; - } - - @Override - public void setExpiration(long expiration) { - _expiration = expiration; - - if (_oAuthTokenRemoteModel != null) { - try { - Class clazz = _oAuthTokenRemoteModel.getClass(); - - Method method = clazz.getMethod("setExpiration", long.class); - - method.invoke(_oAuthTokenRemoteModel, expiration); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - public BaseModel getOAuthTokenRemoteModel() { - return _oAuthTokenRemoteModel; - } - - public void setOAuthTokenRemoteModel(BaseModel oAuthTokenRemoteModel) { - _oAuthTokenRemoteModel = oAuthTokenRemoteModel; - } - - 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 = _oAuthTokenRemoteModel.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(_oAuthTokenRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - OAuthTokenLocalServiceUtil.addOAuthToken(this); - } - else { - OAuthTokenLocalServiceUtil.updateOAuthToken(this); - } - } - - @Override - public OAuthToken toEscapedModel() { - return (OAuthToken)ProxyUtil.newProxyInstance(OAuthToken.class.getClassLoader(), - new Class[] { OAuthToken.class }, new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - OAuthTokenClp clone = new OAuthTokenClp(); - - clone.setOAuthTokenId(getOAuthTokenId()); - clone.setCompanyId(getCompanyId()); - clone.setUserId(getUserId()); - clone.setUserName(getUserName()); - clone.setCreateDate(getCreateDate()); - clone.setModifiedDate(getModifiedDate()); - clone.setGadgetKey(getGadgetKey()); - clone.setServiceName(getServiceName()); - clone.setModuleId(getModuleId()); - clone.setAccessToken(getAccessToken()); - clone.setTokenName(getTokenName()); - clone.setTokenSecret(getTokenSecret()); - clone.setSessionHandle(getSessionHandle()); - clone.setExpiration(getExpiration()); - - return clone; - } - - @Override - public int compareTo(OAuthToken oAuthToken) { - long primaryKey = oAuthToken.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof OAuthTokenClp)) { - return false; - } - - OAuthTokenClp oAuthToken = (OAuthTokenClp)obj; - - long primaryKey = oAuthToken.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(29); - - sb.append("{oAuthTokenId="); - sb.append(getOAuthTokenId()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", gadgetKey="); - sb.append(getGadgetKey()); - sb.append(", serviceName="); - sb.append(getServiceName()); - sb.append(", moduleId="); - sb.append(getModuleId()); - sb.append(", accessToken="); - sb.append(getAccessToken()); - sb.append(", tokenName="); - sb.append(getTokenName()); - sb.append(", tokenSecret="); - sb.append(getTokenSecret()); - sb.append(", sessionHandle="); - sb.append(getSessionHandle()); - sb.append(", expiration="); - sb.append(getExpiration()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(46); - - sb.append(""); - sb.append("com.liferay.opensocial.model.OAuthToken"); - sb.append(""); - - sb.append( - "oAuthTokenId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "gadgetKey"); - sb.append( - "serviceName"); - sb.append( - "moduleId"); - sb.append( - "accessToken"); - sb.append( - "tokenName"); - sb.append( - "tokenSecret"); - sb.append( - "sessionHandle"); - sb.append( - "expiration"); - - sb.append(""); - - return sb.toString(); - } - - private long _oAuthTokenId; - private long _companyId; - private long _userId; - private String _userUuid; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private String _gadgetKey; - private String _serviceName; - private long _moduleId; - private String _accessToken; - private String _tokenName; - private String _tokenSecret; - private String _sessionHandle; - private long _expiration; - private BaseModel _oAuthTokenRemoteModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenModel.java deleted file mode 100644 index 88a0f1098d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenModel.java +++ /dev/null @@ -1,350 +0,0 @@ -/** - * 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 com.liferay.opensocial.model; - -import com.liferay.portal.kernel.bean.AutoEscape; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.model.AuditedModel; -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 OAuthToken service. Represents a row in the "OpenSocial_OAuthToken" database table, with each column mapped to a property of this class. - * - *

    - * This interface and its corresponding implementation {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.opensocial.model.impl.OAuthTokenImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthToken - * @see com.liferay.opensocial.model.impl.OAuthTokenImpl - * @see com.liferay.opensocial.model.impl.OAuthTokenModelImpl - * @generated - */ -public interface OAuthTokenModel extends AuditedModel, BaseModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a o auth token model instance should use the {@link OAuthToken} interface instead. - */ - - /** - * Returns the primary key of this o auth token. - * - * @return the primary key of this o auth token - */ - public long getPrimaryKey(); - - /** - * Sets the primary key of this o auth token. - * - * @param primaryKey the primary key of this o auth token - */ - public void setPrimaryKey(long primaryKey); - - /** - * Returns the o auth token ID of this o auth token. - * - * @return the o auth token ID of this o auth token - */ - public long getOAuthTokenId(); - - /** - * Sets the o auth token ID of this o auth token. - * - * @param oAuthTokenId the o auth token ID of this o auth token - */ - public void setOAuthTokenId(long oAuthTokenId); - - /** - * Returns the company ID of this o auth token. - * - * @return the company ID of this o auth token - */ - @Override - public long getCompanyId(); - - /** - * Sets the company ID of this o auth token. - * - * @param companyId the company ID of this o auth token - */ - @Override - public void setCompanyId(long companyId); - - /** - * Returns the user ID of this o auth token. - * - * @return the user ID of this o auth token - */ - @Override - public long getUserId(); - - /** - * Sets the user ID of this o auth token. - * - * @param userId the user ID of this o auth token - */ - @Override - public void setUserId(long userId); - - /** - * Returns the user uuid of this o auth token. - * - * @return the user uuid of this o auth token - * @throws SystemException if a system exception occurred - */ - @Override - public String getUserUuid() throws SystemException; - - /** - * Sets the user uuid of this o auth token. - * - * @param userUuid the user uuid of this o auth token - */ - @Override - public void setUserUuid(String userUuid); - - /** - * Returns the user name of this o auth token. - * - * @return the user name of this o auth token - */ - @AutoEscape - @Override - public String getUserName(); - - /** - * Sets the user name of this o auth token. - * - * @param userName the user name of this o auth token - */ - @Override - public void setUserName(String userName); - - /** - * Returns the create date of this o auth token. - * - * @return the create date of this o auth token - */ - @Override - public Date getCreateDate(); - - /** - * Sets the create date of this o auth token. - * - * @param createDate the create date of this o auth token - */ - @Override - public void setCreateDate(Date createDate); - - /** - * Returns the modified date of this o auth token. - * - * @return the modified date of this o auth token - */ - @Override - public Date getModifiedDate(); - - /** - * Sets the modified date of this o auth token. - * - * @param modifiedDate the modified date of this o auth token - */ - @Override - public void setModifiedDate(Date modifiedDate); - - /** - * Returns the gadget key of this o auth token. - * - * @return the gadget key of this o auth token - */ - @AutoEscape - public String getGadgetKey(); - - /** - * Sets the gadget key of this o auth token. - * - * @param gadgetKey the gadget key of this o auth token - */ - public void setGadgetKey(String gadgetKey); - - /** - * Returns the service name of this o auth token. - * - * @return the service name of this o auth token - */ - @AutoEscape - public String getServiceName(); - - /** - * Sets the service name of this o auth token. - * - * @param serviceName the service name of this o auth token - */ - public void setServiceName(String serviceName); - - /** - * Returns the module ID of this o auth token. - * - * @return the module ID of this o auth token - */ - public long getModuleId(); - - /** - * Sets the module ID of this o auth token. - * - * @param moduleId the module ID of this o auth token - */ - public void setModuleId(long moduleId); - - /** - * Returns the access token of this o auth token. - * - * @return the access token of this o auth token - */ - @AutoEscape - public String getAccessToken(); - - /** - * Sets the access token of this o auth token. - * - * @param accessToken the access token of this o auth token - */ - public void setAccessToken(String accessToken); - - /** - * Returns the token name of this o auth token. - * - * @return the token name of this o auth token - */ - @AutoEscape - public String getTokenName(); - - /** - * Sets the token name of this o auth token. - * - * @param tokenName the token name of this o auth token - */ - public void setTokenName(String tokenName); - - /** - * Returns the token secret of this o auth token. - * - * @return the token secret of this o auth token - */ - @AutoEscape - public String getTokenSecret(); - - /** - * Sets the token secret of this o auth token. - * - * @param tokenSecret the token secret of this o auth token - */ - public void setTokenSecret(String tokenSecret); - - /** - * Returns the session handle of this o auth token. - * - * @return the session handle of this o auth token - */ - @AutoEscape - public String getSessionHandle(); - - /** - * Sets the session handle of this o auth token. - * - * @param sessionHandle the session handle of this o auth token - */ - public void setSessionHandle(String sessionHandle); - - /** - * Returns the expiration of this o auth token. - * - * @return the expiration of this o auth token - */ - public long getExpiration(); - - /** - * Sets the expiration of this o auth token. - * - * @param expiration the expiration of this o auth token - */ - public void setExpiration(long expiration); - - @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(OAuthToken oAuthToken); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public OAuthToken toEscapedModel(); - - @Override - public OAuthToken toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenSoap.java deleted file mode 100644 index e92ab2689c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenSoap.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - * 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 com.liferay.opensocial.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. - * - * @author Brian Wing Shun Chan - * @generated - */ -public class OAuthTokenSoap implements Serializable { - public static OAuthTokenSoap toSoapModel(OAuthToken model) { - OAuthTokenSoap soapModel = new OAuthTokenSoap(); - - soapModel.setOAuthTokenId(model.getOAuthTokenId()); - soapModel.setCompanyId(model.getCompanyId()); - soapModel.setUserId(model.getUserId()); - soapModel.setUserName(model.getUserName()); - soapModel.setCreateDate(model.getCreateDate()); - soapModel.setModifiedDate(model.getModifiedDate()); - soapModel.setGadgetKey(model.getGadgetKey()); - soapModel.setServiceName(model.getServiceName()); - soapModel.setModuleId(model.getModuleId()); - soapModel.setAccessToken(model.getAccessToken()); - soapModel.setTokenName(model.getTokenName()); - soapModel.setTokenSecret(model.getTokenSecret()); - soapModel.setSessionHandle(model.getSessionHandle()); - soapModel.setExpiration(model.getExpiration()); - - return soapModel; - } - - public static OAuthTokenSoap[] toSoapModels(OAuthToken[] models) { - OAuthTokenSoap[] soapModels = new OAuthTokenSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static OAuthTokenSoap[][] toSoapModels(OAuthToken[][] models) { - OAuthTokenSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new OAuthTokenSoap[models.length][models[0].length]; - } - else { - soapModels = new OAuthTokenSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static OAuthTokenSoap[] toSoapModels(List models) { - List soapModels = new ArrayList(models.size()); - - for (OAuthToken model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new OAuthTokenSoap[soapModels.size()]); - } - - public OAuthTokenSoap() { - } - - public long getPrimaryKey() { - return _oAuthTokenId; - } - - public void setPrimaryKey(long pk) { - setOAuthTokenId(pk); - } - - public long getOAuthTokenId() { - return _oAuthTokenId; - } - - public void setOAuthTokenId(long oAuthTokenId) { - _oAuthTokenId = oAuthTokenId; - } - - 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 Date getModifiedDate() { - return _modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - public String getGadgetKey() { - return _gadgetKey; - } - - public void setGadgetKey(String gadgetKey) { - _gadgetKey = gadgetKey; - } - - public String getServiceName() { - return _serviceName; - } - - public void setServiceName(String serviceName) { - _serviceName = serviceName; - } - - public long getModuleId() { - return _moduleId; - } - - public void setModuleId(long moduleId) { - _moduleId = moduleId; - } - - public String getAccessToken() { - return _accessToken; - } - - public void setAccessToken(String accessToken) { - _accessToken = accessToken; - } - - public String getTokenName() { - return _tokenName; - } - - public void setTokenName(String tokenName) { - _tokenName = tokenName; - } - - public String getTokenSecret() { - return _tokenSecret; - } - - public void setTokenSecret(String tokenSecret) { - _tokenSecret = tokenSecret; - } - - public String getSessionHandle() { - return _sessionHandle; - } - - public void setSessionHandle(String sessionHandle) { - _sessionHandle = sessionHandle; - } - - public long getExpiration() { - return _expiration; - } - - public void setExpiration(long expiration) { - _expiration = expiration; - } - - private long _oAuthTokenId; - private long _companyId; - private long _userId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private String _gadgetKey; - private String _serviceName; - private long _moduleId; - private String _accessToken; - private String _tokenName; - private String _tokenSecret; - private String _sessionHandle; - private long _expiration; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenWrapper.java deleted file mode 100644 index a44651ba78..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/model/OAuthTokenWrapper.java +++ /dev/null @@ -1,620 +0,0 @@ -/** - * 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 com.liferay.opensocial.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 OAuthToken}. - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthToken - * @generated - */ -public class OAuthTokenWrapper implements OAuthToken, ModelWrapper { - public OAuthTokenWrapper(OAuthToken oAuthToken) { - _oAuthToken = oAuthToken; - } - - @Override - public Class getModelClass() { - return OAuthToken.class; - } - - @Override - public String getModelClassName() { - return OAuthToken.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("oAuthTokenId", getOAuthTokenId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("gadgetKey", getGadgetKey()); - attributes.put("serviceName", getServiceName()); - attributes.put("moduleId", getModuleId()); - attributes.put("accessToken", getAccessToken()); - attributes.put("tokenName", getTokenName()); - attributes.put("tokenSecret", getTokenSecret()); - attributes.put("sessionHandle", getSessionHandle()); - attributes.put("expiration", getExpiration()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - Long oAuthTokenId = (Long)attributes.get("oAuthTokenId"); - - if (oAuthTokenId != null) { - setOAuthTokenId(oAuthTokenId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String gadgetKey = (String)attributes.get("gadgetKey"); - - if (gadgetKey != null) { - setGadgetKey(gadgetKey); - } - - String serviceName = (String)attributes.get("serviceName"); - - if (serviceName != null) { - setServiceName(serviceName); - } - - Long moduleId = (Long)attributes.get("moduleId"); - - if (moduleId != null) { - setModuleId(moduleId); - } - - String accessToken = (String)attributes.get("accessToken"); - - if (accessToken != null) { - setAccessToken(accessToken); - } - - String tokenName = (String)attributes.get("tokenName"); - - if (tokenName != null) { - setTokenName(tokenName); - } - - String tokenSecret = (String)attributes.get("tokenSecret"); - - if (tokenSecret != null) { - setTokenSecret(tokenSecret); - } - - String sessionHandle = (String)attributes.get("sessionHandle"); - - if (sessionHandle != null) { - setSessionHandle(sessionHandle); - } - - Long expiration = (Long)attributes.get("expiration"); - - if (expiration != null) { - setExpiration(expiration); - } - } - - /** - * Returns the primary key of this o auth token. - * - * @return the primary key of this o auth token - */ - @Override - public long getPrimaryKey() { - return _oAuthToken.getPrimaryKey(); - } - - /** - * Sets the primary key of this o auth token. - * - * @param primaryKey the primary key of this o auth token - */ - @Override - public void setPrimaryKey(long primaryKey) { - _oAuthToken.setPrimaryKey(primaryKey); - } - - /** - * Returns the o auth token ID of this o auth token. - * - * @return the o auth token ID of this o auth token - */ - @Override - public long getOAuthTokenId() { - return _oAuthToken.getOAuthTokenId(); - } - - /** - * Sets the o auth token ID of this o auth token. - * - * @param oAuthTokenId the o auth token ID of this o auth token - */ - @Override - public void setOAuthTokenId(long oAuthTokenId) { - _oAuthToken.setOAuthTokenId(oAuthTokenId); - } - - /** - * Returns the company ID of this o auth token. - * - * @return the company ID of this o auth token - */ - @Override - public long getCompanyId() { - return _oAuthToken.getCompanyId(); - } - - /** - * Sets the company ID of this o auth token. - * - * @param companyId the company ID of this o auth token - */ - @Override - public void setCompanyId(long companyId) { - _oAuthToken.setCompanyId(companyId); - } - - /** - * Returns the user ID of this o auth token. - * - * @return the user ID of this o auth token - */ - @Override - public long getUserId() { - return _oAuthToken.getUserId(); - } - - /** - * Sets the user ID of this o auth token. - * - * @param userId the user ID of this o auth token - */ - @Override - public void setUserId(long userId) { - _oAuthToken.setUserId(userId); - } - - /** - * Returns the user uuid of this o auth token. - * - * @return the user uuid of this o auth token - * @throws SystemException if a system exception occurred - */ - @Override - public java.lang.String getUserUuid() - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthToken.getUserUuid(); - } - - /** - * Sets the user uuid of this o auth token. - * - * @param userUuid the user uuid of this o auth token - */ - @Override - public void setUserUuid(java.lang.String userUuid) { - _oAuthToken.setUserUuid(userUuid); - } - - /** - * Returns the user name of this o auth token. - * - * @return the user name of this o auth token - */ - @Override - public java.lang.String getUserName() { - return _oAuthToken.getUserName(); - } - - /** - * Sets the user name of this o auth token. - * - * @param userName the user name of this o auth token - */ - @Override - public void setUserName(java.lang.String userName) { - _oAuthToken.setUserName(userName); - } - - /** - * Returns the create date of this o auth token. - * - * @return the create date of this o auth token - */ - @Override - public java.util.Date getCreateDate() { - return _oAuthToken.getCreateDate(); - } - - /** - * Sets the create date of this o auth token. - * - * @param createDate the create date of this o auth token - */ - @Override - public void setCreateDate(java.util.Date createDate) { - _oAuthToken.setCreateDate(createDate); - } - - /** - * Returns the modified date of this o auth token. - * - * @return the modified date of this o auth token - */ - @Override - public java.util.Date getModifiedDate() { - return _oAuthToken.getModifiedDate(); - } - - /** - * Sets the modified date of this o auth token. - * - * @param modifiedDate the modified date of this o auth token - */ - @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _oAuthToken.setModifiedDate(modifiedDate); - } - - /** - * Returns the gadget key of this o auth token. - * - * @return the gadget key of this o auth token - */ - @Override - public java.lang.String getGadgetKey() { - return _oAuthToken.getGadgetKey(); - } - - /** - * Sets the gadget key of this o auth token. - * - * @param gadgetKey the gadget key of this o auth token - */ - @Override - public void setGadgetKey(java.lang.String gadgetKey) { - _oAuthToken.setGadgetKey(gadgetKey); - } - - /** - * Returns the service name of this o auth token. - * - * @return the service name of this o auth token - */ - @Override - public java.lang.String getServiceName() { - return _oAuthToken.getServiceName(); - } - - /** - * Sets the service name of this o auth token. - * - * @param serviceName the service name of this o auth token - */ - @Override - public void setServiceName(java.lang.String serviceName) { - _oAuthToken.setServiceName(serviceName); - } - - /** - * Returns the module ID of this o auth token. - * - * @return the module ID of this o auth token - */ - @Override - public long getModuleId() { - return _oAuthToken.getModuleId(); - } - - /** - * Sets the module ID of this o auth token. - * - * @param moduleId the module ID of this o auth token - */ - @Override - public void setModuleId(long moduleId) { - _oAuthToken.setModuleId(moduleId); - } - - /** - * Returns the access token of this o auth token. - * - * @return the access token of this o auth token - */ - @Override - public java.lang.String getAccessToken() { - return _oAuthToken.getAccessToken(); - } - - /** - * Sets the access token of this o auth token. - * - * @param accessToken the access token of this o auth token - */ - @Override - public void setAccessToken(java.lang.String accessToken) { - _oAuthToken.setAccessToken(accessToken); - } - - /** - * Returns the token name of this o auth token. - * - * @return the token name of this o auth token - */ - @Override - public java.lang.String getTokenName() { - return _oAuthToken.getTokenName(); - } - - /** - * Sets the token name of this o auth token. - * - * @param tokenName the token name of this o auth token - */ - @Override - public void setTokenName(java.lang.String tokenName) { - _oAuthToken.setTokenName(tokenName); - } - - /** - * Returns the token secret of this o auth token. - * - * @return the token secret of this o auth token - */ - @Override - public java.lang.String getTokenSecret() { - return _oAuthToken.getTokenSecret(); - } - - /** - * Sets the token secret of this o auth token. - * - * @param tokenSecret the token secret of this o auth token - */ - @Override - public void setTokenSecret(java.lang.String tokenSecret) { - _oAuthToken.setTokenSecret(tokenSecret); - } - - /** - * Returns the session handle of this o auth token. - * - * @return the session handle of this o auth token - */ - @Override - public java.lang.String getSessionHandle() { - return _oAuthToken.getSessionHandle(); - } - - /** - * Sets the session handle of this o auth token. - * - * @param sessionHandle the session handle of this o auth token - */ - @Override - public void setSessionHandle(java.lang.String sessionHandle) { - _oAuthToken.setSessionHandle(sessionHandle); - } - - /** - * Returns the expiration of this o auth token. - * - * @return the expiration of this o auth token - */ - @Override - public long getExpiration() { - return _oAuthToken.getExpiration(); - } - - /** - * Sets the expiration of this o auth token. - * - * @param expiration the expiration of this o auth token - */ - @Override - public void setExpiration(long expiration) { - _oAuthToken.setExpiration(expiration); - } - - @Override - public boolean isNew() { - return _oAuthToken.isNew(); - } - - @Override - public void setNew(boolean n) { - _oAuthToken.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _oAuthToken.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _oAuthToken.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _oAuthToken.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _oAuthToken.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _oAuthToken.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _oAuthToken.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _oAuthToken.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _oAuthToken.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _oAuthToken.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new OAuthTokenWrapper((OAuthToken)_oAuthToken.clone()); - } - - @Override - public int compareTo(com.liferay.opensocial.model.OAuthToken oAuthToken) { - return _oAuthToken.compareTo(oAuthToken); - } - - @Override - public int hashCode() { - return _oAuthToken.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _oAuthToken.toCacheModel(); - } - - @Override - public com.liferay.opensocial.model.OAuthToken toEscapedModel() { - return new OAuthTokenWrapper(_oAuthToken.toEscapedModel()); - } - - @Override - public com.liferay.opensocial.model.OAuthToken toUnescapedModel() { - return new OAuthTokenWrapper(_oAuthToken.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _oAuthToken.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _oAuthToken.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _oAuthToken.persist(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof OAuthTokenWrapper)) { - return false; - } - - OAuthTokenWrapper oAuthTokenWrapper = (OAuthTokenWrapper)obj; - - if (Validator.equals(_oAuthToken, oAuthTokenWrapper._oAuthToken)) { - return true; - } - - return false; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public OAuthToken getWrappedOAuthToken() { - return _oAuthToken; - } - - @Override - public OAuthToken getWrappedModel() { - return _oAuthToken; - } - - @Override - public void resetOriginalValues() { - _oAuthToken.resetOriginalValues(); - } - - private OAuthToken _oAuthToken; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/ClpSerializer.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/ClpSerializer.java deleted file mode 100644 index 3af9bc92c0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/ClpSerializer.java +++ /dev/null @@ -1,342 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.opensocial.model.GadgetClp; -import com.liferay.opensocial.model.OAuthConsumerClp; -import com.liferay.opensocial.model.OAuthTokenClp; - -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 java.io.ObjectInputStream; -import java.io.ObjectOutputStream; - -import java.lang.reflect.Method; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Brian Wing Shun Chan - */ -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, - "opensocial-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( - "opensocial-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 = "opensocial-portlet"; - } - - return _servletContextName; - } - } - - public static Object translateInput(BaseModel oldModel) { - Class oldModelClass = oldModel.getClass(); - - String oldModelClassName = oldModelClass.getName(); - - if (oldModelClassName.equals(GadgetClp.class.getName())) { - return translateInputGadget(oldModel); - } - - if (oldModelClassName.equals(OAuthConsumerClp.class.getName())) { - return translateInputOAuthConsumer(oldModel); - } - - if (oldModelClassName.equals(OAuthTokenClp.class.getName())) { - return translateInputOAuthToken(oldModel); - } - - return oldModel; - } - - public static Object translateInput(List oldList) { - List newList = new ArrayList(oldList.size()); - - for (int i = 0; i < oldList.size(); i++) { - Object curObj = oldList.get(i); - - newList.add(translateInput(curObj)); - } - - return newList; - } - - public static Object translateInputGadget(BaseModel oldModel) { - GadgetClp oldClpModel = (GadgetClp)oldModel; - - BaseModel newModel = oldClpModel.getGadgetRemoteModel(); - - newModel.setModelAttributes(oldClpModel.getModelAttributes()); - - return newModel; - } - - public static Object translateInputOAuthConsumer(BaseModel oldModel) { - OAuthConsumerClp oldClpModel = (OAuthConsumerClp)oldModel; - - BaseModel newModel = oldClpModel.getOAuthConsumerRemoteModel(); - - newModel.setModelAttributes(oldClpModel.getModelAttributes()); - - return newModel; - } - - public static Object translateInputOAuthToken(BaseModel oldModel) { - OAuthTokenClp oldClpModel = (OAuthTokenClp)oldModel; - - BaseModel newModel = oldClpModel.getOAuthTokenRemoteModel(); - - 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)obj); - } - else { - return obj; - } - } - - public static Object translateOutput(BaseModel oldModel) { - Class oldModelClass = oldModel.getClass(); - - String oldModelClassName = oldModelClass.getName(); - - if (oldModelClassName.equals( - "com.liferay.opensocial.model.impl.GadgetImpl")) { - return translateOutputGadget(oldModel); - } - - if (oldModelClassName.equals( - "com.liferay.opensocial.model.impl.OAuthConsumerImpl")) { - return translateOutputOAuthConsumer(oldModel); - } - - if (oldModelClassName.equals( - "com.liferay.opensocial.model.impl.OAuthTokenImpl")) { - return translateOutputOAuthToken(oldModel); - } - - return oldModel; - } - - public static Object translateOutput(List oldList) { - List newList = new ArrayList(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)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 (ClassNotFoundException cnfe) { - if (_log.isInfoEnabled()) { - _log.info("Do not use reflection to translate throwable"); - } - - _useReflectionToTranslateThrowable = false; - } - 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( - "com.liferay.opensocial.DuplicateGadgetURLException")) { - return new com.liferay.opensocial.DuplicateGadgetURLException(throwable.getMessage(), - throwable.getCause()); - } - - if (className.equals( - "com.liferay.opensocial.GadgetPortletCategoryNamesException")) { - return new com.liferay.opensocial.GadgetPortletCategoryNamesException(throwable.getMessage(), - throwable.getCause()); - } - - if (className.equals("com.liferay.opensocial.GadgetURLException")) { - return new com.liferay.opensocial.GadgetURLException(throwable.getMessage(), - throwable.getCause()); - } - - if (className.equals("com.liferay.opensocial.NoSuchGadgetException")) { - return new com.liferay.opensocial.NoSuchGadgetException(throwable.getMessage(), - throwable.getCause()); - } - - if (className.equals( - "com.liferay.opensocial.NoSuchOAuthConsumerException")) { - return new com.liferay.opensocial.NoSuchOAuthConsumerException(throwable.getMessage(), - throwable.getCause()); - } - - if (className.equals("com.liferay.opensocial.NoSuchOAuthTokenException")) { - return new com.liferay.opensocial.NoSuchOAuthTokenException(throwable.getMessage(), - throwable.getCause()); - } - - return throwable; - } - - public static Object translateOutputGadget(BaseModel oldModel) { - GadgetClp newModel = new GadgetClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setGadgetRemoteModel(oldModel); - - return newModel; - } - - public static Object translateOutputOAuthConsumer(BaseModel oldModel) { - OAuthConsumerClp newModel = new OAuthConsumerClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setOAuthConsumerRemoteModel(oldModel); - - return newModel; - } - - public static Object translateOutputOAuthToken(BaseModel oldModel) { - OAuthTokenClp newModel = new OAuthTokenClp(); - - newModel.setModelAttributes(oldModel.getModelAttributes()); - - newModel.setOAuthTokenRemoteModel(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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalService.java deleted file mode 100644 index dbddb1b9d8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalService.java +++ /dev/null @@ -1,331 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -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 Gadget. 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 Brian Wing Shun Chan - * @see GadgetLocalServiceUtil - * @see com.liferay.opensocial.service.base.GadgetLocalServiceBaseImpl - * @see com.liferay.opensocial.service.impl.GadgetLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface GadgetLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link GadgetLocalServiceUtil} to access the gadget local service. Add custom service methods to {@link com.liferay.opensocial.service.impl.GadgetLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the gadget to the database. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was added - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget addGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new gadget with the primary key. Does not add the gadget to the database. - * - * @param gadgetId the primary key for the new gadget - * @return the new gadget - */ - public com.liferay.opensocial.model.Gadget createGadget(long gadgetId); - - /** - * Deletes the gadget with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param gadgetId the primary key of the gadget - * @return the gadget that was removed - * @throws PortalException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget deleteGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the gadget from the database. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget deleteGadget( - com.liferay.opensocial.model.Gadget gadget) - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.opensocial.model.Gadget fetchGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadget with the matching UUID and company. - * - * @param uuid the gadget's UUID - * @param companyId the primary key of the company - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.Gadget fetchGadgetByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadget with the primary key. - * - * @param gadgetId the primary key of the gadget - * @return the gadget - * @throws PortalException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.Gadget getGadget(long gadgetId) - 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 the gadget with the matching UUID and company. - * - * @param uuid the gadget's UUID - * @param companyId the primary key of the company - * @return the matching gadget - * @throws PortalException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.Gadget getGadgetByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of gadgets - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getGadgets( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of gadgets. - * - * @return the number of gadgets - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getGadgetsCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the gadget in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was updated - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget updateGadget( - com.liferay.opensocial.model.Gadget gadget) - 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 com.liferay.opensocial.model.Gadget addGadget(long companyId, - java.lang.String url, java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteGadgets(long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - public void destroyGadget(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - public void destroyGadgets() - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.Gadget fetchGadget(long companyId, - java.lang.String url) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.Gadget getGadget(long companyId, - java.lang.String url) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.Gadget getGadget( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getGadgets( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getGadgetsCount(long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - public void initGadget(java.lang.String uuid, long companyId, - long gadgetId, java.lang.String name, - java.lang.String portletCategoryNames) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void initGadgets() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.opensocial.model.Gadget updateGadget(long gadgetId, - java.lang.String portletCategoryNames) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalServiceClp.java deleted file mode 100644 index 48fd6c6bff..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalServiceClp.java +++ /dev/null @@ -1,1241 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class GadgetLocalServiceClp implements GadgetLocalService { - public GadgetLocalServiceClp(InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addGadget"; - - _methodParameterTypes0 = new String[] { - "com.liferay.opensocial.model.Gadget" - }; - - _methodName1 = "createGadget"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteGadget"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteGadget"; - - _methodParameterTypes3 = new String[] { - "com.liferay.opensocial.model.Gadget" - }; - - _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 = "fetchGadget"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchGadgetByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "getGadget"; - - _methodParameterTypes12 = new String[] { "long" }; - - _methodName13 = "getPersistedModel"; - - _methodParameterTypes13 = new String[] { "java.io.Serializable" }; - - _methodName14 = "getGadgetByUuidAndCompanyId"; - - _methodParameterTypes14 = new String[] { "java.lang.String", "long" }; - - _methodName15 = "getGadgets"; - - _methodParameterTypes15 = new String[] { "int", "int" }; - - _methodName16 = "getGadgetsCount"; - - _methodParameterTypes16 = new String[] { }; - - _methodName17 = "updateGadget"; - - _methodParameterTypes17 = new String[] { - "com.liferay.opensocial.model.Gadget" - }; - - _methodName18 = "getBeanIdentifier"; - - _methodParameterTypes18 = new String[] { }; - - _methodName19 = "setBeanIdentifier"; - - _methodParameterTypes19 = new String[] { "java.lang.String" }; - - _methodName21 = "addGadget"; - - _methodParameterTypes21 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName22 = "deleteGadgets"; - - _methodParameterTypes22 = new String[] { "long" }; - - _methodName23 = "destroyGadget"; - - _methodParameterTypes23 = new String[] { "java.lang.String", "long" }; - - _methodName24 = "destroyGadgets"; - - _methodParameterTypes24 = new String[] { }; - - _methodName25 = "fetchGadget"; - - _methodParameterTypes25 = new String[] { "long", "java.lang.String" }; - - _methodName26 = "getGadget"; - - _methodParameterTypes26 = new String[] { "long", "java.lang.String" }; - - _methodName27 = "getGadget"; - - _methodParameterTypes27 = new String[] { "java.lang.String", "long" }; - - _methodName28 = "getGadgets"; - - _methodParameterTypes28 = new String[] { "long", "int", "int" }; - - _methodName29 = "getGadgetsCount"; - - _methodParameterTypes29 = new String[] { "long" }; - - _methodName30 = "initGadget"; - - _methodParameterTypes30 = new String[] { - "java.lang.String", "long", "long", "java.lang.String", - "java.lang.String" - }; - - _methodName31 = "initGadgets"; - - _methodParameterTypes31 = new String[] { }; - - _methodName32 = "updateGadget"; - - _methodParameterTypes32 = new String[] { "long", "java.lang.String" }; - } - - @Override - public com.liferay.opensocial.model.Gadget addGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(gadget) }); - } - 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 (com.liferay.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.Gadget createGadget(long gadgetId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { gadgetId }); - } - 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.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.Gadget deleteGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { gadgetId }); - } - 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.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.Gadget deleteGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(gadget) }); - } - 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 (com.liferay.opensocial.model.Gadget)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 com.liferay.opensocial.model.Gadget fetchGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { gadgetId }); - } - 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 (com.liferay.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.Gadget fetchGadgetByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { ClpSerializer.translateInput(uuid), 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 (com.liferay.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.Gadget getGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName12, - _methodParameterTypes12, new Object[] { gadgetId }); - } - 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.opensocial.model.Gadget)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(_methodName13, - _methodParameterTypes13, - 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 com.liferay.opensocial.model.Gadget getGadgetByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName14, - _methodParameterTypes14, - new Object[] { ClpSerializer.translateInput(uuid), companyId }); - } - 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.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getGadgets( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getGadgetsCount() - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName16, - _methodParameterTypes16, 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 com.liferay.opensocial.model.Gadget updateGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName17, - _methodParameterTypes17, - new Object[] { ClpSerializer.translateInput(gadget) }); - } - 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 (com.liferay.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.lang.String getBeanIdentifier() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName18, - _methodParameterTypes18, 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(_methodName19, - _methodParameterTypes19, - 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 com.liferay.opensocial.model.Gadget addGadget(long companyId, - java.lang.String url, java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName21, - _methodParameterTypes21, - new Object[] { - companyId, - - ClpSerializer.translateInput(url), - - ClpSerializer.translateInput(portletCategoryNames), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void deleteGadgets(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName22, - _methodParameterTypes22, 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"); - } - } - } - - @Override - public void destroyGadget(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { ClpSerializer.translateInput(uuid), 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"); - } - } - } - - @Override - public void destroyGadgets() - throws com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, 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"); - } - } - } - - @Override - public com.liferay.opensocial.model.Gadget fetchGadget(long companyId, - java.lang.String url) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { companyId, ClpSerializer.translateInput(url) }); - } - 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 (com.liferay.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.Gadget getGadget(long companyId, - java.lang.String url) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName26, - _methodParameterTypes26, - new Object[] { companyId, ClpSerializer.translateInput(url) }); - } - 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.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.Gadget getGadget( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName27, - _methodParameterTypes27, - new Object[] { ClpSerializer.translateInput(uuid), companyId }); - } - 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.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getGadgets( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName28, - _methodParameterTypes28, - new Object[] { companyId, 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 - public int getGadgetsCount(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName29, - _methodParameterTypes29, 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 ((Integer)returnObj).intValue(); - } - - @Override - public void initGadget(java.lang.String uuid, long companyId, - long gadgetId, java.lang.String name, - java.lang.String portletCategoryNames) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName30, - _methodParameterTypes30, - new Object[] { - ClpSerializer.translateInput(uuid), - - companyId, - - gadgetId, - - ClpSerializer.translateInput(name), - - ClpSerializer.translateInput(portletCategoryNames) - }); - } - 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"); - } - } - } - - @Override - public void initGadgets() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName31, - _methodParameterTypes31, new Object[] { }); - } - 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"); - } - } - } - - @Override - public com.liferay.opensocial.model.Gadget updateGadget(long gadgetId, - java.lang.String portletCategoryNames) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName32, - _methodParameterTypes32, - new Object[] { - gadgetId, - - ClpSerializer.translateInput(portletCategoryNames) - }); - } - 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.opensocial.model.Gadget)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 _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; - private String _methodName21; - private String[] _methodParameterTypes21; - private String _methodName22; - private String[] _methodParameterTypes22; - private String _methodName23; - private String[] _methodParameterTypes23; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; - private String _methodName27; - private String[] _methodParameterTypes27; - private String _methodName28; - private String[] _methodParameterTypes28; - private String _methodName29; - private String[] _methodParameterTypes29; - private String _methodName30; - private String[] _methodParameterTypes30; - private String _methodName31; - private String[] _methodParameterTypes31; - private String _methodName32; - private String[] _methodParameterTypes32; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalServiceUtil.java deleted file mode 100644 index 27444a6e72..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalServiceUtil.java +++ /dev/null @@ -1,415 +0,0 @@ -/** - * 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 com.liferay.opensocial.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 Gadget. This utility wraps - * {@link com.liferay.opensocial.service.impl.GadgetLocalServiceImpl} 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 Brian Wing Shun Chan - * @see GadgetLocalService - * @see com.liferay.opensocial.service.base.GadgetLocalServiceBaseImpl - * @see com.liferay.opensocial.service.impl.GadgetLocalServiceImpl - * @generated - */ -public class GadgetLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.opensocial.service.impl.GadgetLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the gadget to the database. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was added - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget addGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addGadget(gadget); - } - - /** - * Creates a new gadget with the primary key. Does not add the gadget to the database. - * - * @param gadgetId the primary key for the new gadget - * @return the new gadget - */ - public static com.liferay.opensocial.model.Gadget createGadget( - long gadgetId) { - return getService().createGadget(gadgetId); - } - - /** - * Deletes the gadget with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param gadgetId the primary key of the gadget - * @return the gadget that was removed - * @throws PortalException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget deleteGadget( - long gadgetId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteGadget(gadgetId); - } - - /** - * Deletes the gadget from the database. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget deleteGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().deleteGadget(gadget); - } - - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.opensocial.model.Gadget fetchGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchGadget(gadgetId); - } - - /** - * Returns the gadget with the matching UUID and company. - * - * @param uuid the gadget's UUID - * @param companyId the primary key of the company - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget fetchGadgetByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchGadgetByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the gadget with the primary key. - * - * @param gadgetId the primary key of the gadget - * @return the gadget - * @throws PortalException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget getGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getGadget(gadgetId); - } - - 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 the gadget with the matching UUID and company. - * - * @param uuid the gadget's UUID - * @param companyId the primary key of the company - * @return the matching gadget - * @throws PortalException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget getGadgetByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getGadgetByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns a range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List getGadgets( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getGadgets(start, end); - } - - /** - * Returns the number of gadgets. - * - * @return the number of gadgets - * @throws SystemException if a system exception occurred - */ - public static int getGadgetsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getGadgetsCount(); - } - - /** - * Updates the gadget in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was updated - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget updateGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateGadget(gadget); - } - - /** - * 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 com.liferay.opensocial.model.Gadget addGadget( - long companyId, java.lang.String url, - java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addGadget(companyId, url, portletCategoryNames, - serviceContext); - } - - public static void deleteGadgets(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getService().deleteGadgets(companyId); - } - - public static void destroyGadget(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getService().destroyGadget(uuid, companyId); - } - - public static void destroyGadgets() - throws com.liferay.portal.kernel.exception.SystemException { - getService().destroyGadgets(); - } - - public static com.liferay.opensocial.model.Gadget fetchGadget( - long companyId, java.lang.String url) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchGadget(companyId, url); - } - - public static com.liferay.opensocial.model.Gadget getGadget( - long companyId, java.lang.String url) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getGadget(companyId, url); - } - - public static com.liferay.opensocial.model.Gadget getGadget( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getGadget(uuid, companyId); - } - - public static java.util.List getGadgets( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getGadgets(companyId, start, end); - } - - public static int getGadgetsCount(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getGadgetsCount(companyId); - } - - public static void initGadget(java.lang.String uuid, long companyId, - long gadgetId, java.lang.String name, - java.lang.String portletCategoryNames) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .initGadget(uuid, companyId, gadgetId, name, portletCategoryNames); - } - - public static void initGadgets() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().initGadgets(); - } - - public static com.liferay.opensocial.model.Gadget updateGadget( - long gadgetId, java.lang.String portletCategoryNames) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().updateGadget(gadgetId, portletCategoryNames); - } - - public static void clearService() { - _service = null; - } - - public static GadgetLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - GadgetLocalService.class.getName()); - - if (invokableLocalService instanceof GadgetLocalService) { - _service = (GadgetLocalService)invokableLocalService; - } - else { - _service = new GadgetLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(GadgetLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(GadgetLocalService service) { - } - - private static GadgetLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalServiceWrapper.java deleted file mode 100644 index 3724e5d426..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetLocalServiceWrapper.java +++ /dev/null @@ -1,430 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link GadgetLocalService}. - * - * @author Brian Wing Shun Chan - * @see GadgetLocalService - * @generated - */ -public class GadgetLocalServiceWrapper implements GadgetLocalService, - ServiceWrapper { - public GadgetLocalServiceWrapper(GadgetLocalService gadgetLocalService) { - _gadgetLocalService = gadgetLocalService; - } - - /** - * Adds the gadget to the database. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was added - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.Gadget addGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.addGadget(gadget); - } - - /** - * Creates a new gadget with the primary key. Does not add the gadget to the database. - * - * @param gadgetId the primary key for the new gadget - * @return the new gadget - */ - @Override - public com.liferay.opensocial.model.Gadget createGadget(long gadgetId) { - return _gadgetLocalService.createGadget(gadgetId); - } - - /** - * Deletes the gadget with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param gadgetId the primary key of the gadget - * @return the gadget that was removed - * @throws PortalException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.Gadget deleteGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.deleteGadget(gadgetId); - } - - /** - * Deletes the gadget from the database. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.Gadget deleteGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.deleteGadget(gadget); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _gadgetLocalService.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 _gadgetLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @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 _gadgetLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 _gadgetLocalService.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 _gadgetLocalService.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 _gadgetLocalService.dynamicQueryCount(dynamicQuery, projection); - } - - @Override - public com.liferay.opensocial.model.Gadget fetchGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.fetchGadget(gadgetId); - } - - /** - * Returns the gadget with the matching UUID and company. - * - * @param uuid the gadget's UUID - * @param companyId the primary key of the company - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.Gadget fetchGadgetByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.fetchGadgetByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns the gadget with the primary key. - * - * @param gadgetId the primary key of the gadget - * @return the gadget - * @throws PortalException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.Gadget getGadget(long gadgetId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.getGadget(gadgetId); - } - - @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 _gadgetLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns the gadget with the matching UUID and company. - * - * @param uuid the gadget's UUID - * @param companyId the primary key of the company - * @return the matching gadget - * @throws PortalException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.Gadget getGadgetByUuidAndCompanyId( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.getGadgetByUuidAndCompanyId(uuid, companyId); - } - - /** - * Returns a range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getGadgets( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.getGadgets(start, end); - } - - /** - * Returns the number of gadgets. - * - * @return the number of gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public int getGadgetsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.getGadgetsCount(); - } - - /** - * Updates the gadget in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.Gadget updateGadget( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.updateGadget(gadget); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _gadgetLocalService.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) { - _gadgetLocalService.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 _gadgetLocalService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public com.liferay.opensocial.model.Gadget addGadget(long companyId, - java.lang.String url, java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.addGadget(companyId, url, - portletCategoryNames, serviceContext); - } - - @Override - public void deleteGadgets(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - _gadgetLocalService.deleteGadgets(companyId); - } - - @Override - public void destroyGadget(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - _gadgetLocalService.destroyGadget(uuid, companyId); - } - - @Override - public void destroyGadgets() - throws com.liferay.portal.kernel.exception.SystemException { - _gadgetLocalService.destroyGadgets(); - } - - @Override - public com.liferay.opensocial.model.Gadget fetchGadget(long companyId, - java.lang.String url) - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.fetchGadget(companyId, url); - } - - @Override - public com.liferay.opensocial.model.Gadget getGadget(long companyId, - java.lang.String url) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.getGadget(companyId, url); - } - - @Override - public com.liferay.opensocial.model.Gadget getGadget( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.getGadget(uuid, companyId); - } - - @Override - public java.util.List getGadgets( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.getGadgets(companyId, start, end); - } - - @Override - public int getGadgetsCount(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.getGadgetsCount(companyId); - } - - @Override - public void initGadget(java.lang.String uuid, long companyId, - long gadgetId, java.lang.String name, - java.lang.String portletCategoryNames) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _gadgetLocalService.initGadget(uuid, companyId, gadgetId, name, - portletCategoryNames); - } - - @Override - public void initGadgets() - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _gadgetLocalService.initGadgets(); - } - - @Override - public com.liferay.opensocial.model.Gadget updateGadget(long gadgetId, - java.lang.String portletCategoryNames) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _gadgetLocalService.updateGadget(gadgetId, portletCategoryNames); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public GadgetLocalService getWrappedGadgetLocalService() { - return _gadgetLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedGadgetLocalService( - GadgetLocalService gadgetLocalService) { - _gadgetLocalService = gadgetLocalService; - } - - @Override - public GadgetLocalService getWrappedService() { - return _gadgetLocalService; - } - - @Override - public void setWrappedService(GadgetLocalService gadgetLocalService) { - _gadgetLocalService = gadgetLocalService; - } - - private GadgetLocalService _gadgetLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetService.java deleted file mode 100644 index f817396b1f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetService.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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 com.liferay.opensocial.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 Gadget. Methods of this - * service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. - * - * @author Brian Wing Shun Chan - * @see GadgetServiceUtil - * @see com.liferay.opensocial.service.base.GadgetServiceBaseImpl - * @see com.liferay.opensocial.service.impl.GadgetServiceImpl - * @generated - */ -@AccessControlled -@JSONWebService -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface GadgetService extends BaseService, InvokableService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link GadgetServiceUtil} to access the gadget remote service. Add custom service methods to {@link com.liferay.opensocial.service.impl.GadgetServiceImpl} 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; - - public com.liferay.opensocial.model.Gadget addGadget(long companyId, - java.lang.String url, java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteGadget(long gadgetId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void updateGadget(long gadgetId, - java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetServiceClp.java deleted file mode 100644 index 1b5c75e3fd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetServiceClp.java +++ /dev/null @@ -1,234 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.service.InvokableService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class GadgetServiceClp implements GadgetService { - public GadgetServiceClp(InvokableService invokableService) { - _invokableService = invokableService; - - _methodName0 = "getBeanIdentifier"; - - _methodParameterTypes0 = new String[] { }; - - _methodName1 = "setBeanIdentifier"; - - _methodParameterTypes1 = new String[] { "java.lang.String" }; - - _methodName3 = "addGadget"; - - _methodParameterTypes3 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName4 = "deleteGadget"; - - _methodParameterTypes4 = new String[] { - "long", "com.liferay.portal.service.ServiceContext" - }; - - _methodName5 = "updateGadget"; - - _methodParameterTypes5 = new String[] { - "long", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - } - - @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(); - } - - @Override - public com.liferay.opensocial.model.Gadget addGadget(long companyId, - java.lang.String url, java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { - companyId, - - ClpSerializer.translateInput(url), - - ClpSerializer.translateInput(portletCategoryNames), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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.opensocial.model.Gadget)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void deleteGadget(long gadgetId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName4, - _methodParameterTypes4, - new Object[] { - gadgetId, - - ClpSerializer.translateInput(serviceContext) - }); - } - 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"); - } - } - } - - @Override - public void updateGadget(long gadgetId, - java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableService.invokeMethod(_methodName5, - _methodParameterTypes5, - new Object[] { - gadgetId, - - ClpSerializer.translateInput(portletCategoryNames), - - ClpSerializer.translateInput(serviceContext) - }); - } - 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"); - } - } - } - - private InvokableService _invokableService; - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - private String _methodName3; - private String[] _methodParameterTypes3; - private String _methodName4; - private String[] _methodParameterTypes4; - private String _methodName5; - private String[] _methodParameterTypes5; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetServiceUtil.java deleted file mode 100644 index 6a96e0b111..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetServiceUtil.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * 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 com.liferay.opensocial.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 Gadget. This utility wraps - * {@link com.liferay.opensocial.service.impl.GadgetServiceImpl} 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 Brian Wing Shun Chan - * @see GadgetService - * @see com.liferay.opensocial.service.base.GadgetServiceBaseImpl - * @see com.liferay.opensocial.service.impl.GadgetServiceImpl - * @generated - */ -public class GadgetServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.opensocial.service.impl.GadgetServiceImpl} 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 com.liferay.opensocial.model.Gadget addGadget( - long companyId, java.lang.String url, - java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addGadget(companyId, url, portletCategoryNames, - serviceContext); - } - - public static void deleteGadget(long gadgetId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().deleteGadget(gadgetId, serviceContext); - } - - public static void updateGadget(long gadgetId, - java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService().updateGadget(gadgetId, portletCategoryNames, serviceContext); - } - - public static void clearService() { - _service = null; - } - - public static GadgetService getService() { - if (_service == null) { - InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - GadgetService.class.getName()); - - if (invokableService instanceof GadgetService) { - _service = (GadgetService)invokableService; - } - else { - _service = new GadgetServiceClp(invokableService); - } - - ReferenceRegistry.registerReference(GadgetServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(GadgetService service) { - } - - private static GadgetService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetServiceWrapper.java deleted file mode 100644 index 965e869292..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/GadgetServiceWrapper.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link GadgetService}. - * - * @author Brian Wing Shun Chan - * @see GadgetService - * @generated - */ -public class GadgetServiceWrapper implements GadgetService, - ServiceWrapper { - public GadgetServiceWrapper(GadgetService gadgetService) { - _gadgetService = gadgetService; - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _gadgetService.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) { - _gadgetService.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 _gadgetService.invokeMethod(name, parameterTypes, arguments); - } - - @Override - public com.liferay.opensocial.model.Gadget addGadget(long companyId, - java.lang.String url, java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _gadgetService.addGadget(companyId, url, portletCategoryNames, - serviceContext); - } - - @Override - public void deleteGadget(long gadgetId, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _gadgetService.deleteGadget(gadgetId, serviceContext); - } - - @Override - public void updateGadget(long gadgetId, - java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _gadgetService.updateGadget(gadgetId, portletCategoryNames, - serviceContext); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public GadgetService getWrappedGadgetService() { - return _gadgetService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedGadgetService(GadgetService gadgetService) { - _gadgetService = gadgetService; - } - - @Override - public GadgetService getWrappedService() { - return _gadgetService; - } - - @Override - public void setWrappedService(GadgetService gadgetService) { - _gadgetService = gadgetService; - } - - private GadgetService _gadgetService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalService.java deleted file mode 100644 index c43b9bc552..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalService.java +++ /dev/null @@ -1,292 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -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 OAuthConsumer. 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 Brian Wing Shun Chan - * @see OAuthConsumerLocalServiceUtil - * @see com.liferay.opensocial.service.base.OAuthConsumerLocalServiceBaseImpl - * @see com.liferay.opensocial.service.impl.OAuthConsumerLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface OAuthConsumerLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link OAuthConsumerLocalServiceUtil} to access the o auth consumer local service. Add custom service methods to {@link com.liferay.opensocial.service.impl.OAuthConsumerLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the o auth consumer to the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was added - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer addOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new o auth consumer with the primary key. Does not add the o auth consumer to the database. - * - * @param oAuthConsumerId the primary key for the new o auth consumer - * @return the new o auth consumer - */ - public com.liferay.opensocial.model.OAuthConsumer createOAuthConsumer( - long oAuthConsumerId); - - /** - * Deletes the o auth consumer with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer that was removed - * @throws PortalException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer deleteOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the o auth consumer from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer deleteOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.opensocial.model.OAuthConsumer fetchOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth consumer with the primary key. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer - * @throws PortalException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.OAuthConsumer getOAuthConsumer( - long oAuthConsumerId) - 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 o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of o auth consumers - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getOAuthConsumers( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of o auth consumers. - * - * @return the number of o auth consumers - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getOAuthConsumersCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the o auth consumer in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was updated - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer updateOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - 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 com.liferay.opensocial.model.OAuthConsumer addOAuthConsumer( - long companyId, java.lang.String gadgetKey, - java.lang.String serviceName, java.lang.String consumerKey, - java.lang.String consumerSecret, java.lang.String keyType) - throws com.liferay.portal.kernel.exception.SystemException; - - public void deleteOAuthConsumers(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.OAuthConsumer fetchOAuthConsumer( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.OAuthConsumer getOAuthConsumer( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getOAuthConsumers( - java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getOAuthConsumers( - java.lang.String gadgetKey, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getOAuthConsumersCount(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.opensocial.model.OAuthConsumer updateOAuthConsumer( - long oAuthConsumerId, java.lang.String consumerKey, - java.lang.String consumerSecret, java.lang.String keyType, - java.lang.String keyName, java.lang.String callbackURL) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalServiceClp.java deleted file mode 100644 index 20b347f1ca..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalServiceClp.java +++ /dev/null @@ -1,1050 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class OAuthConsumerLocalServiceClp implements OAuthConsumerLocalService { - public OAuthConsumerLocalServiceClp( - InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addOAuthConsumer"; - - _methodParameterTypes0 = new String[] { - "com.liferay.opensocial.model.OAuthConsumer" - }; - - _methodName1 = "createOAuthConsumer"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteOAuthConsumer"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteOAuthConsumer"; - - _methodParameterTypes3 = new String[] { - "com.liferay.opensocial.model.OAuthConsumer" - }; - - _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 = "fetchOAuthConsumer"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "getOAuthConsumer"; - - _methodParameterTypes11 = new String[] { "long" }; - - _methodName12 = "getPersistedModel"; - - _methodParameterTypes12 = new String[] { "java.io.Serializable" }; - - _methodName13 = "getOAuthConsumers"; - - _methodParameterTypes13 = new String[] { "int", "int" }; - - _methodName14 = "getOAuthConsumersCount"; - - _methodParameterTypes14 = new String[] { }; - - _methodName15 = "updateOAuthConsumer"; - - _methodParameterTypes15 = new String[] { - "com.liferay.opensocial.model.OAuthConsumer" - }; - - _methodName16 = "getBeanIdentifier"; - - _methodParameterTypes16 = new String[] { }; - - _methodName17 = "setBeanIdentifier"; - - _methodParameterTypes17 = new String[] { "java.lang.String" }; - - _methodName19 = "addOAuthConsumer"; - - _methodParameterTypes19 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String" - }; - - _methodName20 = "deleteOAuthConsumers"; - - _methodParameterTypes20 = new String[] { "java.lang.String" }; - - _methodName21 = "fetchOAuthConsumer"; - - _methodParameterTypes21 = new String[] { - "java.lang.String", "java.lang.String" - }; - - _methodName22 = "getOAuthConsumer"; - - _methodParameterTypes22 = new String[] { - "java.lang.String", "java.lang.String" - }; - - _methodName23 = "getOAuthConsumers"; - - _methodParameterTypes23 = new String[] { "java.lang.String" }; - - _methodName24 = "getOAuthConsumers"; - - _methodParameterTypes24 = new String[] { "java.lang.String", "int", "int" }; - - _methodName25 = "getOAuthConsumersCount"; - - _methodParameterTypes25 = new String[] { "java.lang.String" }; - - _methodName26 = "updateOAuthConsumer"; - - _methodParameterTypes26 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String" - }; - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer addOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(oAuthConsumer) }); - } - 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 (com.liferay.opensocial.model.OAuthConsumer)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer createOAuthConsumer( - long oAuthConsumerId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { oAuthConsumerId }); - } - 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.opensocial.model.OAuthConsumer)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer deleteOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { oAuthConsumerId }); - } - 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.opensocial.model.OAuthConsumer)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer deleteOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(oAuthConsumer) }); - } - 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 (com.liferay.opensocial.model.OAuthConsumer)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 com.liferay.opensocial.model.OAuthConsumer fetchOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { oAuthConsumerId }); - } - 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 (com.liferay.opensocial.model.OAuthConsumer)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer getOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, new Object[] { oAuthConsumerId }); - } - 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.opensocial.model.OAuthConsumer)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 getOAuthConsumers( - 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getOAuthConsumersCount() - 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 com.liferay.opensocial.model.OAuthConsumer updateOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { ClpSerializer.translateInput(oAuthConsumer) }); - } - 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 (com.liferay.opensocial.model.OAuthConsumer)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 com.liferay.opensocial.model.OAuthConsumer addOAuthConsumer( - long companyId, java.lang.String gadgetKey, - java.lang.String serviceName, java.lang.String consumerKey, - java.lang.String consumerSecret, java.lang.String keyType) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { - companyId, - - ClpSerializer.translateInput(gadgetKey), - - ClpSerializer.translateInput(serviceName), - - ClpSerializer.translateInput(consumerKey), - - ClpSerializer.translateInput(consumerSecret), - - ClpSerializer.translateInput(keyType) - }); - } - 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 (com.liferay.opensocial.model.OAuthConsumer)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void deleteOAuthConsumers(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName20, - _methodParameterTypes20, - new Object[] { ClpSerializer.translateInput(gadgetKey) }); - } - 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"); - } - } - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer fetchOAuthConsumer( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName21, - _methodParameterTypes21, - new Object[] { - ClpSerializer.translateInput(gadgetKey), - - ClpSerializer.translateInput(serviceName) - }); - } - 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 (com.liferay.opensocial.model.OAuthConsumer)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer getOAuthConsumer( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName22, - _methodParameterTypes22, - new Object[] { - ClpSerializer.translateInput(gadgetKey), - - ClpSerializer.translateInput(serviceName) - }); - } - 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.opensocial.model.OAuthConsumer)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getOAuthConsumers( - java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { ClpSerializer.translateInput(gadgetKey) }); - } - 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 java.util.List getOAuthConsumers( - java.lang.String gadgetKey, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, - new Object[] { - ClpSerializer.translateInput(gadgetKey), - - 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 - public int getOAuthConsumersCount(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, - new Object[] { ClpSerializer.translateInput(gadgetKey) }); - } - 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 com.liferay.opensocial.model.OAuthConsumer updateOAuthConsumer( - long oAuthConsumerId, java.lang.String consumerKey, - java.lang.String consumerSecret, java.lang.String keyType, - java.lang.String keyName, java.lang.String callbackURL) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName26, - _methodParameterTypes26, - new Object[] { - oAuthConsumerId, - - ClpSerializer.translateInput(consumerKey), - - ClpSerializer.translateInput(consumerSecret), - - ClpSerializer.translateInput(keyType), - - ClpSerializer.translateInput(keyName), - - ClpSerializer.translateInput(callbackURL) - }); - } - 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.opensocial.model.OAuthConsumer)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; - private String _methodName21; - private String[] _methodParameterTypes21; - private String _methodName22; - private String[] _methodParameterTypes22; - private String _methodName23; - private String[] _methodParameterTypes23; - private String _methodName24; - private String[] _methodParameterTypes24; - private String _methodName25; - private String[] _methodParameterTypes25; - private String _methodName26; - private String[] _methodParameterTypes26; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalServiceUtil.java deleted file mode 100644 index c24045dc7d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalServiceUtil.java +++ /dev/null @@ -1,364 +0,0 @@ -/** - * 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 com.liferay.opensocial.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 OAuthConsumer. This utility wraps - * {@link com.liferay.opensocial.service.impl.OAuthConsumerLocalServiceImpl} 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 Brian Wing Shun Chan - * @see OAuthConsumerLocalService - * @see com.liferay.opensocial.service.base.OAuthConsumerLocalServiceBaseImpl - * @see com.liferay.opensocial.service.impl.OAuthConsumerLocalServiceImpl - * @generated - */ -public class OAuthConsumerLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.opensocial.service.impl.OAuthConsumerLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the o auth consumer to the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was added - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer addOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addOAuthConsumer(oAuthConsumer); - } - - /** - * Creates a new o auth consumer with the primary key. Does not add the o auth consumer to the database. - * - * @param oAuthConsumerId the primary key for the new o auth consumer - * @return the new o auth consumer - */ - public static com.liferay.opensocial.model.OAuthConsumer createOAuthConsumer( - long oAuthConsumerId) { - return getService().createOAuthConsumer(oAuthConsumerId); - } - - /** - * Deletes the o auth consumer with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer that was removed - * @throws PortalException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer deleteOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteOAuthConsumer(oAuthConsumerId); - } - - /** - * Deletes the o auth consumer from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer deleteOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().deleteOAuthConsumer(oAuthConsumer); - } - - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.opensocial.model.OAuthConsumer fetchOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchOAuthConsumer(oAuthConsumerId); - } - - /** - * Returns the o auth consumer with the primary key. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer - * @throws PortalException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer getOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthConsumer(oAuthConsumerId); - } - - 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 o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of o auth consumers - * @throws SystemException if a system exception occurred - */ - public static java.util.List getOAuthConsumers( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthConsumers(start, end); - } - - /** - * Returns the number of o auth consumers. - * - * @return the number of o auth consumers - * @throws SystemException if a system exception occurred - */ - public static int getOAuthConsumersCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthConsumersCount(); - } - - /** - * Updates the o auth consumer in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was updated - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer updateOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateOAuthConsumer(oAuthConsumer); - } - - /** - * 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 com.liferay.opensocial.model.OAuthConsumer addOAuthConsumer( - long companyId, java.lang.String gadgetKey, - java.lang.String serviceName, java.lang.String consumerKey, - java.lang.String consumerSecret, java.lang.String keyType) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .addOAuthConsumer(companyId, gadgetKey, serviceName, - consumerKey, consumerSecret, keyType); - } - - public static void deleteOAuthConsumers(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - getService().deleteOAuthConsumers(gadgetKey); - } - - public static com.liferay.opensocial.model.OAuthConsumer fetchOAuthConsumer( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchOAuthConsumer(gadgetKey, serviceName); - } - - public static com.liferay.opensocial.model.OAuthConsumer getOAuthConsumer( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthConsumer(gadgetKey, serviceName); - } - - public static java.util.List getOAuthConsumers( - java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthConsumers(gadgetKey); - } - - public static java.util.List getOAuthConsumers( - java.lang.String gadgetKey, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthConsumers(gadgetKey, start, end); - } - - public static int getOAuthConsumersCount(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthConsumersCount(gadgetKey); - } - - public static com.liferay.opensocial.model.OAuthConsumer updateOAuthConsumer( - long oAuthConsumerId, java.lang.String consumerKey, - java.lang.String consumerSecret, java.lang.String keyType, - java.lang.String keyName, java.lang.String callbackURL) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateOAuthConsumer(oAuthConsumerId, consumerKey, - consumerSecret, keyType, keyName, callbackURL); - } - - public static void clearService() { - _service = null; - } - - public static OAuthConsumerLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - OAuthConsumerLocalService.class.getName()); - - if (invokableLocalService instanceof OAuthConsumerLocalService) { - _service = (OAuthConsumerLocalService)invokableLocalService; - } - else { - _service = new OAuthConsumerLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(OAuthConsumerLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(OAuthConsumerLocalService service) { - } - - private static OAuthConsumerLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalServiceWrapper.java deleted file mode 100644 index 72bd0c8365..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthConsumerLocalServiceWrapper.java +++ /dev/null @@ -1,383 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link OAuthConsumerLocalService}. - * - * @author Brian Wing Shun Chan - * @see OAuthConsumerLocalService - * @generated - */ -public class OAuthConsumerLocalServiceWrapper - implements OAuthConsumerLocalService, - ServiceWrapper { - public OAuthConsumerLocalServiceWrapper( - OAuthConsumerLocalService oAuthConsumerLocalService) { - _oAuthConsumerLocalService = oAuthConsumerLocalService; - } - - /** - * Adds the o auth consumer to the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was added - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthConsumer addOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.addOAuthConsumer(oAuthConsumer); - } - - /** - * Creates a new o auth consumer with the primary key. Does not add the o auth consumer to the database. - * - * @param oAuthConsumerId the primary key for the new o auth consumer - * @return the new o auth consumer - */ - @Override - public com.liferay.opensocial.model.OAuthConsumer createOAuthConsumer( - long oAuthConsumerId) { - return _oAuthConsumerLocalService.createOAuthConsumer(oAuthConsumerId); - } - - /** - * Deletes the o auth consumer with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer that was removed - * @throws PortalException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthConsumer deleteOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.deleteOAuthConsumer(oAuthConsumerId); - } - - /** - * Deletes the o auth consumer from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthConsumer deleteOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.deleteOAuthConsumer(oAuthConsumer); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _oAuthConsumerLocalService.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 _oAuthConsumerLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @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 _oAuthConsumerLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 _oAuthConsumerLocalService.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 _oAuthConsumerLocalService.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 _oAuthConsumerLocalService.dynamicQueryCount(dynamicQuery, - projection); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer fetchOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.fetchOAuthConsumer(oAuthConsumerId); - } - - /** - * Returns the o auth consumer with the primary key. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer - * @throws PortalException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthConsumer getOAuthConsumer( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.getOAuthConsumer(oAuthConsumerId); - } - - @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 _oAuthConsumerLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns a range of all the o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getOAuthConsumers( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.getOAuthConsumers(start, end); - } - - /** - * Returns the number of o auth consumers. - * - * @return the number of o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public int getOAuthConsumersCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.getOAuthConsumersCount(); - } - - /** - * Updates the o auth consumer in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthConsumer updateOAuthConsumer( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.updateOAuthConsumer(oAuthConsumer); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _oAuthConsumerLocalService.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) { - _oAuthConsumerLocalService.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 _oAuthConsumerLocalService.invokeMethod(name, parameterTypes, - arguments); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer addOAuthConsumer( - long companyId, java.lang.String gadgetKey, - java.lang.String serviceName, java.lang.String consumerKey, - java.lang.String consumerSecret, java.lang.String keyType) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.addOAuthConsumer(companyId, - gadgetKey, serviceName, consumerKey, consumerSecret, keyType); - } - - @Override - public void deleteOAuthConsumers(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - _oAuthConsumerLocalService.deleteOAuthConsumers(gadgetKey); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer fetchOAuthConsumer( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.fetchOAuthConsumer(gadgetKey, - serviceName); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer getOAuthConsumer( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.getOAuthConsumer(gadgetKey, - serviceName); - } - - @Override - public java.util.List getOAuthConsumers( - java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.getOAuthConsumers(gadgetKey); - } - - @Override - public java.util.List getOAuthConsumers( - java.lang.String gadgetKey, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.getOAuthConsumers(gadgetKey, start, - end); - } - - @Override - public int getOAuthConsumersCount(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.getOAuthConsumersCount(gadgetKey); - } - - @Override - public com.liferay.opensocial.model.OAuthConsumer updateOAuthConsumer( - long oAuthConsumerId, java.lang.String consumerKey, - java.lang.String consumerSecret, java.lang.String keyType, - java.lang.String keyName, java.lang.String callbackURL) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _oAuthConsumerLocalService.updateOAuthConsumer(oAuthConsumerId, - consumerKey, consumerSecret, keyType, keyName, callbackURL); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public OAuthConsumerLocalService getWrappedOAuthConsumerLocalService() { - return _oAuthConsumerLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedOAuthConsumerLocalService( - OAuthConsumerLocalService oAuthConsumerLocalService) { - _oAuthConsumerLocalService = oAuthConsumerLocalService; - } - - @Override - public OAuthConsumerLocalService getWrappedService() { - return _oAuthConsumerLocalService; - } - - @Override - public void setWrappedService( - OAuthConsumerLocalService oAuthConsumerLocalService) { - _oAuthConsumerLocalService = oAuthConsumerLocalService; - } - - private OAuthConsumerLocalService _oAuthConsumerLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalService.java deleted file mode 100644 index 6afd927ca2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalService.java +++ /dev/null @@ -1,286 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -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 OAuthToken. 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 Brian Wing Shun Chan - * @see OAuthTokenLocalServiceUtil - * @see com.liferay.opensocial.service.base.OAuthTokenLocalServiceBaseImpl - * @see com.liferay.opensocial.service.impl.OAuthTokenLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface OAuthTokenLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link OAuthTokenLocalServiceUtil} to access the o auth token local service. Add custom service methods to {@link com.liferay.opensocial.service.impl.OAuthTokenLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the o auth token to the database. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was added - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken addOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new o auth token with the primary key. Does not add the o auth token to the database. - * - * @param oAuthTokenId the primary key for the new o auth token - * @return the new o auth token - */ - public com.liferay.opensocial.model.OAuthToken createOAuthToken( - long oAuthTokenId); - - /** - * Deletes the o auth token with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token that was removed - * @throws PortalException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken deleteOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the o auth token from the database. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken deleteOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.opensocial.model.OAuthToken fetchOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth token with the primary key. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token - * @throws PortalException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.OAuthToken getOAuthToken( - long oAuthTokenId) - 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 o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of o auth tokens - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getOAuthTokens( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of o auth tokens. - * - * @return the number of o auth tokens - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getOAuthTokensCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the o auth token in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was updated - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken updateOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - 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 com.liferay.opensocial.model.OAuthToken addOAuthToken(long userId, - java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String accessToken, - java.lang.String tokenName, java.lang.String tokenSecret, - java.lang.String sessionHandle, long expiration) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteOAuthToken(long userId, java.lang.String gadgetKey, - java.lang.String serviceName, long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - public void deleteOAuthTokens(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.OAuthToken fetchOAuthToken( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.opensocial.model.OAuthToken getOAuthToken(long userId, - java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getOAuthTokens( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalServiceClp.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalServiceClp.java deleted file mode 100644 index e384520d78..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalServiceClp.java +++ /dev/null @@ -1,1007 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class OAuthTokenLocalServiceClp implements OAuthTokenLocalService { - public OAuthTokenLocalServiceClp( - InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addOAuthToken"; - - _methodParameterTypes0 = new String[] { - "com.liferay.opensocial.model.OAuthToken" - }; - - _methodName1 = "createOAuthToken"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteOAuthToken"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteOAuthToken"; - - _methodParameterTypes3 = new String[] { - "com.liferay.opensocial.model.OAuthToken" - }; - - _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 = "fetchOAuthToken"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "getOAuthToken"; - - _methodParameterTypes11 = new String[] { "long" }; - - _methodName12 = "getPersistedModel"; - - _methodParameterTypes12 = new String[] { "java.io.Serializable" }; - - _methodName13 = "getOAuthTokens"; - - _methodParameterTypes13 = new String[] { "int", "int" }; - - _methodName14 = "getOAuthTokensCount"; - - _methodParameterTypes14 = new String[] { }; - - _methodName15 = "updateOAuthToken"; - - _methodParameterTypes15 = new String[] { - "com.liferay.opensocial.model.OAuthToken" - }; - - _methodName16 = "getBeanIdentifier"; - - _methodParameterTypes16 = new String[] { }; - - _methodName17 = "setBeanIdentifier"; - - _methodParameterTypes17 = new String[] { "java.lang.String" }; - - _methodName19 = "addOAuthToken"; - - _methodParameterTypes19 = new String[] { - "long", "java.lang.String", "java.lang.String", "long", - "java.lang.String", "java.lang.String", "java.lang.String", - "java.lang.String", "long" - }; - - _methodName20 = "deleteOAuthToken"; - - _methodParameterTypes20 = new String[] { - "long", "java.lang.String", "java.lang.String", "long", - "java.lang.String" - }; - - _methodName21 = "deleteOAuthTokens"; - - _methodParameterTypes21 = new String[] { - "java.lang.String", "java.lang.String" - }; - - _methodName22 = "fetchOAuthToken"; - - _methodParameterTypes22 = new String[] { - "long", "java.lang.String", "java.lang.String", "long", - "java.lang.String" - }; - - _methodName23 = "getOAuthToken"; - - _methodParameterTypes23 = new String[] { - "long", "java.lang.String", "java.lang.String", "long", - "java.lang.String" - }; - - _methodName24 = "getOAuthTokens"; - - _methodParameterTypes24 = new String[] { - "java.lang.String", "java.lang.String" - }; - } - - @Override - public com.liferay.opensocial.model.OAuthToken addOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { ClpSerializer.translateInput(oAuthToken) }); - } - 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 (com.liferay.opensocial.model.OAuthToken)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthToken createOAuthToken( - long oAuthTokenId) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, new Object[] { oAuthTokenId }); - } - 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.opensocial.model.OAuthToken)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthToken deleteOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, new Object[] { oAuthTokenId }); - } - 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.opensocial.model.OAuthToken)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthToken deleteOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { ClpSerializer.translateInput(oAuthToken) }); - } - 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 (com.liferay.opensocial.model.OAuthToken)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 com.liferay.opensocial.model.OAuthToken fetchOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, new Object[] { oAuthTokenId }); - } - 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 (com.liferay.opensocial.model.OAuthToken)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthToken getOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, new Object[] { oAuthTokenId }); - } - 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.opensocial.model.OAuthToken)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 getOAuthTokens( - 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)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getOAuthTokensCount() - 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 com.liferay.opensocial.model.OAuthToken updateOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { ClpSerializer.translateInput(oAuthToken) }); - } - 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 (com.liferay.opensocial.model.OAuthToken)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 com.liferay.opensocial.model.OAuthToken addOAuthToken(long userId, - java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String accessToken, - java.lang.String tokenName, java.lang.String tokenSecret, - java.lang.String sessionHandle, long expiration) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName19, - _methodParameterTypes19, - new Object[] { - userId, - - ClpSerializer.translateInput(gadgetKey), - - ClpSerializer.translateInput(serviceName), - - moduleId, - - ClpSerializer.translateInput(accessToken), - - ClpSerializer.translateInput(tokenName), - - ClpSerializer.translateInput(tokenSecret), - - ClpSerializer.translateInput(sessionHandle), - - expiration - }); - } - 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.opensocial.model.OAuthToken)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void deleteOAuthToken(long userId, java.lang.String gadgetKey, - java.lang.String serviceName, long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName20, - _methodParameterTypes20, - new Object[] { - userId, - - ClpSerializer.translateInput(gadgetKey), - - ClpSerializer.translateInput(serviceName), - - moduleId, - - ClpSerializer.translateInput(tokenName) - }); - } - 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"); - } - } - } - - @Override - public void deleteOAuthTokens(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - try { - _invokableLocalService.invokeMethod(_methodName21, - _methodParameterTypes21, - new Object[] { - ClpSerializer.translateInput(gadgetKey), - - ClpSerializer.translateInput(serviceName) - }); - } - 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"); - } - } - } - - @Override - public com.liferay.opensocial.model.OAuthToken fetchOAuthToken( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName22, - _methodParameterTypes22, - new Object[] { - userId, - - ClpSerializer.translateInput(gadgetKey), - - ClpSerializer.translateInput(serviceName), - - moduleId, - - ClpSerializer.translateInput(tokenName) - }); - } - 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 (com.liferay.opensocial.model.OAuthToken)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.opensocial.model.OAuthToken getOAuthToken(long userId, - java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, - new Object[] { - userId, - - ClpSerializer.translateInput(gadgetKey), - - ClpSerializer.translateInput(serviceName), - - moduleId, - - ClpSerializer.translateInput(tokenName) - }); - } - 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.opensocial.model.OAuthToken)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getOAuthTokens( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, - new Object[] { - ClpSerializer.translateInput(gadgetKey), - - ClpSerializer.translateInput(serviceName) - }); - } - 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); - } - - 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; - private String _methodName24; - private String[] _methodParameterTypes24; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalServiceUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalServiceUtil.java deleted file mode 100644 index 465387cf77..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalServiceUtil.java +++ /dev/null @@ -1,361 +0,0 @@ -/** - * 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 com.liferay.opensocial.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 OAuthToken. This utility wraps - * {@link com.liferay.opensocial.service.impl.OAuthTokenLocalServiceImpl} 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 Brian Wing Shun Chan - * @see OAuthTokenLocalService - * @see com.liferay.opensocial.service.base.OAuthTokenLocalServiceBaseImpl - * @see com.liferay.opensocial.service.impl.OAuthTokenLocalServiceImpl - * @generated - */ -public class OAuthTokenLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link com.liferay.opensocial.service.impl.OAuthTokenLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the o auth token to the database. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was added - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken addOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addOAuthToken(oAuthToken); - } - - /** - * Creates a new o auth token with the primary key. Does not add the o auth token to the database. - * - * @param oAuthTokenId the primary key for the new o auth token - * @return the new o auth token - */ - public static com.liferay.opensocial.model.OAuthToken createOAuthToken( - long oAuthTokenId) { - return getService().createOAuthToken(oAuthTokenId); - } - - /** - * Deletes the o auth token with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token that was removed - * @throws PortalException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken deleteOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().deleteOAuthToken(oAuthTokenId); - } - - /** - * Deletes the o auth token from the database. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken deleteOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().deleteOAuthToken(oAuthToken); - } - - 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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @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. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 com.liferay.opensocial.model.OAuthToken fetchOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().fetchOAuthToken(oAuthTokenId); - } - - /** - * Returns the o auth token with the primary key. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token - * @throws PortalException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken getOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthToken(oAuthTokenId); - } - - 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 o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of o auth tokens - * @throws SystemException if a system exception occurred - */ - public static java.util.List getOAuthTokens( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthTokens(start, end); - } - - /** - * Returns the number of o auth tokens. - * - * @return the number of o auth tokens - * @throws SystemException if a system exception occurred - */ - public static int getOAuthTokensCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthTokensCount(); - } - - /** - * Updates the o auth token in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was updated - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken updateOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().updateOAuthToken(oAuthToken); - } - - /** - * 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 com.liferay.opensocial.model.OAuthToken addOAuthToken( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String accessToken, - java.lang.String tokenName, java.lang.String tokenSecret, - java.lang.String sessionHandle, long expiration) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .addOAuthToken(userId, gadgetKey, serviceName, moduleId, - accessToken, tokenName, tokenSecret, sessionHandle, expiration); - } - - public static void deleteOAuthToken(long userId, - java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - getService() - .deleteOAuthToken(userId, gadgetKey, serviceName, moduleId, - tokenName); - } - - public static void deleteOAuthTokens(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - getService().deleteOAuthTokens(gadgetKey, serviceName); - } - - public static com.liferay.opensocial.model.OAuthToken fetchOAuthToken( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .fetchOAuthToken(userId, gadgetKey, serviceName, moduleId, - tokenName); - } - - public static com.liferay.opensocial.model.OAuthToken getOAuthToken( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .getOAuthToken(userId, gadgetKey, serviceName, moduleId, - tokenName); - } - - public static java.util.List getOAuthTokens( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getOAuthTokens(gadgetKey, serviceName); - } - - public static void clearService() { - _service = null; - } - - public static OAuthTokenLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - OAuthTokenLocalService.class.getName()); - - if (invokableLocalService instanceof OAuthTokenLocalService) { - _service = (OAuthTokenLocalService)invokableLocalService; - } - else { - _service = new OAuthTokenLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(OAuthTokenLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(OAuthTokenLocalService service) { - } - - private static OAuthTokenLocalService _service; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalServiceWrapper.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalServiceWrapper.java deleted file mode 100644 index c662cfe70d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/OAuthTokenLocalServiceWrapper.java +++ /dev/null @@ -1,371 +0,0 @@ -/** - * 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 com.liferay.opensocial.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link OAuthTokenLocalService}. - * - * @author Brian Wing Shun Chan - * @see OAuthTokenLocalService - * @generated - */ -public class OAuthTokenLocalServiceWrapper implements OAuthTokenLocalService, - ServiceWrapper { - public OAuthTokenLocalServiceWrapper( - OAuthTokenLocalService oAuthTokenLocalService) { - _oAuthTokenLocalService = oAuthTokenLocalService; - } - - /** - * Adds the o auth token to the database. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was added - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthToken addOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.addOAuthToken(oAuthToken); - } - - /** - * Creates a new o auth token with the primary key. Does not add the o auth token to the database. - * - * @param oAuthTokenId the primary key for the new o auth token - * @return the new o auth token - */ - @Override - public com.liferay.opensocial.model.OAuthToken createOAuthToken( - long oAuthTokenId) { - return _oAuthTokenLocalService.createOAuthToken(oAuthTokenId); - } - - /** - * Deletes the o auth token with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token that was removed - * @throws PortalException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthToken deleteOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.deleteOAuthToken(oAuthTokenId); - } - - /** - * Deletes the o auth token from the database. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthToken deleteOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.deleteOAuthToken(oAuthToken); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _oAuthTokenLocalService.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 _oAuthTokenLocalService.dynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @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 _oAuthTokenLocalService.dynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 _oAuthTokenLocalService.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 _oAuthTokenLocalService.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 _oAuthTokenLocalService.dynamicQueryCount(dynamicQuery, - projection); - } - - @Override - public com.liferay.opensocial.model.OAuthToken fetchOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.fetchOAuthToken(oAuthTokenId); - } - - /** - * Returns the o auth token with the primary key. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token - * @throws PortalException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthToken getOAuthToken( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.getOAuthToken(oAuthTokenId); - } - - @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 _oAuthTokenLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns a range of all the o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getOAuthTokens( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.getOAuthTokens(start, end); - } - - /** - * Returns the number of o auth tokens. - * - * @return the number of o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public int getOAuthTokensCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.getOAuthTokensCount(); - } - - /** - * Updates the o auth token in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public com.liferay.opensocial.model.OAuthToken updateOAuthToken( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.updateOAuthToken(oAuthToken); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _oAuthTokenLocalService.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) { - _oAuthTokenLocalService.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 _oAuthTokenLocalService.invokeMethod(name, parameterTypes, - arguments); - } - - @Override - public com.liferay.opensocial.model.OAuthToken addOAuthToken(long userId, - java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String accessToken, - java.lang.String tokenName, java.lang.String tokenSecret, - java.lang.String sessionHandle, long expiration) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.addOAuthToken(userId, gadgetKey, - serviceName, moduleId, accessToken, tokenName, tokenSecret, - sessionHandle, expiration); - } - - @Override - public void deleteOAuthToken(long userId, java.lang.String gadgetKey, - java.lang.String serviceName, long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - _oAuthTokenLocalService.deleteOAuthToken(userId, gadgetKey, - serviceName, moduleId, tokenName); - } - - @Override - public void deleteOAuthTokens(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - _oAuthTokenLocalService.deleteOAuthTokens(gadgetKey, serviceName); - } - - @Override - public com.liferay.opensocial.model.OAuthToken fetchOAuthToken( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.fetchOAuthToken(userId, gadgetKey, - serviceName, moduleId, tokenName); - } - - @Override - public com.liferay.opensocial.model.OAuthToken getOAuthToken(long userId, - java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.getOAuthToken(userId, gadgetKey, - serviceName, moduleId, tokenName); - } - - @Override - public java.util.List getOAuthTokens( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - return _oAuthTokenLocalService.getOAuthTokens(gadgetKey, serviceName); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public OAuthTokenLocalService getWrappedOAuthTokenLocalService() { - return _oAuthTokenLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedOAuthTokenLocalService( - OAuthTokenLocalService oAuthTokenLocalService) { - _oAuthTokenLocalService = oAuthTokenLocalService; - } - - @Override - public OAuthTokenLocalService getWrappedService() { - return _oAuthTokenLocalService; - } - - @Override - public void setWrappedService(OAuthTokenLocalService oAuthTokenLocalService) { - _oAuthTokenLocalService = oAuthTokenLocalService; - } - - private OAuthTokenLocalService _oAuthTokenLocalService; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/messaging/ClpMessageListener.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/messaging/ClpMessageListener.java deleted file mode 100644 index 1f3f602a5c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/messaging/ClpMessageListener.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.messaging; - -import com.liferay.opensocial.service.ClpSerializer; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; -import com.liferay.opensocial.service.GadgetServiceUtil; -import com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil; -import com.liferay.opensocial.service.OAuthTokenLocalServiceUtil; - -import com.liferay.portal.kernel.messaging.BaseMessageListener; -import com.liferay.portal.kernel.messaging.Message; - -/** - * @author Brian Wing Shun Chan - */ -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())) { - GadgetLocalServiceUtil.clearService(); - - GadgetServiceUtil.clearService(); - OAuthConsumerLocalServiceUtil.clearService(); - - OAuthTokenLocalServiceUtil.clearService(); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/permission/GadgetPermission.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/permission/GadgetPermission.java deleted file mode 100644 index e880901bb6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/permission/GadgetPermission.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.permission; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.security.auth.PrincipalException; -import com.liferay.portal.security.permission.PermissionChecker; - -/** - * @author Michael Young - */ -public class GadgetPermission { - - public static final String RESOURCE_NAME = "com.liferay.opensocial"; - - public static void check( - PermissionChecker permissionChecker, long groupId, long gadgetId, - String actionId) - throws PortalException { - - if (!contains(permissionChecker, groupId, gadgetId, actionId)) { - throw new PrincipalException(); - } - } - - public static void check( - PermissionChecker permissionChecker, long groupId, String actionId) - throws PortalException { - - if (!contains(permissionChecker, groupId, actionId)) { - throw new PrincipalException(); - } - } - - public static boolean contains( - PermissionChecker permissionChecker, long groupId, long gadgetId, - String actionId) { - - return permissionChecker.hasPermission( - groupId, Gadget.class.getName(), gadgetId, actionId); - } - - public static boolean contains( - PermissionChecker permissionChecker, long groupId, String actionId) { - - return permissionChecker.hasPermission( - groupId, RESOURCE_NAME, groupId, actionId); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetActionableDynamicQuery.java deleted file mode 100644 index f660e3081d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public abstract class GadgetActionableDynamicQuery - extends BaseActionableDynamicQuery { - public GadgetActionableDynamicQuery() throws SystemException { - setBaseLocalService(GadgetLocalServiceUtil.getService()); - setClass(Gadget.class); - - setClassLoader(com.liferay.opensocial.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("gadgetId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetExportActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetExportActionableDynamicQuery.java deleted file mode 100644 index 7ac00720c2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetExportActionableDynamicQuery.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.Gadget; - -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.ExportImportHelperUtil; -import com.liferay.portal.kernel.lar.ManifestSummary; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.util.PortalUtil; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class GadgetExportActionableDynamicQuery - extends GadgetActionableDynamicQuery { - public GadgetExportActionableDynamicQuery( - PortletDataContext portletDataContext) throws SystemException { - _portletDataContext = portletDataContext; - - setCompanyId(_portletDataContext.getCompanyId()); - } - - @Override - public long performCount() throws PortalException, SystemException { - ManifestSummary manifestSummary = _portletDataContext.getManifestSummary(); - - StagedModelType stagedModelType = getStagedModelType(); - - long modelAdditionCount = super.performCount(); - - manifestSummary.addModelAdditionCount(stagedModelType.toString(), - modelAdditionCount); - - long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(_portletDataContext, - stagedModelType); - - manifestSummary.addModelDeletionCount(stagedModelType.toString(), - modelDeletionCount); - - return modelAdditionCount; - } - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - _portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate"); - } - - protected StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Gadget.class.getName())); - } - - @Override - @SuppressWarnings("unused") - protected void performAction(Object object) - throws PortalException, SystemException { - Gadget stagedModel = (Gadget)object; - - StagedModelDataHandlerUtil.exportStagedModel(_portletDataContext, - stagedModel); - } - - private PortletDataContext _portletDataContext; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetPersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetPersistence.java deleted file mode 100644 index e827a56b6d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetPersistence.java +++ /dev/null @@ -1,871 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.Gadget; - -import com.liferay.portal.service.persistence.BasePersistence; - -/** - * The persistence interface for the gadget service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see GadgetPersistenceImpl - * @see GadgetUtil - * @generated - */ -public interface GadgetPersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link GadgetUtil} to access the gadget persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the gadgets where uuid = ?. - * - * @param uuid the uuid - * @return the matching gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the gadgets where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the gadgets where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadgets before and after the current gadget in the ordered set where uuid = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget[] findByUuid_PrevAndNext( - long gadgetId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the gadgets that the user has permission to view where uuid = ?. - * - * @param uuid the uuid - * @return the matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the gadgets that the user has permission to view where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the gadgets that the user has permissions to view where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where uuid = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget[] filterFindByUuid_PrevAndNext( - long gadgetId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the gadgets where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of gadgets where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - public int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of gadgets that the user has permission to view where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the gadgets where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the gadgets where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the gadgets where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadgets before and after the current gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget[] findByUuid_C_PrevAndNext( - long gadgetId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the gadgets that the user has permissions to view where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget[] filterFindByUuid_C_PrevAndNext( - long gadgetId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the gadgets where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of gadgets where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - public int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the gadgets where companyId = ?. - * - * @param companyId the company ID - * @return the matching gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the gadgets where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the gadgets where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findByCompanyId( - long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget findByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget fetchByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget findByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget fetchByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadgets before and after the current gadget in the ordered set where companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget[] findByCompanyId_PrevAndNext( - long gadgetId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the gadgets that the user has permission to view where companyId = ?. - * - * @param companyId the company ID - * @return the matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the gadgets that the user has permission to view where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByCompanyId( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the gadgets that the user has permissions to view where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public java.util.List filterFindByCompanyId( - long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget[] filterFindByCompanyId_PrevAndNext( - long gadgetId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the gadgets 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 gadgets where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - public int countByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of gadgets that the user has permission to view where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public int filterCountByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadget where companyId = ? and url = ? or throws a {@link com.liferay.opensocial.NoSuchGadgetException} if it could not be found. - * - * @param companyId the company ID - * @param url the url - * @return the matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget findByC_U(long companyId, - java.lang.String url) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadget where companyId = ? and url = ? or returns null if it could not be found. Uses the finder cache. - * - * @param companyId the company ID - * @param url the url - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget fetchByC_U(long companyId, - java.lang.String url) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadget where companyId = ? and url = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param companyId the company ID - * @param url the url - * @param retrieveFromCache whether to use the finder cache - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget fetchByC_U(long companyId, - java.lang.String url, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the gadget where companyId = ? and url = ? from the database. - * - * @param companyId the company ID - * @param url the url - * @return the gadget that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget removeByC_U(long companyId, - java.lang.String url) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of gadgets where companyId = ? and url = ?. - * - * @param companyId the company ID - * @param url the url - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - public int countByC_U(long companyId, java.lang.String url) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the gadget in the entity cache if it is enabled. - * - * @param gadget the gadget - */ - public void cacheResult(com.liferay.opensocial.model.Gadget gadget); - - /** - * Caches the gadgets in the entity cache if it is enabled. - * - * @param gadgets the gadgets - */ - public void cacheResult( - java.util.List gadgets); - - /** - * Creates a new gadget with the primary key. Does not add the gadget to the database. - * - * @param gadgetId the primary key for the new gadget - * @return the new gadget - */ - public com.liferay.opensocial.model.Gadget create(long gadgetId); - - /** - * Removes the gadget with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param gadgetId the primary key of the gadget - * @return the gadget that was removed - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget remove(long gadgetId) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.opensocial.model.Gadget updateImpl( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadget with the primary key or throws a {@link com.liferay.opensocial.NoSuchGadgetException} if it could not be found. - * - * @param gadgetId the primary key of the gadget - * @return the gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget findByPrimaryKey(long gadgetId) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the gadget with the primary key or returns null if it could not be found. - * - * @param gadgetId the primary key of the gadget - * @return the gadget, or null if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.Gadget fetchByPrimaryKey(long gadgetId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the gadgets. - * - * @return the gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of gadgets - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the gadgets from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of gadgets. - * - * @return the number of gadgets - * @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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetUtil.java deleted file mode 100644 index c935d72605..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/GadgetUtil.java +++ /dev/null @@ -1,1113 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.Gadget; - -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 java.util.List; - -/** - * The persistence utility for the gadget service. This utility wraps {@link GadgetPersistenceImpl} 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. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see GadgetPersistence - * @see GadgetPersistenceImpl - * @generated - */ -public class GadgetUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(Gadget gadget) { - getPersistence().clearCache(gadget); - } - - /** - * @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 findWithDynamicQuery(DynamicQuery dynamicQuery) - throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 Gadget update(Gadget gadget) throws SystemException { - return getPersistence().update(gadget); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static Gadget update(Gadget gadget, ServiceContext serviceContext) - throws SystemException { - return getPersistence().update(gadget, serviceContext); - } - - /** - * Returns all the gadgets where uuid = ?. - * - * @param uuid the uuid - * @return the matching gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid); - } - - /** - * Returns a range of all the gadgets where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end); - } - - /** - * Returns an ordered range of all the gadgets where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid(uuid, start, end, orderByComparator); - } - - /** - * Returns the first gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget findByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the first gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget fetchByUuid_First( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_First(uuid, orderByComparator); - } - - /** - * Returns the last gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget findByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the last gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget fetchByUuid_Last( - java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByUuid_Last(uuid, orderByComparator); - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set where uuid = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget[] findByUuid_PrevAndNext( - long gadgetId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_PrevAndNext(gadgetId, uuid, orderByComparator); - } - - /** - * Returns all the gadgets that the user has permission to view where uuid = ?. - * - * @param uuid the uuid - * @return the matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByUuid( - java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByUuid(uuid); - } - - /** - * Returns a range of all the gadgets that the user has permission to view where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByUuid( - java.lang.String uuid, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByUuid(uuid, start, end); - } - - /** - * Returns an ordered range of all the gadgets that the user has permissions to view where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByUuid( - java.lang.String uuid, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByUuid(uuid, start, end, orderByComparator); - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where uuid = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget[] filterFindByUuid_PrevAndNext( - long gadgetId, java.lang.String uuid, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByUuid_PrevAndNext(gadgetId, uuid, - orderByComparator); - } - - /** - * Removes all the gadgets where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid(uuid); - } - - /** - * Returns the number of gadgets where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static int countByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid(uuid); - } - - /** - * Returns the number of gadgets that the user has permission to view where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByUuid(java.lang.String uuid) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByUuid(uuid); - } - - /** - * Returns all the gadgets where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId); - } - - /** - * Returns a range of all the gadgets where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByUuid_C(uuid, companyId, start, end); - } - - /** - * Returns an ordered range of all the gadgets where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C(uuid, companyId, start, end, orderByComparator); - } - - /** - * Returns the first gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget findByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the first gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget fetchByUuid_C_First( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_First(uuid, companyId, orderByComparator); - } - - /** - * Returns the last gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget findByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the last gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget fetchByUuid_C_Last( - java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByUuid_C_Last(uuid, companyId, orderByComparator); - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget[] findByUuid_C_PrevAndNext( - long gadgetId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByUuid_C_PrevAndNext(gadgetId, uuid, companyId, - orderByComparator); - } - - /** - * Returns all the gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByUuid_C( - java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByUuid_C(uuid, companyId); - } - - /** - * Returns a range of all the gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByUuid_C( - java.lang.String uuid, long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByUuid_C(uuid, companyId, start, end); - } - - /** - * Returns an ordered range of all the gadgets that the user has permissions to view where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByUuid_C( - java.lang.String uuid, long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByUuid_C(uuid, companyId, start, end, - orderByComparator); - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget[] filterFindByUuid_C_PrevAndNext( - long gadgetId, java.lang.String uuid, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByUuid_C_PrevAndNext(gadgetId, uuid, companyId, - orderByComparator); - } - - /** - * Removes all the gadgets where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - public static void removeByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByUuid_C(uuid, companyId); - } - - /** - * Returns the number of gadgets where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static int countByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByUuid_C(uuid, companyId); - } - - /** - * Returns the number of gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByUuid_C(java.lang.String uuid, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByUuid_C(uuid, companyId); - } - - /** - * Returns all the gadgets where companyId = ?. - * - * @param companyId the company ID - * @return the matching gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByCompanyId(companyId); - } - - /** - * Returns a range of all the gadgets where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 gadgets where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget findByCompanyId_First( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByCompanyId_First(companyId, orderByComparator); - } - - /** - * Returns the first gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget 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 gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget findByCompanyId_Last( - long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByCompanyId_Last(companyId, orderByComparator); - } - - /** - * Returns the last gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget 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 gadgets before and after the current gadget in the ordered set where companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget[] findByCompanyId_PrevAndNext( - long gadgetId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByCompanyId_PrevAndNext(gadgetId, companyId, - orderByComparator); - } - - /** - * Returns all the gadgets that the user has permission to view where companyId = ?. - * - * @param companyId the company ID - * @return the matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByCompanyId( - long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByCompanyId(companyId); - } - - /** - * Returns a range of all the gadgets that the user has permission to view where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByCompanyId( - long companyId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterFindByCompanyId(companyId, start, end); - } - - /** - * Returns an ordered range of all the gadgets that the user has permissions to view where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static java.util.List filterFindByCompanyId( - long companyId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByCompanyId(companyId, start, end, - orderByComparator); - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget[] filterFindByCompanyId_PrevAndNext( - long gadgetId, long companyId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .filterFindByCompanyId_PrevAndNext(gadgetId, companyId, - orderByComparator); - } - - /** - * Removes all the gadgets 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 gadgets where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static int countByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByCompanyId(companyId); - } - - /** - * Returns the number of gadgets that the user has permission to view where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - public static int filterCountByCompanyId(long companyId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().filterCountByCompanyId(companyId); - } - - /** - * Returns the gadget where companyId = ? and url = ? or throws a {@link com.liferay.opensocial.NoSuchGadgetException} if it could not be found. - * - * @param companyId the company ID - * @param url the url - * @return the matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget findByC_U( - long companyId, java.lang.String url) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByC_U(companyId, url); - } - - /** - * Returns the gadget where companyId = ? and url = ? or returns null if it could not be found. Uses the finder cache. - * - * @param companyId the company ID - * @param url the url - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget fetchByC_U( - long companyId, java.lang.String url) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByC_U(companyId, url); - } - - /** - * Returns the gadget where companyId = ? and url = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param companyId the company ID - * @param url the url - * @param retrieveFromCache whether to use the finder cache - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget fetchByC_U( - long companyId, java.lang.String url, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByC_U(companyId, url, retrieveFromCache); - } - - /** - * Removes the gadget where companyId = ? and url = ? from the database. - * - * @param companyId the company ID - * @param url the url - * @return the gadget that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget removeByC_U( - long companyId, java.lang.String url) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().removeByC_U(companyId, url); - } - - /** - * Returns the number of gadgets where companyId = ? and url = ?. - * - * @param companyId the company ID - * @param url the url - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - public static int countByC_U(long companyId, java.lang.String url) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByC_U(companyId, url); - } - - /** - * Caches the gadget in the entity cache if it is enabled. - * - * @param gadget the gadget - */ - public static void cacheResult(com.liferay.opensocial.model.Gadget gadget) { - getPersistence().cacheResult(gadget); - } - - /** - * Caches the gadgets in the entity cache if it is enabled. - * - * @param gadgets the gadgets - */ - public static void cacheResult( - java.util.List gadgets) { - getPersistence().cacheResult(gadgets); - } - - /** - * Creates a new gadget with the primary key. Does not add the gadget to the database. - * - * @param gadgetId the primary key for the new gadget - * @return the new gadget - */ - public static com.liferay.opensocial.model.Gadget create(long gadgetId) { - return getPersistence().create(gadgetId); - } - - /** - * Removes the gadget with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param gadgetId the primary key of the gadget - * @return the gadget that was removed - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget remove(long gadgetId) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().remove(gadgetId); - } - - public static com.liferay.opensocial.model.Gadget updateImpl( - com.liferay.opensocial.model.Gadget gadget) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(gadget); - } - - /** - * Returns the gadget with the primary key or throws a {@link com.liferay.opensocial.NoSuchGadgetException} if it could not be found. - * - * @param gadgetId the primary key of the gadget - * @return the gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget findByPrimaryKey( - long gadgetId) - throws com.liferay.opensocial.NoSuchGadgetException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByPrimaryKey(gadgetId); - } - - /** - * Returns the gadget with the primary key or returns null if it could not be found. - * - * @param gadgetId the primary key of the gadget - * @return the gadget, or null if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.Gadget fetchByPrimaryKey( - long gadgetId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(gadgetId); - } - - /** - * Returns all the gadgets. - * - * @return the gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of gadgets - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 gadgets 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 gadgets. - * - * @return the number of gadgets - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static GadgetPersistence getPersistence() { - if (_persistence == null) { - _persistence = (GadgetPersistence)PortletBeanLocatorUtil.locate(com.liferay.opensocial.service.ClpSerializer.getServletContextName(), - GadgetPersistence.class.getName()); - - ReferenceRegistry.registerReference(GadgetUtil.class, "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(GadgetPersistence persistence) { - } - - private static GadgetPersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthConsumerActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthConsumerActionableDynamicQuery.java deleted file mode 100644 index 7914220237..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthConsumerActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.OAuthConsumer; -import com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public abstract class OAuthConsumerActionableDynamicQuery - extends BaseActionableDynamicQuery { - public OAuthConsumerActionableDynamicQuery() throws SystemException { - setBaseLocalService(OAuthConsumerLocalServiceUtil.getService()); - setClass(OAuthConsumer.class); - - setClassLoader(com.liferay.opensocial.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("oAuthConsumerId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthConsumerPersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthConsumerPersistence.java deleted file mode 100644 index 52e9930000..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthConsumerPersistence.java +++ /dev/null @@ -1,368 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.OAuthConsumer; - -import com.liferay.portal.service.persistence.BasePersistence; - -/** - * The persistence interface for the o auth consumer service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthConsumerPersistenceImpl - * @see OAuthConsumerUtil - * @generated - */ -public interface OAuthConsumerPersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link OAuthConsumerUtil} to access the o auth consumer persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the o auth consumers where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @return the matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGadgetKey( - java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the o auth consumers where gadgetKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGadgetKey( - java.lang.String gadgetKey, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the o auth consumers where gadgetKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public java.util.List findByGadgetKey( - java.lang.String gadgetKey, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer findByGadgetKey_First( - java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer fetchByGadgetKey_First( - java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer findByGadgetKey_Last( - java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer fetchByGadgetKey_Last( - java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth consumers before and after the current o auth consumer in the ordered set where gadgetKey = ?. - * - * @param oAuthConsumerId the primary key of the current o auth consumer - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer[] findByGadgetKey_PrevAndNext( - long oAuthConsumerId, java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the o auth consumers where gadgetKey = ? from the database. - * - * @param gadgetKey the gadget key - * @throws SystemException if a system exception occurred - */ - public void removeByGadgetKey(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of o auth consumers where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @return the number of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public int countByGadgetKey(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth consumer where gadgetKey = ? and serviceName = ? or throws a {@link com.liferay.opensocial.NoSuchOAuthConsumerException} if it could not be found. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the matching o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer findByG_S( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth consumer where gadgetKey = ? and serviceName = ? or returns null if it could not be found. Uses the finder cache. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer fetchByG_S( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth consumer where gadgetKey = ? and serviceName = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param retrieveFromCache whether to use the finder cache - * @return the matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer fetchByG_S( - java.lang.String gadgetKey, java.lang.String serviceName, - boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the o auth consumer where gadgetKey = ? and serviceName = ? from the database. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the o auth consumer that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer removeByG_S( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of o auth consumers where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the number of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public int countByG_S(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the o auth consumer in the entity cache if it is enabled. - * - * @param oAuthConsumer the o auth consumer - */ - public void cacheResult( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer); - - /** - * Caches the o auth consumers in the entity cache if it is enabled. - * - * @param oAuthConsumers the o auth consumers - */ - public void cacheResult( - java.util.List oAuthConsumers); - - /** - * Creates a new o auth consumer with the primary key. Does not add the o auth consumer to the database. - * - * @param oAuthConsumerId the primary key for the new o auth consumer - * @return the new o auth consumer - */ - public com.liferay.opensocial.model.OAuthConsumer create( - long oAuthConsumerId); - - /** - * Removes the o auth consumer with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer that was removed - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer remove( - long oAuthConsumerId) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.opensocial.model.OAuthConsumer updateImpl( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth consumer with the primary key or throws a {@link com.liferay.opensocial.NoSuchOAuthConsumerException} if it could not be found. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer findByPrimaryKey( - long oAuthConsumerId) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth consumer with the primary key or returns null if it could not be found. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer, or null if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthConsumer fetchByPrimaryKey( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the o auth consumers. - * - * @return the o auth consumers - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of o auth consumers - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of o auth consumers - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the o auth consumers from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of o auth consumers. - * - * @return the number of o auth consumers - * @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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthConsumerUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthConsumerUtil.java deleted file mode 100644 index 1e04bca2f4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthConsumerUtil.java +++ /dev/null @@ -1,523 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.OAuthConsumer; - -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 java.util.List; - -/** - * The persistence utility for the o auth consumer service. This utility wraps {@link OAuthConsumerPersistenceImpl} 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. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthConsumerPersistence - * @see OAuthConsumerPersistenceImpl - * @generated - */ -public class OAuthConsumerUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(OAuthConsumer oAuthConsumer) { - getPersistence().clearCache(oAuthConsumer); - } - - /** - * @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 findWithDynamicQuery( - DynamicQuery dynamicQuery) throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 OAuthConsumer update(OAuthConsumer oAuthConsumer) - throws SystemException { - return getPersistence().update(oAuthConsumer); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static OAuthConsumer update(OAuthConsumer oAuthConsumer, - ServiceContext serviceContext) throws SystemException { - return getPersistence().update(oAuthConsumer, serviceContext); - } - - /** - * Returns all the o auth consumers where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @return the matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGadgetKey( - java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGadgetKey(gadgetKey); - } - - /** - * Returns a range of all the o auth consumers where gadgetKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGadgetKey( - java.lang.String gadgetKey, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByGadgetKey(gadgetKey, start, end); - } - - /** - * Returns an ordered range of all the o auth consumers where gadgetKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByGadgetKey( - java.lang.String gadgetKey, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGadgetKey(gadgetKey, start, end, orderByComparator); - } - - /** - * Returns the first o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer findByGadgetKey_First( - java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGadgetKey_First(gadgetKey, orderByComparator); - } - - /** - * Returns the first o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer fetchByGadgetKey_First( - java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByGadgetKey_First(gadgetKey, orderByComparator); - } - - /** - * Returns the last o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer findByGadgetKey_Last( - java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGadgetKey_Last(gadgetKey, orderByComparator); - } - - /** - * Returns the last o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer fetchByGadgetKey_Last( - java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByGadgetKey_Last(gadgetKey, orderByComparator); - } - - /** - * Returns the o auth consumers before and after the current o auth consumer in the ordered set where gadgetKey = ?. - * - * @param oAuthConsumerId the primary key of the current o auth consumer - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer[] findByGadgetKey_PrevAndNext( - long oAuthConsumerId, java.lang.String gadgetKey, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByGadgetKey_PrevAndNext(oAuthConsumerId, gadgetKey, - orderByComparator); - } - - /** - * Removes all the o auth consumers where gadgetKey = ? from the database. - * - * @param gadgetKey the gadget key - * @throws SystemException if a system exception occurred - */ - public static void removeByGadgetKey(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByGadgetKey(gadgetKey); - } - - /** - * Returns the number of o auth consumers where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @return the number of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public static int countByGadgetKey(java.lang.String gadgetKey) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByGadgetKey(gadgetKey); - } - - /** - * Returns the o auth consumer where gadgetKey = ? and serviceName = ? or throws a {@link com.liferay.opensocial.NoSuchOAuthConsumerException} if it could not be found. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the matching o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer findByG_S( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(gadgetKey, serviceName); - } - - /** - * Returns the o auth consumer where gadgetKey = ? and serviceName = ? or returns null if it could not be found. Uses the finder cache. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer fetchByG_S( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByG_S(gadgetKey, serviceName); - } - - /** - * Returns the o auth consumer where gadgetKey = ? and serviceName = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param retrieveFromCache whether to use the finder cache - * @return the matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer fetchByG_S( - java.lang.String gadgetKey, java.lang.String serviceName, - boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S(gadgetKey, serviceName, retrieveFromCache); - } - - /** - * Removes the o auth consumer where gadgetKey = ? and serviceName = ? from the database. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the o auth consumer that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer removeByG_S( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().removeByG_S(gadgetKey, serviceName); - } - - /** - * Returns the number of o auth consumers where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the number of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - public static int countByG_S(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_S(gadgetKey, serviceName); - } - - /** - * Caches the o auth consumer in the entity cache if it is enabled. - * - * @param oAuthConsumer the o auth consumer - */ - public static void cacheResult( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) { - getPersistence().cacheResult(oAuthConsumer); - } - - /** - * Caches the o auth consumers in the entity cache if it is enabled. - * - * @param oAuthConsumers the o auth consumers - */ - public static void cacheResult( - java.util.List oAuthConsumers) { - getPersistence().cacheResult(oAuthConsumers); - } - - /** - * Creates a new o auth consumer with the primary key. Does not add the o auth consumer to the database. - * - * @param oAuthConsumerId the primary key for the new o auth consumer - * @return the new o auth consumer - */ - public static com.liferay.opensocial.model.OAuthConsumer create( - long oAuthConsumerId) { - return getPersistence().create(oAuthConsumerId); - } - - /** - * Removes the o auth consumer with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer that was removed - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer remove( - long oAuthConsumerId) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().remove(oAuthConsumerId); - } - - public static com.liferay.opensocial.model.OAuthConsumer updateImpl( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(oAuthConsumer); - } - - /** - * Returns the o auth consumer with the primary key or throws a {@link com.liferay.opensocial.NoSuchOAuthConsumerException} if it could not be found. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer findByPrimaryKey( - long oAuthConsumerId) - throws com.liferay.opensocial.NoSuchOAuthConsumerException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByPrimaryKey(oAuthConsumerId); - } - - /** - * Returns the o auth consumer with the primary key or returns null if it could not be found. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer, or null if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthConsumer fetchByPrimaryKey( - long oAuthConsumerId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(oAuthConsumerId); - } - - /** - * Returns all the o auth consumers. - * - * @return the o auth consumers - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of o auth consumers - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of o auth consumers - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 o auth consumers 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 o auth consumers. - * - * @return the number of o auth consumers - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static OAuthConsumerPersistence getPersistence() { - if (_persistence == null) { - _persistence = (OAuthConsumerPersistence)PortletBeanLocatorUtil.locate(com.liferay.opensocial.service.ClpSerializer.getServletContextName(), - OAuthConsumerPersistence.class.getName()); - - ReferenceRegistry.registerReference(OAuthConsumerUtil.class, - "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(OAuthConsumerPersistence persistence) { - } - - private static OAuthConsumerPersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthTokenActionableDynamicQuery.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthTokenActionableDynamicQuery.java deleted file mode 100644 index a603753f77..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthTokenActionableDynamicQuery.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.OAuthToken; -import com.liferay.opensocial.service.OAuthTokenLocalServiceUtil; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public abstract class OAuthTokenActionableDynamicQuery - extends BaseActionableDynamicQuery { - public OAuthTokenActionableDynamicQuery() throws SystemException { - setBaseLocalService(OAuthTokenLocalServiceUtil.getService()); - setClass(OAuthToken.class); - - setClassLoader(com.liferay.opensocial.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("oAuthTokenId"); - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthTokenPersistence.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthTokenPersistence.java deleted file mode 100644 index 46c2a6f4e9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthTokenPersistence.java +++ /dev/null @@ -1,397 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.OAuthToken; - -import com.liferay.portal.service.persistence.BasePersistence; - -/** - * The persistence interface for the o auth token service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthTokenPersistenceImpl - * @see OAuthTokenUtil - * @generated - */ -public interface OAuthTokenPersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link OAuthTokenUtil} to access the o auth token persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the o auth tokens where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the o auth tokens where gadgetKey = ? and serviceName = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - java.lang.String gadgetKey, java.lang.String serviceName, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the o auth tokens where gadgetKey = ? and serviceName = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public java.util.List findByG_S( - java.lang.String gadgetKey, java.lang.String serviceName, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken findByG_S_First( - java.lang.String gadgetKey, java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken fetchByG_S_First( - java.lang.String gadgetKey, java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken findByG_S_Last( - java.lang.String gadgetKey, java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken fetchByG_S_Last( - java.lang.String gadgetKey, java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth tokens before and after the current o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param oAuthTokenId the primary key of the current o auth token - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken[] findByG_S_PrevAndNext( - long oAuthTokenId, java.lang.String gadgetKey, - java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the o auth tokens where gadgetKey = ? and serviceName = ? from the database. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @throws SystemException if a system exception occurred - */ - public void removeByG_S(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of o auth tokens where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the number of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public int countByG_S(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? or throws a {@link com.liferay.opensocial.NoSuchOAuthTokenException} if it could not be found. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the matching o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken findByU_G_S_M_T( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? or returns null if it could not be found. Uses the finder cache. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken fetchByU_G_S_M_T( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @param retrieveFromCache whether to use the finder cache - * @return the matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken fetchByU_G_S_M_T( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? from the database. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the o auth token that was removed - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken removeByU_G_S_M_T( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of o auth tokens where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ?. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the number of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public int countByU_G_S_M_T(long userId, java.lang.String gadgetKey, - java.lang.String serviceName, long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the o auth token in the entity cache if it is enabled. - * - * @param oAuthToken the o auth token - */ - public void cacheResult(com.liferay.opensocial.model.OAuthToken oAuthToken); - - /** - * Caches the o auth tokens in the entity cache if it is enabled. - * - * @param oAuthTokens the o auth tokens - */ - public void cacheResult( - java.util.List oAuthTokens); - - /** - * Creates a new o auth token with the primary key. Does not add the o auth token to the database. - * - * @param oAuthTokenId the primary key for the new o auth token - * @return the new o auth token - */ - public com.liferay.opensocial.model.OAuthToken create(long oAuthTokenId); - - /** - * Removes the o auth token with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token that was removed - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken remove(long oAuthTokenId) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.opensocial.model.OAuthToken updateImpl( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth token with the primary key or throws a {@link com.liferay.opensocial.NoSuchOAuthTokenException} if it could not be found. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken findByPrimaryKey( - long oAuthTokenId) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the o auth token with the primary key or returns null if it could not be found. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token, or null if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public com.liferay.opensocial.model.OAuthToken fetchByPrimaryKey( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the o auth tokens. - * - * @return the o auth tokens - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of o auth tokens - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of o auth tokens - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the o auth tokens from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of o auth tokens. - * - * @return the number of o auth tokens - * @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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthTokenUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthTokenUtil.java deleted file mode 100644 index f647b60d66..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/service/com/liferay/opensocial/service/persistence/OAuthTokenUtil.java +++ /dev/null @@ -1,565 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.model.OAuthToken; - -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 java.util.List; - -/** - * The persistence utility for the o auth token service. This utility wraps {@link OAuthTokenPersistenceImpl} 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. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthTokenPersistence - * @see OAuthTokenPersistenceImpl - * @generated - */ -public class OAuthTokenUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml 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(OAuthToken oAuthToken) { - getPersistence().clearCache(oAuthToken); - } - - /** - * @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 findWithDynamicQuery( - DynamicQuery dynamicQuery) throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List 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 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 OAuthToken update(OAuthToken oAuthToken) - throws SystemException { - return getPersistence().update(oAuthToken); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static OAuthToken update(OAuthToken oAuthToken, - ServiceContext serviceContext) throws SystemException { - return getPersistence().update(oAuthToken, serviceContext); - } - - /** - * Returns all the o auth tokens where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - java.lang.String gadgetKey, java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(gadgetKey, serviceName); - } - - /** - * Returns a range of all the o auth tokens where gadgetKey = ? and serviceName = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - java.lang.String gadgetKey, java.lang.String serviceName, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByG_S(gadgetKey, serviceName, start, end); - } - - /** - * Returns an ordered range of all the o auth tokens where gadgetKey = ? and serviceName = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByG_S( - java.lang.String gadgetKey, java.lang.String serviceName, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S(gadgetKey, serviceName, start, end, - orderByComparator); - } - - /** - * Returns the first o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken findByG_S_First( - java.lang.String gadgetKey, java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S_First(gadgetKey, serviceName, orderByComparator); - } - - /** - * Returns the first o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken fetchByG_S_First( - java.lang.String gadgetKey, java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_First(gadgetKey, serviceName, orderByComparator); - } - - /** - * Returns the last o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken findByG_S_Last( - java.lang.String gadgetKey, java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S_Last(gadgetKey, serviceName, orderByComparator); - } - - /** - * Returns the last o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken fetchByG_S_Last( - java.lang.String gadgetKey, java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByG_S_Last(gadgetKey, serviceName, orderByComparator); - } - - /** - * Returns the o auth tokens before and after the current o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param oAuthTokenId the primary key of the current o auth token - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken[] findByG_S_PrevAndNext( - long oAuthTokenId, java.lang.String gadgetKey, - java.lang.String serviceName, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByG_S_PrevAndNext(oAuthTokenId, gadgetKey, serviceName, - orderByComparator); - } - - /** - * Removes all the o auth tokens where gadgetKey = ? and serviceName = ? from the database. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @throws SystemException if a system exception occurred - */ - public static void removeByG_S(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByG_S(gadgetKey, serviceName); - } - - /** - * Returns the number of o auth tokens where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the number of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public static int countByG_S(java.lang.String gadgetKey, - java.lang.String serviceName) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByG_S(gadgetKey, serviceName); - } - - /** - * Returns the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? or throws a {@link com.liferay.opensocial.NoSuchOAuthTokenException} if it could not be found. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the matching o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken findByU_G_S_M_T( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByU_G_S_M_T(userId, gadgetKey, serviceName, moduleId, - tokenName); - } - - /** - * Returns the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? or returns null if it could not be found. Uses the finder cache. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken fetchByU_G_S_M_T( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByU_G_S_M_T(userId, gadgetKey, serviceName, moduleId, - tokenName); - } - - /** - * Returns the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @param retrieveFromCache whether to use the finder cache - * @return the matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken fetchByU_G_S_M_T( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByU_G_S_M_T(userId, gadgetKey, serviceName, moduleId, - tokenName, retrieveFromCache); - } - - /** - * Removes the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? from the database. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the o auth token that was removed - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken removeByU_G_S_M_T( - long userId, java.lang.String gadgetKey, java.lang.String serviceName, - long moduleId, java.lang.String tokenName) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .removeByU_G_S_M_T(userId, gadgetKey, serviceName, moduleId, - tokenName); - } - - /** - * Returns the number of o auth tokens where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ?. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the number of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - public static int countByU_G_S_M_T(long userId, java.lang.String gadgetKey, - java.lang.String serviceName, long moduleId, java.lang.String tokenName) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .countByU_G_S_M_T(userId, gadgetKey, serviceName, moduleId, - tokenName); - } - - /** - * Caches the o auth token in the entity cache if it is enabled. - * - * @param oAuthToken the o auth token - */ - public static void cacheResult( - com.liferay.opensocial.model.OAuthToken oAuthToken) { - getPersistence().cacheResult(oAuthToken); - } - - /** - * Caches the o auth tokens in the entity cache if it is enabled. - * - * @param oAuthTokens the o auth tokens - */ - public static void cacheResult( - java.util.List oAuthTokens) { - getPersistence().cacheResult(oAuthTokens); - } - - /** - * Creates a new o auth token with the primary key. Does not add the o auth token to the database. - * - * @param oAuthTokenId the primary key for the new o auth token - * @return the new o auth token - */ - public static com.liferay.opensocial.model.OAuthToken create( - long oAuthTokenId) { - return getPersistence().create(oAuthTokenId); - } - - /** - * Removes the o auth token with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token that was removed - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken remove( - long oAuthTokenId) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().remove(oAuthTokenId); - } - - public static com.liferay.opensocial.model.OAuthToken updateImpl( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(oAuthToken); - } - - /** - * Returns the o auth token with the primary key or throws a {@link com.liferay.opensocial.NoSuchOAuthTokenException} if it could not be found. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken findByPrimaryKey( - long oAuthTokenId) - throws com.liferay.opensocial.NoSuchOAuthTokenException, - com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByPrimaryKey(oAuthTokenId); - } - - /** - * Returns the o auth token with the primary key or returns null if it could not be found. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token, or null if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static com.liferay.opensocial.model.OAuthToken fetchByPrimaryKey( - long oAuthTokenId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(oAuthTokenId); - } - - /** - * Returns all the o auth tokens. - * - * @return the o auth tokens - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of o auth tokens - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of o auth tokens - * @throws SystemException if a system exception occurred - */ - public static java.util.List 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 o auth tokens 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 o auth tokens. - * - * @return the number of o auth tokens - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static OAuthTokenPersistence getPersistence() { - if (_persistence == null) { - _persistence = (OAuthTokenPersistence)PortletBeanLocatorUtil.locate(com.liferay.opensocial.service.ClpSerializer.getServletContextName(), - OAuthTokenPersistence.class.getName()); - - ReferenceRegistry.registerReference(OAuthTokenUtil.class, - "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(OAuthTokenPersistence persistence) { - } - - private static OAuthTokenPersistence _persistence; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/indexes.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/indexes.properties deleted file mode 100644 index 4dc39dfc19..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/indexes.properties +++ /dev/null @@ -1,10 +0,0 @@ -IX_A6A89EB1=OpenSocial_Gadget.C_U -IX_729869EE=OpenSocial_Gadget.CompanyId -IX_E1F8627A=OpenSocial_Gadget.Uuid -IX_3C79316E=OpenSocial_Gadget.Uuid_C - -IX_8E715BF8=OpenSocial_OAuthConsumer.G_S -IX_47206618=OpenSocial_OAuthConsumer.GadgetKey - -IX_6C8CCC3D=OpenSocial_OAuthToken.G_S -IX_CDD35402=OpenSocial_OAuthToken.U_G_S_M_T \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/indexes.sql b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/indexes.sql deleted file mode 100644 index 28859ef335..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/indexes.sql +++ /dev/null @@ -1,10 +0,0 @@ -create index IX_729869EE on OpenSocial_Gadget (companyId); -create unique index IX_A6A89EB1 on OpenSocial_Gadget (companyId, url); -create index IX_E1F8627A on OpenSocial_Gadget (uuid_); -create index IX_3C79316E on OpenSocial_Gadget (uuid_, companyId); - -create index IX_47206618 on OpenSocial_OAuthConsumer (gadgetKey); -create index IX_8E715BF8 on OpenSocial_OAuthConsumer (gadgetKey, serviceName); - -create index IX_6C8CCC3D on OpenSocial_OAuthToken (gadgetKey, serviceName); -create index IX_CDD35402 on OpenSocial_OAuthToken (userId, gadgetKey, serviceName, moduleId, tokenName); \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/sequences.sql b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/sequences.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/tables.sql b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/tables.sql deleted file mode 100644 index 4724459c4b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/sql/tables.sql +++ /dev/null @@ -1,39 +0,0 @@ -create table OpenSocial_Gadget ( - uuid_ VARCHAR(75) null, - gadgetId LONG not null primary key, - companyId LONG, - createDate DATE null, - modifiedDate DATE null, - name VARCHAR(75) null, - url STRING null, - portletCategoryNames STRING null -); - -create table OpenSocial_OAuthConsumer ( - oAuthConsumerId LONG not null primary key, - companyId LONG, - createDate DATE null, - modifiedDate DATE null, - gadgetKey VARCHAR(75) null, - serviceName VARCHAR(75) null, - consumerKey VARCHAR(75) null, - consumerSecret TEXT null, - keyType VARCHAR(75) null -); - -create table OpenSocial_OAuthToken ( - oAuthTokenId LONG not null primary key, - companyId LONG, - userId LONG, - userName VARCHAR(75) null, - createDate DATE null, - modifiedDate DATE null, - gadgetKey VARCHAR(75) null, - serviceName VARCHAR(75) null, - moduleId LONG, - accessToken VARCHAR(75) null, - tokenName VARCHAR(75) null, - tokenSecret VARCHAR(75) null, - sessionHandle VARCHAR(75) null, - expiration LONG -); \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/base-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/base-spring.xml deleted file mode 100644 index 8e5edbab1f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/base-spring.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/cluster-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/cluster-spring.xml deleted file mode 100644 index cd5219ba85..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/cluster-spring.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/hibernate-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/hibernate-spring.xml deleted file mode 100644 index 27564a2f12..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/hibernate-spring.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml deleted file mode 100644 index 380d6975c4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/infrastructure-spring.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-all.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-all.xml deleted file mode 100644 index e4580c90ba..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-all.xml +++ /dev/null @@ -1,5494 +0,0 @@ - - - - - ConfigurationActionImpl - com.liferay.opensocial.adhocgadget.action.ConfigurationActionImpl - - - - processAction - - portletConfig - javax.portlet.PortletConfig - - - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - render - - portletConfig - javax.portlet.PortletConfig - - - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - - - - Exception - java.lang.Exception - - - - - getGadget - - portletConfig - javax.portlet.PortletConfig - - - - portletRequest - javax.portlet.PortletRequest - - - - - - - Exception - java.lang.Exception - - - - - - AdhocGadgetPortlet - com.liferay.opensocial.adhocgadget.portlet.AdhocGadgetPortlet - - - getGadget - - renderRequest - javax.portlet.RenderRequest - - - - - - - Exception - java.lang.Exception - - - - - - AdminPortletDataHandler - com.liferay.opensocial.admin.lar.AdminPortletDataHandler - - - AdminPortletDataHandler - - - doDeleteData - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - portletId - java.lang.String - - - - portletPreferences - javax.portlet.PortletPreferences - - - - - - - Exception - java.lang.Exception - - - - - doExportData - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - portletId - java.lang.String - - - - portletPreferences - javax.portlet.PortletPreferences - - - - - - - Exception - java.lang.Exception - - - - - doImportData - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - portletId - java.lang.String - - - - portletPreferences - javax.portlet.PortletPreferences - - - - data - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - exportGadget - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - gadgetsElement - com.liferay.portal.kernel.xml.Element - - - - gadget - com.liferay.opensocial.model.Gadget - - - - Exception - java.lang.Exception - - - - - getGadgetPath - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - gadget - com.liferay.opensocial.model.Gadget - - - - - - - - importGadget - - portletDataContext - com.liferay.portal.kernel.lar.PortletDataContext - - - - gadgetElement - com.liferay.portal.kernel.xml.Element - - - - gadget - com.liferay.opensocial.model.Gadget - - - - Exception - java.lang.Exception - - - - - _PORTLET_ID - - - - AdminPortlet - com.liferay.opensocial.admin.portlet.AdminPortlet - - - - deleteGadget - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - refreshGadgets - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateGadget - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - updateOAuthConsumers - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - doAddGadget - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - - - - Exception - java.lang.Exception - - - - - doUpdateGadget - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - - EditorPortlet - com.liferay.opensocial.editor.portlet.EditorPortlet - - - serveResource - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - updateGadget - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - serveAddFileEntry - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveAddFolder - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveDeleteFileEntry - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveDeleteFolder - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveException - - exception - java.lang.Exception - - - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - IOException - java.io.IOException - - - - - serveGetFileEntryContent - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveGetFolderChildren - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveGetRenderParameters - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveUpdateFileEntryContent - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveUpdateFileEntryTitle - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - serveUpdateFolderName - - resourceRequest - javax.portlet.ResourceRequest - - - - resourceResponse - javax.portlet.ResourceResponse - - - - Exception - java.lang.Exception - - - - - - BaseConfigurationAction - com.liferay.opensocial.gadget.action.BaseConfigurationAction - - - doProcessAction - - portletConfig - javax.portlet.PortletConfig - - - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - doRender - - portletConfig - javax.portlet.PortletConfig - - - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - Exception - java.lang.Exception - - - - - getGadget - - portletConfig - javax.portlet.PortletConfig - - - - portletRequest - javax.portlet.PortletRequest - - - - - - - Exception - java.lang.Exception - - - - - getUserPrefs - - portletConfig - javax.portlet.PortletConfig - - - - portletRequest - javax.portlet.PortletRequest - - - - - - - Exception - java.lang.Exception - - - - - hasUserPrefs - - portletConfig - javax.portlet.PortletConfig - - - - portletRequest - javax.portlet.PortletRequest - - - - - - - - - ConfigurationActionImpl - com.liferay.opensocial.gadget.action.ConfigurationActionImpl - - - processAction - - portletConfig - javax.portlet.PortletConfig - - - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - render - - portletConfig - javax.portlet.PortletConfig - - - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - - - - Exception - java.lang.Exception - - - - - getGadget - - portletConfig - javax.portlet.PortletConfig - - - - portletRequest - javax.portlet.PortletRequest - - - - - - - Exception - java.lang.Exception - - - - - - BaseGadgetPortlet - com.liferay.opensocial.gadget.portlet.BaseGadgetPortlet - - - render - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - IOException - java.io.IOException - - - - PortletException - javax.portlet.PortletException - - - - - checkExpando - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - Exception - java.lang.Exception - - - - - doRender - - renderRequest - javax.portlet.RenderRequest - - - - renderResponse - javax.portlet.RenderResponse - - - - Exception - java.lang.Exception - - - - - getGadget - - renderRequest - javax.portlet.RenderRequest - - - - - - - Exception - java.lang.Exception - - - - - getTitle - - renderRequest - javax.portlet.RenderRequest - - - - - - - - getView - - renderRequest - javax.portlet.RenderRequest - - - - gadgetSpec - org.apache.shindig.gadgets.spec.GadgetSpec - - - - - - - - overrideConfiguration - - gadgetSpec - org.apache.shindig.gadgets.spec.GadgetSpec - - - - portlet - com.liferay.portal.model.Portlet - - - - portletDisplay - com.liferay.portal.theme.PortletDisplay - - - - Exception - java.lang.Exception - - - - - PORTLET_NAME_PREFIX - - - - GadgetPortlet - com.liferay.opensocial.gadget.portlet.GadgetPortlet - - - getGadget - - renderRequest - javax.portlet.RenderRequest - - - - - - - Exception - java.lang.Exception - - - - - overrideConfiguration - - gadgetSpec - org.apache.shindig.gadgets.spec.GadgetSpec - - - - portlet - com.liferay.portal.model.Portlet - - - - portletDisplay - com.liferay.portal.theme.PortletDisplay - - - - Exception - java.lang.Exception - - - - - - OpenSocialHotDeployMessageListener - com.liferay.opensocial.messaging.OpenSocialHotDeployMessageListener - - - OpenSocialHotDeployMessageListener - - servletContextNames - java.lang.String - - - - - checkExpando - - Exception - java.lang.Exception - - - - - onDeploy - - message - com.liferay.portal.kernel.messaging.Message - - - - Exception - java.lang.Exception - - - - - onUndeploy - - message - com.liferay.portal.kernel.messaging.Message - - - - Exception - java.lang.Exception - - - - - verifyGadgets - - Exception - java.lang.Exception - - - - - _GADGETS_CATEGORY - - - - GadgetConstants - com.liferay.opensocial.model.impl.GadgetConstants - - - isAdhocGadget - - gadgetKey - java.lang.String - - - - - - - - isPublishedGadget - - gadgetKey - java.lang.String - - - - - - - - toAdhocGadgetId - - gadgetKey - java.lang.String - - - - - - - - toAdhocGadgetKey - - moduleId - long - - - - - - - - toPublishedGadgetId - - gadgetKey - java.lang.String - - - - - - - - toPublishedGadgetKey - - gadgetId - long - - - - - - - - ADHOC_PREFIX - - - PUBLISHED_PREFIX - - - - GadgetImpl - com.liferay.opensocial.model.impl.GadgetImpl - - - GadgetImpl - - - - OAuthConsumerImpl - com.liferay.opensocial.model.impl.OAuthConsumerImpl - - - OAuthConsumerImpl - - - getKeyName - - - - - - setKeyName - - keyName - java.lang.String - - - - - _keyName - - - - OAuthTokenImpl - com.liferay.opensocial.model.impl.OAuthTokenImpl - - - OAuthTokenImpl - - - - GadgetLocalServiceImpl - com.liferay.opensocial.service.impl.GadgetLocalServiceImpl - - - - - addGadget - - companyId - long - - - - url - java.lang.String - - - - portletCategoryNames - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteGadget - - gadget - com.liferay.opensocial.model.Gadget - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteGadget - - gadgetId - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - destroyGadget - - uuid - java.lang.String - - - - companyId - long - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - destroyGadgets - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - fetchGadget - - companyId - long - - - - url - java.lang.String - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGadget - - companyId - long - - - - url - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGadget - - uuid - java.lang.String - - - - companyId - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGadgets - - companyId - long - - - - start - int - - - - end - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGadgetsCount - - companyId - long - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - initGadget - - uuid - java.lang.String - - - - companyId - long - - - - gadgetId - long - - - - name - java.lang.String - - - - portletCategoryNames - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - initGadgets - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateGadget - - gadgetId - long - - - - portletCategoryNames - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - addPortletExtraInfo - - portlet - com.liferay.portal.model.Portlet - - - - portletApp - com.liferay.portal.model.PortletApp - - - - title - java.lang.String - - - - - getPortlet - - uuid - java.lang.String - - - - companyId - long - - - - name - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - getPortletId - - uuid - java.lang.String - - - - - - - - validate - - companyId - long - - - - url - java.lang.String - - - - portletCategoryNames - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - validate - - portletCategoryNames - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - _GADGET_PORTLET_ID - - - _GADGET_PORTLET_NAME - - - _portletsPool - - - - GadgetServiceImpl - com.liferay.opensocial.service.impl.GadgetServiceImpl - - - - addGadget - - companyId - long - - - - url - java.lang.String - - - - portletCategoryNames - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteGadget - - gadgetId - long - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateGadget - - gadgetId - long - - - - portletCategoryNames - java.lang.String - - - - serviceContext - com.liferay.portal.service.ServiceContext - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - - OAuthConsumerLocalServiceImpl - com.liferay.opensocial.service.impl.OAuthConsumerLocalServiceImpl - - - addOAuthConsumer - - companyId - long - - - - gadgetKey - java.lang.String - - - - serviceName - java.lang.String - - - - consumerKey - java.lang.String - - - - consumerSecret - java.lang.String - - - - keyType - java.lang.String - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteOAuthConsumer - - oAuthConsumerId - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteOAuthConsumer - - oAuthConsumer - com.liferay.opensocial.model.OAuthConsumer - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteOAuthConsumers - - gadgetKey - java.lang.String - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - fetchOAuthConsumer - - gadgetKey - java.lang.String - - - - serviceName - java.lang.String - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getOAuthConsumer - - gadgetKey - java.lang.String - - - - serviceName - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getOAuthConsumers - - gadgetKey - java.lang.String - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getOAuthConsumers - - gadgetKey - java.lang.String - - - - start - int - - - - end - int - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getOAuthConsumersCount - - gadgetKey - java.lang.String - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - updateOAuthConsumer - - oAuthConsumerId - long - - - - consumerKey - java.lang.String - - - - consumerSecret - java.lang.String - - - - keyType - java.lang.String - - - - keyName - java.lang.String - - - - callbackURL - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - - OAuthTokenLocalServiceImpl - com.liferay.opensocial.service.impl.OAuthTokenLocalServiceImpl - - - addOAuthToken - - userId - long - - - - gadgetKey - java.lang.String - - - - serviceName - java.lang.String - - - - moduleId - long - - - - accessToken - java.lang.String - - - - tokenName - java.lang.String - - - - tokenSecret - java.lang.String - - - - sessionHandle - java.lang.String - - - - expiration - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteOAuthToken - - userId - long - - - - gadgetKey - java.lang.String - - - - serviceName - java.lang.String - - - - moduleId - long - - - - tokenName - java.lang.String - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - deleteOAuthTokens - - gadgetKey - java.lang.String - - - - serviceName - java.lang.String - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - fetchOAuthToken - - userId - long - - - - gadgetKey - java.lang.String - - - - serviceName - java.lang.String - - - - moduleId - long - - - - tokenName - java.lang.String - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getOAuthToken - - userId - long - - - - gadgetKey - java.lang.String - - - - serviceName - java.lang.String - - - - moduleId - long - - - - tokenName - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getOAuthTokens - - gadgetKey - java.lang.String - - - - serviceName - java.lang.String - - - - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - - LiferayJsonContainerConfig - com.liferay.opensocial.shindig.config.LiferayJsonContainerConfig - - - LiferayJsonContainerConfig - - containers - java.lang.String - - - - expressions - org.apache.shindig.expressions.Expressions - - - - org.apache.shindig.config.ContainerConfigException - org.apache.shindig.config.ContainerConfigException - - - - - getString - - container - java.lang.String - - - - property - java.lang.String - - - - - - - - - LiferayModule - com.liferay.opensocial.shindig.guice.LiferayModule - - - configure - - - - LiferayOAuthModule - com.liferay.opensocial.shindig.oauth.LiferayOAuthModule - - - configure - - - - LiferayOAuthStore - com.liferay.opensocial.shindig.oauth.LiferayOAuthStore - - - LiferayOAuthStore - - oAuthConsumer - com.liferay.opensocial.model.OAuthConsumer - - - - - getConsumerKeyAndSecret - - securityToken - org.apache.shindig.auth.SecurityToken - - - - serviceName - java.lang.String - - - - oAuthServiceProvider - net.oauth.OAuthServiceProvider - - - - - - - org.apache.shindig.gadgets.GadgetException - org.apache.shindig.gadgets.GadgetException - - - - - getTokenInfo - - securityToken - org.apache.shindig.auth.SecurityToken - - - - consumerInfo - ConsumerInfo - - - - serviceName - java.lang.String - - - - tokenName - java.lang.String - - - - - - - org.apache.shindig.gadgets.GadgetException - org.apache.shindig.gadgets.GadgetException - - - - - removeToken - - securityToken - org.apache.shindig.auth.SecurityToken - - - - consumerInfo - ConsumerInfo - - - - serviceName - java.lang.String - - - - tokenName - java.lang.String - - - - org.apache.shindig.gadgets.GadgetException - org.apache.shindig.gadgets.GadgetException - - - - - setTokenInfo - - securityToken - org.apache.shindig.auth.SecurityToken - - - - consumerInfo - ConsumerInfo - - - - serviceName - java.lang.String - - - - tokenName - java.lang.String - - - - tokenInfo - TokenInfo - - - - org.apache.shindig.gadgets.GadgetException - org.apache.shindig.gadgets.GadgetException - - - - - getOAuthConsumer - - securityToken - org.apache.shindig.auth.SecurityToken - - - - serviceName - java.lang.String - - - - - - - org.apache.shindig.gadgets.GadgetException - org.apache.shindig.gadgets.GadgetException - - - - - getOAuthToken - - securityToken - org.apache.shindig.auth.SecurityToken - - - - serviceName - java.lang.String - - - - tokenName - java.lang.String - - - - - - - org.apache.shindig.gadgets.GadgetException - org.apache.shindig.gadgets.GadgetException - - - - - _callbackURL - - - _oAuthConsumer - - - - LiferayOAuthStoreProvider - com.liferay.opensocial.shindig.oauth.LiferayOAuthStoreProvider - - - LiferayOAuthStoreProvider - - - get - - - - - - _convertFromOpenSsl - - key - java.lang.String - - - - - - - - _getOAuthConsumer - - keyFileName - java.lang.String - - - - keyName - java.lang.String - - - - - - - - _DEFAULT_CONSUMER_KEY - - - _DEFAULT_SERVICE_NAME - - - _KEY_DIR - - - _OPEN_SSL_A_Z - - - _log - - - _oAuthStore - - - - LiferayActivityService - com.liferay.opensocial.shindig.service.LiferayActivityService - - - createActivity - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - activity - org.apache.shindig.social.opensocial.model.Activity - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - deleteActivities - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - activityIds - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - doCreateActivity - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - activity - org.apache.shindig.social.opensocial.model.Activity - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - doDeleteActivities - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - activityIds - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - doGetActivities - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doGetActivities - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - activityIds - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doGetActivity - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - activityId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - getActivities - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getActivities - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - activityIds - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getActivity - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - activityId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getActivities - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - userId - long - - - - - - - Exception - java.lang.Exception - - - - - getActivity - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - socialActivity - com.liferay.portlet.social.model.SocialActivity - - - - - - - Exception - java.lang.Exception - - - - - getExternalActivity - - socialActivity - com.liferay.portlet.social.model.SocialActivity - - - - - - - Exception - java.lang.Exception - - - - - getMediaItems - - mediaItemsJSONArray - com.liferay.portal.kernel.json.JSONArray - - - - - - - - getMediaItems - - mediaItems - java.util.List - - - - - - - - getTemplateParams - - templateParamsJSONArray - com.liferay.portal.kernel.json.JSONArray - - - - - - - - getTemplateParams - - map - java.util.Map - - - - - - - - getThemeDisplay - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - _ACTIVITY_FIELDS - - - _log - - - - LiferayAlbumService - com.liferay.opensocial.shindig.service.LiferayAlbumService - - - createAlbum - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - album - org.apache.shindig.social.opensocial.model.Album - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - deleteAlbum - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getAlbum - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - albumId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getAlbums - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getAlbums - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - albumIds - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - updateAlbum - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - album - org.apache.shindig.social.opensocial.model.Album - - - - albumId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - doCreateAlbum - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - album - org.apache.shindig.social.opensocial.model.Album - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - doDeleteAlbum - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - doGetAlbum - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - albumId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doGetAlbums - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doGetAlbums - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - albumIds - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doUpdateAlbum - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - album - org.apache.shindig.social.opensocial.model.Album - - - - albumId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - toAlbum - - folder - com.liferay.portal.kernel.repository.model.Folder - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - JSONException - com.liferay.portal.kernel.json.JSONException - - - - - _ALBUM_FIELDS - - - _log - - - - LiferayAppDataService - com.liferay.opensocial.shindig.service.LiferayAppDataService - - - deletePersonData - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getPersonData - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - updatePersonData - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - values - java.util.Map - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - doDeletePersonData - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - doGetPersonData - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doUpdatePersonData - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - values - java.util.Map - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - getColumnName - - appId - java.lang.String - - - - field - java.lang.String - - - - - - - - getCompanyId - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - getExpandoColumn - - companyId - long - - - - columnName - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - getExpandoColumns - - companyId - long - - - - appId - java.lang.String - - - - - - - - getExpandoValue - - companyId - long - - - - appId - java.lang.String - - - - userId - long - - - - columnName - java.lang.String - - - - - - - - _log - - - - LiferayMediaItemService - com.liferay.opensocial.shindig.service.LiferayMediaItemService - - - createMediaItem - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItem - org.apache.shindig.social.opensocial.model.MediaItem - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - deleteMediaItem - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItemId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getMediaItem - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItemId - java.lang.String - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getMediaItems - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getMediaItems - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getMediaItems - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItemIds - java.util.Set - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - updateMediaItem - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItemId - java.lang.String - - - - mediaItem - org.apache.shindig.social.opensocial.model.MediaItem - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - doCreateMediaItem - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItem - org.apache.shindig.social.opensocial.model.MediaItem - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - doDeleteMediaItem - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItemId - java.lang.String - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - doGetMediaItem - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItemId - java.lang.String - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doGetMediaItems - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - appId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doGetMediaItems - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doGetMediaItems - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItemIds - java.util.Set - - - - fields - java.util.Set - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doUpdateMediaItem - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - appId - java.lang.String - - - - albumId - java.lang.String - - - - mediaItemId - java.lang.String - - - - mediaItem - org.apache.shindig.social.opensocial.model.MediaItem - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - Exception - java.lang.Exception - - - - - getFileName - - mediaItem - org.apache.shindig.social.opensocial.model.MediaItem - - - - options - com.liferay.portal.kernel.util.Http.Options - - - - - - - - toMediaItem - - fileEntry - com.liferay.portal.kernel.repository.model.FileEntry - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - toMediaItemType - - fileName - java.lang.String - - - - - - - - _MEDIA_ITEM_FIELDS - - - _log - - - _fileNamePattern - - - - LiferayPersonService - com.liferay.opensocial.shindig.service.LiferayPersonService - - - getPeople - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - getPerson - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - org.apache.shindig.protocol.ProtocolException - org.apache.shindig.protocol.ProtocolException - - - - - doGetPeople - - userIds - java.util.Set - - - - groupId - org.apache.shindig.social.opensocial.spi.GroupId - - - - collectionOptions - org.apache.shindig.social.opensocial.spi.CollectionOptions - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - doGetPerson - - userId - org.apache.shindig.social.opensocial.spi.UserId - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - getEmails - - user - com.liferay.portal.model.User - - - - - - - Exception - java.lang.Exception - - - - - getGroupPerson - - groupId - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - getPhoneNumbers - - className - java.lang.String - - - - classPK - long - - - - - - - Exception - java.lang.Exception - - - - - getUserPerson - - user - com.liferay.portal.model.User - - - - fields - java.util.Set - - - - securityToken - org.apache.shindig.auth.SecurityToken - - - - - - - Exception - java.lang.Exception - - - - - _log - - - - AuthenticationServletFilter - com.liferay.opensocial.shindig.servlet.AuthenticationServletFilter - - - doFilter - - servletRequest - javax.servlet.ServletRequest - - - - servletResponse - javax.servlet.ServletResponse - - - - filterChain - javax.servlet.FilterChain - - - - IOException - java.io.IOException - - - - ServletException - javax.servlet.ServletException - - - - - init - - filterConfig - javax.servlet.FilterConfig - - - - ServletException - javax.servlet.ServletException - - - - - _init - - servletContext - javax.servlet.ServletContext - - - - ServletException - javax.servlet.ServletException - - - - - - GuiceServletContextListener - com.liferay.opensocial.shindig.servlet.GuiceServletContextListener - - - contextDestroyed - - servletContextEvent - javax.servlet.ServletContextEvent - - - - - contextInitialized - - servletContextEvent - javax.servlet.ServletContextEvent - - - - - doPortalDestroy - - Exception - java.lang.Exception - - - - - doPortalInit - - Exception - java.lang.Exception - - - - - _guiceServletContextListener - - - _initializedServletContextEvent - - - - ShindigFilter - com.liferay.opensocial.shindig.servlet.ShindigFilter - - - - destroy - - - doFilter - - servletRequest - javax.servlet.ServletRequest - - - - servletResponse - javax.servlet.ServletResponse - - - - filterChain - javax.servlet.FilterChain - - - - IOException - java.io.IOException - - - - ServletException - javax.servlet.ServletException - - - - - init - - filterConfig - javax.servlet.FilterConfig - - - - ServletException - javax.servlet.ServletException - - - - - setPermissionChecker - - servletRequest - javax.servlet.ServletRequest - - - - - - - - _init - - servletContext - javax.servlet.ServletContext - - - - ServletException - javax.servlet.ServletException - - - - - _log - - - - HttpServletRequestThreadLocal - com.liferay.opensocial.shindig.util.HttpServletRequestThreadLocal - - - getHttpServletRequest - - - - - - setHttpServletRequest - - httpServletRequest - javax.servlet.http.HttpServletRequest - - - - - _httpServletRequest - - - - SerializerUtil - com.liferay.opensocial.shindig.util.SerializerUtil - - - copyProperties - - jsonObject - com.liferay.portal.kernel.json.JSONObject - - - - bean - java.lang.Object - - - - fields - java.lang.Object[] - - - - JSONException - com.liferay.portal.kernel.json.JSONException - - - - - copyProperties - - map - java.util.Map - - - - bean - java.lang.Object - - - - fields - java.lang.Object[] - - - - JSONException - com.liferay.portal.kernel.json.JSONException - - - - - copyProperties - - bean - java.lang.Object - - - - jsonObject - com.liferay.portal.kernel.json.JSONObject - - - - fields - java.lang.Object[] - - - - - copyProperties - - bean - java.lang.Object - - - - map - java.util.Map - - - - fields - java.lang.Object[] - - - - - copyProperty - - jsonObject - com.liferay.portal.kernel.json.JSONObject - - - - bean - java.lang.Object - - - - field - java.lang.Object - - - - JSONException - com.liferay.portal.kernel.json.JSONException - - - - - copyProperty - - map - java.util.Map - - - - bean - java.lang.Object - - - - field - java.lang.Object - - - - JSONException - com.liferay.portal.kernel.json.JSONException - - - - - copyProperty - - bean - java.lang.Object - - - - jsonObject - com.liferay.portal.kernel.json.JSONObject - - - - field - java.lang.Object - - - - - copyProperty - - bean - java.lang.Object - - - - map - java.util.Map - - - - field - java.lang.Object - - - - - toExpandoAttributes - - bean - java.lang.Object - - - - fields - java.lang.Object[] - - - - companyId - long - - - - className - java.lang.String - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - - getBeanProperty - - bean - java.lang.Object - - - - fieldName - java.lang.String - - - - - - - - setBeanProperty - - bean - java.lang.Object - - - - fieldName - java.lang.String - - - - value - java.lang.String - - - - JSONException - com.liferay.portal.kernel.json.JSONException - - - - - _ADDRESS_FIELDS - - - - ShindigUtil - com.liferay.opensocial.shindig.util.ShindigUtil - - - - clearGadgetSpecCache - - url - java.lang.String - - - - - createSecurityToken - - ownerId - java.lang.String - - - - viewerId - long - - - - appId - java.lang.String - - - - domain - java.lang.String - - - - appUrl - java.lang.String - - - - moduleId - long - - - - activeUrl - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - getColumnUserPrefs - - namespace - java.lang.String - - - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - - - - - getFileEntryURL - - portalURL - java.lang.String - - - - fileEntryId - long - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getGadget - - portletPreferences - javax.portlet.PortletPreferences - - - - - - - Exception - java.lang.Exception - - - - - getGadget - - portletName - java.lang.String - - - - companyId - long - - - - - - - Exception - java.lang.Exception - - - - - getGadgetEditorRootFolder - - repositoryId - long - - - - - - - Exception - java.lang.Exception - - - - - getGadgetSpec - - url - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - getGadgetSpec - - url - java.lang.String - - - - debug - boolean - - - - ignoreCache - boolean - - - - - - - Exception - java.lang.Exception - - - - - getHost - - - - - - getModuleId - - namespace - java.lang.String - - - - - - - - getOAuthServices - - url - java.lang.String - - - - - - - Exception - java.lang.Exception - - - - - getOwnerId - - layout - com.liferay.portal.model.Layout - - - - - - - PortalException - com.liferay.portal.kernel.exception.PortalException - - - - SystemException - com.liferay.portal.kernel.exception.SystemException - - - - - getPortletResourceNamespace - - portletRequest - javax.portlet.PortletRequest - - - - themeDisplay - com.liferay.portal.theme.ThemeDisplay - - - - - - - Exception - java.lang.Exception - - - - - getScheme - - - - - - getTableOpenSocial - - - - - - hasUserPrefs - - gadgetSpec - org.apache.shindig.gadgets.spec.GadgetSpec - - - - - - - Exception - java.lang.Exception - - - - - hasUserPrefs - - userPrefs - java.util.Map - - - - - - - Exception - java.lang.Exception - - - - - isContentValid - - content - java.lang.String - - - - - - - - isValidUser - - user - com.liferay.portal.model.User - - - - - - - - setHost - - host - java.lang.String - - - - - setScheme - - scheme - java.lang.String - - - - - transformURL - - url - java.lang.String - - - - - - - - updateOAuthConsumers - - actionRequest - javax.portlet.ActionRequest - - - - actionResponse - javax.portlet.ActionResponse - - - - Exception - java.lang.Exception - - - - - _COLUMN_USER_PREFS - - - _GADGET_EDITOR_ROOT_FOLDER_NAME - - - _TABLE_OPEN_SOCIAL - - - _basicSecurityTokenCodec - - - _containerConfig - - - _host - - - _ignoreGadgetSpecCache - - - _processor - - - _scheme - - - - ActionKeys - com.liferay.opensocial.util.ActionKeys - - - PUBLISH_GADGET - - - - PortletPropsKeys - com.liferay.opensocial.util.PortletPropsKeys - - - PUBSUB_URI_LOAD_TIMEOUT - - - SHINDIG_JS_DEBUG - - - SHINDIG_NO_CACHE - - - SHINDIG_OAUTH_CALLBACK_URL - - - SHINDIG_OAUTH_KEY_FILE_NAME - - - SHINDIG_OAUTH_KEY_NAME - - - - PortletPropsValues - com.liferay.opensocial.util.PortletPropsValues - - - PUBSUB_URI_LOAD_TIMEOUT - - - SHINDIG_JS_DEBUG - - - SHINDIG_NO_CACHE - - - SHINDIG_OAUTH_CALLBACK_URL - - - SHINDIG_OAUTH_KEY_FILE_NAME - - - SHINDIG_OAUTH_KEY_NAME - - - - WebKeys - com.liferay.opensocial.util.WebKeys - - - GADGET - - - OAUTH_SERVICES - - - USER_PREFS - - - VIEW - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-rt.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-rt.xml deleted file mode 100644 index 3b5337821a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/javadocs-rt.xml +++ /dev/null @@ -1,2 +0,0 @@ - -GadgetLocalServiceImplcom.liferay.opensocial.service.impl.GadgetLocalServiceImpladdGadgetcompanyIdlongurljava.lang.StringportletCategoryNamesjava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteGadgetgadgetcom.liferay.opensocial.model.GadgetSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteGadgetgadgetIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondestroyGadgetuuidjava.lang.StringcompanyIdlongSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondestroyGadgetsSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionfetchGadgetcompanyIdlongurljava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGadgetcompanyIdlongurljava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGadgetuuidjava.lang.StringcompanyIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGadgetscompanyIdlongstartintendintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetGadgetsCountcompanyIdlongSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptioninitGadgetuuidjava.lang.StringcompanyIdlonggadgetIdlongnamejava.lang.StringportletCategoryNamesjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptioninitGadgetsPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateGadgetgadgetIdlongportletCategoryNamesjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionaddPortletExtraInfoportletcom.liferay.portal.model.PortletportletAppcom.liferay.portal.model.PortletApptitlejava.lang.StringgetPortletuuidjava.lang.StringcompanyIdlongnamejava.lang.StringExceptionjava.lang.ExceptiongetPortletIduuidjava.lang.StringvalidatecompanyIdlongurljava.lang.StringportletCategoryNamesjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionvalidateportletCategoryNamesjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalException_GADGET_PORTLET_ID_GADGET_PORTLET_NAME_portletsPoolGadgetServiceImplcom.liferay.opensocial.service.impl.GadgetServiceImpladdGadgetcompanyIdlongurljava.lang.StringportletCategoryNamesjava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteGadgetgadgetIdlongserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateGadgetgadgetIdlongportletCategoryNamesjava.lang.StringserviceContextcom.liferay.portal.service.ServiceContextPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionOAuthConsumerLocalServiceImplcom.liferay.opensocial.service.impl.OAuthConsumerLocalServiceImpladdOAuthConsumercompanyIdlonggadgetKeyjava.lang.StringserviceNamejava.lang.StringconsumerKeyjava.lang.StringconsumerSecretjava.lang.StringkeyTypejava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteOAuthConsumeroAuthConsumerIdlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteOAuthConsumeroAuthConsumercom.liferay.opensocial.model.OAuthConsumerSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteOAuthConsumersgadgetKeyjava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionfetchOAuthConsumergadgetKeyjava.lang.StringserviceNamejava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetOAuthConsumergadgetKeyjava.lang.StringserviceNamejava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetOAuthConsumersgadgetKeyjava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetOAuthConsumersgadgetKeyjava.lang.StringstartintendintSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetOAuthConsumersCountgadgetKeyjava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionupdateOAuthConsumeroAuthConsumerIdlongconsumerKeyjava.lang.StringconsumerSecretjava.lang.StringkeyTypejava.lang.StringkeyNamejava.lang.StringcallbackURLjava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionOAuthTokenLocalServiceImplcom.liferay.opensocial.service.impl.OAuthTokenLocalServiceImpladdOAuthTokenuserIdlonggadgetKeyjava.lang.StringserviceNamejava.lang.StringmoduleIdlongaccessTokenjava.lang.StringtokenNamejava.lang.StringtokenSecretjava.lang.StringsessionHandlejava.lang.StringexpirationlongPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteOAuthTokenuserIdlonggadgetKeyjava.lang.StringserviceNamejava.lang.StringmoduleIdlongtokenNamejava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiondeleteOAuthTokensgadgetKeyjava.lang.StringserviceNamejava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptionfetchOAuthTokenuserIdlonggadgetKeyjava.lang.StringserviceNamejava.lang.StringmoduleIdlongtokenNamejava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetOAuthTokenuserIdlonggadgetKeyjava.lang.StringserviceNamejava.lang.StringmoduleIdlongtokenNamejava.lang.StringPortalExceptioncom.liferay.portal.kernel.exception.PortalExceptionSystemExceptioncom.liferay.portal.kernel.exception.SystemExceptiongetOAuthTokensgadgetKeyjava.lang.StringserviceNamejava.lang.StringSystemExceptioncom.liferay.portal.kernel.exception.SystemException \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/messaging-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/messaging-spring.xml deleted file mode 100644 index 26efedd77f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/messaging-spring.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-hbm.xml deleted file mode 100644 index 781e53cea8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-hbm.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml deleted file mode 100644 index de26c92e68..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - 4000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-orm.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-orm.xml deleted file mode 100644 index 2285ab125d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-orm.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - PROPERTY - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - - - - - - - - - - - - - - - TIMESTAMP - - - TIMESTAMP - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-spring.xml deleted file mode 100644 index a3a7125300..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/portlet-spring.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml deleted file mode 100644 index fe293f420e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/META-INF/shard-data-source-spring.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/adhocgadget/action/ConfigurationActionImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/adhocgadget/action/ConfigurationActionImpl.java deleted file mode 100644 index 1d36931c85..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/adhocgadget/action/ConfigurationActionImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * 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 com.liferay.opensocial.adhocgadget.action; - -import com.liferay.opensocial.gadget.action.BaseConfigurationAction; -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.opensocial.util.WebKeys; -import com.liferay.portal.kernel.servlet.SessionErrors; -import com.liferay.portal.kernel.servlet.SessionMessages; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.util.PortalUtil; - -import java.util.Map; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequest; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import org.apache.shindig.gadgets.spec.OAuthService; - -/** - * @author Michael Young - * @author Dennis Ju - */ -public class ConfigurationActionImpl extends BaseConfigurationAction { - - @Override - public void processAction( - PortletConfig portletConfig, ActionRequest actionRequest, - ActionResponse actionResponse) - throws Exception { - - String tabs2 = ParamUtil.get(actionRequest, "tabs2", "gadget"); - - if (tabs2.equals("manage-oauth")) { - ShindigUtil.updateOAuthConsumers(actionRequest, actionResponse); - - String portletResource = ParamUtil.getString( - actionRequest, "portletResource"); - - SessionMessages.add( - actionRequest, - PortalUtil.getPortletId(actionRequest) + - SessionMessages.KEY_SUFFIX_REFRESH_PORTLET, - portletResource); - - SessionMessages.add( - actionRequest, - PortalUtil.getPortletId(actionRequest) + - SessionMessages.KEY_SUFFIX_UPDATED_CONFIGURATION); - } - else if (tabs2.equals("preferences")) { - doProcessAction(portletConfig, actionRequest, actionResponse); - } - else { - String url = getParameter(actionRequest, "url"); - - try { - ShindigUtil.getGadgetSpec(url, false, true); - } - catch (Exception e) { - SessionErrors.add(actionRequest, e.getClass()); - } - - setPreference(actionRequest, "url", url); - - super.processAction(portletConfig, actionRequest, actionResponse); - } - } - - @Override - public String render( - PortletConfig portletConfig, RenderRequest renderRequest, - RenderResponse renderResponse) - throws Exception { - - if (hasUserPrefs(portletConfig, renderRequest)) { - doRender(portletConfig, renderRequest, renderResponse); - } - - try { - Gadget gadget = getGadget(portletConfig, renderRequest); - - Map oAuthServices = - ShindigUtil.getOAuthServices(gadget.getUrl()); - - renderRequest.setAttribute(WebKeys.OAUTH_SERVICES, oAuthServices); - } - catch (Exception e) { - } - - return "/adhoc_gadget/configuration.jsp"; - } - - @Override - protected Gadget getGadget( - PortletConfig portletConfig, PortletRequest portletRequest) - throws Exception { - - String portletResource = ParamUtil.getString( - portletRequest, "portletResource"); - - PortletPreferences portletPreferences = portletRequest.getPreferences(); - - return ShindigUtil.getGadget(portletPreferences); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/adhocgadget/portlet/AdhocGadgetPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/adhocgadget/portlet/AdhocGadgetPortlet.java deleted file mode 100644 index 243f3f05c1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/adhocgadget/portlet/AdhocGadgetPortlet.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * 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 com.liferay.opensocial.adhocgadget.portlet; - -import com.liferay.opensocial.gadget.portlet.BaseGadgetPortlet; -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.Portlet; -import com.liferay.portlet.PortletPreferencesFactoryUtil; - -import javax.portlet.PortletPreferences; -import javax.portlet.RenderRequest; - -/** - * @author Michael Young - */ -public class AdhocGadgetPortlet extends BaseGadgetPortlet { - - @Override - protected Gadget getGadget(RenderRequest renderRequest) throws Exception { - Portlet portlet = (Portlet)renderRequest.getAttribute( - WebKeys.RENDER_PORTLET); - - PortletPreferences portletPreferences = - PortletPreferencesFactoryUtil.getPortletSetup( - renderRequest, portlet.getPortletId()); - - return ShindigUtil.getGadget(portletPreferences); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/admin/lar/AdminPortletDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/admin/lar/AdminPortletDataHandler.java deleted file mode 100644 index 676c5e1a5a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/admin/lar/AdminPortletDataHandler.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * 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 com.liferay.opensocial.admin.lar; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; -import com.liferay.opensocial.service.permission.GadgetPermission; -import com.liferay.opensocial.service.persistence.GadgetExportActionableDynamicQuery; -import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; -import com.liferay.portal.kernel.lar.BasePortletDataHandler; -import com.liferay.portal.kernel.lar.DataLevel; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil; -import com.liferay.portal.kernel.lar.StagedModelType; -import com.liferay.portal.kernel.xml.Element; - -import java.util.List; - -import javax.portlet.PortletPreferences; - -/** - * @author Michael C. Han - */ -public class AdminPortletDataHandler extends BasePortletDataHandler { - - public AdminPortletDataHandler() { - setDataLevel(DataLevel.PORTAL); - setDeletionSystemEventStagedModelTypes( - new StagedModelType(Gadget.class)); - setPublishToLiveByDefault(true); - } - - @Override - protected PortletPreferences doDeleteData( - PortletDataContext portletDataContext, String portletId, - PortletPreferences portletPreferences) - throws Exception { - - if (portletDataContext.addPrimaryKey( - AdminPortletDataHandler.class, "deleteData")) { - - return portletPreferences; - } - - GadgetLocalServiceUtil.deleteGadgets(portletDataContext.getCompanyId()); - - return portletPreferences; - } - - @Override - protected String doExportData( - final PortletDataContext portletDataContext, String portletId, - PortletPreferences portletPreferences) - throws Exception { - - Element rootElement = addExportDataRootElement(portletDataContext); - - portletDataContext.addPortletPermissions( - GadgetPermission.RESOURCE_NAME); - - rootElement.addAttribute( - "group-id", String.valueOf(portletDataContext.getScopeGroupId())); - - ActionableDynamicQuery actionableDynamicQuery = - new GadgetExportActionableDynamicQuery(portletDataContext); - - actionableDynamicQuery.performActions(); - - return getExportDataRootElementString(rootElement); - } - - @Override - protected PortletPreferences doImportData( - PortletDataContext portletDataContext, String portletId, - PortletPreferences portletPreferences, String data) - throws Exception { - - portletDataContext.importPortletPermissions( - GadgetPermission.RESOURCE_NAME); - - Element gadgetsElement = portletDataContext.getImportDataGroupElement( - Gadget.class); - - List gadgetElements = gadgetsElement.elements(); - - for (Element gadgetElement : gadgetElements) { - StagedModelDataHandlerUtil.importStagedModel( - portletDataContext, gadgetElement); - } - - return null; - } - - @Override - protected void doPrepareManifestSummary( - PortletDataContext portletDataContext, - PortletPreferences portletPreferences) - throws Exception { - - ActionableDynamicQuery actionableDynamicQuery = - new GadgetExportActionableDynamicQuery(portletDataContext); - - actionableDynamicQuery.performCount(); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/admin/lar/GadgetStagedModelDataHandler.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/admin/lar/GadgetStagedModelDataHandler.java deleted file mode 100644 index 6d5157e145..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/admin/lar/GadgetStagedModelDataHandler.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * 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 com.liferay.opensocial.admin.lar; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.lar.BaseStagedModelDataHandler; -import com.liferay.portal.kernel.lar.ExportImportPathUtil; -import com.liferay.portal.kernel.lar.PortletDataContext; -import com.liferay.portal.kernel.xml.Element; -import com.liferay.portal.model.Group; -import com.liferay.portal.service.GroupLocalServiceUtil; -import com.liferay.portal.service.ServiceContext; - -/** - * @author Michael C. Han - */ -public class GadgetStagedModelDataHandler - extends BaseStagedModelDataHandler { - - public static final String[] CLASS_NAMES = {Gadget.class.getName()}; - - @Override - public void deleteStagedModel( - String uuid, long groupId, String className, String extraData) - throws PortalException, SystemException { - - Group group = GroupLocalServiceUtil.getGroup(groupId); - - Gadget gadget = GadgetLocalServiceUtil.fetchGadgetByUuidAndCompanyId( - uuid, group.getCompanyId()); - - if (gadget != null) { - GadgetLocalServiceUtil.deleteGadget(gadget); - } - } - - @Override - public String[] getClassNames() { - return CLASS_NAMES; - } - - @Override - public String getDisplayName(Gadget gadget) { - return gadget.getName(); - } - - @Override - protected void doExportStagedModel( - PortletDataContext portletDataContext, Gadget gadget) - throws Exception { - - Element gadgetElement = portletDataContext.getExportDataElement(gadget); - - portletDataContext.addClassedModel( - gadgetElement, ExportImportPathUtil.getModelPath(gadget), gadget); - } - - @Override - protected void doImportStagedModel( - PortletDataContext portletDataContext, Gadget gadget) - throws Exception { - - ServiceContext serviceContext = portletDataContext.createServiceContext( - gadget); - - Gadget importedGadget = null; - - if (portletDataContext.isDataStrategyMirror()) { - Gadget existingGadget = - GadgetLocalServiceUtil.fetchGadgetByUuidAndCompanyId( - gadget.getUuid(), portletDataContext.getCompanyId()); - - if (existingGadget == null) { - serviceContext.setUuid(gadget.getUuid()); - - importedGadget = GadgetLocalServiceUtil.addGadget( - portletDataContext.getCompanyId(), gadget.getUrl(), - gadget.getPortletCategoryNames(), serviceContext); - } - else { - existingGadget.setName(gadget.getName()); - existingGadget.setUrl(gadget.getUrl()); - existingGadget.setPortletCategoryNames( - gadget.getPortletCategoryNames()); - - importedGadget = GadgetLocalServiceUtil.updateGadget( - existingGadget); - } - } - else { - importedGadget = GadgetLocalServiceUtil.addGadget( - portletDataContext.getCompanyId(), gadget.getUrl(), - gadget.getPortletCategoryNames(), serviceContext); - } - - portletDataContext.importClassedModel(gadget, importedGadget); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/admin/portlet/AdminPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/admin/portlet/AdminPortlet.java deleted file mode 100644 index 487b521a39..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/admin/portlet/AdminPortlet.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * 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 com.liferay.opensocial.admin.portlet; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; -import com.liferay.opensocial.service.GadgetServiceUtil; -import com.liferay.opensocial.service.permission.GadgetPermission; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.opensocial.util.ActionKeys; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.util.Constants; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.util.bridges.mvc.MVCPortlet; - -import java.util.List; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; - -/** - * @author Michael Young - * @author Dennis Ju - */ -public class AdminPortlet extends MVCPortlet { - - public void deleteGadget( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - long gadgetId = ParamUtil.getLong(actionRequest, "gadgetId"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Gadget.class.getName(), actionRequest); - - GadgetServiceUtil.deleteGadget(gadgetId, serviceContext); - } - - public void refreshGadgets( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - long[] gadgetIds = ParamUtil.getLongValues(actionRequest, "gadgetId"); - - if (gadgetIds.length == 0) { - List gadgets = GadgetLocalServiceUtil.getGadgets( - QueryUtil.ALL_POS, QueryUtil.ALL_POS); - - for (Gadget gadget : gadgets) { - ShindigUtil.clearGadgetSpecCache(gadget.getUrl()); - } - } - else { - for (long gadgetId : gadgetIds) { - Gadget gadget = GadgetLocalServiceUtil.getGadget(gadgetId); - - ShindigUtil.clearGadgetSpecCache(gadget.getUrl()); - } - } - } - - public void updateGadget( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - - if (cmd.equals(Constants.ADD)) { - doAddGadget(actionRequest, actionResponse); - } - else if (cmd.equals(Constants.UPDATE)) { - doUpdateGadget(actionRequest, actionResponse); - } - } - - public void updateOAuthConsumers( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - long gadgetId = ParamUtil.getLong(actionRequest, "gadgetId"); - - GadgetPermission.check( - permissionChecker, themeDisplay.getScopeGroupId(), gadgetId, - ActionKeys.UPDATE); - - ShindigUtil.updateOAuthConsumers(actionRequest, actionResponse); - } - - protected Gadget doAddGadget( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String url = ParamUtil.getString(actionRequest, "url"); - String portletCategoryNames = ParamUtil.getString( - actionRequest, "portletCategoryNames"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Gadget.class.getName(), actionRequest); - - Gadget gadget = GadgetServiceUtil.addGadget( - themeDisplay.getCompanyId(), url, portletCategoryNames, - serviceContext); - - return gadget; - } - - protected void doUpdateGadget( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - long gadgetId = ParamUtil.getLong(actionRequest, "gadgetId"); - - String portletCategoryNames = ParamUtil.getString( - actionRequest, "portletCategoryNames"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - Gadget.class.getName(), actionRequest); - - GadgetServiceUtil.updateGadget( - gadgetId, portletCategoryNames, serviceContext); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/editor/portlet/EditorPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/editor/portlet/EditorPortlet.java deleted file mode 100644 index e08910571d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/editor/portlet/EditorPortlet.java +++ /dev/null @@ -1,512 +0,0 @@ -/** - * 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 com.liferay.opensocial.editor.portlet; - -import com.liferay.opensocial.admin.portlet.AdminPortlet; -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; -import com.liferay.opensocial.service.permission.GadgetPermission; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.opensocial.util.ActionKeys; -import com.liferay.portal.kernel.json.JSONArray; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.repository.model.Folder; -import com.liferay.portal.kernel.util.Constants; -import com.liferay.portal.kernel.util.HttpUtil; -import com.liferay.portal.kernel.util.ListUtil; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.security.auth.AuthTokenUtil; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.service.DLAppServiceUtil; -import com.liferay.portlet.documentlibrary.util.comparator.RepositoryModelNameComparator; - -import java.io.IOException; - -import java.util.List; -import java.util.Map; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletException; -import javax.portlet.ResourceRequest; -import javax.portlet.ResourceResponse; - -import org.apache.shindig.gadgets.spec.Feature; -import org.apache.shindig.gadgets.spec.GadgetSpec; -import org.apache.shindig.gadgets.spec.ModulePrefs; - -/** - * @author Dennis Ju - */ -public class EditorPortlet extends AdminPortlet { - - @Override - public void serveResource( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws IOException, PortletException { - - try { - AuthTokenUtil.checkCSRFToken( - PortalUtil.getHttpServletRequest(resourceRequest), - this.getClass().getName()); - - String resourceID = resourceRequest.getResourceID(); - - if (resourceID.equals("addFileEntry")) { - serveAddFileEntry(resourceRequest, resourceResponse); - } - else if (resourceID.equals("addFolder")) { - serveAddFolder(resourceRequest, resourceResponse); - } - else if (resourceID.equals("deleteFileEntry")) { - serveDeleteFileEntry(resourceRequest, resourceResponse); - } - else if (resourceID.equals("deleteFolder")) { - serveDeleteFolder(resourceRequest, resourceResponse); - } - else if (resourceID.equals("getFileEntryContent")) { - serveGetFileEntryContent(resourceRequest, resourceResponse); - } - else if (resourceID.equals("getFolderChildren")) { - serveGetFolderChildren(resourceRequest, resourceResponse); - } - else if (resourceID.equals("getRenderParameters")) { - serveGetRenderParameters(resourceRequest, resourceResponse); - } - else if (resourceID.equals("updateFileEntryContent")) { - serveUpdateFileEntryContent(resourceRequest, resourceResponse); - } - else if (resourceID.equals("updateFileEntryTitle")) { - serveUpdateFileEntryTitle(resourceRequest, resourceResponse); - } - else if (resourceID.equals("updateFolderName")) { - serveUpdateFolderName(resourceRequest, resourceResponse); - } - } - catch (IOException ioe) { - serveException(ioe, resourceRequest, resourceResponse); - - throw ioe; - } - catch (PortletException pe) { - serveException(pe, resourceRequest, resourceResponse); - - throw pe; - } - catch (Exception e) { - serveException(e, resourceRequest, resourceResponse); - - throw new PortletException(e); - } - } - - @Override - public void updateGadget( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - long groupId = themeDisplay.getScopeGroupId(); - - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - - if (cmd.equals(Constants.ADD)) { - GadgetPermission.check( - permissionChecker, groupId, ActionKeys.PUBLISH_GADGET); - - Gadget gadget = doAddGadget(actionRequest, actionResponse); - - String publishGadgetRedirect = ParamUtil.getString( - actionRequest, "publishGadgetRedirect"); - - boolean unpublishPermission = GadgetPermission.contains( - permissionChecker, groupId, gadget.getGadgetId(), - ActionKeys.DELETE); - - publishGadgetRedirect = HttpUtil.addParameter( - publishGadgetRedirect, "unpublishPermission", - unpublishPermission); - - publishGadgetRedirect = HttpUtil.addParameter( - publishGadgetRedirect, "gadgetId", gadget.getGadgetId()); - - actionResponse.sendRedirect(publishGadgetRedirect); - } - else { - long gadgetId = ParamUtil.getLong(actionRequest, "gadgetId"); - - GadgetPermission.check( - permissionChecker, groupId, gadgetId, ActionKeys.UPDATE); - - doUpdateGadget(actionRequest, actionResponse); - } - } - - protected void serveAddFileEntry( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)resourceRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long folderId = ParamUtil.getLong(resourceRequest, "folderId"); - - Folder folder = DLAppServiceUtil.getFolder(folderId); - - String fileEntryTitle = ParamUtil.getString( - resourceRequest, "fileEntryTitle"); - - String content = ParamUtil.getString(resourceRequest, "content"); - - byte[] bytes = content.getBytes(StringPool.UTF8); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - resourceRequest); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - - serviceContext.setAttribute("sourceFileName", fileEntryTitle); - - serviceContext.setScopeGroupId(folder.getGroupId()); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - FileEntry fileEntry = DLAppServiceUtil.addFileEntry( - folder.getRepositoryId(), folderId, fileEntryTitle, - resourceRequest.getContentType(), fileEntryTitle, StringPool.BLANK, - StringPool.BLANK, bytes, serviceContext); - - jsonObject.put("fileEntryId", fileEntry.getFileEntryId()); - - String portalURL = PortalUtil.getPortalURL(themeDisplay); - - String fileEntryURL = ShindigUtil.getFileEntryURL( - portalURL, fileEntry.getFileEntryId()); - - jsonObject.put("fileEntryURL", fileEntryURL); - - writeJSON(resourceRequest, resourceResponse, jsonObject); - } - - protected void serveAddFolder( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - long parentFolderId = ParamUtil.getLong( - resourceRequest, "parentFolderId"); - - Folder parentFolder = DLAppServiceUtil.getFolder(parentFolderId); - - String folderName = ParamUtil.getString(resourceRequest, "folderName"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - resourceRequest); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - serviceContext.setScopeGroupId(parentFolder.getGroupId()); - - Folder folder = DLAppServiceUtil.addFolder( - parentFolder.getRepositoryId(), parentFolderId, folderName, - StringPool.BLANK, serviceContext); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - jsonObject.put("folderId", folder.getFolderId()); - - writeJSON(resourceRequest, resourceResponse, jsonObject); - } - - protected void serveDeleteFileEntry( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - long fileEntryId = ParamUtil.getLong(resourceRequest, "fileEntryId"); - - DLAppServiceUtil.deleteFileEntry(fileEntryId); - } - - protected void serveDeleteFolder( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - long folderId = ParamUtil.getLong(resourceRequest, "folderId"); - - DLAppServiceUtil.deleteFolder(folderId); - } - - protected void serveException( - Exception exception, ResourceRequest resourceRequest, - ResourceResponse resourceResponse) - throws IOException { - - JSONObject jsonError = JSONFactoryUtil.createJSONObject(); - - jsonError.put("message", exception.getLocalizedMessage()); - jsonError.put("name", exception.getClass().getSimpleName()); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - jsonObject.put("error", jsonError); - - writeJSON(resourceRequest, resourceResponse, jsonObject); - } - - protected void serveGetFileEntryContent( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - long fileEntryId = ParamUtil.getLong(resourceRequest, "fileEntryId"); - - FileEntry fileEntry = DLAppServiceUtil.getFileEntry(fileEntryId); - - String content = StringUtil.read(fileEntry.getContentStream()); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - jsonObject.put("content", content); - - writeJSON(resourceRequest, resourceResponse, jsonObject); - } - - protected void serveGetFolderChildren( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)resourceRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long repositoryId = ParamUtil.getLong(resourceRequest, "repositoryId"); - long folderId = ParamUtil.getLong(resourceRequest, "folderId"); - - List folders = DLAppServiceUtil.getFolders( - repositoryId, folderId); - - folders = ListUtil.sort( - folders, new RepositoryModelNameComparator(true)); - - JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); - - for (Folder folder : folders) { - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - jsonObject.put("entryId", folder.getFolderId()); - jsonObject.put("label", folder.getName()); - jsonObject.put("leaf", false); - jsonObject.put("type", "editor"); - - jsonArray.put(jsonObject); - } - - boolean getFileEntries = ParamUtil.getBoolean( - resourceRequest, "getFileEntries"); - - if (getFileEntries) { - PermissionChecker permissionChecker = - themeDisplay.getPermissionChecker(); - - List fileEntries = DLAppServiceUtil.getFileEntries( - repositoryId, folderId); - - fileEntries = ListUtil.sort( - fileEntries, new RepositoryModelNameComparator(true)); - - for (FileEntry fileEntry : fileEntries) { - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - jsonObject.put("entryId", fileEntry.getFileEntryId()); - - String portalURL = PortalUtil.getPortalURL(themeDisplay); - - String fileEntryURL = ShindigUtil.getFileEntryURL( - portalURL, fileEntry.getFileEntryId()); - - jsonObject.put("fileEntryURL", fileEntryURL); - - long gadgetId = 0; - - try { - Gadget gadget = GadgetLocalServiceUtil.getGadget( - themeDisplay.getCompanyId(), fileEntryURL); - - gadgetId = gadget.getGadgetId(); - } - catch (Exception e) { - } - - jsonObject.put("gadgetId", gadgetId); - - jsonObject.put("label", fileEntry.getTitle()); - jsonObject.put("leaf", true); - - JSONObject jsonPermissions = JSONFactoryUtil.createJSONObject(); - - if (gadgetId > 0) { - boolean unpublishPermission = GadgetPermission.contains( - permissionChecker, themeDisplay.getScopeGroupId(), - gadgetId, ActionKeys.DELETE); - - jsonPermissions.put( - "unpublishPermission", unpublishPermission); - } - - jsonObject.put("permissions", jsonPermissions); - - jsonObject.put("type", "editor"); - - jsonArray.put(jsonObject); - } - } - - writeJSON(resourceRequest, resourceResponse, jsonArray); - } - - protected void serveGetRenderParameters( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)resourceRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - String fileEntryURL = ParamUtil.getString( - resourceRequest, "fileEntryURL"); - - GadgetSpec gadgetSpec = ShindigUtil.getGadgetSpec( - fileEntryURL, true, true); - - ModulePrefs modulePrefs = gadgetSpec.getModulePrefs(); - - jsonObject.put("height", modulePrefs.getHeight()); - - long moduleId = ShindigUtil.getModuleId( - resourceResponse.getNamespace()); - - jsonObject.put("moduleId", moduleId); - - Map features = modulePrefs.getFeatures(); - - boolean requiresPubsub = features.containsKey("pubsub-2"); - - jsonObject.put("requiresPubsub", requiresPubsub); - - boolean scrolling = modulePrefs.getScrolling(); - - jsonObject.put("scrolling", scrolling); - - String ownerId = ShindigUtil.getOwnerId(themeDisplay.getLayout()); - String portalURL = PortalUtil.getPortalURL(themeDisplay); - String currentURL = PortalUtil.getCurrentURL(resourceRequest); - - String secureToken = ShindigUtil.createSecurityToken( - ownerId, themeDisplay.getUserId(), fileEntryURL, portalURL, - fileEntryURL, moduleId, currentURL); - - jsonObject.put("secureToken", secureToken); - - jsonObject.put("specUrl", fileEntryURL); - - writeJSON(resourceRequest, resourceResponse, jsonObject); - } - - protected void serveUpdateFileEntryContent( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - long fileEntryId = ParamUtil.getLong(resourceRequest, "fileEntryId"); - - FileEntry fileEntry = DLAppServiceUtil.getFileEntry(fileEntryId); - - String content = ParamUtil.getString(resourceRequest, "content"); - - byte[] bytes = content.getBytes(StringPool.UTF8); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - resourceRequest); - - DLAppServiceUtil.updateFileEntry( - fileEntryId, fileEntry.getTitle(), resourceRequest.getContentType(), - fileEntry.getTitle(), fileEntry.getDescription(), StringPool.BLANK, - false, bytes, serviceContext); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - writeJSON(resourceRequest, resourceResponse, jsonObject); - } - - protected void serveUpdateFileEntryTitle( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - long fileEntryId = ParamUtil.getLong(resourceRequest, "fileEntryId"); - - FileEntry fileEntry = DLAppServiceUtil.getFileEntry(fileEntryId); - - String fileEntryTitle = ParamUtil.getString( - resourceRequest, "fileEntryTitle"); - - byte[] bytes = null; - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - resourceRequest); - - DLAppServiceUtil.updateFileEntry( - fileEntryId, fileEntryTitle, resourceRequest.getContentType(), - fileEntryTitle, fileEntry.getDescription(), StringPool.BLANK, false, - bytes, serviceContext); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - writeJSON(resourceRequest, resourceResponse, jsonObject); - } - - protected void serveUpdateFolderName( - ResourceRequest resourceRequest, ResourceResponse resourceResponse) - throws Exception { - - long folderId = ParamUtil.getLong(resourceRequest, "folderId"); - - Folder folder = DLAppServiceUtil.getFolder(folderId); - - String folderName = ParamUtil.getString(resourceRequest, "folderName"); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - resourceRequest); - - DLAppServiceUtil.updateFolder( - folderId, folderName, folder.getDescription(), serviceContext); - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - writeJSON(resourceRequest, resourceResponse, jsonObject); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/action/BaseConfigurationAction.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/action/BaseConfigurationAction.java deleted file mode 100644 index b69f1cbb04..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/action/BaseConfigurationAction.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * 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 com.liferay.opensocial.gadget.action; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.opensocial.util.WebKeys; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.portlet.DefaultConfigurationAction; -import com.liferay.portal.kernel.servlet.SessionMessages; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.model.Layout; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.expando.service.ExpandoValueServiceUtil; - -import java.util.Map; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; -import javax.portlet.PortletRequest; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import org.apache.shindig.gadgets.spec.GadgetSpec; -import org.apache.shindig.gadgets.spec.UserPref; - -/** - * @author Michael Young - */ -public abstract class BaseConfigurationAction - extends DefaultConfigurationAction { - - protected void doProcessAction( - PortletConfig portletConfig, ActionRequest actionRequest, - ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - Layout layout = themeDisplay.getLayout(); - - JSONObject userPrefsJSONObject = JSONFactoryUtil.createJSONObject(); - - Map userPrefs = getUserPrefs( - portletConfig, actionRequest); - - for (UserPref userPref : userPrefs.values()) { - String name = userPref.getName(); - - String value = ParamUtil.getString(actionRequest, name); - - userPrefsJSONObject.put(name, value); - } - - String namespace = ShindigUtil.getPortletResourceNamespace( - actionRequest, themeDisplay); - - String columnName = ShindigUtil.getColumnUserPrefs( - namespace, themeDisplay); - - ExpandoValueServiceUtil.addValue( - themeDisplay.getCompanyId(), Layout.class.getName(), - ShindigUtil.getTableOpenSocial(), columnName, layout.getPlid(), - userPrefsJSONObject.toString()); - - String portletResource = ParamUtil.getString( - actionRequest, "portletResource"); - - SessionMessages.add( - actionRequest, - PortalUtil.getPortletId(actionRequest) + - SessionMessages.KEY_SUFFIX_REFRESH_PORTLET, - portletResource); - - SessionMessages.add( - actionRequest, - PortalUtil.getPortletId(actionRequest) + - SessionMessages.KEY_SUFFIX_UPDATED_CONFIGURATION); - } - - protected void doRender( - PortletConfig portletConfig, RenderRequest renderRequest, - RenderResponse renderResponse) - throws Exception { - - Map userPrefs = getUserPrefs( - portletConfig, renderRequest); - - renderRequest.setAttribute(WebKeys.USER_PREFS, userPrefs); - } - - protected abstract Gadget getGadget( - PortletConfig portletConfig, PortletRequest portletRequest) - throws Exception; - - protected Map getUserPrefs( - PortletConfig portletConfig, PortletRequest portletRequest) - throws Exception { - - Gadget gadget = getGadget(portletConfig, portletRequest); - - GadgetSpec gadgetSpec = ShindigUtil.getGadgetSpec(gadget.getUrl()); - - return gadgetSpec.getUserPrefs(); - } - - protected boolean hasUserPrefs( - PortletConfig portletConfig, PortletRequest portletRequest) { - - try { - Map userPrefs = getUserPrefs( - portletConfig, portletRequest); - - return ShindigUtil.hasUserPrefs(userPrefs); - } - catch (Exception e) { - return false; - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/action/ConfigurationActionImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/action/ConfigurationActionImpl.java deleted file mode 100644 index e6fec40490..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/action/ConfigurationActionImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * 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 com.liferay.opensocial.gadget.action; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.opensocial.util.WebKeys; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.theme.ThemeDisplay; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; -import javax.portlet.PortletRequest; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -/** - * @author Michael Young - */ -public class ConfigurationActionImpl extends BaseConfigurationAction { - - @Override - public void processAction( - PortletConfig portletConfig, ActionRequest actionRequest, - ActionResponse actionResponse) - throws Exception { - - doProcessAction(portletConfig, actionRequest, actionResponse); - } - - @Override - public String render( - PortletConfig portletConfig, RenderRequest renderRequest, - RenderResponse renderResponse) - throws Exception { - - doRender(portletConfig, renderRequest, renderResponse); - - return "/gadget/configuration.jsp"; - } - - @Override - protected Gadget getGadget( - PortletConfig portletConfig, PortletRequest portletRequest) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - String portletResource = ParamUtil.getString( - portletRequest, "portletResource"); - - return ShindigUtil.getGadget( - portletResource, themeDisplay.getCompanyId()); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/portlet/BaseGadgetPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/portlet/BaseGadgetPortlet.java deleted file mode 100644 index 66e2cf8fc6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/portlet/BaseGadgetPortlet.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * 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 com.liferay.opensocial.gadget.portlet; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.opensocial.util.WebKeys; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.model.Layout; -import com.liferay.portal.model.Portlet; -import com.liferay.portal.model.ResourceConstants; -import com.liferay.portal.model.Role; -import com.liferay.portal.model.RoleConstants; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.service.PortletLocalServiceUtil; -import com.liferay.portal.service.ResourcePermissionLocalServiceUtil; -import com.liferay.portal.service.RoleLocalServiceUtil; -import com.liferay.portal.theme.PortletDisplay; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.expando.model.ExpandoColumn; -import com.liferay.portlet.expando.model.ExpandoColumnConstants; -import com.liferay.portlet.expando.model.ExpandoTable; -import com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil; -import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; -import com.liferay.util.bridges.mvc.MVCPortlet; - -import java.io.IOException; - -import java.util.HashMap; -import java.util.Map; - -import javax.portlet.PortletException; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.WindowState; - -import org.apache.shindig.gadgets.spec.GadgetSpec; - -/** - * @author Michael Young - */ -public abstract class BaseGadgetPortlet extends MVCPortlet { - - public static final String PORTLET_NAME_PREFIX = "OPENSOCIAL_"; - - @Override - public void render( - RenderRequest renderRequest, RenderResponse renderResponse) - throws IOException, PortletException { - - try { - doRender(renderRequest, renderResponse); - - super.render(renderRequest, renderResponse); - } - catch (IOException ioe) { - throw ioe; - } - catch (PortletException pe) { - throw pe; - } - catch (Exception e) { - throw new PortletException(e); - } - } - - protected void checkExpando( - RenderRequest renderRequest, RenderResponse renderResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - ExpandoTable expandoTable = ExpandoTableLocalServiceUtil.getTable( - themeDisplay.getCompanyId(), Layout.class.getName(), - ShindigUtil.getTableOpenSocial()); - - String namespace = renderResponse.getNamespace(); - - String columnName = ShindigUtil.getColumnUserPrefs( - namespace, themeDisplay); - - ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn( - expandoTable.getTableId(), columnName); - - if (expandoColumn == null) { - expandoColumn = ExpandoColumnLocalServiceUtil.addColumn( - expandoTable.getTableId(), columnName, - ExpandoColumnConstants.STRING); - - Map roleIdsToActionIds = - new HashMap(); - - Role guestRole = RoleLocalServiceUtil.getRole( - expandoColumn.getCompanyId(), RoleConstants.GUEST); - - roleIdsToActionIds.put( - guestRole.getRoleId(), new String[] {ActionKeys.VIEW}); - - Role userRole = RoleLocalServiceUtil.getRole( - expandoColumn.getCompanyId(), RoleConstants.USER); - - roleIdsToActionIds.put( - userRole.getRoleId(), - new String[] {ActionKeys.UPDATE, ActionKeys.VIEW}); - - ResourcePermissionLocalServiceUtil.setResourcePermissions( - expandoColumn.getCompanyId(), ExpandoColumn.class.getName(), - ResourceConstants.SCOPE_INDIVIDUAL, - String.valueOf(expandoColumn.getColumnId()), - roleIdsToActionIds); - } - } - - protected void doRender( - RenderRequest renderRequest, RenderResponse renderResponse) - throws Exception { - - checkExpando(renderRequest, renderResponse); - - ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); - - Portlet portlet = PortletLocalServiceUtil.getPortletById( - themeDisplay.getCompanyId(), portletDisplay.getId()); - - Gadget gadget = getGadget(renderRequest); - - if (gadget == null) { - return; - } - - GadgetSpec gadgetSpec = ShindigUtil.getGadgetSpec(gadget.getUrl()); - - overrideConfiguration(gadgetSpec, portlet, portletDisplay); - - renderRequest.setAttribute(WebKeys.GADGET, gadget); - - String view = getView(renderRequest, gadgetSpec); - - renderRequest.setAttribute(WebKeys.VIEW, view); - } - - protected abstract Gadget getGadget(RenderRequest renderRequest) - throws Exception; - - @Override - protected String getTitle(RenderRequest renderRequest) { - Gadget gadget = null; - - try { - gadget = getGadget(renderRequest); - } - catch (Exception e) { - } - - if (gadget != null) { - return gadget.getName(); - } - else { - return super.getTitle(renderRequest); - } - } - - protected String getView( - RenderRequest renderRequest, GadgetSpec gadgetSpec) { - - WindowState windowState = renderRequest.getWindowState(); - - String view = ParamUtil.getString(renderRequest, "view"); - - if (gadgetSpec.getView(view) != null) { - return view; - } - - if (windowState.equals(WindowState.NORMAL)) { - if (gadgetSpec.getView("default") != null) { - view = "default"; - } - else if (gadgetSpec.getView("home") != null) { - view = "home"; - } - else if (gadgetSpec.getView("profile") != null) { - view = "profile"; - } - else if (gadgetSpec.getView("canvas") != null) { - view = "canvas"; - } - } - else if (windowState.equals(WindowState.MAXIMIZED)) { - if (gadgetSpec.getView("canvas") != null) { - view = "canvas"; - } - else if (gadgetSpec.getView("default") != null) { - view = "default"; - } - else if (gadgetSpec.getView("home") != null) { - view = "home"; - } - else if (gadgetSpec.getView("profile") != null) { - view = "profile"; - } - } - - return view; - } - - protected void overrideConfiguration( - GadgetSpec gadgetSpec, Portlet portlet, - PortletDisplay portletDisplay) - throws Exception { - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/portlet/GadgetPortlet.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/portlet/GadgetPortlet.java deleted file mode 100644 index 4cb2062b1b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/portlet/GadgetPortlet.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 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 com.liferay.opensocial.gadget.portlet; - -import com.liferay.opensocial.gadget.action.ConfigurationActionImpl; -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.Portlet; -import com.liferay.portal.theme.PortletDisplay; -import com.liferay.portal.theme.ThemeDisplay; - -import javax.portlet.PortletConfig; -import javax.portlet.RenderRequest; - -import org.apache.shindig.gadgets.spec.GadgetSpec; - -/** - * @author Michael Young - */ -public class GadgetPortlet extends BaseGadgetPortlet { - - @Override - protected Gadget getGadget(RenderRequest renderRequest) throws Exception { - ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - PortletConfig portletConfig = getPortletConfig(); - - return ShindigUtil.getGadget( - portletConfig.getPortletName(), themeDisplay.getCompanyId()); - } - - @Override - protected void overrideConfiguration( - GadgetSpec gadgetSpec, Portlet portlet, - PortletDisplay portletDisplay) - throws Exception { - - String urlConfiguration = portletDisplay.getURLConfiguration(); - - if (ShindigUtil.hasUserPrefs(gadgetSpec)) { - portlet.setConfigurationActionClass( - ConfigurationActionImpl.class.getName()); - - urlConfiguration = urlConfiguration.replaceAll( - "edit_permissions", "edit_configuration"); - } - else { - portlet.setConfigurationActionClass(null); - - urlConfiguration = urlConfiguration.replaceAll( - "edit_configuration", "edit_permissions"); - } - - portletDisplay.setURLConfiguration(urlConfiguration); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/messaging/OpenSocialHotDeployMessageListener.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/messaging/OpenSocialHotDeployMessageListener.java deleted file mode 100644 index 7023cbba37..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/messaging/OpenSocialHotDeployMessageListener.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * 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 com.liferay.opensocial.messaging; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.ClpSerializer; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; -import com.liferay.opensocial.shindig.servlet.GuiceServletContextListener; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.messaging.HotDeployMessageListener; -import com.liferay.portal.kernel.messaging.Message; -import com.liferay.portal.kernel.portlet.PortletClassLoaderUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.Company; -import com.liferay.portal.model.Layout; -import com.liferay.portal.model.User; -import com.liferay.portal.service.CompanyLocalServiceUtil; -import com.liferay.portal.service.PortletLocalServiceUtil; -import com.liferay.portlet.expando.NoSuchTableException; -import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; - -import java.util.List; - -import javax.servlet.ServletContextListener; - -/** - * @author Michael Young - */ -public class OpenSocialHotDeployMessageListener - extends HotDeployMessageListener { - - public OpenSocialHotDeployMessageListener(String... servletContextNames) { - super(servletContextNames); - } - - protected void checkExpando() throws Exception { - List companies = CompanyLocalServiceUtil.getCompanies(); - - for (Company company : companies) { - try { - ExpandoTableLocalServiceUtil.getTable( - company.getCompanyId(), Layout.class.getName(), - ShindigUtil.getTableOpenSocial()); - } - catch (NoSuchTableException nste) { - ExpandoTableLocalServiceUtil.addTable( - company.getCompanyId(), Layout.class.getName(), - ShindigUtil.getTableOpenSocial()); - } - - try { - ExpandoTableLocalServiceUtil.getTable( - company.getCompanyId(), User.class.getName(), - ShindigUtil.getTableOpenSocial()); - } - catch (NoSuchTableException nste) { - ExpandoTableLocalServiceUtil.addTable( - company.getCompanyId(), User.class.getName(), - ShindigUtil.getTableOpenSocial()); - } - } - } - - @Override - protected void onDeploy(Message message) throws Exception { - verifyGadgets(); - - List companies = CompanyLocalServiceUtil.getCompanies(); - - for (Company company : companies) { - PortletLocalServiceUtil.addPortletCategory( - company.getCompanyId(), _GADGETS_CATEGORY); - } - - GadgetLocalServiceUtil.initGadgets(); - - checkExpando(); - - Thread currentThread = Thread.currentThread(); - - ClassLoader classLoader = currentThread.getContextClassLoader(); - - try { - currentThread.setContextClassLoader( - PortletClassLoaderUtil.getClassLoader( - ClpSerializer.getServletContextName())); - - _guiceServletContextListener.contextInitialized( - GuiceServletContextListener. - getInitializedServletContextEvent()); - } - finally { - currentThread.setContextClassLoader(classLoader); - } - } - - @Override - protected void onUndeploy(Message message) throws Exception { - GadgetLocalServiceUtil.destroyGadgets(); - - _guiceServletContextListener.contextDestroyed( - GuiceServletContextListener.getInitializedServletContextEvent()); - } - - protected void verifyGadgets() throws Exception { - List gadgets = GadgetLocalServiceUtil.getGadgets( - QueryUtil.ALL_POS, QueryUtil.ALL_POS); - - for (Gadget gadget : gadgets) { - if (Validator.isNull(gadget.getUuid()) || - Validator.isNull(gadget.getPortletCategoryNames())) { - - gadget.setPortletCategoryNames(_GADGETS_CATEGORY); - - GadgetLocalServiceUtil.updateGadget(gadget); - } - } - } - - private static final String _GADGETS_CATEGORY = "category.gadgets"; - - private ServletContextListener _guiceServletContextListener = - new org.apache.shindig.common.servlet.GuiceServletContextListener(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetBaseImpl.java deleted file mode 100644 index 4bf4de2f9f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetBaseImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; - -import com.liferay.portal.kernel.exception.SystemException; - -/** - * The extended model base implementation for the Gadget service. Represents a row in the "OpenSocial_Gadget" database table, with each column mapped to a property of this class. - * - *

    - * 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 GadgetImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see GadgetImpl - * @see com.liferay.opensocial.model.Gadget - * @generated - */ -public abstract class GadgetBaseImpl extends GadgetModelImpl implements Gadget { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a gadget model instance should use the {@link Gadget} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - GadgetLocalServiceUtil.addGadget(this); - } - else { - GadgetLocalServiceUtil.updateGadget(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetCacheModel.java deleted file mode 100644 index 1551762291..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetCacheModel.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.opensocial.model.Gadget; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -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 Gadget in entity cache. - * - * @author Brian Wing Shun Chan - * @see Gadget - * @generated - */ -public class GadgetCacheModel implements CacheModel, Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(17); - - sb.append("{uuid="); - sb.append(uuid); - sb.append(", gadgetId="); - sb.append(gadgetId); - sb.append(", companyId="); - sb.append(companyId); - sb.append(", createDate="); - sb.append(createDate); - sb.append(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", name="); - sb.append(name); - sb.append(", url="); - sb.append(url); - sb.append(", portletCategoryNames="); - sb.append(portletCategoryNames); - sb.append("}"); - - return sb.toString(); - } - - @Override - public Gadget toEntityModel() { - GadgetImpl gadgetImpl = new GadgetImpl(); - - if (uuid == null) { - gadgetImpl.setUuid(StringPool.BLANK); - } - else { - gadgetImpl.setUuid(uuid); - } - - gadgetImpl.setGadgetId(gadgetId); - gadgetImpl.setCompanyId(companyId); - - if (createDate == Long.MIN_VALUE) { - gadgetImpl.setCreateDate(null); - } - else { - gadgetImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - gadgetImpl.setModifiedDate(null); - } - else { - gadgetImpl.setModifiedDate(new Date(modifiedDate)); - } - - if (name == null) { - gadgetImpl.setName(StringPool.BLANK); - } - else { - gadgetImpl.setName(name); - } - - if (url == null) { - gadgetImpl.setUrl(StringPool.BLANK); - } - else { - gadgetImpl.setUrl(url); - } - - if (portletCategoryNames == null) { - gadgetImpl.setPortletCategoryNames(StringPool.BLANK); - } - else { - gadgetImpl.setPortletCategoryNames(portletCategoryNames); - } - - gadgetImpl.resetOriginalValues(); - - return gadgetImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - uuid = objectInput.readUTF(); - gadgetId = objectInput.readLong(); - companyId = objectInput.readLong(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - name = objectInput.readUTF(); - url = objectInput.readUTF(); - portletCategoryNames = objectInput.readUTF(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - if (uuid == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(uuid); - } - - objectOutput.writeLong(gadgetId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - - if (name == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(name); - } - - if (url == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(url); - } - - if (portletCategoryNames == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(portletCategoryNames); - } - } - - public String uuid; - public long gadgetId; - public long companyId; - public long createDate; - public long modifiedDate; - public String name; - public String url; - public String portletCategoryNames; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetConstants.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetConstants.java deleted file mode 100644 index b019ea040f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetConstants.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.StringUtil; - -/** - * @author Dennis Ju - */ -public class GadgetConstants { - - public static final String ADHOC_PREFIX = "ADHOC_"; - - public static final String PUBLISHED_PREFIX = "PUBLISHED_"; - - public static boolean isAdhocGadget(String gadgetKey) { - return StringUtil.contains(gadgetKey, ADHOC_PREFIX); - } - - public static boolean isPublishedGadget(String gadgetKey) { - return StringUtil.contains(gadgetKey, PUBLISHED_PREFIX); - } - - public static long toAdhocGadgetId(String gadgetKey) { - String moduleIdString = StringUtil.remove(gadgetKey, ADHOC_PREFIX); - - return GetterUtil.getLong(moduleIdString); - } - - public static String toAdhocGadgetKey(long moduleId) { - return ADHOC_PREFIX.concat(String.valueOf(moduleId)); - } - - public static long toPublishedGadgetId(String gadgetKey) { - String gadgetIdString = StringUtil.remove(gadgetKey, PUBLISHED_PREFIX); - - return GetterUtil.getLong(gadgetIdString); - } - - public static String toPublishedGadgetKey(long gadgetId) { - return PUBLISHED_PREFIX.concat(String.valueOf(gadgetId)); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetImpl.java deleted file mode 100644 index 55b9f413ac..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -/** - * @author Brian Wing Shun Chan - */ -public class GadgetImpl extends GadgetBaseImpl { - - public GadgetImpl() { - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetModelImpl.java deleted file mode 100644 index d6155b7275..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/GadgetModelImpl.java +++ /dev/null @@ -1,643 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.model.GadgetModel; -import com.liferay.opensocial.model.GadgetSoap; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.json.JSON; -import com.liferay.portal.kernel.lar.StagedModelType; -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 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 Gadget service. Represents a row in the "OpenSocial_Gadget" database table, with each column mapped to a property of this class. - * - *

    - * This implementation and its corresponding interface {@link com.liferay.opensocial.model.GadgetModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link GadgetImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see GadgetImpl - * @see com.liferay.opensocial.model.Gadget - * @see com.liferay.opensocial.model.GadgetModel - * @generated - */ -@JSON(strict = true) -public class GadgetModelImpl extends BaseModelImpl - implements GadgetModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a gadget model instance should use the {@link com.liferay.opensocial.model.Gadget} interface instead. - */ - public static final String TABLE_NAME = "OpenSocial_Gadget"; - public static final Object[][] TABLE_COLUMNS = { - { "uuid_", Types.VARCHAR }, - { "gadgetId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "name", Types.VARCHAR }, - { "url", Types.VARCHAR }, - { "portletCategoryNames", Types.VARCHAR } - }; - public static final String TABLE_SQL_CREATE = "create table OpenSocial_Gadget (uuid_ VARCHAR(75) null,gadgetId LONG not null primary key,companyId LONG,createDate DATE null,modifiedDate DATE null,name VARCHAR(75) null,url STRING null,portletCategoryNames STRING null)"; - public static final String TABLE_SQL_DROP = "drop table OpenSocial_Gadget"; - public static final String ORDER_BY_JPQL = " ORDER BY gadget.name ASC"; - public static final String ORDER_BY_SQL = " ORDER BY OpenSocial_Gadget.name 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.com.liferay.opensocial.model.Gadget"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.com.liferay.opensocial.model.Gadget"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.com.liferay.opensocial.model.Gadget"), - true); - public static long COMPANYID_COLUMN_BITMASK = 1L; - public static long URL_COLUMN_BITMASK = 2L; - public static long UUID_COLUMN_BITMASK = 4L; - public static long NAME_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 Gadget toModel(GadgetSoap soapModel) { - if (soapModel == null) { - return null; - } - - Gadget model = new GadgetImpl(); - - model.setUuid(soapModel.getUuid()); - model.setGadgetId(soapModel.getGadgetId()); - model.setCompanyId(soapModel.getCompanyId()); - model.setCreateDate(soapModel.getCreateDate()); - model.setModifiedDate(soapModel.getModifiedDate()); - model.setName(soapModel.getName()); - model.setUrl(soapModel.getUrl()); - model.setPortletCategoryNames(soapModel.getPortletCategoryNames()); - - 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 toModels(GadgetSoap[] soapModels) { - if (soapModels == null) { - return null; - } - - List models = new ArrayList(soapModels.length); - - for (GadgetSoap 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.com.liferay.opensocial.model.Gadget")); - - public GadgetModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _gadgetId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setGadgetId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _gadgetId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return Gadget.class; - } - - @Override - public String getModelClassName() { - return Gadget.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("uuid", getUuid()); - attributes.put("gadgetId", getGadgetId()); - attributes.put("companyId", getCompanyId()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("name", getName()); - attributes.put("url", getUrl()); - attributes.put("portletCategoryNames", getPortletCategoryNames()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - String uuid = (String)attributes.get("uuid"); - - if (uuid != null) { - setUuid(uuid); - } - - Long gadgetId = (Long)attributes.get("gadgetId"); - - if (gadgetId != null) { - setGadgetId(gadgetId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Date createDate = (Date)attributes.get("createDate"); - - if (createDate != null) { - setCreateDate(createDate); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String name = (String)attributes.get("name"); - - if (name != null) { - setName(name); - } - - String url = (String)attributes.get("url"); - - if (url != null) { - setUrl(url); - } - - String portletCategoryNames = (String)attributes.get( - "portletCategoryNames"); - - if (portletCategoryNames != null) { - setPortletCategoryNames(portletCategoryNames); - } - } - - @JSON - @Override - public String getUuid() { - if (_uuid == null) { - return StringPool.BLANK; - } - else { - return _uuid; - } - } - - @Override - public void setUuid(String uuid) { - if (_originalUuid == null) { - _originalUuid = _uuid; - } - - _uuid = uuid; - } - - public String getOriginalUuid() { - return GetterUtil.getString(_originalUuid); - } - - @JSON - @Override - public long getGadgetId() { - return _gadgetId; - } - - @Override - public void setGadgetId(long gadgetId) { - _gadgetId = gadgetId; - } - - @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 Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - } - - @JSON - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - @JSON - @Override - public String getName() { - if (_name == null) { - return StringPool.BLANK; - } - else { - return _name; - } - } - - @Override - public void setName(String name) { - _columnBitmask = -1L; - - _name = name; - } - - @JSON - @Override - public String getUrl() { - if (_url == null) { - return StringPool.BLANK; - } - else { - return _url; - } - } - - @Override - public void setUrl(String url) { - _columnBitmask |= URL_COLUMN_BITMASK; - - if (_originalUrl == null) { - _originalUrl = _url; - } - - _url = url; - } - - public String getOriginalUrl() { - return GetterUtil.getString(_originalUrl); - } - - @JSON - @Override - public String getPortletCategoryNames() { - if (_portletCategoryNames == null) { - return StringPool.BLANK; - } - else { - return _portletCategoryNames; - } - } - - @Override - public void setPortletCategoryNames(String portletCategoryNames) { - _portletCategoryNames = portletCategoryNames; - } - - @Override - public StagedModelType getStagedModelType() { - return new StagedModelType(PortalUtil.getClassNameId( - Gadget.class.getName())); - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - Gadget.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public Gadget toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (Gadget)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - GadgetImpl gadgetImpl = new GadgetImpl(); - - gadgetImpl.setUuid(getUuid()); - gadgetImpl.setGadgetId(getGadgetId()); - gadgetImpl.setCompanyId(getCompanyId()); - gadgetImpl.setCreateDate(getCreateDate()); - gadgetImpl.setModifiedDate(getModifiedDate()); - gadgetImpl.setName(getName()); - gadgetImpl.setUrl(getUrl()); - gadgetImpl.setPortletCategoryNames(getPortletCategoryNames()); - - gadgetImpl.resetOriginalValues(); - - return gadgetImpl; - } - - @Override - public int compareTo(Gadget gadget) { - int value = 0; - - value = getName().compareTo(gadget.getName()); - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof Gadget)) { - return false; - } - - Gadget gadget = (Gadget)obj; - - long primaryKey = gadget.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - GadgetModelImpl gadgetModelImpl = this; - - gadgetModelImpl._originalUuid = gadgetModelImpl._uuid; - - gadgetModelImpl._originalCompanyId = gadgetModelImpl._companyId; - - gadgetModelImpl._setOriginalCompanyId = false; - - gadgetModelImpl._originalUrl = gadgetModelImpl._url; - - gadgetModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - GadgetCacheModel gadgetCacheModel = new GadgetCacheModel(); - - gadgetCacheModel.uuid = getUuid(); - - String uuid = gadgetCacheModel.uuid; - - if ((uuid != null) && (uuid.length() == 0)) { - gadgetCacheModel.uuid = null; - } - - gadgetCacheModel.gadgetId = getGadgetId(); - - gadgetCacheModel.companyId = getCompanyId(); - - Date createDate = getCreateDate(); - - if (createDate != null) { - gadgetCacheModel.createDate = createDate.getTime(); - } - else { - gadgetCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - gadgetCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - gadgetCacheModel.modifiedDate = Long.MIN_VALUE; - } - - gadgetCacheModel.name = getName(); - - String name = gadgetCacheModel.name; - - if ((name != null) && (name.length() == 0)) { - gadgetCacheModel.name = null; - } - - gadgetCacheModel.url = getUrl(); - - String url = gadgetCacheModel.url; - - if ((url != null) && (url.length() == 0)) { - gadgetCacheModel.url = null; - } - - gadgetCacheModel.portletCategoryNames = getPortletCategoryNames(); - - String portletCategoryNames = gadgetCacheModel.portletCategoryNames; - - if ((portletCategoryNames != null) && - (portletCategoryNames.length() == 0)) { - gadgetCacheModel.portletCategoryNames = null; - } - - return gadgetCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(17); - - sb.append("{uuid="); - sb.append(getUuid()); - sb.append(", gadgetId="); - sb.append(getGadgetId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", name="); - sb.append(getName()); - sb.append(", url="); - sb.append(getUrl()); - sb.append(", portletCategoryNames="); - sb.append(getPortletCategoryNames()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(28); - - sb.append(""); - sb.append("com.liferay.opensocial.model.Gadget"); - sb.append(""); - - sb.append( - "uuid"); - sb.append( - "gadgetId"); - sb.append( - "companyId"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "name"); - sb.append( - "url"); - sb.append( - "portletCategoryNames"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = Gadget.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { Gadget.class }; - private String _uuid; - private String _originalUuid; - private long _gadgetId; - private long _companyId; - private long _originalCompanyId; - private boolean _setOriginalCompanyId; - private Date _createDate; - private Date _modifiedDate; - private String _name; - private String _url; - private String _originalUrl; - private String _portletCategoryNames; - private long _columnBitmask; - private Gadget _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerBaseImpl.java deleted file mode 100644 index bb64bc8588..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerBaseImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.opensocial.model.OAuthConsumer; -import com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil; - -import com.liferay.portal.kernel.exception.SystemException; - -/** - * The extended model base implementation for the OAuthConsumer service. Represents a row in the "OpenSocial_OAuthConsumer" database table, with each column mapped to a property of this class. - * - *

    - * 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 OAuthConsumerImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthConsumerImpl - * @see com.liferay.opensocial.model.OAuthConsumer - * @generated - */ -public abstract class OAuthConsumerBaseImpl extends OAuthConsumerModelImpl - implements OAuthConsumer { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a o auth consumer model instance should use the {@link OAuthConsumer} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - OAuthConsumerLocalServiceUtil.addOAuthConsumer(this); - } - else { - OAuthConsumerLocalServiceUtil.updateOAuthConsumer(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerCacheModel.java deleted file mode 100644 index 437e070d6e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerCacheModel.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.opensocial.model.OAuthConsumer; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -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 OAuthConsumer in entity cache. - * - * @author Brian Wing Shun Chan - * @see OAuthConsumer - * @generated - */ -public class OAuthConsumerCacheModel implements CacheModel, - Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(19); - - sb.append("{oAuthConsumerId="); - sb.append(oAuthConsumerId); - sb.append(", companyId="); - sb.append(companyId); - sb.append(", createDate="); - sb.append(createDate); - sb.append(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", gadgetKey="); - sb.append(gadgetKey); - sb.append(", serviceName="); - sb.append(serviceName); - sb.append(", consumerKey="); - sb.append(consumerKey); - sb.append(", consumerSecret="); - sb.append(consumerSecret); - sb.append(", keyType="); - sb.append(keyType); - sb.append("}"); - - return sb.toString(); - } - - @Override - public OAuthConsumer toEntityModel() { - OAuthConsumerImpl oAuthConsumerImpl = new OAuthConsumerImpl(); - - oAuthConsumerImpl.setOAuthConsumerId(oAuthConsumerId); - oAuthConsumerImpl.setCompanyId(companyId); - - if (createDate == Long.MIN_VALUE) { - oAuthConsumerImpl.setCreateDate(null); - } - else { - oAuthConsumerImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - oAuthConsumerImpl.setModifiedDate(null); - } - else { - oAuthConsumerImpl.setModifiedDate(new Date(modifiedDate)); - } - - if (gadgetKey == null) { - oAuthConsumerImpl.setGadgetKey(StringPool.BLANK); - } - else { - oAuthConsumerImpl.setGadgetKey(gadgetKey); - } - - if (serviceName == null) { - oAuthConsumerImpl.setServiceName(StringPool.BLANK); - } - else { - oAuthConsumerImpl.setServiceName(serviceName); - } - - if (consumerKey == null) { - oAuthConsumerImpl.setConsumerKey(StringPool.BLANK); - } - else { - oAuthConsumerImpl.setConsumerKey(consumerKey); - } - - if (consumerSecret == null) { - oAuthConsumerImpl.setConsumerSecret(StringPool.BLANK); - } - else { - oAuthConsumerImpl.setConsumerSecret(consumerSecret); - } - - if (keyType == null) { - oAuthConsumerImpl.setKeyType(StringPool.BLANK); - } - else { - oAuthConsumerImpl.setKeyType(keyType); - } - - oAuthConsumerImpl.resetOriginalValues(); - - return oAuthConsumerImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - oAuthConsumerId = objectInput.readLong(); - companyId = objectInput.readLong(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - gadgetKey = objectInput.readUTF(); - serviceName = objectInput.readUTF(); - consumerKey = objectInput.readUTF(); - consumerSecret = objectInput.readUTF(); - keyType = objectInput.readUTF(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - objectOutput.writeLong(oAuthConsumerId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - - if (gadgetKey == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(gadgetKey); - } - - if (serviceName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(serviceName); - } - - if (consumerKey == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(consumerKey); - } - - if (consumerSecret == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(consumerSecret); - } - - if (keyType == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(keyType); - } - } - - public long oAuthConsumerId; - public long companyId; - public long createDate; - public long modifiedDate; - public String gadgetKey; - public String serviceName; - public String consumerKey; - public String consumerSecret; - public String keyType; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerImpl.java deleted file mode 100644 index 1322070e62..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.portal.kernel.util.GetterUtil; - -/** - * @author Michael Young - */ -public class OAuthConsumerImpl extends OAuthConsumerBaseImpl { - - public OAuthConsumerImpl() { - } - - public String getKeyName() { - return GetterUtil.getString(_keyName); - } - - public void setKeyName(String keyName) { - _keyName = keyName; - } - - private String _keyName; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerModelImpl.java deleted file mode 100644 index d1f76e0832..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthConsumerModelImpl.java +++ /dev/null @@ -1,595 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.opensocial.model.OAuthConsumer; -import com.liferay.opensocial.model.OAuthConsumerModel; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -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 java.io.Serializable; - -import java.sql.Types; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * The base model implementation for the OAuthConsumer service. Represents a row in the "OpenSocial_OAuthConsumer" database table, with each column mapped to a property of this class. - * - *

    - * This implementation and its corresponding interface {@link com.liferay.opensocial.model.OAuthConsumerModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link OAuthConsumerImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthConsumerImpl - * @see com.liferay.opensocial.model.OAuthConsumer - * @see com.liferay.opensocial.model.OAuthConsumerModel - * @generated - */ -public class OAuthConsumerModelImpl extends BaseModelImpl - implements OAuthConsumerModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a o auth consumer model instance should use the {@link com.liferay.opensocial.model.OAuthConsumer} interface instead. - */ - public static final String TABLE_NAME = "OpenSocial_OAuthConsumer"; - public static final Object[][] TABLE_COLUMNS = { - { "oAuthConsumerId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "gadgetKey", Types.VARCHAR }, - { "serviceName", Types.VARCHAR }, - { "consumerKey", Types.VARCHAR }, - { "consumerSecret", Types.CLOB }, - { "keyType", Types.VARCHAR } - }; - public static final String TABLE_SQL_CREATE = "create table OpenSocial_OAuthConsumer (oAuthConsumerId LONG not null primary key,companyId LONG,createDate DATE null,modifiedDate DATE null,gadgetKey VARCHAR(75) null,serviceName VARCHAR(75) null,consumerKey VARCHAR(75) null,consumerSecret TEXT null,keyType VARCHAR(75) null)"; - public static final String TABLE_SQL_DROP = "drop table OpenSocial_OAuthConsumer"; - public static final String ORDER_BY_JPQL = " ORDER BY oAuthConsumer.serviceName ASC"; - public static final String ORDER_BY_SQL = " ORDER BY OpenSocial_OAuthConsumer.serviceName 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.com.liferay.opensocial.model.OAuthConsumer"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.com.liferay.opensocial.model.OAuthConsumer"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.com.liferay.opensocial.model.OAuthConsumer"), - true); - public static long GADGETKEY_COLUMN_BITMASK = 1L; - public static long SERVICENAME_COLUMN_BITMASK = 2L; - public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get( - "lock.expiration.time.com.liferay.opensocial.model.OAuthConsumer")); - - public OAuthConsumerModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _oAuthConsumerId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setOAuthConsumerId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _oAuthConsumerId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return OAuthConsumer.class; - } - - @Override - public String getModelClassName() { - return OAuthConsumer.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("oAuthConsumerId", getOAuthConsumerId()); - attributes.put("companyId", getCompanyId()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("gadgetKey", getGadgetKey()); - attributes.put("serviceName", getServiceName()); - attributes.put("consumerKey", getConsumerKey()); - attributes.put("consumerSecret", getConsumerSecret()); - attributes.put("keyType", getKeyType()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - Long oAuthConsumerId = (Long)attributes.get("oAuthConsumerId"); - - if (oAuthConsumerId != null) { - setOAuthConsumerId(oAuthConsumerId); - } - - Long companyId = (Long)attributes.get("companyId"); - - if (companyId != null) { - setCompanyId(companyId); - } - - Date createDate = (Date)attributes.get("createDate"); - - if (createDate != null) { - setCreateDate(createDate); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String gadgetKey = (String)attributes.get("gadgetKey"); - - if (gadgetKey != null) { - setGadgetKey(gadgetKey); - } - - String serviceName = (String)attributes.get("serviceName"); - - if (serviceName != null) { - setServiceName(serviceName); - } - - String consumerKey = (String)attributes.get("consumerKey"); - - if (consumerKey != null) { - setConsumerKey(consumerKey); - } - - String consumerSecret = (String)attributes.get("consumerSecret"); - - if (consumerSecret != null) { - setConsumerSecret(consumerSecret); - } - - String keyType = (String)attributes.get("keyType"); - - if (keyType != null) { - setKeyType(keyType); - } - } - - @Override - public long getOAuthConsumerId() { - return _oAuthConsumerId; - } - - @Override - public void setOAuthConsumerId(long oAuthConsumerId) { - _oAuthConsumerId = oAuthConsumerId; - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - @Override - public String getGadgetKey() { - if (_gadgetKey == null) { - return StringPool.BLANK; - } - else { - return _gadgetKey; - } - } - - @Override - public void setGadgetKey(String gadgetKey) { - _columnBitmask |= GADGETKEY_COLUMN_BITMASK; - - if (_originalGadgetKey == null) { - _originalGadgetKey = _gadgetKey; - } - - _gadgetKey = gadgetKey; - } - - public String getOriginalGadgetKey() { - return GetterUtil.getString(_originalGadgetKey); - } - - @Override - public String getServiceName() { - if (_serviceName == null) { - return StringPool.BLANK; - } - else { - return _serviceName; - } - } - - @Override - public void setServiceName(String serviceName) { - _columnBitmask = -1L; - - if (_originalServiceName == null) { - _originalServiceName = _serviceName; - } - - _serviceName = serviceName; - } - - public String getOriginalServiceName() { - return GetterUtil.getString(_originalServiceName); - } - - @Override - public String getConsumerKey() { - if (_consumerKey == null) { - return StringPool.BLANK; - } - else { - return _consumerKey; - } - } - - @Override - public void setConsumerKey(String consumerKey) { - _consumerKey = consumerKey; - } - - @Override - public String getConsumerSecret() { - if (_consumerSecret == null) { - return StringPool.BLANK; - } - else { - return _consumerSecret; - } - } - - @Override - public void setConsumerSecret(String consumerSecret) { - _consumerSecret = consumerSecret; - } - - @Override - public String getKeyType() { - if (_keyType == null) { - return StringPool.BLANK; - } - else { - return _keyType; - } - } - - @Override - public void setKeyType(String keyType) { - _keyType = keyType; - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - OAuthConsumer.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public OAuthConsumer toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (OAuthConsumer)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - OAuthConsumerImpl oAuthConsumerImpl = new OAuthConsumerImpl(); - - oAuthConsumerImpl.setOAuthConsumerId(getOAuthConsumerId()); - oAuthConsumerImpl.setCompanyId(getCompanyId()); - oAuthConsumerImpl.setCreateDate(getCreateDate()); - oAuthConsumerImpl.setModifiedDate(getModifiedDate()); - oAuthConsumerImpl.setGadgetKey(getGadgetKey()); - oAuthConsumerImpl.setServiceName(getServiceName()); - oAuthConsumerImpl.setConsumerKey(getConsumerKey()); - oAuthConsumerImpl.setConsumerSecret(getConsumerSecret()); - oAuthConsumerImpl.setKeyType(getKeyType()); - - oAuthConsumerImpl.resetOriginalValues(); - - return oAuthConsumerImpl; - } - - @Override - public int compareTo(OAuthConsumer oAuthConsumer) { - int value = 0; - - value = getServiceName().compareTo(oAuthConsumer.getServiceName()); - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof OAuthConsumer)) { - return false; - } - - OAuthConsumer oAuthConsumer = (OAuthConsumer)obj; - - long primaryKey = oAuthConsumer.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - OAuthConsumerModelImpl oAuthConsumerModelImpl = this; - - oAuthConsumerModelImpl._originalGadgetKey = oAuthConsumerModelImpl._gadgetKey; - - oAuthConsumerModelImpl._originalServiceName = oAuthConsumerModelImpl._serviceName; - - oAuthConsumerModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - OAuthConsumerCacheModel oAuthConsumerCacheModel = new OAuthConsumerCacheModel(); - - oAuthConsumerCacheModel.oAuthConsumerId = getOAuthConsumerId(); - - oAuthConsumerCacheModel.companyId = getCompanyId(); - - Date createDate = getCreateDate(); - - if (createDate != null) { - oAuthConsumerCacheModel.createDate = createDate.getTime(); - } - else { - oAuthConsumerCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - oAuthConsumerCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - oAuthConsumerCacheModel.modifiedDate = Long.MIN_VALUE; - } - - oAuthConsumerCacheModel.gadgetKey = getGadgetKey(); - - String gadgetKey = oAuthConsumerCacheModel.gadgetKey; - - if ((gadgetKey != null) && (gadgetKey.length() == 0)) { - oAuthConsumerCacheModel.gadgetKey = null; - } - - oAuthConsumerCacheModel.serviceName = getServiceName(); - - String serviceName = oAuthConsumerCacheModel.serviceName; - - if ((serviceName != null) && (serviceName.length() == 0)) { - oAuthConsumerCacheModel.serviceName = null; - } - - oAuthConsumerCacheModel.consumerKey = getConsumerKey(); - - String consumerKey = oAuthConsumerCacheModel.consumerKey; - - if ((consumerKey != null) && (consumerKey.length() == 0)) { - oAuthConsumerCacheModel.consumerKey = null; - } - - oAuthConsumerCacheModel.consumerSecret = getConsumerSecret(); - - String consumerSecret = oAuthConsumerCacheModel.consumerSecret; - - if ((consumerSecret != null) && (consumerSecret.length() == 0)) { - oAuthConsumerCacheModel.consumerSecret = null; - } - - oAuthConsumerCacheModel.keyType = getKeyType(); - - String keyType = oAuthConsumerCacheModel.keyType; - - if ((keyType != null) && (keyType.length() == 0)) { - oAuthConsumerCacheModel.keyType = null; - } - - return oAuthConsumerCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(19); - - sb.append("{oAuthConsumerId="); - sb.append(getOAuthConsumerId()); - sb.append(", companyId="); - sb.append(getCompanyId()); - sb.append(", createDate="); - sb.append(getCreateDate()); - sb.append(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", gadgetKey="); - sb.append(getGadgetKey()); - sb.append(", serviceName="); - sb.append(getServiceName()); - sb.append(", consumerKey="); - sb.append(getConsumerKey()); - sb.append(", consumerSecret="); - sb.append(getConsumerSecret()); - sb.append(", keyType="); - sb.append(getKeyType()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(31); - - sb.append(""); - sb.append("com.liferay.opensocial.model.OAuthConsumer"); - sb.append(""); - - sb.append( - "oAuthConsumerId"); - sb.append( - "companyId"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "gadgetKey"); - sb.append( - "serviceName"); - sb.append( - "consumerKey"); - sb.append( - "consumerSecret"); - sb.append( - "keyType"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = OAuthConsumer.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { - OAuthConsumer.class - }; - private long _oAuthConsumerId; - private long _companyId; - private Date _createDate; - private Date _modifiedDate; - private String _gadgetKey; - private String _originalGadgetKey; - private String _serviceName; - private String _originalServiceName; - private String _consumerKey; - private String _consumerSecret; - private String _keyType; - private long _columnBitmask; - private OAuthConsumer _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenBaseImpl.java deleted file mode 100644 index 9ee6f8938f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenBaseImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.opensocial.model.OAuthToken; -import com.liferay.opensocial.service.OAuthTokenLocalServiceUtil; - -import com.liferay.portal.kernel.exception.SystemException; - -/** - * The extended model base implementation for the OAuthToken service. Represents a row in the "OpenSocial_OAuthToken" database table, with each column mapped to a property of this class. - * - *

    - * 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 OAuthTokenImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthTokenImpl - * @see com.liferay.opensocial.model.OAuthToken - * @generated - */ -public abstract class OAuthTokenBaseImpl extends OAuthTokenModelImpl - implements OAuthToken { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a o auth token model instance should use the {@link OAuthToken} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - OAuthTokenLocalServiceUtil.addOAuthToken(this); - } - else { - OAuthTokenLocalServiceUtil.updateOAuthToken(this); - } - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenCacheModel.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenCacheModel.java deleted file mode 100644 index 56ef5a9998..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenCacheModel.java +++ /dev/null @@ -1,252 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.opensocial.model.OAuthToken; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.CacheModel; - -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 OAuthToken in entity cache. - * - * @author Brian Wing Shun Chan - * @see OAuthToken - * @generated - */ -public class OAuthTokenCacheModel implements CacheModel, - Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(29); - - sb.append("{oAuthTokenId="); - sb.append(oAuthTokenId); - 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(", modifiedDate="); - sb.append(modifiedDate); - sb.append(", gadgetKey="); - sb.append(gadgetKey); - sb.append(", serviceName="); - sb.append(serviceName); - sb.append(", moduleId="); - sb.append(moduleId); - sb.append(", accessToken="); - sb.append(accessToken); - sb.append(", tokenName="); - sb.append(tokenName); - sb.append(", tokenSecret="); - sb.append(tokenSecret); - sb.append(", sessionHandle="); - sb.append(sessionHandle); - sb.append(", expiration="); - sb.append(expiration); - sb.append("}"); - - return sb.toString(); - } - - @Override - public OAuthToken toEntityModel() { - OAuthTokenImpl oAuthTokenImpl = new OAuthTokenImpl(); - - oAuthTokenImpl.setOAuthTokenId(oAuthTokenId); - oAuthTokenImpl.setCompanyId(companyId); - oAuthTokenImpl.setUserId(userId); - - if (userName == null) { - oAuthTokenImpl.setUserName(StringPool.BLANK); - } - else { - oAuthTokenImpl.setUserName(userName); - } - - if (createDate == Long.MIN_VALUE) { - oAuthTokenImpl.setCreateDate(null); - } - else { - oAuthTokenImpl.setCreateDate(new Date(createDate)); - } - - if (modifiedDate == Long.MIN_VALUE) { - oAuthTokenImpl.setModifiedDate(null); - } - else { - oAuthTokenImpl.setModifiedDate(new Date(modifiedDate)); - } - - if (gadgetKey == null) { - oAuthTokenImpl.setGadgetKey(StringPool.BLANK); - } - else { - oAuthTokenImpl.setGadgetKey(gadgetKey); - } - - if (serviceName == null) { - oAuthTokenImpl.setServiceName(StringPool.BLANK); - } - else { - oAuthTokenImpl.setServiceName(serviceName); - } - - oAuthTokenImpl.setModuleId(moduleId); - - if (accessToken == null) { - oAuthTokenImpl.setAccessToken(StringPool.BLANK); - } - else { - oAuthTokenImpl.setAccessToken(accessToken); - } - - if (tokenName == null) { - oAuthTokenImpl.setTokenName(StringPool.BLANK); - } - else { - oAuthTokenImpl.setTokenName(tokenName); - } - - if (tokenSecret == null) { - oAuthTokenImpl.setTokenSecret(StringPool.BLANK); - } - else { - oAuthTokenImpl.setTokenSecret(tokenSecret); - } - - if (sessionHandle == null) { - oAuthTokenImpl.setSessionHandle(StringPool.BLANK); - } - else { - oAuthTokenImpl.setSessionHandle(sessionHandle); - } - - oAuthTokenImpl.setExpiration(expiration); - - oAuthTokenImpl.resetOriginalValues(); - - return oAuthTokenImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - oAuthTokenId = objectInput.readLong(); - companyId = objectInput.readLong(); - userId = objectInput.readLong(); - userName = objectInput.readUTF(); - createDate = objectInput.readLong(); - modifiedDate = objectInput.readLong(); - gadgetKey = objectInput.readUTF(); - serviceName = objectInput.readUTF(); - moduleId = objectInput.readLong(); - accessToken = objectInput.readUTF(); - tokenName = objectInput.readUTF(); - tokenSecret = objectInput.readUTF(); - sessionHandle = objectInput.readUTF(); - expiration = objectInput.readLong(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - objectOutput.writeLong(oAuthTokenId); - objectOutput.writeLong(companyId); - objectOutput.writeLong(userId); - - if (userName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(userName); - } - - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); - - if (gadgetKey == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(gadgetKey); - } - - if (serviceName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(serviceName); - } - - objectOutput.writeLong(moduleId); - - if (accessToken == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(accessToken); - } - - if (tokenName == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(tokenName); - } - - if (tokenSecret == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(tokenSecret); - } - - if (sessionHandle == null) { - objectOutput.writeUTF(StringPool.BLANK); - } - else { - objectOutput.writeUTF(sessionHandle); - } - - objectOutput.writeLong(expiration); - } - - public long oAuthTokenId; - public long companyId; - public long userId; - public String userName; - public long createDate; - public long modifiedDate; - public String gadgetKey; - public String serviceName; - public long moduleId; - public String accessToken; - public String tokenName; - public String tokenSecret; - public String sessionHandle; - public long expiration; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenImpl.java deleted file mode 100644 index 93f3f9ef00..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -/** - * @author Brian Wing Shun Chan - */ -public class OAuthTokenImpl extends OAuthTokenBaseImpl { - - public OAuthTokenImpl() { - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenModelImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenModelImpl.java deleted file mode 100644 index ddee09ed9d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/model/impl/OAuthTokenModelImpl.java +++ /dev/null @@ -1,825 +0,0 @@ -/** - * 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 com.liferay.opensocial.model.impl; - -import com.liferay.opensocial.model.OAuthToken; -import com.liferay.opensocial.model.OAuthTokenModel; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.SystemException; -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 java.io.Serializable; - -import java.sql.Types; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * The base model implementation for the OAuthToken service. Represents a row in the "OpenSocial_OAuthToken" database table, with each column mapped to a property of this class. - * - *

    - * This implementation and its corresponding interface {@link com.liferay.opensocial.model.OAuthTokenModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link OAuthTokenImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthTokenImpl - * @see com.liferay.opensocial.model.OAuthToken - * @see com.liferay.opensocial.model.OAuthTokenModel - * @generated - */ -public class OAuthTokenModelImpl extends BaseModelImpl - implements OAuthTokenModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a o auth token model instance should use the {@link com.liferay.opensocial.model.OAuthToken} interface instead. - */ - public static final String TABLE_NAME = "OpenSocial_OAuthToken"; - public static final Object[][] TABLE_COLUMNS = { - { "oAuthTokenId", Types.BIGINT }, - { "companyId", Types.BIGINT }, - { "userId", Types.BIGINT }, - { "userName", Types.VARCHAR }, - { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP }, - { "gadgetKey", Types.VARCHAR }, - { "serviceName", Types.VARCHAR }, - { "moduleId", Types.BIGINT }, - { "accessToken", Types.VARCHAR }, - { "tokenName", Types.VARCHAR }, - { "tokenSecret", Types.VARCHAR }, - { "sessionHandle", Types.VARCHAR }, - { "expiration", Types.BIGINT } - }; - public static final String TABLE_SQL_CREATE = "create table OpenSocial_OAuthToken (oAuthTokenId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,gadgetKey VARCHAR(75) null,serviceName VARCHAR(75) null,moduleId LONG,accessToken VARCHAR(75) null,tokenName VARCHAR(75) null,tokenSecret VARCHAR(75) null,sessionHandle VARCHAR(75) null,expiration LONG)"; - public static final String TABLE_SQL_DROP = "drop table OpenSocial_OAuthToken"; - public static final String ORDER_BY_JPQL = " ORDER BY oAuthToken.oAuthTokenId ASC"; - public static final String ORDER_BY_SQL = " ORDER BY OpenSocial_OAuthToken.oAuthTokenId 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.com.liferay.opensocial.model.OAuthToken"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.com.liferay.opensocial.model.OAuthToken"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.com.liferay.opensocial.model.OAuthToken"), - true); - public static long GADGETKEY_COLUMN_BITMASK = 1L; - public static long MODULEID_COLUMN_BITMASK = 2L; - public static long SERVICENAME_COLUMN_BITMASK = 4L; - public static long TOKENNAME_COLUMN_BITMASK = 8L; - public static long USERID_COLUMN_BITMASK = 16L; - public static long OAUTHTOKENID_COLUMN_BITMASK = 32L; - public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get( - "lock.expiration.time.com.liferay.opensocial.model.OAuthToken")); - - public OAuthTokenModelImpl() { - } - - @Override - public long getPrimaryKey() { - return _oAuthTokenId; - } - - @Override - public void setPrimaryKey(long primaryKey) { - setOAuthTokenId(primaryKey); - } - - @Override - public Serializable getPrimaryKeyObj() { - return _oAuthTokenId; - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey(((Long)primaryKeyObj).longValue()); - } - - @Override - public Class getModelClass() { - return OAuthToken.class; - } - - @Override - public String getModelClassName() { - return OAuthToken.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("oAuthTokenId", getOAuthTokenId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("gadgetKey", getGadgetKey()); - attributes.put("serviceName", getServiceName()); - attributes.put("moduleId", getModuleId()); - attributes.put("accessToken", getAccessToken()); - attributes.put("tokenName", getTokenName()); - attributes.put("tokenSecret", getTokenSecret()); - attributes.put("sessionHandle", getSessionHandle()); - attributes.put("expiration", getExpiration()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - Long oAuthTokenId = (Long)attributes.get("oAuthTokenId"); - - if (oAuthTokenId != null) { - setOAuthTokenId(oAuthTokenId); - } - - 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); - } - - Date modifiedDate = (Date)attributes.get("modifiedDate"); - - if (modifiedDate != null) { - setModifiedDate(modifiedDate); - } - - String gadgetKey = (String)attributes.get("gadgetKey"); - - if (gadgetKey != null) { - setGadgetKey(gadgetKey); - } - - String serviceName = (String)attributes.get("serviceName"); - - if (serviceName != null) { - setServiceName(serviceName); - } - - Long moduleId = (Long)attributes.get("moduleId"); - - if (moduleId != null) { - setModuleId(moduleId); - } - - String accessToken = (String)attributes.get("accessToken"); - - if (accessToken != null) { - setAccessToken(accessToken); - } - - String tokenName = (String)attributes.get("tokenName"); - - if (tokenName != null) { - setTokenName(tokenName); - } - - String tokenSecret = (String)attributes.get("tokenSecret"); - - if (tokenSecret != null) { - setTokenSecret(tokenSecret); - } - - String sessionHandle = (String)attributes.get("sessionHandle"); - - if (sessionHandle != null) { - setSessionHandle(sessionHandle); - } - - Long expiration = (Long)attributes.get("expiration"); - - if (expiration != null) { - setExpiration(expiration); - } - } - - @Override - public long getOAuthTokenId() { - return _oAuthTokenId; - } - - @Override - public void setOAuthTokenId(long oAuthTokenId) { - _oAuthTokenId = oAuthTokenId; - } - - @Override - public long getCompanyId() { - return _companyId; - } - - @Override - public void setCompanyId(long companyId) { - _companyId = companyId; - } - - @Override - public long getUserId() { - return _userId; - } - - @Override - public void setUserId(long userId) { - _columnBitmask |= USERID_COLUMN_BITMASK; - - if (!_setOriginalUserId) { - _setOriginalUserId = true; - - _originalUserId = _userId; - } - - _userId = userId; - } - - @Override - public String getUserUuid() throws SystemException { - return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid); - } - - @Override - public void setUserUuid(String userUuid) { - _userUuid = userUuid; - } - - public long getOriginalUserId() { - return _originalUserId; - } - - @Override - public String getUserName() { - if (_userName == null) { - return StringPool.BLANK; - } - else { - return _userName; - } - } - - @Override - public void setUserName(String userName) { - _userName = userName; - } - - @Override - public Date getCreateDate() { - return _createDate; - } - - @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; - } - - @Override - public Date getModifiedDate() { - return _modifiedDate; - } - - @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; - } - - @Override - public String getGadgetKey() { - if (_gadgetKey == null) { - return StringPool.BLANK; - } - else { - return _gadgetKey; - } - } - - @Override - public void setGadgetKey(String gadgetKey) { - _columnBitmask |= GADGETKEY_COLUMN_BITMASK; - - if (_originalGadgetKey == null) { - _originalGadgetKey = _gadgetKey; - } - - _gadgetKey = gadgetKey; - } - - public String getOriginalGadgetKey() { - return GetterUtil.getString(_originalGadgetKey); - } - - @Override - public String getServiceName() { - if (_serviceName == null) { - return StringPool.BLANK; - } - else { - return _serviceName; - } - } - - @Override - public void setServiceName(String serviceName) { - _columnBitmask |= SERVICENAME_COLUMN_BITMASK; - - if (_originalServiceName == null) { - _originalServiceName = _serviceName; - } - - _serviceName = serviceName; - } - - public String getOriginalServiceName() { - return GetterUtil.getString(_originalServiceName); - } - - @Override - public long getModuleId() { - return _moduleId; - } - - @Override - public void setModuleId(long moduleId) { - _columnBitmask |= MODULEID_COLUMN_BITMASK; - - if (!_setOriginalModuleId) { - _setOriginalModuleId = true; - - _originalModuleId = _moduleId; - } - - _moduleId = moduleId; - } - - public long getOriginalModuleId() { - return _originalModuleId; - } - - @Override - public String getAccessToken() { - if (_accessToken == null) { - return StringPool.BLANK; - } - else { - return _accessToken; - } - } - - @Override - public void setAccessToken(String accessToken) { - _accessToken = accessToken; - } - - @Override - public String getTokenName() { - if (_tokenName == null) { - return StringPool.BLANK; - } - else { - return _tokenName; - } - } - - @Override - public void setTokenName(String tokenName) { - _columnBitmask |= TOKENNAME_COLUMN_BITMASK; - - if (_originalTokenName == null) { - _originalTokenName = _tokenName; - } - - _tokenName = tokenName; - } - - public String getOriginalTokenName() { - return GetterUtil.getString(_originalTokenName); - } - - @Override - public String getTokenSecret() { - if (_tokenSecret == null) { - return StringPool.BLANK; - } - else { - return _tokenSecret; - } - } - - @Override - public void setTokenSecret(String tokenSecret) { - _tokenSecret = tokenSecret; - } - - @Override - public String getSessionHandle() { - if (_sessionHandle == null) { - return StringPool.BLANK; - } - else { - return _sessionHandle; - } - } - - @Override - public void setSessionHandle(String sessionHandle) { - _sessionHandle = sessionHandle; - } - - @Override - public long getExpiration() { - return _expiration; - } - - @Override - public void setExpiration(long expiration) { - _expiration = expiration; - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public ExpandoBridge getExpandoBridge() { - return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), - OAuthToken.class.getName(), getPrimaryKey()); - } - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext) { - ExpandoBridge expandoBridge = getExpandoBridge(); - - expandoBridge.setAttributes(serviceContext); - } - - @Override - public OAuthToken toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (OAuthToken)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - OAuthTokenImpl oAuthTokenImpl = new OAuthTokenImpl(); - - oAuthTokenImpl.setOAuthTokenId(getOAuthTokenId()); - oAuthTokenImpl.setCompanyId(getCompanyId()); - oAuthTokenImpl.setUserId(getUserId()); - oAuthTokenImpl.setUserName(getUserName()); - oAuthTokenImpl.setCreateDate(getCreateDate()); - oAuthTokenImpl.setModifiedDate(getModifiedDate()); - oAuthTokenImpl.setGadgetKey(getGadgetKey()); - oAuthTokenImpl.setServiceName(getServiceName()); - oAuthTokenImpl.setModuleId(getModuleId()); - oAuthTokenImpl.setAccessToken(getAccessToken()); - oAuthTokenImpl.setTokenName(getTokenName()); - oAuthTokenImpl.setTokenSecret(getTokenSecret()); - oAuthTokenImpl.setSessionHandle(getSessionHandle()); - oAuthTokenImpl.setExpiration(getExpiration()); - - oAuthTokenImpl.resetOriginalValues(); - - return oAuthTokenImpl; - } - - @Override - public int compareTo(OAuthToken oAuthToken) { - long primaryKey = oAuthToken.getPrimaryKey(); - - if (getPrimaryKey() < primaryKey) { - return -1; - } - else if (getPrimaryKey() > primaryKey) { - return 1; - } - else { - return 0; - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof OAuthToken)) { - return false; - } - - OAuthToken oAuthToken = (OAuthToken)obj; - - long primaryKey = oAuthToken.getPrimaryKey(); - - if (getPrimaryKey() == primaryKey) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (int)getPrimaryKey(); - } - - @Override - public void resetOriginalValues() { - OAuthTokenModelImpl oAuthTokenModelImpl = this; - - oAuthTokenModelImpl._originalUserId = oAuthTokenModelImpl._userId; - - oAuthTokenModelImpl._setOriginalUserId = false; - - oAuthTokenModelImpl._originalGadgetKey = oAuthTokenModelImpl._gadgetKey; - - oAuthTokenModelImpl._originalServiceName = oAuthTokenModelImpl._serviceName; - - oAuthTokenModelImpl._originalModuleId = oAuthTokenModelImpl._moduleId; - - oAuthTokenModelImpl._setOriginalModuleId = false; - - oAuthTokenModelImpl._originalTokenName = oAuthTokenModelImpl._tokenName; - - oAuthTokenModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - OAuthTokenCacheModel oAuthTokenCacheModel = new OAuthTokenCacheModel(); - - oAuthTokenCacheModel.oAuthTokenId = getOAuthTokenId(); - - oAuthTokenCacheModel.companyId = getCompanyId(); - - oAuthTokenCacheModel.userId = getUserId(); - - oAuthTokenCacheModel.userName = getUserName(); - - String userName = oAuthTokenCacheModel.userName; - - if ((userName != null) && (userName.length() == 0)) { - oAuthTokenCacheModel.userName = null; - } - - Date createDate = getCreateDate(); - - if (createDate != null) { - oAuthTokenCacheModel.createDate = createDate.getTime(); - } - else { - oAuthTokenCacheModel.createDate = Long.MIN_VALUE; - } - - Date modifiedDate = getModifiedDate(); - - if (modifiedDate != null) { - oAuthTokenCacheModel.modifiedDate = modifiedDate.getTime(); - } - else { - oAuthTokenCacheModel.modifiedDate = Long.MIN_VALUE; - } - - oAuthTokenCacheModel.gadgetKey = getGadgetKey(); - - String gadgetKey = oAuthTokenCacheModel.gadgetKey; - - if ((gadgetKey != null) && (gadgetKey.length() == 0)) { - oAuthTokenCacheModel.gadgetKey = null; - } - - oAuthTokenCacheModel.serviceName = getServiceName(); - - String serviceName = oAuthTokenCacheModel.serviceName; - - if ((serviceName != null) && (serviceName.length() == 0)) { - oAuthTokenCacheModel.serviceName = null; - } - - oAuthTokenCacheModel.moduleId = getModuleId(); - - oAuthTokenCacheModel.accessToken = getAccessToken(); - - String accessToken = oAuthTokenCacheModel.accessToken; - - if ((accessToken != null) && (accessToken.length() == 0)) { - oAuthTokenCacheModel.accessToken = null; - } - - oAuthTokenCacheModel.tokenName = getTokenName(); - - String tokenName = oAuthTokenCacheModel.tokenName; - - if ((tokenName != null) && (tokenName.length() == 0)) { - oAuthTokenCacheModel.tokenName = null; - } - - oAuthTokenCacheModel.tokenSecret = getTokenSecret(); - - String tokenSecret = oAuthTokenCacheModel.tokenSecret; - - if ((tokenSecret != null) && (tokenSecret.length() == 0)) { - oAuthTokenCacheModel.tokenSecret = null; - } - - oAuthTokenCacheModel.sessionHandle = getSessionHandle(); - - String sessionHandle = oAuthTokenCacheModel.sessionHandle; - - if ((sessionHandle != null) && (sessionHandle.length() == 0)) { - oAuthTokenCacheModel.sessionHandle = null; - } - - oAuthTokenCacheModel.expiration = getExpiration(); - - return oAuthTokenCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(29); - - sb.append("{oAuthTokenId="); - sb.append(getOAuthTokenId()); - 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(", modifiedDate="); - sb.append(getModifiedDate()); - sb.append(", gadgetKey="); - sb.append(getGadgetKey()); - sb.append(", serviceName="); - sb.append(getServiceName()); - sb.append(", moduleId="); - sb.append(getModuleId()); - sb.append(", accessToken="); - sb.append(getAccessToken()); - sb.append(", tokenName="); - sb.append(getTokenName()); - sb.append(", tokenSecret="); - sb.append(getTokenSecret()); - sb.append(", sessionHandle="); - sb.append(getSessionHandle()); - sb.append(", expiration="); - sb.append(getExpiration()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(46); - - sb.append(""); - sb.append("com.liferay.opensocial.model.OAuthToken"); - sb.append(""); - - sb.append( - "oAuthTokenId"); - sb.append( - "companyId"); - sb.append( - "userId"); - sb.append( - "userName"); - sb.append( - "createDate"); - sb.append( - "modifiedDate"); - sb.append( - "gadgetKey"); - sb.append( - "serviceName"); - sb.append( - "moduleId"); - sb.append( - "accessToken"); - sb.append( - "tokenName"); - sb.append( - "tokenSecret"); - sb.append( - "sessionHandle"); - sb.append( - "expiration"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = OAuthToken.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { - OAuthToken.class - }; - private long _oAuthTokenId; - private long _companyId; - private long _userId; - private String _userUuid; - private long _originalUserId; - private boolean _setOriginalUserId; - private String _userName; - private Date _createDate; - private Date _modifiedDate; - private String _gadgetKey; - private String _originalGadgetKey; - private String _serviceName; - private String _originalServiceName; - private long _moduleId; - private long _originalModuleId; - private boolean _setOriginalModuleId; - private String _accessToken; - private String _tokenName; - private String _originalTokenName; - private String _tokenSecret; - private String _sessionHandle; - private long _expiration; - private long _columnBitmask; - private OAuthToken _escapedModel; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetLocalServiceBaseImpl.java deleted file mode 100644 index 21991527fe..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetLocalServiceBaseImpl.java +++ /dev/null @@ -1,706 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.base; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.GadgetLocalService; -import com.liferay.opensocial.service.persistence.GadgetPersistence; -import com.liferay.opensocial.service.persistence.OAuthConsumerPersistence; -import com.liferay.opensocial.service.persistence.OAuthTokenPersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the gadget local service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.opensocial.service.impl.GadgetLocalServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.opensocial.service.impl.GadgetLocalServiceImpl - * @see com.liferay.opensocial.service.GadgetLocalServiceUtil - * @generated - */ -public abstract class GadgetLocalServiceBaseImpl extends BaseLocalServiceImpl - implements GadgetLocalService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.opensocial.service.GadgetLocalServiceUtil} to access the gadget local service. - */ - - /** - * Adds the gadget to the database. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public Gadget addGadget(Gadget gadget) throws SystemException { - gadget.setNew(true); - - return gadgetPersistence.update(gadget); - } - - /** - * Creates a new gadget with the primary key. Does not add the gadget to the database. - * - * @param gadgetId the primary key for the new gadget - * @return the new gadget - */ - @Override - public Gadget createGadget(long gadgetId) { - return gadgetPersistence.create(gadgetId); - } - - /** - * Deletes the gadget with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param gadgetId the primary key of the gadget - * @return the gadget that was removed - * @throws PortalException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public Gadget deleteGadget(long gadgetId) - throws PortalException, SystemException { - return gadgetPersistence.remove(gadgetId); - } - - /** - * Deletes the gadget from the database. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was removed - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public Gadget deleteGadget(Gadget gadget) throws SystemException { - return gadgetPersistence.remove(gadget); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(Gadget.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 gadgetPersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @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 gadgetPersistence.findWithDynamicQuery(dynamicQuery, start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 gadgetPersistence.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 gadgetPersistence.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 gadgetPersistence.countWithDynamicQuery(dynamicQuery, projection); - } - - @Override - public Gadget fetchGadget(long gadgetId) throws SystemException { - return gadgetPersistence.fetchByPrimaryKey(gadgetId); - } - - /** - * Returns the gadget with the matching UUID and company. - * - * @param uuid the gadget's UUID - * @param companyId the primary key of the company - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchGadgetByUuidAndCompanyId(String uuid, long companyId) - throws SystemException { - return gadgetPersistence.fetchByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns the gadget with the primary key. - * - * @param gadgetId the primary key of the gadget - * @return the gadget - * @throws PortalException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget getGadget(long gadgetId) - throws PortalException, SystemException { - return gadgetPersistence.findByPrimaryKey(gadgetId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return gadgetPersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns the gadget with the matching UUID and company. - * - * @param uuid the gadget's UUID - * @param companyId the primary key of the company - * @return the matching gadget - * @throws PortalException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget getGadgetByUuidAndCompanyId(String uuid, long companyId) - throws PortalException, SystemException { - return gadgetPersistence.findByUuid_C_First(uuid, companyId, null); - } - - /** - * Returns a range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List getGadgets(int start, int end) - throws SystemException { - return gadgetPersistence.findAll(start, end); - } - - /** - * Returns the number of gadgets. - * - * @return the number of gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public int getGadgetsCount() throws SystemException { - return gadgetPersistence.countAll(); - } - - /** - * Updates the gadget in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param gadget the gadget - * @return the gadget that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public Gadget updateGadget(Gadget gadget) throws SystemException { - return gadgetPersistence.update(gadget); - } - - /** - * Returns the gadget local service. - * - * @return the gadget local service - */ - public com.liferay.opensocial.service.GadgetLocalService getGadgetLocalService() { - return gadgetLocalService; - } - - /** - * Sets the gadget local service. - * - * @param gadgetLocalService the gadget local service - */ - public void setGadgetLocalService( - com.liferay.opensocial.service.GadgetLocalService gadgetLocalService) { - this.gadgetLocalService = gadgetLocalService; - } - - /** - * Returns the gadget remote service. - * - * @return the gadget remote service - */ - public com.liferay.opensocial.service.GadgetService getGadgetService() { - return gadgetService; - } - - /** - * Sets the gadget remote service. - * - * @param gadgetService the gadget remote service - */ - public void setGadgetService( - com.liferay.opensocial.service.GadgetService gadgetService) { - this.gadgetService = gadgetService; - } - - /** - * Returns the gadget persistence. - * - * @return the gadget persistence - */ - public GadgetPersistence getGadgetPersistence() { - return gadgetPersistence; - } - - /** - * Sets the gadget persistence. - * - * @param gadgetPersistence the gadget persistence - */ - public void setGadgetPersistence(GadgetPersistence gadgetPersistence) { - this.gadgetPersistence = gadgetPersistence; - } - - /** - * Returns the o auth consumer local service. - * - * @return the o auth consumer local service - */ - public com.liferay.opensocial.service.OAuthConsumerLocalService getOAuthConsumerLocalService() { - return oAuthConsumerLocalService; - } - - /** - * Sets the o auth consumer local service. - * - * @param oAuthConsumerLocalService the o auth consumer local service - */ - public void setOAuthConsumerLocalService( - com.liferay.opensocial.service.OAuthConsumerLocalService oAuthConsumerLocalService) { - this.oAuthConsumerLocalService = oAuthConsumerLocalService; - } - - /** - * Returns the o auth consumer persistence. - * - * @return the o auth consumer persistence - */ - public OAuthConsumerPersistence getOAuthConsumerPersistence() { - return oAuthConsumerPersistence; - } - - /** - * Sets the o auth consumer persistence. - * - * @param oAuthConsumerPersistence the o auth consumer persistence - */ - public void setOAuthConsumerPersistence( - OAuthConsumerPersistence oAuthConsumerPersistence) { - this.oAuthConsumerPersistence = oAuthConsumerPersistence; - } - - /** - * Returns the o auth token local service. - * - * @return the o auth token local service - */ - public com.liferay.opensocial.service.OAuthTokenLocalService getOAuthTokenLocalService() { - return oAuthTokenLocalService; - } - - /** - * Sets the o auth token local service. - * - * @param oAuthTokenLocalService the o auth token local service - */ - public void setOAuthTokenLocalService( - com.liferay.opensocial.service.OAuthTokenLocalService oAuthTokenLocalService) { - this.oAuthTokenLocalService = oAuthTokenLocalService; - } - - /** - * Returns the o auth token persistence. - * - * @return the o auth token persistence - */ - public OAuthTokenPersistence getOAuthTokenPersistence() { - return oAuthTokenPersistence; - } - - /** - * Sets the o auth token persistence. - * - * @param oAuthTokenPersistence the o auth token persistence - */ - public void setOAuthTokenPersistence( - OAuthTokenPersistence oAuthTokenPersistence) { - this.oAuthTokenPersistence = oAuthTokenPersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * 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("com.liferay.opensocial.model.Gadget", - gadgetLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "com.liferay.opensocial.model.Gadget"); - } - - /** - * 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 Gadget.class; - } - - protected String getModelClassName() { - return Gadget.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = gadgetPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.opensocial.service.GadgetLocalService.class) - protected com.liferay.opensocial.service.GadgetLocalService gadgetLocalService; - @BeanReference(type = com.liferay.opensocial.service.GadgetService.class) - protected com.liferay.opensocial.service.GadgetService gadgetService; - @BeanReference(type = GadgetPersistence.class) - protected GadgetPersistence gadgetPersistence; - @BeanReference(type = com.liferay.opensocial.service.OAuthConsumerLocalService.class) - protected com.liferay.opensocial.service.OAuthConsumerLocalService oAuthConsumerLocalService; - @BeanReference(type = OAuthConsumerPersistence.class) - protected OAuthConsumerPersistence oAuthConsumerPersistence; - @BeanReference(type = com.liferay.opensocial.service.OAuthTokenLocalService.class) - protected com.liferay.opensocial.service.OAuthTokenLocalService oAuthTokenLocalService; - @BeanReference(type = OAuthTokenPersistence.class) - protected OAuthTokenPersistence oAuthTokenPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @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 GadgetLocalServiceClpInvoker _clpInvoker = new GadgetLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetLocalServiceClpInvoker.java deleted file mode 100644 index 97bb6d673d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetLocalServiceClpInvoker.java +++ /dev/null @@ -1,466 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.base; - -import com.liferay.opensocial.service.GadgetLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class GadgetLocalServiceClpInvoker { - public GadgetLocalServiceClpInvoker() { - _methodName0 = "addGadget"; - - _methodParameterTypes0 = new String[] { - "com.liferay.opensocial.model.Gadget" - }; - - _methodName1 = "createGadget"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteGadget"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteGadget"; - - _methodParameterTypes3 = new String[] { - "com.liferay.opensocial.model.Gadget" - }; - - _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 = "fetchGadget"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "fetchGadgetByUuidAndCompanyId"; - - _methodParameterTypes11 = new String[] { "java.lang.String", "long" }; - - _methodName12 = "getGadget"; - - _methodParameterTypes12 = new String[] { "long" }; - - _methodName13 = "getPersistedModel"; - - _methodParameterTypes13 = new String[] { "java.io.Serializable" }; - - _methodName14 = "getGadgetByUuidAndCompanyId"; - - _methodParameterTypes14 = new String[] { "java.lang.String", "long" }; - - _methodName15 = "getGadgets"; - - _methodParameterTypes15 = new String[] { "int", "int" }; - - _methodName16 = "getGadgetsCount"; - - _methodParameterTypes16 = new String[] { }; - - _methodName17 = "updateGadget"; - - _methodParameterTypes17 = new String[] { - "com.liferay.opensocial.model.Gadget" - }; - - _methodName50 = "getBeanIdentifier"; - - _methodParameterTypes50 = new String[] { }; - - _methodName51 = "setBeanIdentifier"; - - _methodParameterTypes51 = new String[] { "java.lang.String" }; - - _methodName56 = "addGadget"; - - _methodParameterTypes56 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName57 = "deleteGadget"; - - _methodParameterTypes57 = new String[] { - "com.liferay.opensocial.model.Gadget" - }; - - _methodName58 = "deleteGadget"; - - _methodParameterTypes58 = new String[] { "long" }; - - _methodName59 = "deleteGadgets"; - - _methodParameterTypes59 = new String[] { "long" }; - - _methodName60 = "destroyGadget"; - - _methodParameterTypes60 = new String[] { "java.lang.String", "long" }; - - _methodName61 = "destroyGadgets"; - - _methodParameterTypes61 = new String[] { }; - - _methodName62 = "fetchGadget"; - - _methodParameterTypes62 = new String[] { "long", "java.lang.String" }; - - _methodName63 = "getGadget"; - - _methodParameterTypes63 = new String[] { "long", "java.lang.String" }; - - _methodName64 = "getGadget"; - - _methodParameterTypes64 = new String[] { "java.lang.String", "long" }; - - _methodName65 = "getGadgets"; - - _methodParameterTypes65 = new String[] { "long", "int", "int" }; - - _methodName66 = "getGadgetsCount"; - - _methodParameterTypes66 = new String[] { "long" }; - - _methodName67 = "initGadget"; - - _methodParameterTypes67 = new String[] { - "java.lang.String", "long", "long", "java.lang.String", - "java.lang.String" - }; - - _methodName68 = "initGadgets"; - - _methodParameterTypes68 = new String[] { }; - - _methodName69 = "updateGadget"; - - _methodParameterTypes69 = new String[] { "long", "java.lang.String" }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return GadgetLocalServiceUtil.addGadget((com.liferay.opensocial.model.Gadget)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return GadgetLocalServiceUtil.createGadget(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return GadgetLocalServiceUtil.deleteGadget(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return GadgetLocalServiceUtil.deleteGadget((com.liferay.opensocial.model.Gadget)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return GadgetLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return GadgetLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return GadgetLocalServiceUtil.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 GadgetLocalServiceUtil.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 GadgetLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return GadgetLocalServiceUtil.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 GadgetLocalServiceUtil.fetchGadget(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return GadgetLocalServiceUtil.fetchGadgetByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return GadgetLocalServiceUtil.getGadget(((Long)arguments[0]).longValue()); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return GadgetLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return GadgetLocalServiceUtil.getGadgetByUuidAndCompanyId((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return GadgetLocalServiceUtil.getGadgets(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName16.equals(name) && - Arrays.deepEquals(_methodParameterTypes16, parameterTypes)) { - return GadgetLocalServiceUtil.getGadgetsCount(); - } - - if (_methodName17.equals(name) && - Arrays.deepEquals(_methodParameterTypes17, parameterTypes)) { - return GadgetLocalServiceUtil.updateGadget((com.liferay.opensocial.model.Gadget)arguments[0]); - } - - if (_methodName50.equals(name) && - Arrays.deepEquals(_methodParameterTypes50, parameterTypes)) { - return GadgetLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName51.equals(name) && - Arrays.deepEquals(_methodParameterTypes51, parameterTypes)) { - GadgetLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName56.equals(name) && - Arrays.deepEquals(_methodParameterTypes56, parameterTypes)) { - return GadgetLocalServiceUtil.addGadget(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (com.liferay.portal.service.ServiceContext)arguments[3]); - } - - if (_methodName57.equals(name) && - Arrays.deepEquals(_methodParameterTypes57, parameterTypes)) { - return GadgetLocalServiceUtil.deleteGadget((com.liferay.opensocial.model.Gadget)arguments[0]); - } - - if (_methodName58.equals(name) && - Arrays.deepEquals(_methodParameterTypes58, parameterTypes)) { - return GadgetLocalServiceUtil.deleteGadget(((Long)arguments[0]).longValue()); - } - - if (_methodName59.equals(name) && - Arrays.deepEquals(_methodParameterTypes59, parameterTypes)) { - GadgetLocalServiceUtil.deleteGadgets(((Long)arguments[0]).longValue()); - - return null; - } - - if (_methodName60.equals(name) && - Arrays.deepEquals(_methodParameterTypes60, parameterTypes)) { - GadgetLocalServiceUtil.destroyGadget((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - - return null; - } - - if (_methodName61.equals(name) && - Arrays.deepEquals(_methodParameterTypes61, parameterTypes)) { - GadgetLocalServiceUtil.destroyGadgets(); - - return null; - } - - if (_methodName62.equals(name) && - Arrays.deepEquals(_methodParameterTypes62, parameterTypes)) { - return GadgetLocalServiceUtil.fetchGadget(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - if (_methodName63.equals(name) && - Arrays.deepEquals(_methodParameterTypes63, parameterTypes)) { - return GadgetLocalServiceUtil.getGadget(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - if (_methodName64.equals(name) && - Arrays.deepEquals(_methodParameterTypes64, parameterTypes)) { - return GadgetLocalServiceUtil.getGadget((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue()); - } - - if (_methodName65.equals(name) && - Arrays.deepEquals(_methodParameterTypes65, parameterTypes)) { - return GadgetLocalServiceUtil.getGadgets(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName66.equals(name) && - Arrays.deepEquals(_methodParameterTypes66, parameterTypes)) { - return GadgetLocalServiceUtil.getGadgetsCount(((Long)arguments[0]).longValue()); - } - - if (_methodName67.equals(name) && - Arrays.deepEquals(_methodParameterTypes67, parameterTypes)) { - GadgetLocalServiceUtil.initGadget((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue(), - ((Long)arguments[2]).longValue(), - (java.lang.String)arguments[3], (java.lang.String)arguments[4]); - - return null; - } - - if (_methodName68.equals(name) && - Arrays.deepEquals(_methodParameterTypes68, parameterTypes)) { - GadgetLocalServiceUtil.initGadgets(); - - return null; - } - - if (_methodName69.equals(name) && - Arrays.deepEquals(_methodParameterTypes69, parameterTypes)) { - return GadgetLocalServiceUtil.updateGadget(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - } - - 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 _methodName16; - private String[] _methodParameterTypes16; - private String _methodName17; - private String[] _methodParameterTypes17; - private String _methodName50; - private String[] _methodParameterTypes50; - private String _methodName51; - private String[] _methodParameterTypes51; - private String _methodName56; - private String[] _methodParameterTypes56; - private String _methodName57; - private String[] _methodParameterTypes57; - private String _methodName58; - private String[] _methodParameterTypes58; - private String _methodName59; - private String[] _methodParameterTypes59; - private String _methodName60; - private String[] _methodParameterTypes60; - private String _methodName61; - private String[] _methodParameterTypes61; - private String _methodName62; - private String[] _methodParameterTypes62; - private String _methodName63; - private String[] _methodParameterTypes63; - private String _methodName64; - private String[] _methodParameterTypes64; - private String _methodName65; - private String[] _methodParameterTypes65; - private String _methodName66; - private String[] _methodParameterTypes66; - private String _methodName67; - private String[] _methodParameterTypes67; - private String _methodName68; - private String[] _methodParameterTypes68; - private String _methodName69; - private String[] _methodParameterTypes69; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetServiceBaseImpl.java deleted file mode 100644 index 4ac5370802..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetServiceBaseImpl.java +++ /dev/null @@ -1,447 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.base; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.GadgetService; -import com.liferay.opensocial.service.persistence.GadgetPersistence; -import com.liferay.opensocial.service.persistence.OAuthConsumerPersistence; -import com.liferay.opensocial.service.persistence.OAuthTokenPersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the gadget remote service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.opensocial.service.impl.GadgetServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.opensocial.service.impl.GadgetServiceImpl - * @see com.liferay.opensocial.service.GadgetServiceUtil - * @generated - */ -public abstract class GadgetServiceBaseImpl extends BaseServiceImpl - implements GadgetService, IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.opensocial.service.GadgetServiceUtil} to access the gadget remote service. - */ - - /** - * Returns the gadget local service. - * - * @return the gadget local service - */ - public com.liferay.opensocial.service.GadgetLocalService getGadgetLocalService() { - return gadgetLocalService; - } - - /** - * Sets the gadget local service. - * - * @param gadgetLocalService the gadget local service - */ - public void setGadgetLocalService( - com.liferay.opensocial.service.GadgetLocalService gadgetLocalService) { - this.gadgetLocalService = gadgetLocalService; - } - - /** - * Returns the gadget remote service. - * - * @return the gadget remote service - */ - public com.liferay.opensocial.service.GadgetService getGadgetService() { - return gadgetService; - } - - /** - * Sets the gadget remote service. - * - * @param gadgetService the gadget remote service - */ - public void setGadgetService( - com.liferay.opensocial.service.GadgetService gadgetService) { - this.gadgetService = gadgetService; - } - - /** - * Returns the gadget persistence. - * - * @return the gadget persistence - */ - public GadgetPersistence getGadgetPersistence() { - return gadgetPersistence; - } - - /** - * Sets the gadget persistence. - * - * @param gadgetPersistence the gadget persistence - */ - public void setGadgetPersistence(GadgetPersistence gadgetPersistence) { - this.gadgetPersistence = gadgetPersistence; - } - - /** - * Returns the o auth consumer local service. - * - * @return the o auth consumer local service - */ - public com.liferay.opensocial.service.OAuthConsumerLocalService getOAuthConsumerLocalService() { - return oAuthConsumerLocalService; - } - - /** - * Sets the o auth consumer local service. - * - * @param oAuthConsumerLocalService the o auth consumer local service - */ - public void setOAuthConsumerLocalService( - com.liferay.opensocial.service.OAuthConsumerLocalService oAuthConsumerLocalService) { - this.oAuthConsumerLocalService = oAuthConsumerLocalService; - } - - /** - * Returns the o auth consumer persistence. - * - * @return the o auth consumer persistence - */ - public OAuthConsumerPersistence getOAuthConsumerPersistence() { - return oAuthConsumerPersistence; - } - - /** - * Sets the o auth consumer persistence. - * - * @param oAuthConsumerPersistence the o auth consumer persistence - */ - public void setOAuthConsumerPersistence( - OAuthConsumerPersistence oAuthConsumerPersistence) { - this.oAuthConsumerPersistence = oAuthConsumerPersistence; - } - - /** - * Returns the o auth token local service. - * - * @return the o auth token local service - */ - public com.liferay.opensocial.service.OAuthTokenLocalService getOAuthTokenLocalService() { - return oAuthTokenLocalService; - } - - /** - * Sets the o auth token local service. - * - * @param oAuthTokenLocalService the o auth token local service - */ - public void setOAuthTokenLocalService( - com.liferay.opensocial.service.OAuthTokenLocalService oAuthTokenLocalService) { - this.oAuthTokenLocalService = oAuthTokenLocalService; - } - - /** - * Returns the o auth token persistence. - * - * @return the o auth token persistence - */ - public OAuthTokenPersistence getOAuthTokenPersistence() { - return oAuthTokenPersistence; - } - - /** - * Sets the o auth token persistence. - * - * @param oAuthTokenPersistence the o auth token persistence - */ - public void setOAuthTokenPersistence( - OAuthTokenPersistence oAuthTokenPersistence) { - this.oAuthTokenPersistence = oAuthTokenPersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * 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 Gadget.class; - } - - protected String getModelClassName() { - return Gadget.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = gadgetPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.opensocial.service.GadgetLocalService.class) - protected com.liferay.opensocial.service.GadgetLocalService gadgetLocalService; - @BeanReference(type = com.liferay.opensocial.service.GadgetService.class) - protected com.liferay.opensocial.service.GadgetService gadgetService; - @BeanReference(type = GadgetPersistence.class) - protected GadgetPersistence gadgetPersistence; - @BeanReference(type = com.liferay.opensocial.service.OAuthConsumerLocalService.class) - protected com.liferay.opensocial.service.OAuthConsumerLocalService oAuthConsumerLocalService; - @BeanReference(type = OAuthConsumerPersistence.class) - protected OAuthConsumerPersistence oAuthConsumerPersistence; - @BeanReference(type = com.liferay.opensocial.service.OAuthTokenLocalService.class) - protected com.liferay.opensocial.service.OAuthTokenLocalService oAuthTokenLocalService; - @BeanReference(type = OAuthTokenPersistence.class) - protected OAuthTokenPersistence oAuthTokenPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @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 GadgetServiceClpInvoker _clpInvoker = new GadgetServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetServiceClpInvoker.java deleted file mode 100644 index 4d29700bd6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetServiceClpInvoker.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.base; - -import com.liferay.opensocial.service.GadgetServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class GadgetServiceClpInvoker { - public GadgetServiceClpInvoker() { - _methodName32 = "getBeanIdentifier"; - - _methodParameterTypes32 = new String[] { }; - - _methodName33 = "setBeanIdentifier"; - - _methodParameterTypes33 = new String[] { "java.lang.String" }; - - _methodName38 = "addGadget"; - - _methodParameterTypes38 = new String[] { - "long", "java.lang.String", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - - _methodName39 = "deleteGadget"; - - _methodParameterTypes39 = new String[] { - "long", "com.liferay.portal.service.ServiceContext" - }; - - _methodName40 = "updateGadget"; - - _methodParameterTypes40 = new String[] { - "long", "java.lang.String", - "com.liferay.portal.service.ServiceContext" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName32.equals(name) && - Arrays.deepEquals(_methodParameterTypes32, parameterTypes)) { - return GadgetServiceUtil.getBeanIdentifier(); - } - - if (_methodName33.equals(name) && - Arrays.deepEquals(_methodParameterTypes33, parameterTypes)) { - GadgetServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName38.equals(name) && - Arrays.deepEquals(_methodParameterTypes38, parameterTypes)) { - return GadgetServiceUtil.addGadget(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (com.liferay.portal.service.ServiceContext)arguments[3]); - } - - if (_methodName39.equals(name) && - Arrays.deepEquals(_methodParameterTypes39, parameterTypes)) { - GadgetServiceUtil.deleteGadget(((Long)arguments[0]).longValue(), - (com.liferay.portal.service.ServiceContext)arguments[1]); - - return null; - } - - if (_methodName40.equals(name) && - Arrays.deepEquals(_methodParameterTypes40, parameterTypes)) { - GadgetServiceUtil.updateGadget(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], - (com.liferay.portal.service.ServiceContext)arguments[2]); - - return null; - } - - throw new UnsupportedOperationException(); - } - - private String _methodName32; - private String[] _methodParameterTypes32; - private String _methodName33; - private String[] _methodParameterTypes33; - private String _methodName38; - private String[] _methodParameterTypes38; - private String _methodName39; - private String[] _methodParameterTypes39; - private String _methodName40; - private String[] _methodParameterTypes40; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthConsumerLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthConsumerLocalServiceBaseImpl.java deleted file mode 100644 index 7ada49b78e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthConsumerLocalServiceBaseImpl.java +++ /dev/null @@ -1,684 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.base; - -import com.liferay.opensocial.model.OAuthConsumer; -import com.liferay.opensocial.service.OAuthConsumerLocalService; -import com.liferay.opensocial.service.persistence.GadgetPersistence; -import com.liferay.opensocial.service.persistence.OAuthConsumerPersistence; -import com.liferay.opensocial.service.persistence.OAuthTokenPersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the o auth consumer local service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.opensocial.service.impl.OAuthConsumerLocalServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.opensocial.service.impl.OAuthConsumerLocalServiceImpl - * @see com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil - * @generated - */ -public abstract class OAuthConsumerLocalServiceBaseImpl - extends BaseLocalServiceImpl implements OAuthConsumerLocalService, - IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil} to access the o auth consumer local service. - */ - - /** - * Adds the o auth consumer to the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public OAuthConsumer addOAuthConsumer(OAuthConsumer oAuthConsumer) - throws SystemException { - oAuthConsumer.setNew(true); - - return oAuthConsumerPersistence.update(oAuthConsumer); - } - - /** - * Creates a new o auth consumer with the primary key. Does not add the o auth consumer to the database. - * - * @param oAuthConsumerId the primary key for the new o auth consumer - * @return the new o auth consumer - */ - @Override - public OAuthConsumer createOAuthConsumer(long oAuthConsumerId) { - return oAuthConsumerPersistence.create(oAuthConsumerId); - } - - /** - * Deletes the o auth consumer with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer that was removed - * @throws PortalException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public OAuthConsumer deleteOAuthConsumer(long oAuthConsumerId) - throws PortalException, SystemException { - return oAuthConsumerPersistence.remove(oAuthConsumerId); - } - - /** - * Deletes the o auth consumer from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was removed - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public OAuthConsumer deleteOAuthConsumer(OAuthConsumer oAuthConsumer) - throws SystemException { - return oAuthConsumerPersistence.remove(oAuthConsumer); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(OAuthConsumer.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 oAuthConsumerPersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @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 oAuthConsumerPersistence.findWithDynamicQuery(dynamicQuery, - start, end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 oAuthConsumerPersistence.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 oAuthConsumerPersistence.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 oAuthConsumerPersistence.countWithDynamicQuery(dynamicQuery, - projection); - } - - @Override - public OAuthConsumer fetchOAuthConsumer(long oAuthConsumerId) - throws SystemException { - return oAuthConsumerPersistence.fetchByPrimaryKey(oAuthConsumerId); - } - - /** - * Returns the o auth consumer with the primary key. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer - * @throws PortalException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer getOAuthConsumer(long oAuthConsumerId) - throws PortalException, SystemException { - return oAuthConsumerPersistence.findByPrimaryKey(oAuthConsumerId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return oAuthConsumerPersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns a range of all the o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public List getOAuthConsumers(int start, int end) - throws SystemException { - return oAuthConsumerPersistence.findAll(start, end); - } - - /** - * Returns the number of o auth consumers. - * - * @return the number of o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public int getOAuthConsumersCount() throws SystemException { - return oAuthConsumerPersistence.countAll(); - } - - /** - * Updates the o auth consumer in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param oAuthConsumer the o auth consumer - * @return the o auth consumer that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public OAuthConsumer updateOAuthConsumer(OAuthConsumer oAuthConsumer) - throws SystemException { - return oAuthConsumerPersistence.update(oAuthConsumer); - } - - /** - * Returns the gadget local service. - * - * @return the gadget local service - */ - public com.liferay.opensocial.service.GadgetLocalService getGadgetLocalService() { - return gadgetLocalService; - } - - /** - * Sets the gadget local service. - * - * @param gadgetLocalService the gadget local service - */ - public void setGadgetLocalService( - com.liferay.opensocial.service.GadgetLocalService gadgetLocalService) { - this.gadgetLocalService = gadgetLocalService; - } - - /** - * Returns the gadget remote service. - * - * @return the gadget remote service - */ - public com.liferay.opensocial.service.GadgetService getGadgetService() { - return gadgetService; - } - - /** - * Sets the gadget remote service. - * - * @param gadgetService the gadget remote service - */ - public void setGadgetService( - com.liferay.opensocial.service.GadgetService gadgetService) { - this.gadgetService = gadgetService; - } - - /** - * Returns the gadget persistence. - * - * @return the gadget persistence - */ - public GadgetPersistence getGadgetPersistence() { - return gadgetPersistence; - } - - /** - * Sets the gadget persistence. - * - * @param gadgetPersistence the gadget persistence - */ - public void setGadgetPersistence(GadgetPersistence gadgetPersistence) { - this.gadgetPersistence = gadgetPersistence; - } - - /** - * Returns the o auth consumer local service. - * - * @return the o auth consumer local service - */ - public com.liferay.opensocial.service.OAuthConsumerLocalService getOAuthConsumerLocalService() { - return oAuthConsumerLocalService; - } - - /** - * Sets the o auth consumer local service. - * - * @param oAuthConsumerLocalService the o auth consumer local service - */ - public void setOAuthConsumerLocalService( - com.liferay.opensocial.service.OAuthConsumerLocalService oAuthConsumerLocalService) { - this.oAuthConsumerLocalService = oAuthConsumerLocalService; - } - - /** - * Returns the o auth consumer persistence. - * - * @return the o auth consumer persistence - */ - public OAuthConsumerPersistence getOAuthConsumerPersistence() { - return oAuthConsumerPersistence; - } - - /** - * Sets the o auth consumer persistence. - * - * @param oAuthConsumerPersistence the o auth consumer persistence - */ - public void setOAuthConsumerPersistence( - OAuthConsumerPersistence oAuthConsumerPersistence) { - this.oAuthConsumerPersistence = oAuthConsumerPersistence; - } - - /** - * Returns the o auth token local service. - * - * @return the o auth token local service - */ - public com.liferay.opensocial.service.OAuthTokenLocalService getOAuthTokenLocalService() { - return oAuthTokenLocalService; - } - - /** - * Sets the o auth token local service. - * - * @param oAuthTokenLocalService the o auth token local service - */ - public void setOAuthTokenLocalService( - com.liferay.opensocial.service.OAuthTokenLocalService oAuthTokenLocalService) { - this.oAuthTokenLocalService = oAuthTokenLocalService; - } - - /** - * Returns the o auth token persistence. - * - * @return the o auth token persistence - */ - public OAuthTokenPersistence getOAuthTokenPersistence() { - return oAuthTokenPersistence; - } - - /** - * Sets the o auth token persistence. - * - * @param oAuthTokenPersistence the o auth token persistence - */ - public void setOAuthTokenPersistence( - OAuthTokenPersistence oAuthTokenPersistence) { - this.oAuthTokenPersistence = oAuthTokenPersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * 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("com.liferay.opensocial.model.OAuthConsumer", - oAuthConsumerLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "com.liferay.opensocial.model.OAuthConsumer"); - } - - /** - * 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 OAuthConsumer.class; - } - - protected String getModelClassName() { - return OAuthConsumer.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = oAuthConsumerPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.opensocial.service.GadgetLocalService.class) - protected com.liferay.opensocial.service.GadgetLocalService gadgetLocalService; - @BeanReference(type = com.liferay.opensocial.service.GadgetService.class) - protected com.liferay.opensocial.service.GadgetService gadgetService; - @BeanReference(type = GadgetPersistence.class) - protected GadgetPersistence gadgetPersistence; - @BeanReference(type = com.liferay.opensocial.service.OAuthConsumerLocalService.class) - protected com.liferay.opensocial.service.OAuthConsumerLocalService oAuthConsumerLocalService; - @BeanReference(type = OAuthConsumerPersistence.class) - protected OAuthConsumerPersistence oAuthConsumerPersistence; - @BeanReference(type = com.liferay.opensocial.service.OAuthTokenLocalService.class) - protected com.liferay.opensocial.service.OAuthTokenLocalService oAuthTokenLocalService; - @BeanReference(type = OAuthTokenPersistence.class) - protected OAuthTokenPersistence oAuthTokenPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @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 OAuthConsumerLocalServiceClpInvoker _clpInvoker = new OAuthConsumerLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthConsumerLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthConsumerLocalServiceClpInvoker.java deleted file mode 100644 index eb6a11e6e1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthConsumerLocalServiceClpInvoker.java +++ /dev/null @@ -1,392 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.base; - -import com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class OAuthConsumerLocalServiceClpInvoker { - public OAuthConsumerLocalServiceClpInvoker() { - _methodName0 = "addOAuthConsumer"; - - _methodParameterTypes0 = new String[] { - "com.liferay.opensocial.model.OAuthConsumer" - }; - - _methodName1 = "createOAuthConsumer"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteOAuthConsumer"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteOAuthConsumer"; - - _methodParameterTypes3 = new String[] { - "com.liferay.opensocial.model.OAuthConsumer" - }; - - _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 = "fetchOAuthConsumer"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "getOAuthConsumer"; - - _methodParameterTypes11 = new String[] { "long" }; - - _methodName12 = "getPersistedModel"; - - _methodParameterTypes12 = new String[] { "java.io.Serializable" }; - - _methodName13 = "getOAuthConsumers"; - - _methodParameterTypes13 = new String[] { "int", "int" }; - - _methodName14 = "getOAuthConsumersCount"; - - _methodParameterTypes14 = new String[] { }; - - _methodName15 = "updateOAuthConsumer"; - - _methodParameterTypes15 = new String[] { - "com.liferay.opensocial.model.OAuthConsumer" - }; - - _methodName48 = "getBeanIdentifier"; - - _methodParameterTypes48 = new String[] { }; - - _methodName49 = "setBeanIdentifier"; - - _methodParameterTypes49 = new String[] { "java.lang.String" }; - - _methodName54 = "addOAuthConsumer"; - - _methodParameterTypes54 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String" - }; - - _methodName55 = "deleteOAuthConsumer"; - - _methodParameterTypes55 = new String[] { "long" }; - - _methodName56 = "deleteOAuthConsumer"; - - _methodParameterTypes56 = new String[] { - "com.liferay.opensocial.model.OAuthConsumer" - }; - - _methodName57 = "deleteOAuthConsumers"; - - _methodParameterTypes57 = new String[] { "java.lang.String" }; - - _methodName58 = "fetchOAuthConsumer"; - - _methodParameterTypes58 = new String[] { - "java.lang.String", "java.lang.String" - }; - - _methodName59 = "getOAuthConsumer"; - - _methodParameterTypes59 = new String[] { - "java.lang.String", "java.lang.String" - }; - - _methodName60 = "getOAuthConsumers"; - - _methodParameterTypes60 = new String[] { "java.lang.String" }; - - _methodName61 = "getOAuthConsumers"; - - _methodParameterTypes61 = new String[] { "java.lang.String", "int", "int" }; - - _methodName62 = "getOAuthConsumersCount"; - - _methodParameterTypes62 = new String[] { "java.lang.String" }; - - _methodName63 = "updateOAuthConsumer"; - - _methodParameterTypes63 = new String[] { - "long", "java.lang.String", "java.lang.String", - "java.lang.String", "java.lang.String", "java.lang.String" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.addOAuthConsumer((com.liferay.opensocial.model.OAuthConsumer)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.createOAuthConsumer(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.deleteOAuthConsumer(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.deleteOAuthConsumer((com.liferay.opensocial.model.OAuthConsumer)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.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 OAuthConsumerLocalServiceUtil.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 OAuthConsumerLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.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 OAuthConsumerLocalServiceUtil.fetchOAuthConsumer(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.getOAuthConsumer(((Long)arguments[0]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.getOAuthConsumers(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.getOAuthConsumersCount(); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.updateOAuthConsumer((com.liferay.opensocial.model.OAuthConsumer)arguments[0]); - } - - if (_methodName48.equals(name) && - Arrays.deepEquals(_methodParameterTypes48, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName49.equals(name) && - Arrays.deepEquals(_methodParameterTypes49, parameterTypes)) { - OAuthConsumerLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName54.equals(name) && - Arrays.deepEquals(_methodParameterTypes54, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.addOAuthConsumer(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (java.lang.String)arguments[3], (java.lang.String)arguments[4], - (java.lang.String)arguments[5]); - } - - if (_methodName55.equals(name) && - Arrays.deepEquals(_methodParameterTypes55, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.deleteOAuthConsumer(((Long)arguments[0]).longValue()); - } - - if (_methodName56.equals(name) && - Arrays.deepEquals(_methodParameterTypes56, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.deleteOAuthConsumer((com.liferay.opensocial.model.OAuthConsumer)arguments[0]); - } - - if (_methodName57.equals(name) && - Arrays.deepEquals(_methodParameterTypes57, parameterTypes)) { - OAuthConsumerLocalServiceUtil.deleteOAuthConsumers((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName58.equals(name) && - Arrays.deepEquals(_methodParameterTypes58, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.fetchOAuthConsumer((java.lang.String)arguments[0], - (java.lang.String)arguments[1]); - } - - if (_methodName59.equals(name) && - Arrays.deepEquals(_methodParameterTypes59, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.getOAuthConsumer((java.lang.String)arguments[0], - (java.lang.String)arguments[1]); - } - - if (_methodName60.equals(name) && - Arrays.deepEquals(_methodParameterTypes60, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.getOAuthConsumers((java.lang.String)arguments[0]); - } - - if (_methodName61.equals(name) && - Arrays.deepEquals(_methodParameterTypes61, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.getOAuthConsumers((java.lang.String)arguments[0], - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName62.equals(name) && - Arrays.deepEquals(_methodParameterTypes62, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.getOAuthConsumersCount((java.lang.String)arguments[0]); - } - - if (_methodName63.equals(name) && - Arrays.deepEquals(_methodParameterTypes63, parameterTypes)) { - return OAuthConsumerLocalServiceUtil.updateOAuthConsumer(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - (java.lang.String)arguments[3], (java.lang.String)arguments[4], - (java.lang.String)arguments[5]); - } - - 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 _methodName48; - private String[] _methodParameterTypes48; - private String _methodName49; - private String[] _methodParameterTypes49; - private String _methodName54; - private String[] _methodParameterTypes54; - private String _methodName55; - private String[] _methodParameterTypes55; - private String _methodName56; - private String[] _methodParameterTypes56; - private String _methodName57; - private String[] _methodParameterTypes57; - private String _methodName58; - private String[] _methodParameterTypes58; - private String _methodName59; - private String[] _methodParameterTypes59; - private String _methodName60; - private String[] _methodParameterTypes60; - private String _methodName61; - private String[] _methodParameterTypes61; - private String _methodName62; - private String[] _methodParameterTypes62; - private String _methodName63; - private String[] _methodParameterTypes63; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthTokenLocalServiceBaseImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthTokenLocalServiceBaseImpl.java deleted file mode 100644 index a4c3b53124..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthTokenLocalServiceBaseImpl.java +++ /dev/null @@ -1,684 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.base; - -import com.liferay.opensocial.model.OAuthToken; -import com.liferay.opensocial.service.OAuthTokenLocalService; -import com.liferay.opensocial.service.persistence.GadgetPersistence; -import com.liferay.opensocial.service.persistence.OAuthConsumerPersistence; -import com.liferay.opensocial.service.persistence.OAuthTokenPersistence; - -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.ClassNamePersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the o auth token local service. - * - *

    - * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.opensocial.service.impl.OAuthTokenLocalServiceImpl}. - *

    - * - * @author Brian Wing Shun Chan - * @see com.liferay.opensocial.service.impl.OAuthTokenLocalServiceImpl - * @see com.liferay.opensocial.service.OAuthTokenLocalServiceUtil - * @generated - */ -public abstract class OAuthTokenLocalServiceBaseImpl - extends BaseLocalServiceImpl implements OAuthTokenLocalService, - IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link com.liferay.opensocial.service.OAuthTokenLocalServiceUtil} to access the o auth token local service. - */ - - /** - * Adds the o auth token to the database. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public OAuthToken addOAuthToken(OAuthToken oAuthToken) - throws SystemException { - oAuthToken.setNew(true); - - return oAuthTokenPersistence.update(oAuthToken); - } - - /** - * Creates a new o auth token with the primary key. Does not add the o auth token to the database. - * - * @param oAuthTokenId the primary key for the new o auth token - * @return the new o auth token - */ - @Override - public OAuthToken createOAuthToken(long oAuthTokenId) { - return oAuthTokenPersistence.create(oAuthTokenId); - } - - /** - * Deletes the o auth token with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token that was removed - * @throws PortalException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public OAuthToken deleteOAuthToken(long oAuthTokenId) - throws PortalException, SystemException { - return oAuthTokenPersistence.remove(oAuthTokenId); - } - - /** - * Deletes the o auth token from the database. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was removed - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public OAuthToken deleteOAuthToken(OAuthToken oAuthToken) - throws SystemException { - return oAuthTokenPersistence.remove(oAuthToken); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(OAuthToken.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 oAuthTokenPersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * Performs a dynamic query on the database and returns a range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @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 oAuthTokenPersistence.findWithDynamicQuery(dynamicQuery, start, - end); - } - - /** - * Performs a dynamic query on the database and returns an ordered range of the matching rows. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @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 null) - * @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 oAuthTokenPersistence.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 oAuthTokenPersistence.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 oAuthTokenPersistence.countWithDynamicQuery(dynamicQuery, - projection); - } - - @Override - public OAuthToken fetchOAuthToken(long oAuthTokenId) - throws SystemException { - return oAuthTokenPersistence.fetchByPrimaryKey(oAuthTokenId); - } - - /** - * Returns the o auth token with the primary key. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token - * @throws PortalException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken getOAuthToken(long oAuthTokenId) - throws PortalException, SystemException { - return oAuthTokenPersistence.findByPrimaryKey(oAuthTokenId); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return oAuthTokenPersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns a range of all the o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public List getOAuthTokens(int start, int end) - throws SystemException { - return oAuthTokenPersistence.findAll(start, end); - } - - /** - * Returns the number of o auth tokens. - * - * @return the number of o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public int getOAuthTokensCount() throws SystemException { - return oAuthTokenPersistence.countAll(); - } - - /** - * Updates the o auth token in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param oAuthToken the o auth token - * @return the o auth token that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public OAuthToken updateOAuthToken(OAuthToken oAuthToken) - throws SystemException { - return oAuthTokenPersistence.update(oAuthToken); - } - - /** - * Returns the gadget local service. - * - * @return the gadget local service - */ - public com.liferay.opensocial.service.GadgetLocalService getGadgetLocalService() { - return gadgetLocalService; - } - - /** - * Sets the gadget local service. - * - * @param gadgetLocalService the gadget local service - */ - public void setGadgetLocalService( - com.liferay.opensocial.service.GadgetLocalService gadgetLocalService) { - this.gadgetLocalService = gadgetLocalService; - } - - /** - * Returns the gadget remote service. - * - * @return the gadget remote service - */ - public com.liferay.opensocial.service.GadgetService getGadgetService() { - return gadgetService; - } - - /** - * Sets the gadget remote service. - * - * @param gadgetService the gadget remote service - */ - public void setGadgetService( - com.liferay.opensocial.service.GadgetService gadgetService) { - this.gadgetService = gadgetService; - } - - /** - * Returns the gadget persistence. - * - * @return the gadget persistence - */ - public GadgetPersistence getGadgetPersistence() { - return gadgetPersistence; - } - - /** - * Sets the gadget persistence. - * - * @param gadgetPersistence the gadget persistence - */ - public void setGadgetPersistence(GadgetPersistence gadgetPersistence) { - this.gadgetPersistence = gadgetPersistence; - } - - /** - * Returns the o auth consumer local service. - * - * @return the o auth consumer local service - */ - public com.liferay.opensocial.service.OAuthConsumerLocalService getOAuthConsumerLocalService() { - return oAuthConsumerLocalService; - } - - /** - * Sets the o auth consumer local service. - * - * @param oAuthConsumerLocalService the o auth consumer local service - */ - public void setOAuthConsumerLocalService( - com.liferay.opensocial.service.OAuthConsumerLocalService oAuthConsumerLocalService) { - this.oAuthConsumerLocalService = oAuthConsumerLocalService; - } - - /** - * Returns the o auth consumer persistence. - * - * @return the o auth consumer persistence - */ - public OAuthConsumerPersistence getOAuthConsumerPersistence() { - return oAuthConsumerPersistence; - } - - /** - * Sets the o auth consumer persistence. - * - * @param oAuthConsumerPersistence the o auth consumer persistence - */ - public void setOAuthConsumerPersistence( - OAuthConsumerPersistence oAuthConsumerPersistence) { - this.oAuthConsumerPersistence = oAuthConsumerPersistence; - } - - /** - * Returns the o auth token local service. - * - * @return the o auth token local service - */ - public com.liferay.opensocial.service.OAuthTokenLocalService getOAuthTokenLocalService() { - return oAuthTokenLocalService; - } - - /** - * Sets the o auth token local service. - * - * @param oAuthTokenLocalService the o auth token local service - */ - public void setOAuthTokenLocalService( - com.liferay.opensocial.service.OAuthTokenLocalService oAuthTokenLocalService) { - this.oAuthTokenLocalService = oAuthTokenLocalService; - } - - /** - * Returns the o auth token persistence. - * - * @return the o auth token persistence - */ - public OAuthTokenPersistence getOAuthTokenPersistence() { - return oAuthTokenPersistence; - } - - /** - * Sets the o auth token persistence. - * - * @param oAuthTokenPersistence the o auth token persistence - */ - public void setOAuthTokenPersistence( - OAuthTokenPersistence oAuthTokenPersistence) { - this.oAuthTokenPersistence = oAuthTokenPersistence; - } - - /** - * 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 class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * 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("com.liferay.opensocial.model.OAuthToken", - oAuthTokenLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "com.liferay.opensocial.model.OAuthToken"); - } - - /** - * 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 OAuthToken.class; - } - - protected String getModelClassName() { - return OAuthToken.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = oAuthTokenPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = com.liferay.opensocial.service.GadgetLocalService.class) - protected com.liferay.opensocial.service.GadgetLocalService gadgetLocalService; - @BeanReference(type = com.liferay.opensocial.service.GadgetService.class) - protected com.liferay.opensocial.service.GadgetService gadgetService; - @BeanReference(type = GadgetPersistence.class) - protected GadgetPersistence gadgetPersistence; - @BeanReference(type = com.liferay.opensocial.service.OAuthConsumerLocalService.class) - protected com.liferay.opensocial.service.OAuthConsumerLocalService oAuthConsumerLocalService; - @BeanReference(type = OAuthConsumerPersistence.class) - protected OAuthConsumerPersistence oAuthConsumerPersistence; - @BeanReference(type = com.liferay.opensocial.service.OAuthTokenLocalService.class) - protected com.liferay.opensocial.service.OAuthTokenLocalService oAuthTokenLocalService; - @BeanReference(type = OAuthTokenPersistence.class) - protected OAuthTokenPersistence oAuthTokenPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) - protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; - @BeanReference(type = com.liferay.portal.service.ClassNameService.class) - protected com.liferay.portal.service.ClassNameService classNameService; - @BeanReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @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 OAuthTokenLocalServiceClpInvoker _clpInvoker = new OAuthTokenLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthTokenLocalServiceClpInvoker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthTokenLocalServiceClpInvoker.java deleted file mode 100644 index f47759bf14..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/base/OAuthTokenLocalServiceClpInvoker.java +++ /dev/null @@ -1,358 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.base; - -import com.liferay.opensocial.service.OAuthTokenLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author Brian Wing Shun Chan - * @generated - */ -public class OAuthTokenLocalServiceClpInvoker { - public OAuthTokenLocalServiceClpInvoker() { - _methodName0 = "addOAuthToken"; - - _methodParameterTypes0 = new String[] { - "com.liferay.opensocial.model.OAuthToken" - }; - - _methodName1 = "createOAuthToken"; - - _methodParameterTypes1 = new String[] { "long" }; - - _methodName2 = "deleteOAuthToken"; - - _methodParameterTypes2 = new String[] { "long" }; - - _methodName3 = "deleteOAuthToken"; - - _methodParameterTypes3 = new String[] { - "com.liferay.opensocial.model.OAuthToken" - }; - - _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 = "fetchOAuthToken"; - - _methodParameterTypes10 = new String[] { "long" }; - - _methodName11 = "getOAuthToken"; - - _methodParameterTypes11 = new String[] { "long" }; - - _methodName12 = "getPersistedModel"; - - _methodParameterTypes12 = new String[] { "java.io.Serializable" }; - - _methodName13 = "getOAuthTokens"; - - _methodParameterTypes13 = new String[] { "int", "int" }; - - _methodName14 = "getOAuthTokensCount"; - - _methodParameterTypes14 = new String[] { }; - - _methodName15 = "updateOAuthToken"; - - _methodParameterTypes15 = new String[] { - "com.liferay.opensocial.model.OAuthToken" - }; - - _methodName48 = "getBeanIdentifier"; - - _methodParameterTypes48 = new String[] { }; - - _methodName49 = "setBeanIdentifier"; - - _methodParameterTypes49 = new String[] { "java.lang.String" }; - - _methodName54 = "addOAuthToken"; - - _methodParameterTypes54 = new String[] { - "long", "java.lang.String", "java.lang.String", "long", - "java.lang.String", "java.lang.String", "java.lang.String", - "java.lang.String", "long" - }; - - _methodName55 = "deleteOAuthToken"; - - _methodParameterTypes55 = new String[] { - "long", "java.lang.String", "java.lang.String", "long", - "java.lang.String" - }; - - _methodName56 = "deleteOAuthTokens"; - - _methodParameterTypes56 = new String[] { - "java.lang.String", "java.lang.String" - }; - - _methodName57 = "fetchOAuthToken"; - - _methodParameterTypes57 = new String[] { - "long", "java.lang.String", "java.lang.String", "long", - "java.lang.String" - }; - - _methodName58 = "getOAuthToken"; - - _methodParameterTypes58 = new String[] { - "long", "java.lang.String", "java.lang.String", "long", - "java.lang.String" - }; - - _methodName59 = "getOAuthTokens"; - - _methodParameterTypes59 = new String[] { - "java.lang.String", "java.lang.String" - }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return OAuthTokenLocalServiceUtil.addOAuthToken((com.liferay.opensocial.model.OAuthToken)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return OAuthTokenLocalServiceUtil.createOAuthToken(((Long)arguments[0]).longValue()); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return OAuthTokenLocalServiceUtil.deleteOAuthToken(((Long)arguments[0]).longValue()); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return OAuthTokenLocalServiceUtil.deleteOAuthToken((com.liferay.opensocial.model.OAuthToken)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return OAuthTokenLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return OAuthTokenLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return OAuthTokenLocalServiceUtil.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 OAuthTokenLocalServiceUtil.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 OAuthTokenLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return OAuthTokenLocalServiceUtil.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 OAuthTokenLocalServiceUtil.fetchOAuthToken(((Long)arguments[0]).longValue()); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return OAuthTokenLocalServiceUtil.getOAuthToken(((Long)arguments[0]).longValue()); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return OAuthTokenLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return OAuthTokenLocalServiceUtil.getOAuthTokens(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return OAuthTokenLocalServiceUtil.getOAuthTokensCount(); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return OAuthTokenLocalServiceUtil.updateOAuthToken((com.liferay.opensocial.model.OAuthToken)arguments[0]); - } - - if (_methodName48.equals(name) && - Arrays.deepEquals(_methodParameterTypes48, parameterTypes)) { - return OAuthTokenLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName49.equals(name) && - Arrays.deepEquals(_methodParameterTypes49, parameterTypes)) { - OAuthTokenLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - if (_methodName54.equals(name) && - Arrays.deepEquals(_methodParameterTypes54, parameterTypes)) { - return OAuthTokenLocalServiceUtil.addOAuthToken(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - ((Long)arguments[3]).longValue(), - (java.lang.String)arguments[4], (java.lang.String)arguments[5], - (java.lang.String)arguments[6], (java.lang.String)arguments[7], - ((Long)arguments[8]).longValue()); - } - - if (_methodName55.equals(name) && - Arrays.deepEquals(_methodParameterTypes55, parameterTypes)) { - OAuthTokenLocalServiceUtil.deleteOAuthToken(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - ((Long)arguments[3]).longValue(), (java.lang.String)arguments[4]); - - return null; - } - - if (_methodName56.equals(name) && - Arrays.deepEquals(_methodParameterTypes56, parameterTypes)) { - OAuthTokenLocalServiceUtil.deleteOAuthTokens((java.lang.String)arguments[0], - (java.lang.String)arguments[1]); - - return null; - } - - if (_methodName57.equals(name) && - Arrays.deepEquals(_methodParameterTypes57, parameterTypes)) { - return OAuthTokenLocalServiceUtil.fetchOAuthToken(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - ((Long)arguments[3]).longValue(), (java.lang.String)arguments[4]); - } - - if (_methodName58.equals(name) && - Arrays.deepEquals(_methodParameterTypes58, parameterTypes)) { - return OAuthTokenLocalServiceUtil.getOAuthToken(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1], (java.lang.String)arguments[2], - ((Long)arguments[3]).longValue(), (java.lang.String)arguments[4]); - } - - if (_methodName59.equals(name) && - Arrays.deepEquals(_methodParameterTypes59, parameterTypes)) { - return OAuthTokenLocalServiceUtil.getOAuthTokens((java.lang.String)arguments[0], - (java.lang.String)arguments[1]); - } - - 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 _methodName48; - private String[] _methodParameterTypes48; - private String _methodName49; - private String[] _methodParameterTypes49; - private String _methodName54; - private String[] _methodParameterTypes54; - private String _methodName55; - private String[] _methodParameterTypes55; - private String _methodName56; - private String[] _methodParameterTypes56; - private String _methodName57; - private String[] _methodParameterTypes57; - private String _methodName58; - private String[] _methodParameterTypes58; - private String _methodName59; - private String[] _methodParameterTypes59; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/http/GadgetServiceSoap.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/http/GadgetServiceSoap.java deleted file mode 100644 index 03d9e72147..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/http/GadgetServiceSoap.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.http; - -import com.liferay.opensocial.service.GadgetServiceUtil; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.rmi.RemoteException; - -/** - * Provides the SOAP utility for the - * {@link com.liferay.opensocial.service.GadgetServiceUtil} 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. - * - *

    - * 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 com.liferay.opensocial.model.GadgetSoap}. - * If the method in the service utility returns a - * {@link com.liferay.opensocial.model.Gadget}, that is translated to a - * {@link com.liferay.opensocial.model.GadgetSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

    - * - *

    - * 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). - *

    - * - *

    - * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

    - * - *

    - * The SOAP utility is only generated for remote services. - *

    - * - * @author Brian Wing Shun Chan - * @see GadgetServiceHttp - * @see com.liferay.opensocial.model.GadgetSoap - * @see com.liferay.opensocial.service.GadgetServiceUtil - * @generated - */ -public class GadgetServiceSoap { - public static com.liferay.opensocial.model.GadgetSoap addGadget( - long companyId, java.lang.String url, - java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - com.liferay.opensocial.model.Gadget returnValue = GadgetServiceUtil.addGadget(companyId, - url, portletCategoryNames, serviceContext); - - return com.liferay.opensocial.model.GadgetSoap.toSoapModel(returnValue); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void deleteGadget(long gadgetId, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - GadgetServiceUtil.deleteGadget(gadgetId, serviceContext); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - public static void updateGadget(long gadgetId, - java.lang.String portletCategoryNames, - com.liferay.portal.service.ServiceContext serviceContext) - throws RemoteException { - try { - GadgetServiceUtil.updateGadget(gadgetId, portletCategoryNames, - serviceContext); - } - catch (Exception e) { - _log.error(e, e); - - throw new RemoteException(e.getMessage()); - } - } - - private static Log _log = LogFactoryUtil.getLog(GadgetServiceSoap.class); -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/http/GadgetService_deploy.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/http/GadgetService_deploy.wsdd deleted file mode 100644 index 5717717aea..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/http/GadgetService_deploy.wsdd +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/http/GadgetService_undeploy.wsdd b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/http/GadgetService_undeploy.wsdd deleted file mode 100644 index 9e017f1cc5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/http/GadgetService_undeploy.wsdd +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/GadgetLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/GadgetLocalServiceImpl.java deleted file mode 100644 index cc2e06fe99..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/GadgetLocalServiceImpl.java +++ /dev/null @@ -1,375 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.impl; - -import com.liferay.opensocial.DuplicateGadgetURLException; -import com.liferay.opensocial.GadgetPortletCategoryNamesException; -import com.liferay.opensocial.GadgetURLException; -import com.liferay.opensocial.NoSuchGadgetException; -import com.liferay.opensocial.gadget.portlet.GadgetPortlet; -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.model.impl.GadgetConstants; -import com.liferay.opensocial.service.ClpSerializer; -import com.liferay.opensocial.service.base.GadgetLocalServiceBaseImpl; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.portal.kernel.cluster.Clusterable; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.portlet.PortletBag; -import com.liferay.portal.kernel.portlet.PortletBagPool; -import com.liferay.portal.kernel.systemevent.SystemEvent; -import com.liferay.portal.kernel.util.ContentTypes; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.Portlet; -import com.liferay.portal.model.PortletApp; -import com.liferay.portal.model.PortletInfo; -import com.liferay.portal.model.SystemEventConstants; -import com.liferay.portal.service.PortletLocalServiceUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.InvokerPortlet; -import com.liferay.portlet.PortletInstanceFactoryUtil; - -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; - -import javax.portlet.PortletMode; -import javax.portlet.WindowState; - -import org.apache.shindig.gadgets.spec.GadgetSpec; -import org.apache.shindig.gadgets.spec.ModulePrefs; - -/** - * @author Michael Young - * @author Brian Wing Shun Chan - * @author Dennis Ju - */ -public class GadgetLocalServiceImpl extends GadgetLocalServiceBaseImpl { - - public Gadget addGadget( - long companyId, String url, String portletCategoryNames, - ServiceContext serviceContext) - throws PortalException, SystemException { - - Date now = new Date(); - - validate(companyId, url, portletCategoryNames); - - long gadgetId = counterLocalService.increment(); - - Gadget gadget = gadgetPersistence.create(gadgetId); - - gadget.setUuid(serviceContext.getUuid()); - gadget.setCompanyId(companyId); - gadget.setCreateDate(now); - gadget.setModifiedDate(now); - - GadgetSpec gadgetSpec = null; - - try { - gadgetSpec = ShindigUtil.getGadgetSpec(url); - } - catch (Exception e) { - throw new GadgetURLException(e); - } - - ModulePrefs modulePrefs = gadgetSpec.getModulePrefs(); - - gadget.setName(modulePrefs.getTitle()); - gadget.setUrl(url); - gadget.setPortletCategoryNames(portletCategoryNames); - - gadgetPersistence.update(gadget); - - gadgetLocalService.initGadget( - gadget.getUuid(), companyId, gadgetId, gadget.getName(), - gadget.getPortletCategoryNames()); - - return gadget; - } - - @Override - @SystemEvent(type = SystemEventConstants.TYPE_DELETE) - public Gadget deleteGadget(Gadget gadget) throws SystemException { - - // Gadget - - gadgetLocalService.destroyGadget( - gadget.getUuid(), gadget.getCompanyId()); - - gadgetPersistence.remove(gadget); - - // OAuth consumer - - String gadgetKey = GadgetConstants.toPublishedGadgetKey( - gadget.getGadgetId()); - - oAuthConsumerLocalService.deleteOAuthConsumers(gadgetKey); - - return gadget; - } - - @Override - public Gadget deleteGadget(long gadgetId) - throws PortalException, SystemException { - - Gadget gadget = gadgetPersistence.findByPrimaryKey(gadgetId); - - return deleteGadget(gadget); - } - - @Override - public void deleteGadgets(long companyId) throws SystemException { - List gadgets = gadgetPersistence.findByCompanyId(companyId); - - for (Gadget gadget : gadgets) { - gadgetLocalService.deleteGadget(gadget); - } - } - - @Clusterable - public void destroyGadget(String uuid, long companyId) - throws SystemException { - - try { - Portlet portlet = _portletsPool.remove(uuid); - - if (portlet == null) { - portlet = PortletLocalServiceUtil.getPortletById( - companyId, getPortletId(uuid)); - } - - PortletInstanceFactoryUtil.destroy(portlet); - } - catch (SystemException se) { - throw se; - } - catch (Exception e) { - throw new SystemException(e); - } - } - - public void destroyGadgets() throws SystemException { - List gadgets = gadgetPersistence.findAll(); - - for (Gadget gadget : gadgets) { - destroyGadget(gadget.getUuid(), gadget.getCompanyId()); - } - } - - public Gadget fetchGadget(long companyId, String url) - throws SystemException { - - return gadgetPersistence.fetchByC_U(companyId, url); - } - - public Gadget getGadget(long companyId, String url) - throws PortalException, SystemException { - - return gadgetPersistence.findByC_U(companyId, url); - } - - public Gadget getGadget(String uuid, long companyId) - throws PortalException, SystemException { - - List gadgets = gadgetPersistence.findByUuid_C(uuid, companyId); - - if (gadgets.isEmpty()) { - throw new NoSuchGadgetException( - "No gadget exists with uuid " + uuid); - } - - return gadgets.get(0); - } - - public List getGadgets(long companyId, int start, int end) - throws SystemException { - - return gadgetPersistence.findByCompanyId(companyId, start, end); - } - - public int getGadgetsCount(long companyId) throws SystemException { - return gadgetPersistence.countByCompanyId(companyId); - } - - @Clusterable - public void initGadget( - String uuid, long companyId, long gadgetId, String name, - String portletCategoryNames) - throws PortalException, SystemException { - - try { - Portlet portlet = getPortlet(uuid, companyId, name); - - String[] portletCategoryNamesArray = StringUtil.split( - portletCategoryNames); - - PortletLocalServiceUtil.deployRemotePortlet( - portlet, portletCategoryNamesArray); - } - catch (PortalException pe) { - throw pe; - } - catch (SystemException se) { - throw se; - } - catch (Exception e) { - throw new SystemException(e); - } - } - - public void initGadgets() throws PortalException, SystemException { - List gadgets = gadgetPersistence.findAll(); - - for (Gadget gadget : gadgets) { - initGadget( - gadget.getUuid(), gadget.getCompanyId(), gadget.getGadgetId(), - gadget.getName(), gadget.getPortletCategoryNames()); - } - } - - public Gadget updateGadget(long gadgetId, String portletCategoryNames) - throws PortalException, SystemException { - - validate(portletCategoryNames); - - Gadget gadget = gadgetPersistence.findByPrimaryKey(gadgetId); - - gadget.setPortletCategoryNames(portletCategoryNames); - - gadgetPersistence.update(gadget); - - gadgetLocalService.initGadget( - gadget.getUuid(), gadget.getCompanyId(), gadgetId, gadget.getName(), - gadget.getPortletCategoryNames()); - - return gadget; - } - - protected void addPortletExtraInfo( - Portlet portlet, PortletApp portletApp, String title) { - - Set mimeTypePortletModes = new HashSet(); - - mimeTypePortletModes.add(PortletMode.VIEW.toString()); - - portlet.getPortletModes().put( - ContentTypes.TEXT_HTML, mimeTypePortletModes); - - Set mimeTypeWindowStates = new HashSet(); - - mimeTypeWindowStates.add(WindowState.MAXIMIZED.toString()); - mimeTypeWindowStates.add(WindowState.MINIMIZED.toString()); - mimeTypeWindowStates.add(WindowState.NORMAL.toString()); - - portlet.getWindowStates().put( - ContentTypes.TEXT_HTML, mimeTypeWindowStates); - - PortletInfo portletInfo = new PortletInfo(title, title, title, title); - - portlet.setPortletInfo(portletInfo); - } - - protected Portlet getPortlet(String uuid, long companyId, String name) - throws Exception { - - Portlet portlet = _portletsPool.get(uuid); - - if (portlet != null) { - return portlet; - } - - String portletId = getPortletId(uuid); - - portlet = PortletLocalServiceUtil.clonePortlet(_GADGET_PORTLET_ID); - - portlet.setCompanyId(companyId); - portlet.setPortletId(portletId); - portlet.setTimestamp(System.currentTimeMillis()); - - PortletApp portletApp = PortletLocalServiceUtil.getPortletApp( - ClpSerializer.getServletContextName()); - - portlet.setPortletApp(portletApp); - - portlet.setPortletName(portletId); - portlet.setDisplayName(portletId); - portlet.setPortletClass(GadgetPortlet.class.getName()); - - Map initParams = portlet.getInitParams(); - - initParams.put( - InvokerPortlet.INIT_INVOKER_PORTLET_NAME, _GADGET_PORTLET_NAME); - - addPortletExtraInfo(portlet, portletApp, name); - - _portletsPool.put(uuid, portlet); - - PortletBag portletBag = PortletBagPool.get(_GADGET_PORTLET_ID); - - portletBag = (PortletBag)portletBag.clone(); - - portletBag.setPortletName(portletId); - portletBag.setPortletInstance(new GadgetPortlet()); - - PortletBagPool.put(portletId, portletBag); - - return portlet; - } - - protected String getPortletId(String uuid) { - String portletId = GadgetPortlet.PORTLET_NAME_PREFIX.concat(uuid); - - portletId = PortalUtil.getJsSafePortletId( - PortalUUIDUtil.toJsSafeUuid(portletId)); - - return portletId; - } - - protected void validate( - long companyId, String url, String portletCategoryNames) - throws PortalException, SystemException { - - Gadget gadget = gadgetPersistence.fetchByC_U(companyId, url); - - if (gadget != null) { - throw new DuplicateGadgetURLException(); - } - - validate(portletCategoryNames); - } - - protected void validate(String portletCategoryNames) - throws PortalException { - - if (Validator.isNull(portletCategoryNames)) { - throw new GadgetPortletCategoryNamesException(); - } - } - - private static final String _GADGET_PORTLET_ID = "2_WAR_opensocialportlet"; - - private static final String _GADGET_PORTLET_NAME = "2"; - - private static Map _portletsPool = - new ConcurrentHashMap(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/GadgetServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/GadgetServiceImpl.java deleted file mode 100644 index 1f5d569df6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/GadgetServiceImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.impl; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.service.base.GadgetServiceBaseImpl; -import com.liferay.opensocial.service.permission.GadgetPermission; -import com.liferay.opensocial.util.ActionKeys; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.service.ServiceContext; - -/** - * @author Brian Wing Shun Chan - * @author Dennis Ju - */ -public class GadgetServiceImpl extends GadgetServiceBaseImpl { - - public Gadget addGadget( - long companyId, String url, String portletCategoryNames, - ServiceContext serviceContext) - throws PortalException, SystemException { - - GadgetPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), - ActionKeys.PUBLISH_GADGET); - - return gadgetLocalService.addGadget( - companyId, url, portletCategoryNames, serviceContext); - } - - public void deleteGadget(long gadgetId, ServiceContext serviceContext) - throws PortalException, SystemException { - - GadgetPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), gadgetId, - ActionKeys.DELETE); - - gadgetLocalService.deleteGadget(gadgetId); - } - - public void updateGadget( - long gadgetId, String portletCategoryNames, - ServiceContext serviceContext) - throws PortalException, SystemException { - - GadgetPermission.check( - getPermissionChecker(), serviceContext.getScopeGroupId(), gadgetId, - ActionKeys.UPDATE); - - gadgetLocalService.updateGadget(gadgetId, portletCategoryNames); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/OAuthConsumerLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/OAuthConsumerLocalServiceImpl.java deleted file mode 100644 index 7f742f400f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/OAuthConsumerLocalServiceImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.impl; - -import com.liferay.opensocial.model.OAuthConsumer; -import com.liferay.opensocial.model.OAuthConsumerConstants; -import com.liferay.opensocial.service.base.OAuthConsumerLocalServiceBaseImpl; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.StringPool; - -import java.util.Date; -import java.util.List; - -/** - * @author Dennis Ju - */ -public class OAuthConsumerLocalServiceImpl - extends OAuthConsumerLocalServiceBaseImpl { - - public OAuthConsumer addOAuthConsumer( - long companyId, String gadgetKey, String serviceName, - String consumerKey, String consumerSecret, String keyType) - throws SystemException { - - if (keyType.equals(OAuthConsumerConstants.KEY_TYPE_RSA_PRIVATE)) { - consumerSecret = StringPool.BLANK; - } - - Date now = new Date(); - - long oAuthConsumerId = counterLocalService.increment(); - - OAuthConsumer oAuthConsumer = oAuthConsumerPersistence.create( - oAuthConsumerId); - - oAuthConsumer.setCompanyId(companyId); - oAuthConsumer.setCreateDate(now); - oAuthConsumer.setModifiedDate(now); - oAuthConsumer.setGadgetKey(gadgetKey); - oAuthConsumer.setServiceName(serviceName); - oAuthConsumer.setConsumerKey(consumerKey); - oAuthConsumer.setConsumerSecret(consumerSecret); - oAuthConsumer.setKeyType(keyType); - - oAuthConsumerPersistence.update(oAuthConsumer); - - return oAuthConsumer; - } - - @Override - public OAuthConsumer deleteOAuthConsumer(long oAuthConsumerId) - throws PortalException, SystemException { - - OAuthConsumer oAuthConsumer = oAuthConsumerPersistence.findByPrimaryKey( - oAuthConsumerId); - - return deleteOAuthConsumer(oAuthConsumer); - } - - @Override - public OAuthConsumer deleteOAuthConsumer(OAuthConsumer oAuthConsumer) - throws SystemException { - - // OAuth consumer - - oAuthConsumerPersistence.remove(oAuthConsumer); - - // OAuth tokens - - oAuthTokenLocalService.deleteOAuthTokens( - oAuthConsumer.getGadgetKey(), oAuthConsumer.getServiceName()); - - return oAuthConsumer; - } - - public void deleteOAuthConsumers(String gadgetKey) throws SystemException { - List oAuthConsumers = - oAuthConsumerPersistence.findByGadgetKey(gadgetKey); - - for (OAuthConsumer oAuthConsumer : oAuthConsumers) { - deleteOAuthConsumer(oAuthConsumer); - } - } - - public OAuthConsumer fetchOAuthConsumer( - String gadgetKey, String serviceName) - throws SystemException { - - return oAuthConsumerPersistence.fetchByG_S(gadgetKey, serviceName); - } - - public OAuthConsumer getOAuthConsumer(String gadgetKey, String serviceName) - throws PortalException, SystemException { - - return oAuthConsumerPersistence.findByG_S(gadgetKey, serviceName); - } - - public List getOAuthConsumers(String gadgetKey) - throws SystemException { - - return oAuthConsumerPersistence.findByGadgetKey(gadgetKey); - } - - public List getOAuthConsumers( - String gadgetKey, int start, int end) - throws SystemException { - - return oAuthConsumerPersistence.findByGadgetKey(gadgetKey, start, end); - } - - public int getOAuthConsumersCount(String gadgetKey) throws SystemException { - return oAuthConsumerPersistence.countByGadgetKey(gadgetKey); - } - - public OAuthConsumer updateOAuthConsumer( - long oAuthConsumerId, String consumerKey, String consumerSecret, - String keyType, String keyName, String callbackURL) - throws PortalException, SystemException { - - if (keyType.equals(OAuthConsumerConstants.KEY_TYPE_RSA_PRIVATE)) { - consumerSecret = StringPool.BLANK; - } - - OAuthConsumer oAuthConsumer = oAuthConsumerPersistence.findByPrimaryKey( - oAuthConsumerId); - - oAuthConsumer.setConsumerKey(consumerKey); - oAuthConsumer.setConsumerSecret(consumerSecret); - oAuthConsumer.setKeyType(keyType); - - oAuthConsumerPersistence.update(oAuthConsumer); - - return oAuthConsumer; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/OAuthTokenLocalServiceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/OAuthTokenLocalServiceImpl.java deleted file mode 100644 index 18143e565d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/impl/OAuthTokenLocalServiceImpl.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.impl; - -import com.liferay.opensocial.model.OAuthToken; -import com.liferay.opensocial.service.base.OAuthTokenLocalServiceBaseImpl; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.model.User; -import com.liferay.portal.service.UserLocalServiceUtil; - -import java.util.Date; -import java.util.List; - -/** - * @author Dennis Ju - */ -public class OAuthTokenLocalServiceImpl extends OAuthTokenLocalServiceBaseImpl { - - public OAuthToken addOAuthToken( - long userId, String gadgetKey, String serviceName, long moduleId, - String accessToken, String tokenName, String tokenSecret, - String sessionHandle, long expiration) - throws PortalException, SystemException { - - User user = UserLocalServiceUtil.getUser(userId); - Date now = new Date(); - - long oAuthTokenId = counterLocalService.increment(); - - OAuthToken oAuthToken = oAuthTokenPersistence.create(oAuthTokenId); - - oAuthToken.setCompanyId(user.getCompanyId()); - oAuthToken.setUserId(user.getUserId()); - oAuthToken.setUserName(user.getFullName()); - oAuthToken.setCreateDate(now); - oAuthToken.setModifiedDate(now); - oAuthToken.setGadgetKey(gadgetKey); - oAuthToken.setServiceName(serviceName); - oAuthToken.setModuleId(moduleId); - oAuthToken.setAccessToken(accessToken); - oAuthToken.setTokenName(tokenName); - oAuthToken.setTokenSecret(tokenSecret); - oAuthToken.setSessionHandle(sessionHandle); - oAuthToken.setExpiration(expiration); - - oAuthTokenPersistence.update(oAuthToken); - - return oAuthToken; - } - - public void deleteOAuthToken( - long userId, String gadgetKey, String serviceName, long moduleId, - String tokenName) - throws PortalException, SystemException { - - oAuthTokenPersistence.removeByU_G_S_M_T( - userId, gadgetKey, serviceName, moduleId, tokenName); - } - - public void deleteOAuthTokens(String gadgetKey, String serviceName) - throws SystemException { - - oAuthTokenPersistence.removeByG_S(gadgetKey, serviceName); - } - - public OAuthToken fetchOAuthToken( - long userId, String gadgetKey, String serviceName, long moduleId, - String tokenName) - throws SystemException { - - return oAuthTokenPersistence.fetchByU_G_S_M_T( - userId, gadgetKey, serviceName, moduleId, tokenName); - } - - public OAuthToken getOAuthToken( - long userId, String gadgetKey, String serviceName, long moduleId, - String tokenName) - throws PortalException, SystemException { - - return oAuthTokenPersistence.findByU_G_S_M_T( - userId, gadgetKey, serviceName, moduleId, tokenName); - } - - public List getOAuthTokens(String gadgetKey, String serviceName) - throws SystemException { - - return oAuthTokenPersistence.findByG_S(gadgetKey, serviceName); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/persistence/GadgetPersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/persistence/GadgetPersistenceImpl.java deleted file mode 100644 index 7e49c742bc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/persistence/GadgetPersistenceImpl.java +++ /dev/null @@ -1,3846 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.NoSuchGadgetException; -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.model.impl.GadgetImpl; -import com.liferay.opensocial.model.impl.GadgetModelImpl; - -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.SQLQuery; -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.SetUtil; -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.kernel.util.Validator; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.security.permission.InlineSQLHelperUtil; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -/** - * The persistence implementation for the gadget service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see GadgetPersistence - * @see GadgetUtil - * @generated - */ -public class GadgetPersistenceImpl extends BasePersistenceImpl - implements GadgetPersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link GadgetUtil} to access the gadget persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = GadgetImpl.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(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, GadgetImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, GadgetImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.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_UUID = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, GadgetImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, GadgetImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", - new String[] { String.class.getName() }, - GadgetModelImpl.UUID_COLUMN_BITMASK | - GadgetModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", - new String[] { String.class.getName() }); - - /** - * Returns all the gadgets where uuid = ?. - * - * @param uuid the uuid - * @return the matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid) throws SystemException { - return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the gadgets where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, int start, int end) - throws SystemException { - return findByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the gadgets where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid(String uuid, 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_UUID; - finderArgs = new Object[] { uuid }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; - finderArgs = new Object[] { uuid, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Gadget gadget : list) { - if (!Validator.equals(uuid, gadget.getUuid())) { - 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_GADGET_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(GadgetModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget findByUuid_First(String uuid, - OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - Gadget gadget = fetchByUuid_First(uuid, orderByComparator); - - if (gadget != null) { - return gadget; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchGadgetException(msg.toString()); - } - - /** - * Returns the first gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByUuid_First(String uuid, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid(uuid, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget findByUuid_Last(String uuid, - OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - Gadget gadget = fetchByUuid_Last(uuid, orderByComparator); - - if (gadget != null) { - return gadget; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchGadgetException(msg.toString()); - } - - /** - * Returns the last gadget in the ordered set where uuid = ?. - * - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByUuid_Last(String uuid, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid(uuid); - - if (count == 0) { - return null; - } - - List list = findByUuid(uuid, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set where uuid = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget[] findByUuid_PrevAndNext(long gadgetId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - Gadget gadget = findByPrimaryKey(gadgetId); - - Session session = null; - - try { - session = openSession(); - - Gadget[] array = new GadgetImpl[3]; - - array[0] = getByUuid_PrevAndNext(session, gadget, uuid, - orderByComparator, true); - - array[1] = gadget; - - array[2] = getByUuid_PrevAndNext(session, gadget, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Gadget getByUuid_PrevAndNext(Session session, Gadget gadget, - String uuid, 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_GADGET_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_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(GadgetModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(gadget); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the gadgets that the user has permission to view where uuid = ?. - * - * @param uuid the uuid - * @return the matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByUuid(String uuid) throws SystemException { - return filterFindByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the gadgets that the user has permission to view where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByUuid(String uuid, int start, int end) - throws SystemException { - return filterFindByUuid(uuid, start, end, null); - } - - /** - * Returns an ordered range of all the gadgets that the user has permissions to view where uuid = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByUuid(String uuid, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled()) { - return findByUuid(uuid, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(3 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1_SQL); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3_SQL); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2_SQL); - } - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(GadgetModelImpl.ORDER_BY_JPQL); - } - else { - query.append(GadgetModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Gadget.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, GadgetImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, GadgetImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where uuid = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget[] filterFindByUuid_PrevAndNext(long gadgetId, String uuid, - OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - if (!InlineSQLHelperUtil.isEnabled()) { - return findByUuid_PrevAndNext(gadgetId, uuid, orderByComparator); - } - - Gadget gadget = findByPrimaryKey(gadgetId); - - Session session = null; - - try { - session = openSession(); - - Gadget[] array = new GadgetImpl[3]; - - array[0] = filterGetByUuid_PrevAndNext(session, gadget, uuid, - orderByComparator, true); - - array[1] = gadget; - - array[2] = filterGetByUuid_PrevAndNext(session, gadget, uuid, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Gadget filterGetByUuid_PrevAndNext(Session session, - Gadget gadget, String uuid, OrderByComparator orderByComparator, - boolean previous) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(6 + - (orderByComparator.getOrderByFields().length * 6)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1_SQL); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3_SQL); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2_SQL); - } - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(GadgetModelImpl.ORDER_BY_JPQL); - } - else { - query.append(GadgetModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Gadget.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, GadgetImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, GadgetImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(gadget); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the gadgets where uuid = ? from the database. - * - * @param uuid the uuid - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid(String uuid) throws SystemException { - for (Gadget gadget : findByUuid(uuid, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(gadget); - } - } - - /** - * Returns the number of gadgets where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid(String uuid) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; - - Object[] finderArgs = new Object[] { uuid }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_GADGET_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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(); - } - - /** - * Returns the number of gadgets that the user has permission to view where uuid = ?. - * - * @param uuid the uuid - * @return the number of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByUuid(String uuid) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled()) { - return countByUuid(uuid); - } - - StringBundler query = new StringBundler(2); - - query.append(_FILTER_SQL_COUNT_GADGET_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_UUID_1_SQL); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_UUID_3_SQL); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_UUID_2_SQL); - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Gadget.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_UUID_UUID_1 = "gadget.uuid IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2 = "gadget.uuid = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3 = "(gadget.uuid IS NULL OR gadget.uuid = '')"; - private static final String _FINDER_COLUMN_UUID_UUID_1_SQL = "gadget.uuid_ IS NULL"; - private static final String _FINDER_COLUMN_UUID_UUID_2_SQL = "gadget.uuid_ = ?"; - private static final String _FINDER_COLUMN_UUID_UUID_3_SQL = "(gadget.uuid_ IS NULL OR gadget.uuid_ = '')"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, GadgetImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", - new String[] { - String.class.getName(), Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = - new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, GadgetImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }, - GadgetModelImpl.UUID_COLUMN_BITMASK | - GadgetModelImpl.COMPANYID_COLUMN_BITMASK | - GadgetModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", - new String[] { String.class.getName(), Long.class.getName() }); - - /** - * Returns all the gadgets where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId) - throws SystemException { - return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the gadgets where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, long companyId, int start, - int end) throws SystemException { - return findByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the gadgets where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findByUuid_C(String uuid, 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_UUID_C; - finderArgs = new Object[] { uuid, companyId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; - finderArgs = new Object[] { - uuid, companyId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Gadget gadget : list) { - if (!Validator.equals(uuid, gadget.getUuid()) || - (companyId != gadget.getCompanyId())) { - 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_GADGET_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(GadgetModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget findByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - Gadget gadget = fetchByUuid_C_First(uuid, companyId, orderByComparator); - - if (gadget != null) { - return gadget; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchGadgetException(msg.toString()); - } - - /** - * Returns the first gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByUuid_C_First(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByUuid_C(uuid, companyId, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget findByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - Gadget gadget = fetchByUuid_C_Last(uuid, companyId, orderByComparator); - - if (gadget != null) { - return gadget; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("uuid="); - msg.append(uuid); - - msg.append(", companyId="); - msg.append(companyId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchGadgetException(msg.toString()); - } - - /** - * Returns the last gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByUuid_C_Last(String uuid, long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByUuid_C(uuid, companyId); - - if (count == 0) { - return null; - } - - List list = findByUuid_C(uuid, companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set where uuid = ? and companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget[] findByUuid_C_PrevAndNext(long gadgetId, String uuid, - long companyId, OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - Gadget gadget = findByPrimaryKey(gadgetId); - - Session session = null; - - try { - session = openSession(); - - Gadget[] array = new GadgetImpl[3]; - - array[0] = getByUuid_C_PrevAndNext(session, gadget, uuid, - companyId, orderByComparator, true); - - array[1] = gadget; - - array[2] = getByUuid_C_PrevAndNext(session, gadget, uuid, - companyId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Gadget getByUuid_C_PrevAndNext(Session session, Gadget gadget, - String uuid, 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_GADGET_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_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(GadgetModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(gadget); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByUuid_C(String uuid, long companyId) - throws SystemException { - return filterFindByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByUuid_C(String uuid, long companyId, - int start, int end) throws SystemException { - return filterFindByUuid_C(uuid, companyId, start, end, null); - } - - /** - * Returns an ordered range of all the gadgets that the user has permissions to view where uuid = ? and companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param uuid the uuid - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByUuid_C(String uuid, long companyId, - int start, int end, OrderByComparator orderByComparator) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled()) { - return findByUuid_C(uuid, companyId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(4 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(4); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1_SQL); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3_SQL); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2_SQL); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(GadgetModelImpl.ORDER_BY_JPQL); - } - else { - query.append(GadgetModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Gadget.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, GadgetImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, GadgetImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param uuid the uuid - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget[] filterFindByUuid_C_PrevAndNext(long gadgetId, String uuid, - long companyId, OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - if (!InlineSQLHelperUtil.isEnabled()) { - return findByUuid_C_PrevAndNext(gadgetId, uuid, companyId, - orderByComparator); - } - - Gadget gadget = findByPrimaryKey(gadgetId); - - Session session = null; - - try { - session = openSession(); - - Gadget[] array = new GadgetImpl[3]; - - array[0] = filterGetByUuid_C_PrevAndNext(session, gadget, uuid, - companyId, orderByComparator, true); - - array[1] = gadget; - - array[2] = filterGetByUuid_C_PrevAndNext(session, gadget, uuid, - companyId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Gadget filterGetByUuid_C_PrevAndNext(Session session, - Gadget gadget, String uuid, 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); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_1); - } - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1_SQL); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3_SQL); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2_SQL); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(GadgetModelImpl.ORDER_BY_JPQL); - } - else { - query.append(GadgetModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Gadget.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, GadgetImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, GadgetImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(gadget); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the gadgets where uuid = ? and companyId = ? from the database. - * - * @param uuid the uuid - * @param companyId the company ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByUuid_C(String uuid, long companyId) - throws SystemException { - for (Gadget gadget : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(gadget); - } - } - - /** - * Returns the number of gadgets where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public int countByUuid_C(String uuid, long companyId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; - - Object[] finderArgs = new Object[] { uuid, companyId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_GADGET_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - 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(); - } - - /** - * Returns the number of gadgets that the user has permission to view where uuid = ? and companyId = ?. - * - * @param uuid the uuid - * @param companyId the company ID - * @return the number of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByUuid_C(String uuid, long companyId) - throws SystemException { - if (!InlineSQLHelperUtil.isEnabled()) { - return countByUuid_C(uuid, companyId); - } - - StringBundler query = new StringBundler(3); - - query.append(_FILTER_SQL_COUNT_GADGET_WHERE); - - boolean bindUuid = false; - - if (uuid == null) { - query.append(_FINDER_COLUMN_UUID_C_UUID_1_SQL); - } - else if (uuid.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_UUID_C_UUID_3_SQL); - } - else { - bindUuid = true; - - query.append(_FINDER_COLUMN_UUID_C_UUID_2_SQL); - } - - query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Gadget.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindUuid) { - qPos.add(uuid); - } - - qPos.add(companyId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_UUID_C_UUID_1 = "gadget.uuid IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "gadget.uuid = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(gadget.uuid IS NULL OR gadget.uuid = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_1_SQL = "gadget.uuid_ IS NULL AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_2_SQL = "gadget.uuid_ = ? AND "; - private static final String _FINDER_COLUMN_UUID_C_UUID_3_SQL = "(gadget.uuid_ IS NULL OR gadget.uuid_ = '') AND "; - private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "gadget.companyId = ?"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_COMPANYID = - new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, GadgetImpl.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(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, GadgetImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByCompanyId", - new String[] { Long.class.getName() }, - GadgetModelImpl.COMPANYID_COLUMN_BITMASK | - GadgetModelImpl.NAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByCompanyId", - new String[] { Long.class.getName() }); - - /** - * Returns all the gadgets where companyId = ?. - * - * @param companyId the company ID - * @return the matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId) - throws SystemException { - return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the gadgets where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findByCompanyId(long companyId, int start, int end) - throws SystemException { - return findByCompanyId(companyId, start, end, null); - } - - /** - * Returns an ordered range of all the gadgets where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (Gadget gadget : list) { - if ((companyId != gadget.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_GADGET_WHERE); - - query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(GadgetModelImpl.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)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget findByCompanyId_First(long companyId, - OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - Gadget gadget = fetchByCompanyId_First(companyId, orderByComparator); - - if (gadget != null) { - return gadget; - } - - 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 NoSuchGadgetException(msg.toString()); - } - - /** - * Returns the first gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByCompanyId_First(long companyId, - OrderByComparator orderByComparator) throws SystemException { - List list = findByCompanyId(companyId, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget findByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - Gadget gadget = fetchByCompanyId_Last(companyId, orderByComparator); - - if (gadget != null) { - return gadget; - } - - 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 NoSuchGadgetException(msg.toString()); - } - - /** - * Returns the last gadget in the ordered set where companyId = ?. - * - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByCompanyId_Last(long companyId, - OrderByComparator orderByComparator) throws SystemException { - int count = countByCompanyId(companyId); - - if (count == 0) { - return null; - } - - List list = findByCompanyId(companyId, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set where companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget[] findByCompanyId_PrevAndNext(long gadgetId, long companyId, - OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - Gadget gadget = findByPrimaryKey(gadgetId); - - Session session = null; - - try { - session = openSession(); - - Gadget[] array = new GadgetImpl[3]; - - array[0] = getByCompanyId_PrevAndNext(session, gadget, companyId, - orderByComparator, true); - - array[1] = gadget; - - array[2] = getByCompanyId_PrevAndNext(session, gadget, companyId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Gadget getByCompanyId_PrevAndNext(Session session, Gadget gadget, - 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_GADGET_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(GadgetModelImpl.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(gadget); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Returns all the gadgets that the user has permission to view where companyId = ?. - * - * @param companyId the company ID - * @return the matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByCompanyId(long companyId) - throws SystemException { - return filterFindByCompanyId(companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the gadgets that the user has permission to view where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByCompanyId(long companyId, int start, int end) - throws SystemException { - return filterFindByCompanyId(companyId, start, end, null); - } - - /** - * Returns an ordered range of all the gadgets that the user has permissions to view where companyId = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param companyId the company ID - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public List filterFindByCompanyId(long companyId, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled()) { - return findByCompanyId(companyId, start, end, orderByComparator); - } - - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(3 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(3); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - if (getDB().isSupportsInlineDistinct()) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator, true); - } - else { - appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, - orderByComparator, true); - } - } - else { - if (getDB().isSupportsInlineDistinct()) { - query.append(GadgetModelImpl.ORDER_BY_JPQL); - } - else { - query.append(GadgetModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Gadget.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, GadgetImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, GadgetImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(companyId); - - return (List)QueryUtil.list(q, getDialect(), start, end); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - /** - * Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where companyId = ?. - * - * @param gadgetId the primary key of the current gadget - * @param companyId the company ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget[] filterFindByCompanyId_PrevAndNext(long gadgetId, - long companyId, OrderByComparator orderByComparator) - throws NoSuchGadgetException, SystemException { - if (!InlineSQLHelperUtil.isEnabled()) { - return findByCompanyId_PrevAndNext(gadgetId, companyId, - orderByComparator); - } - - Gadget gadget = findByPrimaryKey(gadgetId); - - Session session = null; - - try { - session = openSession(); - - Gadget[] array = new GadgetImpl[3]; - - array[0] = filterGetByCompanyId_PrevAndNext(session, gadget, - companyId, orderByComparator, true); - - array[1] = gadget; - - array[2] = filterGetByCompanyId_PrevAndNext(session, gadget, - companyId, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected Gadget filterGetByCompanyId_PrevAndNext(Session session, - Gadget gadget, 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); - } - - if (getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_WHERE); - } - else { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_1); - } - - query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); - - if (!getDB().isSupportsInlineDistinct()) { - query.append(_FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_2); - } - - if (orderByComparator != null) { - String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); - - if (orderByConditionFields.length > 0) { - query.append(WHERE_AND); - } - - for (int i = 0; i < orderByConditionFields.length; i++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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++) { - if (getDB().isSupportsInlineDistinct()) { - query.append(_ORDER_BY_ENTITY_ALIAS); - } - else { - query.append(_ORDER_BY_ENTITY_TABLE); - } - - 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 { - if (getDB().isSupportsInlineDistinct()) { - query.append(GadgetModelImpl.ORDER_BY_JPQL); - } - else { - query.append(GadgetModelImpl.ORDER_BY_SQL); - } - } - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Gadget.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); - - SQLQuery q = session.createSQLQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - if (getDB().isSupportsInlineDistinct()) { - q.addEntity(_FILTER_ENTITY_ALIAS, GadgetImpl.class); - } - else { - q.addEntity(_FILTER_ENTITY_TABLE, GadgetImpl.class); - } - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(companyId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(gadget); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the gadgets 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 (Gadget gadget : findByCompanyId(companyId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(gadget); - } - } - - /** - * Returns the number of gadgets where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching gadgets - * @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_GADGET_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(); - } - - /** - * Returns the number of gadgets that the user has permission to view where companyId = ?. - * - * @param companyId the company ID - * @return the number of matching gadgets that the user has permission to view - * @throws SystemException if a system exception occurred - */ - @Override - public int filterCountByCompanyId(long companyId) throws SystemException { - if (!InlineSQLHelperUtil.isEnabled()) { - return countByCompanyId(companyId); - } - - StringBundler query = new StringBundler(2); - - query.append(_FILTER_SQL_COUNT_GADGET_WHERE); - - query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2); - - String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), - Gadget.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); - - Session session = null; - - try { - session = openSession(); - - SQLQuery q = session.createSQLQuery(sql); - - q.addScalar(COUNT_COLUMN_NAME, - com.liferay.portal.kernel.dao.orm.Type.LONG); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(companyId); - - Long count = (Long)q.uniqueResult(); - - return count.intValue(); - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - private static final String _FINDER_COLUMN_COMPANYID_COMPANYID_2 = "gadget.companyId = ?"; - public static final FinderPath FINDER_PATH_FETCH_BY_C_U = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, GadgetImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByC_U", - new String[] { Long.class.getName(), String.class.getName() }, - GadgetModelImpl.COMPANYID_COLUMN_BITMASK | - GadgetModelImpl.URL_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_C_U = new FinderPath(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByC_U", - new String[] { Long.class.getName(), String.class.getName() }); - - /** - * Returns the gadget where companyId = ? and url = ? or throws a {@link com.liferay.opensocial.NoSuchGadgetException} if it could not be found. - * - * @param companyId the company ID - * @param url the url - * @return the matching gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget findByC_U(long companyId, String url) - throws NoSuchGadgetException, SystemException { - Gadget gadget = fetchByC_U(companyId, url); - - if (gadget == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("companyId="); - msg.append(companyId); - - msg.append(", url="); - msg.append(url); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchGadgetException(msg.toString()); - } - - return gadget; - } - - /** - * Returns the gadget where companyId = ? and url = ? or returns null if it could not be found. Uses the finder cache. - * - * @param companyId the company ID - * @param url the url - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByC_U(long companyId, String url) - throws SystemException { - return fetchByC_U(companyId, url, true); - } - - /** - * Returns the gadget where companyId = ? and url = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param companyId the company ID - * @param url the url - * @param retrieveFromCache whether to use the finder cache - * @return the matching gadget, or null if a matching gadget could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByC_U(long companyId, String url, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { companyId, url }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_C_U, - finderArgs, this); - } - - if (result instanceof Gadget) { - Gadget gadget = (Gadget)result; - - if ((companyId != gadget.getCompanyId()) || - !Validator.equals(url, gadget.getUrl())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_GADGET_WHERE); - - query.append(_FINDER_COLUMN_C_U_COMPANYID_2); - - boolean bindUrl = false; - - if (url == null) { - query.append(_FINDER_COLUMN_C_U_URL_1); - } - else if (url.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_C_U_URL_3); - } - else { - bindUrl = true; - - query.append(_FINDER_COLUMN_C_U_URL_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(companyId); - - if (bindUrl) { - qPos.add(url); - } - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_U, - finderArgs, list); - } - else { - Gadget gadget = list.get(0); - - result = gadget; - - cacheResult(gadget); - - if ((gadget.getCompanyId() != companyId) || - (gadget.getUrl() == null) || - !gadget.getUrl().equals(url)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_U, - finderArgs, gadget); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_C_U, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (Gadget)result; - } - } - - /** - * Removes the gadget where companyId = ? and url = ? from the database. - * - * @param companyId the company ID - * @param url the url - * @return the gadget that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget removeByC_U(long companyId, String url) - throws NoSuchGadgetException, SystemException { - Gadget gadget = findByC_U(companyId, url); - - return remove(gadget); - } - - /** - * Returns the number of gadgets where companyId = ? and url = ?. - * - * @param companyId the company ID - * @param url the url - * @return the number of matching gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public int countByC_U(long companyId, String url) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_C_U; - - Object[] finderArgs = new Object[] { companyId, url }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_GADGET_WHERE); - - query.append(_FINDER_COLUMN_C_U_COMPANYID_2); - - boolean bindUrl = false; - - if (url == null) { - query.append(_FINDER_COLUMN_C_U_URL_1); - } - else if (url.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_C_U_URL_3); - } - else { - bindUrl = true; - - query.append(_FINDER_COLUMN_C_U_URL_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(companyId); - - if (bindUrl) { - qPos.add(url); - } - - 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_C_U_COMPANYID_2 = "gadget.companyId = ? AND "; - private static final String _FINDER_COLUMN_C_U_URL_1 = "gadget.url IS NULL"; - private static final String _FINDER_COLUMN_C_U_URL_2 = "gadget.url = ?"; - private static final String _FINDER_COLUMN_C_U_URL_3 = "(gadget.url IS NULL OR gadget.url = '')"; - - public GadgetPersistenceImpl() { - setModelClass(Gadget.class); - } - - /** - * Caches the gadget in the entity cache if it is enabled. - * - * @param gadget the gadget - */ - @Override - public void cacheResult(Gadget gadget) { - EntityCacheUtil.putResult(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetImpl.class, gadget.getPrimaryKey(), gadget); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_U, - new Object[] { gadget.getCompanyId(), gadget.getUrl() }, gadget); - - gadget.resetOriginalValues(); - } - - /** - * Caches the gadgets in the entity cache if it is enabled. - * - * @param gadgets the gadgets - */ - @Override - public void cacheResult(List gadgets) { - for (Gadget gadget : gadgets) { - if (EntityCacheUtil.getResult( - GadgetModelImpl.ENTITY_CACHE_ENABLED, GadgetImpl.class, - gadget.getPrimaryKey()) == null) { - cacheResult(gadget); - } - else { - gadget.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all gadgets. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(GadgetImpl.class.getName()); - } - - EntityCacheUtil.clearCache(GadgetImpl.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 gadget. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache(Gadget gadget) { - EntityCacheUtil.removeResult(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetImpl.class, gadget.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(gadget); - } - - @Override - public void clearCache(List gadgets) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (Gadget gadget : gadgets) { - EntityCacheUtil.removeResult(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetImpl.class, gadget.getPrimaryKey()); - - clearUniqueFindersCache(gadget); - } - } - - protected void cacheUniqueFindersCache(Gadget gadget) { - if (gadget.isNew()) { - Object[] args = new Object[] { gadget.getCompanyId(), gadget.getUrl() }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_U, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_U, args, gadget); - } - else { - GadgetModelImpl gadgetModelImpl = (GadgetModelImpl)gadget; - - if ((gadgetModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_C_U.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - gadget.getCompanyId(), gadget.getUrl() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_U, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_U, args, gadget); - } - } - } - - protected void clearUniqueFindersCache(Gadget gadget) { - GadgetModelImpl gadgetModelImpl = (GadgetModelImpl)gadget; - - Object[] args = new Object[] { gadget.getCompanyId(), gadget.getUrl() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_U, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_C_U, args); - - if ((gadgetModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_C_U.getColumnBitmask()) != 0) { - args = new Object[] { - gadgetModelImpl.getOriginalCompanyId(), - gadgetModelImpl.getOriginalUrl() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_U, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_C_U, args); - } - } - - /** - * Creates a new gadget with the primary key. Does not add the gadget to the database. - * - * @param gadgetId the primary key for the new gadget - * @return the new gadget - */ - @Override - public Gadget create(long gadgetId) { - Gadget gadget = new GadgetImpl(); - - gadget.setNew(true); - gadget.setPrimaryKey(gadgetId); - - String uuid = PortalUUIDUtil.generate(); - - gadget.setUuid(uuid); - - return gadget; - } - - /** - * Removes the gadget with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param gadgetId the primary key of the gadget - * @return the gadget that was removed - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget remove(long gadgetId) - throws NoSuchGadgetException, SystemException { - return remove((Serializable)gadgetId); - } - - /** - * Removes the gadget with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the gadget - * @return the gadget that was removed - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget remove(Serializable primaryKey) - throws NoSuchGadgetException, SystemException { - Session session = null; - - try { - session = openSession(); - - Gadget gadget = (Gadget)session.get(GadgetImpl.class, primaryKey); - - if (gadget == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchGadgetException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(gadget); - } - catch (NoSuchGadgetException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected Gadget removeImpl(Gadget gadget) throws SystemException { - gadget = toUnwrappedModel(gadget); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(gadget)) { - gadget = (Gadget)session.get(GadgetImpl.class, - gadget.getPrimaryKeyObj()); - } - - if (gadget != null) { - session.delete(gadget); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (gadget != null) { - clearCache(gadget); - } - - return gadget; - } - - @Override - public Gadget updateImpl(com.liferay.opensocial.model.Gadget gadget) - throws SystemException { - gadget = toUnwrappedModel(gadget); - - boolean isNew = gadget.isNew(); - - GadgetModelImpl gadgetModelImpl = (GadgetModelImpl)gadget; - - if (Validator.isNull(gadget.getUuid())) { - String uuid = PortalUUIDUtil.generate(); - - gadget.setUuid(uuid); - } - - Session session = null; - - try { - session = openSession(); - - if (gadget.isNew()) { - session.save(gadget); - - gadget.setNew(false); - } - else { - session.merge(gadget); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !GadgetModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((gadgetModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { gadgetModelImpl.getOriginalUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - - args = new Object[] { gadgetModelImpl.getUuid() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, - args); - } - - if ((gadgetModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - gadgetModelImpl.getOriginalUuid(), - gadgetModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - - args = new Object[] { - gadgetModelImpl.getUuid(), - gadgetModelImpl.getCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, - args); - } - - if ((gadgetModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - gadgetModelImpl.getOriginalCompanyId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - - args = new Object[] { gadgetModelImpl.getCompanyId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID, - args); - } - } - - EntityCacheUtil.putResult(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetImpl.class, gadget.getPrimaryKey(), gadget); - - clearUniqueFindersCache(gadget); - cacheUniqueFindersCache(gadget); - - return gadget; - } - - protected Gadget toUnwrappedModel(Gadget gadget) { - if (gadget instanceof GadgetImpl) { - return gadget; - } - - GadgetImpl gadgetImpl = new GadgetImpl(); - - gadgetImpl.setNew(gadget.isNew()); - gadgetImpl.setPrimaryKey(gadget.getPrimaryKey()); - - gadgetImpl.setUuid(gadget.getUuid()); - gadgetImpl.setGadgetId(gadget.getGadgetId()); - gadgetImpl.setCompanyId(gadget.getCompanyId()); - gadgetImpl.setCreateDate(gadget.getCreateDate()); - gadgetImpl.setModifiedDate(gadget.getModifiedDate()); - gadgetImpl.setName(gadget.getName()); - gadgetImpl.setUrl(gadget.getUrl()); - gadgetImpl.setPortletCategoryNames(gadget.getPortletCategoryNames()); - - return gadgetImpl; - } - - /** - * Returns the gadget 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 gadget - * @return the gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget findByPrimaryKey(Serializable primaryKey) - throws NoSuchGadgetException, SystemException { - Gadget gadget = fetchByPrimaryKey(primaryKey); - - if (gadget == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchGadgetException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return gadget; - } - - /** - * Returns the gadget with the primary key or throws a {@link com.liferay.opensocial.NoSuchGadgetException} if it could not be found. - * - * @param gadgetId the primary key of the gadget - * @return the gadget - * @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget findByPrimaryKey(long gadgetId) - throws NoSuchGadgetException, SystemException { - return findByPrimaryKey((Serializable)gadgetId); - } - - /** - * Returns the gadget with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the gadget - * @return the gadget, or null if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - Gadget gadget = (Gadget)EntityCacheUtil.getResult(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetImpl.class, primaryKey); - - if (gadget == _nullGadget) { - return null; - } - - if (gadget == null) { - Session session = null; - - try { - session = openSession(); - - gadget = (Gadget)session.get(GadgetImpl.class, primaryKey); - - if (gadget != null) { - cacheResult(gadget); - } - else { - EntityCacheUtil.putResult(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetImpl.class, primaryKey, _nullGadget); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(GadgetModelImpl.ENTITY_CACHE_ENABLED, - GadgetImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return gadget; - } - - /** - * Returns the gadget with the primary key or returns null if it could not be found. - * - * @param gadgetId the primary key of the gadget - * @return the gadget, or null if a gadget with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Gadget fetchByPrimaryKey(long gadgetId) throws SystemException { - return fetchByPrimaryKey((Serializable)gadgetId); - } - - /** - * Returns all the gadgets. - * - * @return the gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @return the range of gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the gadgets. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.GadgetModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of gadgets - * @param end the upper bound of the range of gadgets (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of gadgets - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_GADGET); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_GADGET; - - if (pagination) { - sql = sql.concat(GadgetModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), start, - end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 gadgets from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (Gadget gadget : findAll()) { - remove(gadget); - } - } - - /** - * Returns the number of gadgets. - * - * @return the number of gadgets - * @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_GADGET); - - 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(); - } - - @Override - protected Set getBadColumnNames() { - return _badColumnNames; - } - - /** - * Initializes the gadget persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.com.liferay.opensocial.model.Gadget"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(GadgetImpl.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_GADGET = "SELECT gadget FROM Gadget gadget"; - private static final String _SQL_SELECT_GADGET_WHERE = "SELECT gadget FROM Gadget gadget WHERE "; - private static final String _SQL_COUNT_GADGET = "SELECT COUNT(gadget) FROM Gadget gadget"; - private static final String _SQL_COUNT_GADGET_WHERE = "SELECT COUNT(gadget) FROM Gadget gadget WHERE "; - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN = "gadget.gadgetId"; - private static final String _FILTER_SQL_SELECT_GADGET_WHERE = "SELECT DISTINCT {gadget.*} FROM OpenSocial_Gadget gadget WHERE "; - private static final String _FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_1 = - "SELECT {OpenSocial_Gadget.*} FROM (SELECT DISTINCT gadget.gadgetId FROM OpenSocial_Gadget gadget WHERE "; - private static final String _FILTER_SQL_SELECT_GADGET_NO_INLINE_DISTINCT_WHERE_2 = - ") TEMP_TABLE INNER JOIN OpenSocial_Gadget ON TEMP_TABLE.gadgetId = OpenSocial_Gadget.gadgetId"; - private static final String _FILTER_SQL_COUNT_GADGET_WHERE = "SELECT COUNT(DISTINCT gadget.gadgetId) AS COUNT_VALUE FROM OpenSocial_Gadget gadget WHERE "; - private static final String _FILTER_ENTITY_ALIAS = "gadget"; - private static final String _FILTER_ENTITY_TABLE = "OpenSocial_Gadget"; - private static final String _ORDER_BY_ENTITY_ALIAS = "gadget."; - private static final String _ORDER_BY_ENTITY_TABLE = "OpenSocial_Gadget."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Gadget exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Gadget 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(GadgetPersistenceImpl.class); - private static Set _badColumnNames = SetUtil.fromArray(new String[] { - "uuid" - }); - private static Gadget _nullGadget = new GadgetImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullGadgetCacheModel; - } - }; - - private static CacheModel _nullGadgetCacheModel = new CacheModel() { - @Override - public Gadget toEntityModel() { - return _nullGadget; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/persistence/OAuthConsumerPersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/persistence/OAuthConsumerPersistenceImpl.java deleted file mode 100644 index ae50f24546..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/persistence/OAuthConsumerPersistenceImpl.java +++ /dev/null @@ -1,1601 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.NoSuchOAuthConsumerException; -import com.liferay.opensocial.model.OAuthConsumer; -import com.liferay.opensocial.model.impl.OAuthConsumerImpl; -import com.liferay.opensocial.model.impl.OAuthConsumerModelImpl; - -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.kernel.util.Validator; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * The persistence implementation for the o auth consumer service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthConsumerPersistence - * @see OAuthConsumerUtil - * @generated - */ -public class OAuthConsumerPersistenceImpl extends BasePersistenceImpl - implements OAuthConsumerPersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link OAuthConsumerUtil} to access the o auth consumer persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = OAuthConsumerImpl.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(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerModelImpl.FINDER_CACHE_ENABLED, - OAuthConsumerImpl.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, - "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerModelImpl.FINDER_CACHE_ENABLED, - OAuthConsumerImpl.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, - "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerModelImpl.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_GADGETKEY = - new FinderPath(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerModelImpl.FINDER_CACHE_ENABLED, - OAuthConsumerImpl.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, - "findByGadgetKey", - new String[] { - String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GADGETKEY = - new FinderPath(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerModelImpl.FINDER_CACHE_ENABLED, - OAuthConsumerImpl.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, - "findByGadgetKey", new String[] { String.class.getName() }, - OAuthConsumerModelImpl.GADGETKEY_COLUMN_BITMASK | - OAuthConsumerModelImpl.SERVICENAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_GADGETKEY = new FinderPath(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByGadgetKey", - new String[] { String.class.getName() }); - - /** - * Returns all the o auth consumers where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @return the matching o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGadgetKey(String gadgetKey) - throws SystemException { - return findByGadgetKey(gadgetKey, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - null); - } - - /** - * Returns a range of all the o auth consumers where gadgetKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGadgetKey(String gadgetKey, int start, - int end) throws SystemException { - return findByGadgetKey(gadgetKey, start, end, null); - } - - /** - * Returns an ordered range of all the o auth consumers where gadgetKey = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public List findByGadgetKey(String gadgetKey, 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_GADGETKEY; - finderArgs = new Object[] { gadgetKey }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GADGETKEY; - finderArgs = new Object[] { gadgetKey, start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (OAuthConsumer oAuthConsumer : list) { - if (!Validator.equals(gadgetKey, oAuthConsumer.getGadgetKey())) { - 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_OAUTHCONSUMER_WHERE); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_GADGETKEY_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_GADGETKEY_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_GADGETKEY_GADGETKEY_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(OAuthConsumerModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer findByGadgetKey_First(String gadgetKey, - OrderByComparator orderByComparator) - throws NoSuchOAuthConsumerException, SystemException { - OAuthConsumer oAuthConsumer = fetchByGadgetKey_First(gadgetKey, - orderByComparator); - - if (oAuthConsumer != null) { - return oAuthConsumer; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("gadgetKey="); - msg.append(gadgetKey); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchOAuthConsumerException(msg.toString()); - } - - /** - * Returns the first o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer fetchByGadgetKey_First(String gadgetKey, - OrderByComparator orderByComparator) throws SystemException { - List list = findByGadgetKey(gadgetKey, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer findByGadgetKey_Last(String gadgetKey, - OrderByComparator orderByComparator) - throws NoSuchOAuthConsumerException, SystemException { - OAuthConsumer oAuthConsumer = fetchByGadgetKey_Last(gadgetKey, - orderByComparator); - - if (oAuthConsumer != null) { - return oAuthConsumer; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("gadgetKey="); - msg.append(gadgetKey); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchOAuthConsumerException(msg.toString()); - } - - /** - * Returns the last o auth consumer in the ordered set where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer fetchByGadgetKey_Last(String gadgetKey, - OrderByComparator orderByComparator) throws SystemException { - int count = countByGadgetKey(gadgetKey); - - if (count == 0) { - return null; - } - - List list = findByGadgetKey(gadgetKey, count - 1, count, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the o auth consumers before and after the current o auth consumer in the ordered set where gadgetKey = ?. - * - * @param oAuthConsumerId the primary key of the current o auth consumer - * @param gadgetKey the gadget key - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer[] findByGadgetKey_PrevAndNext(long oAuthConsumerId, - String gadgetKey, OrderByComparator orderByComparator) - throws NoSuchOAuthConsumerException, SystemException { - OAuthConsumer oAuthConsumer = findByPrimaryKey(oAuthConsumerId); - - Session session = null; - - try { - session = openSession(); - - OAuthConsumer[] array = new OAuthConsumerImpl[3]; - - array[0] = getByGadgetKey_PrevAndNext(session, oAuthConsumer, - gadgetKey, orderByComparator, true); - - array[1] = oAuthConsumer; - - array[2] = getByGadgetKey_PrevAndNext(session, oAuthConsumer, - gadgetKey, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected OAuthConsumer getByGadgetKey_PrevAndNext(Session session, - OAuthConsumer oAuthConsumer, String gadgetKey, - 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_OAUTHCONSUMER_WHERE); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_GADGETKEY_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_GADGETKEY_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_GADGETKEY_GADGETKEY_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(OAuthConsumerModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(oAuthConsumer); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the o auth consumers where gadgetKey = ? from the database. - * - * @param gadgetKey the gadget key - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByGadgetKey(String gadgetKey) throws SystemException { - for (OAuthConsumer oAuthConsumer : findByGadgetKey(gadgetKey, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(oAuthConsumer); - } - } - - /** - * Returns the number of o auth consumers where gadgetKey = ?. - * - * @param gadgetKey the gadget key - * @return the number of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public int countByGadgetKey(String gadgetKey) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_GADGETKEY; - - Object[] finderArgs = new Object[] { gadgetKey }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_OAUTHCONSUMER_WHERE); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_GADGETKEY_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_GADGETKEY_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_GADGETKEY_GADGETKEY_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - 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_GADGETKEY_GADGETKEY_1 = "oAuthConsumer.gadgetKey IS NULL"; - private static final String _FINDER_COLUMN_GADGETKEY_GADGETKEY_2 = "oAuthConsumer.gadgetKey = ?"; - private static final String _FINDER_COLUMN_GADGETKEY_GADGETKEY_3 = "(oAuthConsumer.gadgetKey IS NULL OR oAuthConsumer.gadgetKey = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_G_S = new FinderPath(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerModelImpl.FINDER_CACHE_ENABLED, - OAuthConsumerImpl.class, FINDER_CLASS_NAME_ENTITY, "fetchByG_S", - new String[] { String.class.getName(), String.class.getName() }, - OAuthConsumerModelImpl.GADGETKEY_COLUMN_BITMASK | - OAuthConsumerModelImpl.SERVICENAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_S = new FinderPath(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_S", - new String[] { String.class.getName(), String.class.getName() }); - - /** - * Returns the o auth consumer where gadgetKey = ? and serviceName = ? or throws a {@link com.liferay.opensocial.NoSuchOAuthConsumerException} if it could not be found. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the matching o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer findByG_S(String gadgetKey, String serviceName) - throws NoSuchOAuthConsumerException, SystemException { - OAuthConsumer oAuthConsumer = fetchByG_S(gadgetKey, serviceName); - - if (oAuthConsumer == null) { - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("gadgetKey="); - msg.append(gadgetKey); - - msg.append(", serviceName="); - msg.append(serviceName); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchOAuthConsumerException(msg.toString()); - } - - return oAuthConsumer; - } - - /** - * Returns the o auth consumer where gadgetKey = ? and serviceName = ? or returns null if it could not be found. Uses the finder cache. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer fetchByG_S(String gadgetKey, String serviceName) - throws SystemException { - return fetchByG_S(gadgetKey, serviceName, true); - } - - /** - * Returns the o auth consumer where gadgetKey = ? and serviceName = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param retrieveFromCache whether to use the finder cache - * @return the matching o auth consumer, or null if a matching o auth consumer could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer fetchByG_S(String gadgetKey, String serviceName, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { gadgetKey, serviceName }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_G_S, - finderArgs, this); - } - - if (result instanceof OAuthConsumer) { - OAuthConsumer oAuthConsumer = (OAuthConsumer)result; - - if (!Validator.equals(gadgetKey, oAuthConsumer.getGadgetKey()) || - !Validator.equals(serviceName, - oAuthConsumer.getServiceName())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(4); - - query.append(_SQL_SELECT_OAUTHCONSUMER_WHERE); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_G_S_GADGETKEY_2); - } - - boolean bindServiceName = false; - - if (serviceName == null) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_1); - } - else if (serviceName.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_3); - } - else { - bindServiceName = true; - - query.append(_FINDER_COLUMN_G_S_SERVICENAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - if (bindServiceName) { - qPos.add(serviceName); - } - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_S, - finderArgs, list); - } - else { - if ((list.size() > 1) && _log.isWarnEnabled()) { - _log.warn( - "OAuthConsumerPersistenceImpl.fetchByG_S(String, String, boolean) with parameters (" + - StringUtil.merge(finderArgs) + - ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); - } - - OAuthConsumer oAuthConsumer = list.get(0); - - result = oAuthConsumer; - - cacheResult(oAuthConsumer); - - if ((oAuthConsumer.getGadgetKey() == null) || - !oAuthConsumer.getGadgetKey().equals(gadgetKey) || - (oAuthConsumer.getServiceName() == null) || - !oAuthConsumer.getServiceName().equals(serviceName)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_S, - finderArgs, oAuthConsumer); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_S, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (OAuthConsumer)result; - } - } - - /** - * Removes the o auth consumer where gadgetKey = ? and serviceName = ? from the database. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the o auth consumer that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer removeByG_S(String gadgetKey, String serviceName) - throws NoSuchOAuthConsumerException, SystemException { - OAuthConsumer oAuthConsumer = findByG_S(gadgetKey, serviceName); - - return remove(oAuthConsumer); - } - - /** - * Returns the number of o auth consumers where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the number of matching o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_S(String gadgetKey, String serviceName) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_S; - - Object[] finderArgs = new Object[] { gadgetKey, serviceName }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_OAUTHCONSUMER_WHERE); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_G_S_GADGETKEY_2); - } - - boolean bindServiceName = false; - - if (serviceName == null) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_1); - } - else if (serviceName.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_3); - } - else { - bindServiceName = true; - - query.append(_FINDER_COLUMN_G_S_SERVICENAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - if (bindServiceName) { - qPos.add(serviceName); - } - - 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_G_S_GADGETKEY_1 = "oAuthConsumer.gadgetKey IS NULL AND "; - private static final String _FINDER_COLUMN_G_S_GADGETKEY_2 = "oAuthConsumer.gadgetKey = ? AND "; - private static final String _FINDER_COLUMN_G_S_GADGETKEY_3 = "(oAuthConsumer.gadgetKey IS NULL OR oAuthConsumer.gadgetKey = '') AND "; - private static final String _FINDER_COLUMN_G_S_SERVICENAME_1 = "oAuthConsumer.serviceName IS NULL"; - private static final String _FINDER_COLUMN_G_S_SERVICENAME_2 = "oAuthConsumer.serviceName = ?"; - private static final String _FINDER_COLUMN_G_S_SERVICENAME_3 = "(oAuthConsumer.serviceName IS NULL OR oAuthConsumer.serviceName = '')"; - - public OAuthConsumerPersistenceImpl() { - setModelClass(OAuthConsumer.class); - } - - /** - * Caches the o auth consumer in the entity cache if it is enabled. - * - * @param oAuthConsumer the o auth consumer - */ - @Override - public void cacheResult(OAuthConsumer oAuthConsumer) { - EntityCacheUtil.putResult(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerImpl.class, oAuthConsumer.getPrimaryKey(), - oAuthConsumer); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_S, - new Object[] { - oAuthConsumer.getGadgetKey(), oAuthConsumer.getServiceName() - }, oAuthConsumer); - - oAuthConsumer.resetOriginalValues(); - } - - /** - * Caches the o auth consumers in the entity cache if it is enabled. - * - * @param oAuthConsumers the o auth consumers - */ - @Override - public void cacheResult(List oAuthConsumers) { - for (OAuthConsumer oAuthConsumer : oAuthConsumers) { - if (EntityCacheUtil.getResult( - OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerImpl.class, oAuthConsumer.getPrimaryKey()) == null) { - cacheResult(oAuthConsumer); - } - else { - oAuthConsumer.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all o auth consumers. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(OAuthConsumerImpl.class.getName()); - } - - EntityCacheUtil.clearCache(OAuthConsumerImpl.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 o auth consumer. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache(OAuthConsumer oAuthConsumer) { - EntityCacheUtil.removeResult(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerImpl.class, oAuthConsumer.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(oAuthConsumer); - } - - @Override - public void clearCache(List oAuthConsumers) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (OAuthConsumer oAuthConsumer : oAuthConsumers) { - EntityCacheUtil.removeResult(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerImpl.class, oAuthConsumer.getPrimaryKey()); - - clearUniqueFindersCache(oAuthConsumer); - } - } - - protected void cacheUniqueFindersCache(OAuthConsumer oAuthConsumer) { - if (oAuthConsumer.isNew()) { - Object[] args = new Object[] { - oAuthConsumer.getGadgetKey(), oAuthConsumer.getServiceName() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_S, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_S, args, - oAuthConsumer); - } - else { - OAuthConsumerModelImpl oAuthConsumerModelImpl = (OAuthConsumerModelImpl)oAuthConsumer; - - if ((oAuthConsumerModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - oAuthConsumer.getGadgetKey(), - oAuthConsumer.getServiceName() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_S, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_S, args, - oAuthConsumer); - } - } - } - - protected void clearUniqueFindersCache(OAuthConsumer oAuthConsumer) { - OAuthConsumerModelImpl oAuthConsumerModelImpl = (OAuthConsumerModelImpl)oAuthConsumer; - - Object[] args = new Object[] { - oAuthConsumer.getGadgetKey(), oAuthConsumer.getServiceName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_S, args); - - if ((oAuthConsumerModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_G_S.getColumnBitmask()) != 0) { - args = new Object[] { - oAuthConsumerModelImpl.getOriginalGadgetKey(), - oAuthConsumerModelImpl.getOriginalServiceName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_S, args); - } - } - - /** - * Creates a new o auth consumer with the primary key. Does not add the o auth consumer to the database. - * - * @param oAuthConsumerId the primary key for the new o auth consumer - * @return the new o auth consumer - */ - @Override - public OAuthConsumer create(long oAuthConsumerId) { - OAuthConsumer oAuthConsumer = new OAuthConsumerImpl(); - - oAuthConsumer.setNew(true); - oAuthConsumer.setPrimaryKey(oAuthConsumerId); - - return oAuthConsumer; - } - - /** - * Removes the o auth consumer with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer that was removed - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer remove(long oAuthConsumerId) - throws NoSuchOAuthConsumerException, SystemException { - return remove((Serializable)oAuthConsumerId); - } - - /** - * Removes the o auth consumer with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the o auth consumer - * @return the o auth consumer that was removed - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer remove(Serializable primaryKey) - throws NoSuchOAuthConsumerException, SystemException { - Session session = null; - - try { - session = openSession(); - - OAuthConsumer oAuthConsumer = (OAuthConsumer)session.get(OAuthConsumerImpl.class, - primaryKey); - - if (oAuthConsumer == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchOAuthConsumerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(oAuthConsumer); - } - catch (NoSuchOAuthConsumerException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected OAuthConsumer removeImpl(OAuthConsumer oAuthConsumer) - throws SystemException { - oAuthConsumer = toUnwrappedModel(oAuthConsumer); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(oAuthConsumer)) { - oAuthConsumer = (OAuthConsumer)session.get(OAuthConsumerImpl.class, - oAuthConsumer.getPrimaryKeyObj()); - } - - if (oAuthConsumer != null) { - session.delete(oAuthConsumer); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (oAuthConsumer != null) { - clearCache(oAuthConsumer); - } - - return oAuthConsumer; - } - - @Override - public OAuthConsumer updateImpl( - com.liferay.opensocial.model.OAuthConsumer oAuthConsumer) - throws SystemException { - oAuthConsumer = toUnwrappedModel(oAuthConsumer); - - boolean isNew = oAuthConsumer.isNew(); - - OAuthConsumerModelImpl oAuthConsumerModelImpl = (OAuthConsumerModelImpl)oAuthConsumer; - - Session session = null; - - try { - session = openSession(); - - if (oAuthConsumer.isNew()) { - session.save(oAuthConsumer); - - oAuthConsumer.setNew(false); - } - else { - session.merge(oAuthConsumer); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !OAuthConsumerModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((oAuthConsumerModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GADGETKEY.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - oAuthConsumerModelImpl.getOriginalGadgetKey() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GADGETKEY, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GADGETKEY, - args); - - args = new Object[] { oAuthConsumerModelImpl.getGadgetKey() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GADGETKEY, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GADGETKEY, - args); - } - } - - EntityCacheUtil.putResult(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerImpl.class, oAuthConsumer.getPrimaryKey(), - oAuthConsumer); - - clearUniqueFindersCache(oAuthConsumer); - cacheUniqueFindersCache(oAuthConsumer); - - return oAuthConsumer; - } - - protected OAuthConsumer toUnwrappedModel(OAuthConsumer oAuthConsumer) { - if (oAuthConsumer instanceof OAuthConsumerImpl) { - return oAuthConsumer; - } - - OAuthConsumerImpl oAuthConsumerImpl = new OAuthConsumerImpl(); - - oAuthConsumerImpl.setNew(oAuthConsumer.isNew()); - oAuthConsumerImpl.setPrimaryKey(oAuthConsumer.getPrimaryKey()); - - oAuthConsumerImpl.setOAuthConsumerId(oAuthConsumer.getOAuthConsumerId()); - oAuthConsumerImpl.setCompanyId(oAuthConsumer.getCompanyId()); - oAuthConsumerImpl.setCreateDate(oAuthConsumer.getCreateDate()); - oAuthConsumerImpl.setModifiedDate(oAuthConsumer.getModifiedDate()); - oAuthConsumerImpl.setGadgetKey(oAuthConsumer.getGadgetKey()); - oAuthConsumerImpl.setServiceName(oAuthConsumer.getServiceName()); - oAuthConsumerImpl.setConsumerKey(oAuthConsumer.getConsumerKey()); - oAuthConsumerImpl.setConsumerSecret(oAuthConsumer.getConsumerSecret()); - oAuthConsumerImpl.setKeyType(oAuthConsumer.getKeyType()); - - return oAuthConsumerImpl; - } - - /** - * Returns the o auth consumer 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 o auth consumer - * @return the o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer findByPrimaryKey(Serializable primaryKey) - throws NoSuchOAuthConsumerException, SystemException { - OAuthConsumer oAuthConsumer = fetchByPrimaryKey(primaryKey); - - if (oAuthConsumer == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchOAuthConsumerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return oAuthConsumer; - } - - /** - * Returns the o auth consumer with the primary key or throws a {@link com.liferay.opensocial.NoSuchOAuthConsumerException} if it could not be found. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer - * @throws com.liferay.opensocial.NoSuchOAuthConsumerException if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer findByPrimaryKey(long oAuthConsumerId) - throws NoSuchOAuthConsumerException, SystemException { - return findByPrimaryKey((Serializable)oAuthConsumerId); - } - - /** - * Returns the o auth consumer with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the o auth consumer - * @return the o auth consumer, or null if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - OAuthConsumer oAuthConsumer = (OAuthConsumer)EntityCacheUtil.getResult(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerImpl.class, primaryKey); - - if (oAuthConsumer == _nullOAuthConsumer) { - return null; - } - - if (oAuthConsumer == null) { - Session session = null; - - try { - session = openSession(); - - oAuthConsumer = (OAuthConsumer)session.get(OAuthConsumerImpl.class, - primaryKey); - - if (oAuthConsumer != null) { - cacheResult(oAuthConsumer); - } - else { - EntityCacheUtil.putResult(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerImpl.class, primaryKey, _nullOAuthConsumer); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(OAuthConsumerModelImpl.ENTITY_CACHE_ENABLED, - OAuthConsumerImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return oAuthConsumer; - } - - /** - * Returns the o auth consumer with the primary key or returns null if it could not be found. - * - * @param oAuthConsumerId the primary key of the o auth consumer - * @return the o auth consumer, or null if a o auth consumer with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthConsumer fetchByPrimaryKey(long oAuthConsumerId) - throws SystemException { - return fetchByPrimaryKey((Serializable)oAuthConsumerId); - } - - /** - * Returns all the o auth consumers. - * - * @return the o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @return the range of o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) - throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the o auth consumers. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthConsumerModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth consumers - * @param end the upper bound of the range of o auth consumers (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of o auth consumers - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_OAUTHCONSUMER); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_OAUTHCONSUMER; - - if (pagination) { - sql = sql.concat(OAuthConsumerModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 o auth consumers from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (OAuthConsumer oAuthConsumer : findAll()) { - remove(oAuthConsumer); - } - } - - /** - * Returns the number of o auth consumers. - * - * @return the number of o auth consumers - * @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_OAUTHCONSUMER); - - 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 o auth consumer persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.com.liferay.opensocial.model.OAuthConsumer"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(OAuthConsumerImpl.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_OAUTHCONSUMER = "SELECT oAuthConsumer FROM OAuthConsumer oAuthConsumer"; - private static final String _SQL_SELECT_OAUTHCONSUMER_WHERE = "SELECT oAuthConsumer FROM OAuthConsumer oAuthConsumer WHERE "; - private static final String _SQL_COUNT_OAUTHCONSUMER = "SELECT COUNT(oAuthConsumer) FROM OAuthConsumer oAuthConsumer"; - private static final String _SQL_COUNT_OAUTHCONSUMER_WHERE = "SELECT COUNT(oAuthConsumer) FROM OAuthConsumer oAuthConsumer WHERE "; - private static final String _ORDER_BY_ENTITY_ALIAS = "oAuthConsumer."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No OAuthConsumer exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No OAuthConsumer 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(OAuthConsumerPersistenceImpl.class); - private static OAuthConsumer _nullOAuthConsumer = new OAuthConsumerImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullOAuthConsumerCacheModel; - } - }; - - private static CacheModel _nullOAuthConsumerCacheModel = new CacheModel() { - @Override - public OAuthConsumer toEntityModel() { - return _nullOAuthConsumer; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/persistence/OAuthTokenPersistenceImpl.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/persistence/OAuthTokenPersistenceImpl.java deleted file mode 100644 index 4e29881815..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/service/persistence/OAuthTokenPersistenceImpl.java +++ /dev/null @@ -1,1804 +0,0 @@ -/** - * 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 com.liferay.opensocial.service.persistence; - -import com.liferay.opensocial.NoSuchOAuthTokenException; -import com.liferay.opensocial.model.OAuthToken; -import com.liferay.opensocial.model.impl.OAuthTokenImpl; -import com.liferay.opensocial.model.impl.OAuthTokenModelImpl; - -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.kernel.util.Validator; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * The persistence implementation for the o auth token service. - * - *

    - * Caching information and settings can be found in portal.properties - *

    - * - * @author Brian Wing Shun Chan - * @see OAuthTokenPersistence - * @see OAuthTokenUtil - * @generated - */ -public class OAuthTokenPersistenceImpl extends BasePersistenceImpl - implements OAuthTokenPersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link OAuthTokenUtil} to access the o auth token persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = OAuthTokenImpl.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(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenModelImpl.FINDER_CACHE_ENABLED, OAuthTokenImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenModelImpl.FINDER_CACHE_ENABLED, OAuthTokenImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenModelImpl.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_G_S = new FinderPath(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenModelImpl.FINDER_CACHE_ENABLED, OAuthTokenImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_S", - new String[] { - String.class.getName(), String.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S = new FinderPath(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenModelImpl.FINDER_CACHE_ENABLED, OAuthTokenImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_S", - new String[] { String.class.getName(), String.class.getName() }, - OAuthTokenModelImpl.GADGETKEY_COLUMN_BITMASK | - OAuthTokenModelImpl.SERVICENAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_G_S = new FinderPath(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByG_S", - new String[] { String.class.getName(), String.class.getName() }); - - /** - * Returns all the o auth tokens where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the matching o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(String gadgetKey, String serviceName) - throws SystemException { - return findByG_S(gadgetKey, serviceName, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the o auth tokens where gadgetKey = ? and serviceName = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(String gadgetKey, String serviceName, - int start, int end) throws SystemException { - return findByG_S(gadgetKey, serviceName, start, end, null); - } - - /** - * Returns an ordered range of all the o auth tokens where gadgetKey = ? and serviceName = ?. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public List findByG_S(String gadgetKey, String serviceName, - 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_G_S; - finderArgs = new Object[] { gadgetKey, serviceName }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_S; - finderArgs = new Object[] { - gadgetKey, serviceName, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (OAuthToken oAuthToken : list) { - if (!Validator.equals(gadgetKey, oAuthToken.getGadgetKey()) || - !Validator.equals(serviceName, - oAuthToken.getServiceName())) { - 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_OAUTHTOKEN_WHERE); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_G_S_GADGETKEY_2); - } - - boolean bindServiceName = false; - - if (serviceName == null) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_1); - } - else if (serviceName.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_3); - } - else { - bindServiceName = true; - - query.append(_FINDER_COLUMN_G_S_SERVICENAME_2); - } - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(OAuthTokenModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - if (bindServiceName) { - qPos.add(serviceName); - } - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken findByG_S_First(String gadgetKey, String serviceName, - OrderByComparator orderByComparator) - throws NoSuchOAuthTokenException, SystemException { - OAuthToken oAuthToken = fetchByG_S_First(gadgetKey, serviceName, - orderByComparator); - - if (oAuthToken != null) { - return oAuthToken; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("gadgetKey="); - msg.append(gadgetKey); - - msg.append(", serviceName="); - msg.append(serviceName); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchOAuthTokenException(msg.toString()); - } - - /** - * Returns the first o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken fetchByG_S_First(String gadgetKey, String serviceName, - OrderByComparator orderByComparator) throws SystemException { - List list = findByG_S(gadgetKey, serviceName, 0, 1, - orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken findByG_S_Last(String gadgetKey, String serviceName, - OrderByComparator orderByComparator) - throws NoSuchOAuthTokenException, SystemException { - OAuthToken oAuthToken = fetchByG_S_Last(gadgetKey, serviceName, - orderByComparator); - - if (oAuthToken != null) { - return oAuthToken; - } - - StringBundler msg = new StringBundler(6); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("gadgetKey="); - msg.append(gadgetKey); - - msg.append(", serviceName="); - msg.append(serviceName); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchOAuthTokenException(msg.toString()); - } - - /** - * Returns the last o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken fetchByG_S_Last(String gadgetKey, String serviceName, - OrderByComparator orderByComparator) throws SystemException { - int count = countByG_S(gadgetKey, serviceName); - - if (count == 0) { - return null; - } - - List list = findByG_S(gadgetKey, serviceName, count - 1, - count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the o auth tokens before and after the current o auth token in the ordered set where gadgetKey = ? and serviceName = ?. - * - * @param oAuthTokenId the primary key of the current o auth token - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken[] findByG_S_PrevAndNext(long oAuthTokenId, - String gadgetKey, String serviceName, - OrderByComparator orderByComparator) - throws NoSuchOAuthTokenException, SystemException { - OAuthToken oAuthToken = findByPrimaryKey(oAuthTokenId); - - Session session = null; - - try { - session = openSession(); - - OAuthToken[] array = new OAuthTokenImpl[3]; - - array[0] = getByG_S_PrevAndNext(session, oAuthToken, gadgetKey, - serviceName, orderByComparator, true); - - array[1] = oAuthToken; - - array[2] = getByG_S_PrevAndNext(session, oAuthToken, gadgetKey, - serviceName, orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected OAuthToken getByG_S_PrevAndNext(Session session, - OAuthToken oAuthToken, String gadgetKey, String serviceName, - 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_OAUTHTOKEN_WHERE); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_G_S_GADGETKEY_2); - } - - boolean bindServiceName = false; - - if (serviceName == null) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_1); - } - else if (serviceName.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_3); - } - else { - bindServiceName = true; - - query.append(_FINDER_COLUMN_G_S_SERVICENAME_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(OAuthTokenModelImpl.ORDER_BY_JPQL); - } - - String sql = query.toString(); - - Query q = session.createQuery(sql); - - q.setFirstResult(0); - q.setMaxResults(2); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - if (bindServiceName) { - qPos.add(serviceName); - } - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(oAuthToken); - - for (Object value : values) { - qPos.add(value); - } - } - - List list = q.list(); - - if (list.size() == 2) { - return list.get(1); - } - else { - return null; - } - } - - /** - * Removes all the o auth tokens where gadgetKey = ? and serviceName = ? from the database. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByG_S(String gadgetKey, String serviceName) - throws SystemException { - for (OAuthToken oAuthToken : findByG_S(gadgetKey, serviceName, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(oAuthToken); - } - } - - /** - * Returns the number of o auth tokens where gadgetKey = ? and serviceName = ?. - * - * @param gadgetKey the gadget key - * @param serviceName the service name - * @return the number of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public int countByG_S(String gadgetKey, String serviceName) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_G_S; - - Object[] finderArgs = new Object[] { gadgetKey, serviceName }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_COUNT_OAUTHTOKEN_WHERE); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_G_S_GADGETKEY_2); - } - - boolean bindServiceName = false; - - if (serviceName == null) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_1); - } - else if (serviceName.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_G_S_SERVICENAME_3); - } - else { - bindServiceName = true; - - query.append(_FINDER_COLUMN_G_S_SERVICENAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - if (bindServiceName) { - qPos.add(serviceName); - } - - 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_G_S_GADGETKEY_1 = "oAuthToken.gadgetKey IS NULL AND "; - private static final String _FINDER_COLUMN_G_S_GADGETKEY_2 = "oAuthToken.gadgetKey = ? AND "; - private static final String _FINDER_COLUMN_G_S_GADGETKEY_3 = "(oAuthToken.gadgetKey IS NULL OR oAuthToken.gadgetKey = '') AND "; - private static final String _FINDER_COLUMN_G_S_SERVICENAME_1 = "oAuthToken.serviceName IS NULL"; - private static final String _FINDER_COLUMN_G_S_SERVICENAME_2 = "oAuthToken.serviceName = ?"; - private static final String _FINDER_COLUMN_G_S_SERVICENAME_3 = "(oAuthToken.serviceName IS NULL OR oAuthToken.serviceName = '')"; - public static final FinderPath FINDER_PATH_FETCH_BY_U_G_S_M_T = new FinderPath(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenModelImpl.FINDER_CACHE_ENABLED, OAuthTokenImpl.class, - FINDER_CLASS_NAME_ENTITY, "fetchByU_G_S_M_T", - new String[] { - Long.class.getName(), String.class.getName(), - String.class.getName(), Long.class.getName(), - String.class.getName() - }, - OAuthTokenModelImpl.USERID_COLUMN_BITMASK | - OAuthTokenModelImpl.GADGETKEY_COLUMN_BITMASK | - OAuthTokenModelImpl.SERVICENAME_COLUMN_BITMASK | - OAuthTokenModelImpl.MODULEID_COLUMN_BITMASK | - OAuthTokenModelImpl.TOKENNAME_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_U_G_S_M_T = new FinderPath(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByU_G_S_M_T", - new String[] { - Long.class.getName(), String.class.getName(), - String.class.getName(), Long.class.getName(), - String.class.getName() - }); - - /** - * Returns the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? or throws a {@link com.liferay.opensocial.NoSuchOAuthTokenException} if it could not be found. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the matching o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken findByU_G_S_M_T(long userId, String gadgetKey, - String serviceName, long moduleId, String tokenName) - throws NoSuchOAuthTokenException, SystemException { - OAuthToken oAuthToken = fetchByU_G_S_M_T(userId, gadgetKey, - serviceName, moduleId, tokenName); - - if (oAuthToken == null) { - StringBundler msg = new StringBundler(12); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("userId="); - msg.append(userId); - - msg.append(", gadgetKey="); - msg.append(gadgetKey); - - msg.append(", serviceName="); - msg.append(serviceName); - - msg.append(", moduleId="); - msg.append(moduleId); - - msg.append(", tokenName="); - msg.append(tokenName); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchOAuthTokenException(msg.toString()); - } - - return oAuthToken; - } - - /** - * Returns the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? or returns null if it could not be found. Uses the finder cache. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken fetchByU_G_S_M_T(long userId, String gadgetKey, - String serviceName, long moduleId, String tokenName) - throws SystemException { - return fetchByU_G_S_M_T(userId, gadgetKey, serviceName, moduleId, - tokenName, true); - } - - /** - * Returns the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @param retrieveFromCache whether to use the finder cache - * @return the matching o auth token, or null if a matching o auth token could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken fetchByU_G_S_M_T(long userId, String gadgetKey, - String serviceName, long moduleId, String tokenName, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { - userId, gadgetKey, serviceName, moduleId, tokenName - }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_U_G_S_M_T, - finderArgs, this); - } - - if (result instanceof OAuthToken) { - OAuthToken oAuthToken = (OAuthToken)result; - - if ((userId != oAuthToken.getUserId()) || - !Validator.equals(gadgetKey, oAuthToken.getGadgetKey()) || - !Validator.equals(serviceName, oAuthToken.getServiceName()) || - (moduleId != oAuthToken.getModuleId()) || - !Validator.equals(tokenName, oAuthToken.getTokenName())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(7); - - query.append(_SQL_SELECT_OAUTHTOKEN_WHERE); - - query.append(_FINDER_COLUMN_U_G_S_M_T_USERID_2); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_U_G_S_M_T_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_U_G_S_M_T_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_U_G_S_M_T_GADGETKEY_2); - } - - boolean bindServiceName = false; - - if (serviceName == null) { - query.append(_FINDER_COLUMN_U_G_S_M_T_SERVICENAME_1); - } - else if (serviceName.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_U_G_S_M_T_SERVICENAME_3); - } - else { - bindServiceName = true; - - query.append(_FINDER_COLUMN_U_G_S_M_T_SERVICENAME_2); - } - - query.append(_FINDER_COLUMN_U_G_S_M_T_MODULEID_2); - - boolean bindTokenName = false; - - if (tokenName == null) { - query.append(_FINDER_COLUMN_U_G_S_M_T_TOKENNAME_1); - } - else if (tokenName.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_U_G_S_M_T_TOKENNAME_3); - } - else { - bindTokenName = true; - - query.append(_FINDER_COLUMN_U_G_S_M_T_TOKENNAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - if (bindServiceName) { - qPos.add(serviceName); - } - - qPos.add(moduleId); - - if (bindTokenName) { - qPos.add(tokenName); - } - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_U_G_S_M_T, - finderArgs, list); - } - else { - if ((list.size() > 1) && _log.isWarnEnabled()) { - _log.warn( - "OAuthTokenPersistenceImpl.fetchByU_G_S_M_T(long, String, String, long, String, boolean) with parameters (" + - StringUtil.merge(finderArgs) + - ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); - } - - OAuthToken oAuthToken = list.get(0); - - result = oAuthToken; - - cacheResult(oAuthToken); - - if ((oAuthToken.getUserId() != userId) || - (oAuthToken.getGadgetKey() == null) || - !oAuthToken.getGadgetKey().equals(gadgetKey) || - (oAuthToken.getServiceName() == null) || - !oAuthToken.getServiceName().equals(serviceName) || - (oAuthToken.getModuleId() != moduleId) || - (oAuthToken.getTokenName() == null) || - !oAuthToken.getTokenName().equals(tokenName)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_U_G_S_M_T, - finderArgs, oAuthToken); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_U_G_S_M_T, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (OAuthToken)result; - } - } - - /** - * Removes the o auth token where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ? from the database. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the o auth token that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken removeByU_G_S_M_T(long userId, String gadgetKey, - String serviceName, long moduleId, String tokenName) - throws NoSuchOAuthTokenException, SystemException { - OAuthToken oAuthToken = findByU_G_S_M_T(userId, gadgetKey, serviceName, - moduleId, tokenName); - - return remove(oAuthToken); - } - - /** - * Returns the number of o auth tokens where userId = ? and gadgetKey = ? and serviceName = ? and moduleId = ? and tokenName = ?. - * - * @param userId the user ID - * @param gadgetKey the gadget key - * @param serviceName the service name - * @param moduleId the module ID - * @param tokenName the token name - * @return the number of matching o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public int countByU_G_S_M_T(long userId, String gadgetKey, - String serviceName, long moduleId, String tokenName) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_U_G_S_M_T; - - Object[] finderArgs = new Object[] { - userId, gadgetKey, serviceName, moduleId, tokenName - }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(6); - - query.append(_SQL_COUNT_OAUTHTOKEN_WHERE); - - query.append(_FINDER_COLUMN_U_G_S_M_T_USERID_2); - - boolean bindGadgetKey = false; - - if (gadgetKey == null) { - query.append(_FINDER_COLUMN_U_G_S_M_T_GADGETKEY_1); - } - else if (gadgetKey.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_U_G_S_M_T_GADGETKEY_3); - } - else { - bindGadgetKey = true; - - query.append(_FINDER_COLUMN_U_G_S_M_T_GADGETKEY_2); - } - - boolean bindServiceName = false; - - if (serviceName == null) { - query.append(_FINDER_COLUMN_U_G_S_M_T_SERVICENAME_1); - } - else if (serviceName.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_U_G_S_M_T_SERVICENAME_3); - } - else { - bindServiceName = true; - - query.append(_FINDER_COLUMN_U_G_S_M_T_SERVICENAME_2); - } - - query.append(_FINDER_COLUMN_U_G_S_M_T_MODULEID_2); - - boolean bindTokenName = false; - - if (tokenName == null) { - query.append(_FINDER_COLUMN_U_G_S_M_T_TOKENNAME_1); - } - else if (tokenName.equals(StringPool.BLANK)) { - query.append(_FINDER_COLUMN_U_G_S_M_T_TOKENNAME_3); - } - else { - bindTokenName = true; - - query.append(_FINDER_COLUMN_U_G_S_M_T_TOKENNAME_2); - } - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(userId); - - if (bindGadgetKey) { - qPos.add(gadgetKey); - } - - if (bindServiceName) { - qPos.add(serviceName); - } - - qPos.add(moduleId); - - if (bindTokenName) { - qPos.add(tokenName); - } - - 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_U_G_S_M_T_USERID_2 = "oAuthToken.userId = ? AND "; - private static final String _FINDER_COLUMN_U_G_S_M_T_GADGETKEY_1 = "oAuthToken.gadgetKey IS NULL AND "; - private static final String _FINDER_COLUMN_U_G_S_M_T_GADGETKEY_2 = "oAuthToken.gadgetKey = ? AND "; - private static final String _FINDER_COLUMN_U_G_S_M_T_GADGETKEY_3 = "(oAuthToken.gadgetKey IS NULL OR oAuthToken.gadgetKey = '') AND "; - private static final String _FINDER_COLUMN_U_G_S_M_T_SERVICENAME_1 = "oAuthToken.serviceName IS NULL AND "; - private static final String _FINDER_COLUMN_U_G_S_M_T_SERVICENAME_2 = "oAuthToken.serviceName = ? AND "; - private static final String _FINDER_COLUMN_U_G_S_M_T_SERVICENAME_3 = "(oAuthToken.serviceName IS NULL OR oAuthToken.serviceName = '') AND "; - private static final String _FINDER_COLUMN_U_G_S_M_T_MODULEID_2 = "oAuthToken.moduleId = ? AND "; - private static final String _FINDER_COLUMN_U_G_S_M_T_TOKENNAME_1 = "oAuthToken.tokenName IS NULL"; - private static final String _FINDER_COLUMN_U_G_S_M_T_TOKENNAME_2 = "oAuthToken.tokenName = ?"; - private static final String _FINDER_COLUMN_U_G_S_M_T_TOKENNAME_3 = "(oAuthToken.tokenName IS NULL OR oAuthToken.tokenName = '')"; - - public OAuthTokenPersistenceImpl() { - setModelClass(OAuthToken.class); - } - - /** - * Caches the o auth token in the entity cache if it is enabled. - * - * @param oAuthToken the o auth token - */ - @Override - public void cacheResult(OAuthToken oAuthToken) { - EntityCacheUtil.putResult(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenImpl.class, oAuthToken.getPrimaryKey(), oAuthToken); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_U_G_S_M_T, - new Object[] { - oAuthToken.getUserId(), oAuthToken.getGadgetKey(), - oAuthToken.getServiceName(), oAuthToken.getModuleId(), - oAuthToken.getTokenName() - }, oAuthToken); - - oAuthToken.resetOriginalValues(); - } - - /** - * Caches the o auth tokens in the entity cache if it is enabled. - * - * @param oAuthTokens the o auth tokens - */ - @Override - public void cacheResult(List oAuthTokens) { - for (OAuthToken oAuthToken : oAuthTokens) { - if (EntityCacheUtil.getResult( - OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenImpl.class, oAuthToken.getPrimaryKey()) == null) { - cacheResult(oAuthToken); - } - else { - oAuthToken.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all o auth tokens. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(OAuthTokenImpl.class.getName()); - } - - EntityCacheUtil.clearCache(OAuthTokenImpl.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 o auth token. - * - *

    - * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

    - */ - @Override - public void clearCache(OAuthToken oAuthToken) { - EntityCacheUtil.removeResult(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenImpl.class, oAuthToken.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(oAuthToken); - } - - @Override - public void clearCache(List oAuthTokens) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (OAuthToken oAuthToken : oAuthTokens) { - EntityCacheUtil.removeResult(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenImpl.class, oAuthToken.getPrimaryKey()); - - clearUniqueFindersCache(oAuthToken); - } - } - - protected void cacheUniqueFindersCache(OAuthToken oAuthToken) { - if (oAuthToken.isNew()) { - Object[] args = new Object[] { - oAuthToken.getUserId(), oAuthToken.getGadgetKey(), - oAuthToken.getServiceName(), oAuthToken.getModuleId(), - oAuthToken.getTokenName() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_U_G_S_M_T, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_U_G_S_M_T, args, - oAuthToken); - } - else { - OAuthTokenModelImpl oAuthTokenModelImpl = (OAuthTokenModelImpl)oAuthToken; - - if ((oAuthTokenModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_U_G_S_M_T.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - oAuthToken.getUserId(), oAuthToken.getGadgetKey(), - oAuthToken.getServiceName(), oAuthToken.getModuleId(), - oAuthToken.getTokenName() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_U_G_S_M_T, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_U_G_S_M_T, args, - oAuthToken); - } - } - } - - protected void clearUniqueFindersCache(OAuthToken oAuthToken) { - OAuthTokenModelImpl oAuthTokenModelImpl = (OAuthTokenModelImpl)oAuthToken; - - Object[] args = new Object[] { - oAuthToken.getUserId(), oAuthToken.getGadgetKey(), - oAuthToken.getServiceName(), oAuthToken.getModuleId(), - oAuthToken.getTokenName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_U_G_S_M_T, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_U_G_S_M_T, args); - - if ((oAuthTokenModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_U_G_S_M_T.getColumnBitmask()) != 0) { - args = new Object[] { - oAuthTokenModelImpl.getOriginalUserId(), - oAuthTokenModelImpl.getOriginalGadgetKey(), - oAuthTokenModelImpl.getOriginalServiceName(), - oAuthTokenModelImpl.getOriginalModuleId(), - oAuthTokenModelImpl.getOriginalTokenName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_U_G_S_M_T, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_U_G_S_M_T, args); - } - } - - /** - * Creates a new o auth token with the primary key. Does not add the o auth token to the database. - * - * @param oAuthTokenId the primary key for the new o auth token - * @return the new o auth token - */ - @Override - public OAuthToken create(long oAuthTokenId) { - OAuthToken oAuthToken = new OAuthTokenImpl(); - - oAuthToken.setNew(true); - oAuthToken.setPrimaryKey(oAuthTokenId); - - return oAuthToken; - } - - /** - * Removes the o auth token with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token that was removed - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken remove(long oAuthTokenId) - throws NoSuchOAuthTokenException, SystemException { - return remove((Serializable)oAuthTokenId); - } - - /** - * Removes the o auth token with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the o auth token - * @return the o auth token that was removed - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken remove(Serializable primaryKey) - throws NoSuchOAuthTokenException, SystemException { - Session session = null; - - try { - session = openSession(); - - OAuthToken oAuthToken = (OAuthToken)session.get(OAuthTokenImpl.class, - primaryKey); - - if (oAuthToken == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchOAuthTokenException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(oAuthToken); - } - catch (NoSuchOAuthTokenException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected OAuthToken removeImpl(OAuthToken oAuthToken) - throws SystemException { - oAuthToken = toUnwrappedModel(oAuthToken); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(oAuthToken)) { - oAuthToken = (OAuthToken)session.get(OAuthTokenImpl.class, - oAuthToken.getPrimaryKeyObj()); - } - - if (oAuthToken != null) { - session.delete(oAuthToken); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (oAuthToken != null) { - clearCache(oAuthToken); - } - - return oAuthToken; - } - - @Override - public OAuthToken updateImpl( - com.liferay.opensocial.model.OAuthToken oAuthToken) - throws SystemException { - oAuthToken = toUnwrappedModel(oAuthToken); - - boolean isNew = oAuthToken.isNew(); - - OAuthTokenModelImpl oAuthTokenModelImpl = (OAuthTokenModelImpl)oAuthToken; - - Session session = null; - - try { - session = openSession(); - - if (oAuthToken.isNew()) { - session.save(oAuthToken); - - oAuthToken.setNew(false); - } - else { - session.merge(oAuthToken); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !OAuthTokenModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((oAuthTokenModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - oAuthTokenModelImpl.getOriginalGadgetKey(), - oAuthTokenModelImpl.getOriginalServiceName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - - args = new Object[] { - oAuthTokenModelImpl.getGadgetKey(), - oAuthTokenModelImpl.getServiceName() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_S, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_S, - args); - } - } - - EntityCacheUtil.putResult(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenImpl.class, oAuthToken.getPrimaryKey(), oAuthToken); - - clearUniqueFindersCache(oAuthToken); - cacheUniqueFindersCache(oAuthToken); - - return oAuthToken; - } - - protected OAuthToken toUnwrappedModel(OAuthToken oAuthToken) { - if (oAuthToken instanceof OAuthTokenImpl) { - return oAuthToken; - } - - OAuthTokenImpl oAuthTokenImpl = new OAuthTokenImpl(); - - oAuthTokenImpl.setNew(oAuthToken.isNew()); - oAuthTokenImpl.setPrimaryKey(oAuthToken.getPrimaryKey()); - - oAuthTokenImpl.setOAuthTokenId(oAuthToken.getOAuthTokenId()); - oAuthTokenImpl.setCompanyId(oAuthToken.getCompanyId()); - oAuthTokenImpl.setUserId(oAuthToken.getUserId()); - oAuthTokenImpl.setUserName(oAuthToken.getUserName()); - oAuthTokenImpl.setCreateDate(oAuthToken.getCreateDate()); - oAuthTokenImpl.setModifiedDate(oAuthToken.getModifiedDate()); - oAuthTokenImpl.setGadgetKey(oAuthToken.getGadgetKey()); - oAuthTokenImpl.setServiceName(oAuthToken.getServiceName()); - oAuthTokenImpl.setModuleId(oAuthToken.getModuleId()); - oAuthTokenImpl.setAccessToken(oAuthToken.getAccessToken()); - oAuthTokenImpl.setTokenName(oAuthToken.getTokenName()); - oAuthTokenImpl.setTokenSecret(oAuthToken.getTokenSecret()); - oAuthTokenImpl.setSessionHandle(oAuthToken.getSessionHandle()); - oAuthTokenImpl.setExpiration(oAuthToken.getExpiration()); - - return oAuthTokenImpl; - } - - /** - * Returns the o auth token 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 o auth token - * @return the o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken findByPrimaryKey(Serializable primaryKey) - throws NoSuchOAuthTokenException, SystemException { - OAuthToken oAuthToken = fetchByPrimaryKey(primaryKey); - - if (oAuthToken == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchOAuthTokenException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return oAuthToken; - } - - /** - * Returns the o auth token with the primary key or throws a {@link com.liferay.opensocial.NoSuchOAuthTokenException} if it could not be found. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token - * @throws com.liferay.opensocial.NoSuchOAuthTokenException if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken findByPrimaryKey(long oAuthTokenId) - throws NoSuchOAuthTokenException, SystemException { - return findByPrimaryKey((Serializable)oAuthTokenId); - } - - /** - * Returns the o auth token with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the o auth token - * @return the o auth token, or null if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - OAuthToken oAuthToken = (OAuthToken)EntityCacheUtil.getResult(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenImpl.class, primaryKey); - - if (oAuthToken == _nullOAuthToken) { - return null; - } - - if (oAuthToken == null) { - Session session = null; - - try { - session = openSession(); - - oAuthToken = (OAuthToken)session.get(OAuthTokenImpl.class, - primaryKey); - - if (oAuthToken != null) { - cacheResult(oAuthToken); - } - else { - EntityCacheUtil.putResult(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenImpl.class, primaryKey, _nullOAuthToken); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(OAuthTokenModelImpl.ENTITY_CACHE_ENABLED, - OAuthTokenImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return oAuthToken; - } - - /** - * Returns the o auth token with the primary key or returns null if it could not be found. - * - * @param oAuthTokenId the primary key of the o auth token - * @return the o auth token, or null if a o auth token with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public OAuthToken fetchByPrimaryKey(long oAuthTokenId) - throws SystemException { - return fetchByPrimaryKey((Serializable)oAuthTokenId); - } - - /** - * Returns all the o auth tokens. - * - * @return the o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @return the range of o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) - throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the o auth tokens. - * - *

    - * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.opensocial.model.impl.OAuthTokenModelImpl}. If both orderByComparator 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. - *

    - * - * @param start the lower bound of the range of o auth tokens - * @param end the upper bound of the range of o auth tokens (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of o auth tokens - * @throws SystemException if a system exception occurred - */ - @Override - public List 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 list = (List)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_OAUTHTOKEN); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_OAUTHTOKEN; - - if (pagination) { - sql = sql.concat(OAuthTokenModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); - - Collections.sort(list); - - list = new UnmodifiableList(list); - } - else { - list = (List)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 o auth tokens from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (OAuthToken oAuthToken : findAll()) { - remove(oAuthToken); - } - } - - /** - * Returns the number of o auth tokens. - * - * @return the number of o auth tokens - * @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_OAUTHTOKEN); - - 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 o auth token persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.com.liferay.opensocial.model.OAuthToken"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(OAuthTokenImpl.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_OAUTHTOKEN = "SELECT oAuthToken FROM OAuthToken oAuthToken"; - private static final String _SQL_SELECT_OAUTHTOKEN_WHERE = "SELECT oAuthToken FROM OAuthToken oAuthToken WHERE "; - private static final String _SQL_COUNT_OAUTHTOKEN = "SELECT COUNT(oAuthToken) FROM OAuthToken oAuthToken"; - private static final String _SQL_COUNT_OAUTHTOKEN_WHERE = "SELECT COUNT(oAuthToken) FROM OAuthToken oAuthToken WHERE "; - private static final String _ORDER_BY_ENTITY_ALIAS = "oAuthToken."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No OAuthToken exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No OAuthToken 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(OAuthTokenPersistenceImpl.class); - private static OAuthToken _nullOAuthToken = new OAuthTokenImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullOAuthTokenCacheModel; - } - }; - - private static CacheModel _nullOAuthTokenCacheModel = new CacheModel() { - @Override - public OAuthToken toEntityModel() { - return _nullOAuthToken; - } - }; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/config/LiferayJsonContainerConfig.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/config/LiferayJsonContainerConfig.java deleted file mode 100644 index a46e946523..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/config/LiferayJsonContainerConfig.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.config; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; - -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.portal.kernel.util.Validator; - -import org.apache.shindig.config.ContainerConfigException; -import org.apache.shindig.config.JsonContainerConfig; -import org.apache.shindig.expressions.Expressions; - -/** - * @author Michael Young - */ -@Singleton -public class LiferayJsonContainerConfig extends JsonContainerConfig { - - @Inject - public LiferayJsonContainerConfig( - @Named("shindig.containers.default") String containers, - Expressions expressions) - throws ContainerConfigException { - - super(containers, null, null, expressions); - } - - @Override - public String getString(String container, String property) { - String value = super.getString(container, property); - - if (Validator.isNotNull(value)) { - value = ShindigUtil.transformURL(value); - } - - return value; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/guice/LiferayModule.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/guice/LiferayModule.java deleted file mode 100644 index 81a825d5c9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/guice/LiferayModule.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.guice; - -import com.google.inject.AbstractModule; -import com.google.inject.name.Names; - -import com.liferay.opensocial.shindig.config.LiferayJsonContainerConfig; -import com.liferay.opensocial.shindig.service.LiferayActivityService; -import com.liferay.opensocial.shindig.service.LiferayAlbumService; -import com.liferay.opensocial.shindig.service.LiferayAppDataService; -import com.liferay.opensocial.shindig.service.LiferayMediaItemService; -import com.liferay.opensocial.shindig.service.LiferayPersonService; -import com.liferay.opensocial.shindig.util.ShindigUtil; - -import org.apache.shindig.config.ContainerConfig; -import org.apache.shindig.social.opensocial.oauth.OAuthDataStore; -import org.apache.shindig.social.opensocial.spi.ActivityService; -import org.apache.shindig.social.opensocial.spi.AlbumService; -import org.apache.shindig.social.opensocial.spi.AppDataService; -import org.apache.shindig.social.opensocial.spi.MediaItemService; -import org.apache.shindig.social.opensocial.spi.MessageService; -import org.apache.shindig.social.opensocial.spi.MessageService.NotImplementedMessageService; -import org.apache.shindig.social.opensocial.spi.PersonService; -import org.apache.shindig.social.sample.oauth.SampleOAuthDataStore; - -/** - * @author Michael Young - */ -public class LiferayModule extends AbstractModule { - - @Override - protected void configure() { - bind(String.class).annotatedWith( - Names.named("shindig.canonical.json.db")).toInstance( - "sampledata/canonicaldb.json"); - - bind(ActivityService.class).to(LiferayActivityService.class); - bind(AlbumService.class).to(LiferayAlbumService.class); - bind(AppDataService.class).to(LiferayAppDataService.class); - bind(ContainerConfig.class).to(LiferayJsonContainerConfig.class); - bind(MediaItemService.class).to(LiferayMediaItemService.class); - bind(MessageService.class).to(NotImplementedMessageService.class); - bind(OAuthDataStore.class).to(SampleOAuthDataStore.class); - bind(PersonService.class).to(LiferayPersonService.class); - - requestStaticInjection(ShindigUtil.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/oauth/LiferayOAuthModule.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/oauth/LiferayOAuthModule.java deleted file mode 100644 index 5c732a8c1d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/oauth/LiferayOAuthModule.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.oauth; - -import com.google.inject.AbstractModule; -import com.google.inject.name.Names; - -import org.apache.shindig.common.crypto.BlobCrypter; -import org.apache.shindig.gadgets.oauth.OAuthFetcherConfig; -import org.apache.shindig.gadgets.oauth.OAuthModule.OAuthCrypterProvider; -import org.apache.shindig.gadgets.oauth.OAuthModule.OAuthRequestProvider; -import org.apache.shindig.gadgets.oauth.OAuthRequest; -import org.apache.shindig.gadgets.oauth.OAuthStore; - -/** - * @author Dennis Ju - */ -public class LiferayOAuthModule extends AbstractModule { - - @Override - protected void configure() { - bind(BlobCrypter.class).annotatedWith( - Names.named(OAuthFetcherConfig.OAUTH_STATE_CRYPTER)).toProvider( - OAuthCrypterProvider.class); - bind(OAuthRequest.class).toProvider(OAuthRequestProvider.class); - bind(OAuthStore.class).toProvider(LiferayOAuthStoreProvider.class); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/oauth/LiferayOAuthStore.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/oauth/LiferayOAuthStore.java deleted file mode 100644 index f8c6f971ee..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/oauth/LiferayOAuthStore.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.oauth; - -import com.google.inject.Singleton; - -import com.liferay.opensocial.model.Gadget; -import com.liferay.opensocial.model.OAuthConsumer; -import com.liferay.opensocial.model.OAuthConsumerConstants; -import com.liferay.opensocial.model.OAuthToken; -import com.liferay.opensocial.model.impl.GadgetConstants; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; -import com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil; -import com.liferay.opensocial.service.OAuthTokenLocalServiceUtil; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.opensocial.util.PortletPropsValues; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.User; -import com.liferay.portal.service.UserLocalServiceUtil; - -import net.oauth.OAuth; -import net.oauth.OAuthServiceProvider; -import net.oauth.signature.RSA_SHA1; - -import org.apache.shindig.auth.SecurityToken; -import org.apache.shindig.gadgets.GadgetException; -import org.apache.shindig.gadgets.oauth.OAuthStore; - -/** - * @author Dennis Ju - */ -@Singleton -public class LiferayOAuthStore implements OAuthStore { - - public LiferayOAuthStore(OAuthConsumer oAuthConsumer) { - _oAuthConsumer = oAuthConsumer; - } - - public ConsumerInfo getConsumerKeyAndSecret( - SecurityToken securityToken, String serviceName, - OAuthServiceProvider oAuthServiceProvider) - throws GadgetException { - - OAuthConsumer oAuthConsumer = getOAuthConsumer( - securityToken, serviceName); - - if (oAuthConsumer == null) { - throw new GadgetException( - GadgetException.Code.INTERNAL_SERVER_ERROR, - "No key for gadget " + securityToken.getAppUrl() + - " and service " + serviceName); - } - - net.oauth.OAuthConsumer netOAuthConsumer = null; - - String keyType = oAuthConsumer.getKeyType(); - - if (keyType.equals(OAuthConsumerConstants.KEY_TYPE_RSA_PRIVATE)) { - netOAuthConsumer = new net.oauth.OAuthConsumer( - null, oAuthConsumer.getConsumerKey(), null, - oAuthServiceProvider); - - netOAuthConsumer.setProperty( - OAuth.OAUTH_SIGNATURE_METHOD, OAuth.RSA_SHA1); - netOAuthConsumer.setProperty( - RSA_SHA1.PRIVATE_KEY, oAuthConsumer.getConsumerSecret()); - } - else { - netOAuthConsumer = new net.oauth.OAuthConsumer( - null, oAuthConsumer.getConsumerKey(), - oAuthConsumer.getConsumerSecret(), oAuthServiceProvider); - - netOAuthConsumer.setProperty( - OAuth.OAUTH_SIGNATURE_METHOD, OAuth.HMAC_SHA1); - } - - String keyName = oAuthConsumer.getKeyName(); - - String callbackURL = ShindigUtil.transformURL(_callbackURL); - - return new ConsumerInfo(netOAuthConsumer, keyName, callbackURL); - } - - public TokenInfo getTokenInfo( - SecurityToken securityToken, ConsumerInfo consumerInfo, - String serviceName, String tokenName) - throws GadgetException { - - OAuthToken oAuthToken = getOAuthToken( - securityToken, serviceName, tokenName); - - if (oAuthToken == null) { - return null; - } - - TokenInfo tokenInfo = new TokenInfo( - oAuthToken.getAccessToken(), oAuthToken.getTokenSecret(), - oAuthToken.getSessionHandle(), oAuthToken.getExpiration()); - - return tokenInfo; - } - - public void removeToken( - SecurityToken securityToken, ConsumerInfo consumerInfo, - String serviceName, String tokenName) - throws GadgetException { - - OAuthToken oAuthToken = getOAuthToken( - securityToken, serviceName, tokenName); - - if (oAuthToken == null) { - return; - } - - try { - OAuthTokenLocalServiceUtil.deleteOAuthToken(oAuthToken); - } - catch (Exception e) { - throw new GadgetException( - GadgetException.Code.INTERNAL_SERVER_ERROR, e); - } - } - - public void setTokenInfo( - SecurityToken securityToken, ConsumerInfo consumerInfo, - String serviceName, String tokenName, TokenInfo tokenInfo) - throws GadgetException { - - long userId = GetterUtil.getLong(securityToken.getViewerId()); - - User user = null; - - try { - user = UserLocalServiceUtil.getUser(userId); - } - catch (Exception e) { - throw new GadgetException( - GadgetException.Code.INTERNAL_SERVER_ERROR, e); - } - - Gadget gadget = null; - - try { - gadget = GadgetLocalServiceUtil.fetchGadget( - user.getCompanyId(), securityToken.getAppUrl()); - } - catch (SystemException se) { - throw new GadgetException( - GadgetException.Code.INTERNAL_SERVER_ERROR, se); - } - - String gadgetKey = StringPool.BLANK; - - if (gadget == null) { - gadgetKey = GadgetConstants.toAdhocGadgetKey( - securityToken.getModuleId()); - } - else { - gadgetKey = GadgetConstants.toPublishedGadgetKey( - gadget.getGadgetId()); - } - - try { - OAuthTokenLocalServiceUtil.addOAuthToken( - userId, gadgetKey, serviceName, securityToken.getModuleId(), - tokenInfo.getAccessToken(), tokenName, - tokenInfo.getTokenSecret(), tokenInfo.getSessionHandle(), - tokenInfo.getTokenExpireMillis()); - } - catch (Exception e) { - throw new GadgetException( - GadgetException.Code.INTERNAL_SERVER_ERROR, e); - } - } - - protected OAuthConsumer getOAuthConsumer( - SecurityToken securityToken, String serviceName) - throws GadgetException { - - OAuthConsumer oAuthConsumer = null; - - try { - oAuthConsumer = OAuthConsumerLocalServiceUtil.fetchOAuthConsumer( - securityToken.getAppId(), serviceName); - } - catch (SystemException se) { - throw new GadgetException( - GadgetException.Code.INTERNAL_SERVER_ERROR, se); - } - - if (oAuthConsumer == null) { - return _oAuthConsumer; - } - - if (oAuthConsumer.getKeyType().equals( - OAuthConsumerConstants.KEY_TYPE_RSA_PRIVATE)) { - - if (_oAuthConsumer == null) { - throw new GadgetException( - GadgetException.Code.INTERNAL_SERVER_ERROR, - "No OAuth key specified"); - } - - oAuthConsumer.setConsumerSecret(_oAuthConsumer.getConsumerSecret()); - } - - return oAuthConsumer; - } - - protected OAuthToken getOAuthToken( - SecurityToken securityToken, String serviceName, String tokenName) - throws GadgetException { - - long userId = GetterUtil.getLong(securityToken.getViewerId()); - - OAuthToken oAuthToken = null; - - try { - oAuthToken = OAuthTokenLocalServiceUtil.fetchOAuthToken( - userId, securityToken.getAppId(), serviceName, - securityToken.getModuleId(), tokenName); - } - catch (SystemException se) { - throw new GadgetException( - GadgetException.Code.INTERNAL_SERVER_ERROR, se); - } - - return oAuthToken; - } - - private String _callbackURL = PortletPropsValues.SHINDIG_OAUTH_CALLBACK_URL; - private OAuthConsumer _oAuthConsumer; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/oauth/LiferayOAuthStoreProvider.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/oauth/LiferayOAuthStoreProvider.java deleted file mode 100644 index 48c00b7c68..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/oauth/LiferayOAuthStoreProvider.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.oauth; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; - -import com.liferay.opensocial.model.OAuthConsumer; -import com.liferay.opensocial.model.OAuthConsumerConstants; -import com.liferay.opensocial.model.impl.OAuthConsumerImpl; -import com.liferay.opensocial.util.PortletPropsValues; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.util.PropsKeys; -import com.liferay.portal.kernel.util.PropsUtil; -import com.liferay.portal.kernel.util.StringPool; - -import org.apache.shindig.gadgets.oauth.OAuthStore; - -/** - * @author Dennis Ju - */ -@Singleton -public class LiferayOAuthStoreProvider implements Provider { - - @Inject - public LiferayOAuthStoreProvider() { - OAuthConsumer oAuthConsumer = _getOAuthConsumer( - PortletPropsValues.SHINDIG_OAUTH_KEY_FILE_NAME, - PortletPropsValues.SHINDIG_OAUTH_KEY_NAME); - - _oAuthStore = new LiferayOAuthStore(oAuthConsumer); - } - - public OAuthStore get() { - return _oAuthStore; - } - - private String _convertFromOpenSsl(String key) { - key = key.replaceAll(_OPEN_SSL_A_Z, StringPool.BLANK); - key = key.replace(StringPool.NEW_LINE, StringPool.BLANK); - - return key; - } - - private OAuthConsumer _getOAuthConsumer( - String keyFileName, String keyName) { - - OAuthConsumer oAuthConsumer = new OAuthConsumerImpl(); - - oAuthConsumer.setConsumerKey(_DEFAULT_CONSUMER_KEY); - oAuthConsumer.setServiceName(_DEFAULT_SERVICE_NAME); - - String consumerSecret = null; - - String path = PropsUtil.get(PropsKeys.LIFERAY_HOME).concat(_KEY_DIR); - - path = path.replaceAll(StringPool.QUOTE, StringPool.BLANK); - - keyFileName = path.concat(keyFileName); - - try { - consumerSecret = FileUtil.read(keyFileName); - } - catch (Exception e) { - } - finally { - if (consumerSecret == null) { - if (!FileUtil.exists(path)) { - FileUtil.mkdirs(path); - } - - if (_log.isWarnEnabled()) { - _log.warn("Unable to load OAuth key from " + keyFileName); - } - - return null; - } - } - - consumerSecret = _convertFromOpenSsl(consumerSecret); - - oAuthConsumer.setConsumerSecret(consumerSecret); - oAuthConsumer.setKeyType(OAuthConsumerConstants.KEY_TYPE_RSA_PRIVATE); - oAuthConsumer.setKeyName(keyName); - - return oAuthConsumer; - } - - private static final String _DEFAULT_CONSUMER_KEY = "DEFAULT_CONSUMER_KEY"; - - private static final String _DEFAULT_SERVICE_NAME = "LIFERAY"; - - private static final String _KEY_DIR = "/data/opensocial/"; - - private static final String _OPEN_SSL_A_Z = "-----[A-Z ]*-----"; - - private static Log _log = LogFactoryUtil.getLog( - LiferayOAuthStoreProvider.class); - - private final OAuthStore _oAuthStore; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayActivityService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayActivityService.java deleted file mode 100644 index dc61e57632..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayActivityService.java +++ /dev/null @@ -1,469 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.service; - -import com.liferay.opensocial.shindig.util.HttpServletRequestThreadLocal; -import com.liferay.opensocial.shindig.util.SerializerUtil; -import com.liferay.portal.kernel.json.JSONArray; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -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.StringPool; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.Company; -import com.liferay.portal.model.User; -import com.liferay.portal.service.CompanyLocalServiceUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portlet.social.model.SocialActivity; -import com.liferay.portlet.social.model.SocialActivityFeedEntry; -import com.liferay.portlet.social.service.SocialActivityInterpreterLocalServiceUtil; -import com.liferay.portlet.social.service.SocialActivityLocalServiceUtil; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.concurrent.Future; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.shindig.auth.SecurityToken; -import org.apache.shindig.common.util.ImmediateFuture; -import org.apache.shindig.protocol.ProtocolException; -import org.apache.shindig.protocol.RestfulCollection; -import org.apache.shindig.social.core.model.ActivityImpl; -import org.apache.shindig.social.core.model.MediaItemImpl; -import org.apache.shindig.social.opensocial.model.Activity; -import org.apache.shindig.social.opensocial.model.MediaItem; -import org.apache.shindig.social.opensocial.model.MediaItem.Type; -import org.apache.shindig.social.opensocial.spi.ActivityService; -import org.apache.shindig.social.opensocial.spi.CollectionOptions; -import org.apache.shindig.social.opensocial.spi.GroupId; -import org.apache.shindig.social.opensocial.spi.UserId; - -/** - * @author Michael Young - */ -public class LiferayActivityService implements ActivityService { - - public Future createActivity( - UserId userId, GroupId groupId, String appId, Set fields, - Activity activity, SecurityToken securityToken) - throws ProtocolException { - - try { - doCreateActivity( - userId, groupId, appId, fields, activity, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future deleteActivities( - UserId userId, GroupId groupId, String appId, - Set activityIds, SecurityToken securityToken) - throws ProtocolException { - - try { - doDeleteActivities( - userId, groupId, appId, activityIds, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public void doCreateActivity( - UserId userId, GroupId groupId, String appId, Set fields, - Activity activity, SecurityToken securityToken) - throws Exception { - - long userIdLong = GetterUtil.getLong(userId.getUserId(securityToken)); - - String activityAppId = activity.getAppId(); - - JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(); - - SerializerUtil.copyProperties( - activity, extraDataJSONObject, _ACTIVITY_FIELDS); - - SocialActivityLocalServiceUtil.addActivity( - userIdLong, 0L, Activity.class.getName(), activity.getPostedTime(), - activityAppId.hashCode(), extraDataJSONObject.toString(), 0L); - } - - public void doDeleteActivities( - UserId userId, GroupId groupId, String appId, - Set activityIds, SecurityToken securityToken) - throws Exception { - - for (String activityId : activityIds) { - long activityIdLong = GetterUtil.getLong(activityId); - - SocialActivityLocalServiceUtil.deleteActivity(activityIdLong); - } - } - - public RestfulCollection doGetActivities( - Set userIds, GroupId groupId, String appId, - Set fields, CollectionOptions collectionOptions, - SecurityToken securityToken) - throws Exception { - - ThemeDisplay themeDisplay = getThemeDisplay(securityToken); - - List activities = new ArrayList(); - - for (UserId userId : userIds) { - long userIdLong = GetterUtil.getLong( - userId.getUserId(securityToken)); - - List personActivities = getActivities( - themeDisplay, userIdLong); - - activities.addAll(personActivities); - } - - return new RestfulCollection( - activities, collectionOptions.getFirst(), activities.size(), - collectionOptions.getMax()); - } - - public RestfulCollection doGetActivities( - UserId userId, GroupId groupId, String appId, Set fields, - CollectionOptions collectionOptions, Set activityIds, - SecurityToken securityToken) - throws Exception { - - ThemeDisplay themeDisplay = getThemeDisplay(securityToken); - - long userIdLong = GetterUtil.getLong(userId.getUserId(securityToken)); - - List activities = getActivities(themeDisplay, userIdLong); - - return new RestfulCollection( - activities, collectionOptions.getFirst(), activities.size(), - collectionOptions.getMax()); - } - - public Activity doGetActivity( - UserId userId, GroupId groupId, String appId, Set fields, - String activityId, SecurityToken securityToken) - throws Exception { - - ThemeDisplay themeDisplay = getThemeDisplay(securityToken); - - long activityIdLong = GetterUtil.getLong(activityId); - - SocialActivity socialActivity = - SocialActivityLocalServiceUtil.getActivity(activityIdLong); - - return getActivity(themeDisplay, socialActivity); - } - - public Future> getActivities( - Set userIds, GroupId groupId, String appId, - Set fields, CollectionOptions collectionOptions, - SecurityToken securityToken) - throws ProtocolException { - - try { - RestfulCollection activities = doGetActivities( - userIds, groupId, appId, fields, collectionOptions, - securityToken); - - return ImmediateFuture.newInstance(activities); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future> getActivities( - UserId userId, GroupId groupId, String appId, Set fields, - CollectionOptions collectionOptions, Set activityIds, - SecurityToken securityToken) - throws ProtocolException { - - try { - RestfulCollection activities = doGetActivities( - userId, groupId, appId, fields, collectionOptions, activityIds, - securityToken); - - return ImmediateFuture.newInstance(activities); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future getActivity( - UserId userId, GroupId groupId, String appId, Set fields, - String activityId, SecurityToken securityToken) - throws ProtocolException { - - try { - Activity activity = doGetActivity( - userId, groupId, appId, fields, activityId, securityToken); - - return ImmediateFuture.newInstance(activity); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - protected List getActivities( - ThemeDisplay themeDisplay, long userId) - throws Exception { - - List activities = new ArrayList(); - - List socialActivities = - SocialActivityLocalServiceUtil.getUserActivities(userId, 0, 20); - - for (SocialActivity socialActivity : socialActivities) { - Activity activity = getActivity(themeDisplay, socialActivity); - - activities.add(activity); - } - - return activities; - } - - protected Activity getActivity( - ThemeDisplay themeDisplay, SocialActivity socialActivity) - throws Exception { - - Activity activity = null; - - String className = socialActivity.getClassName(); - - if (className.equals(Activity.class.getName())) { - activity = getExternalActivity(socialActivity); - } - else { - activity = new ActivityImpl( - String.valueOf(socialActivity.getClassPK()), - String.valueOf(socialActivity.getUserId())); - - HttpServletRequest request = - HttpServletRequestThreadLocal.getHttpServletRequest(); - - request.setAttribute(WebKeys.THEME_DISPLAY, themeDisplay); - - ServiceContext serviceContext = ServiceContextFactory.getInstance( - request); - - serviceContext.setCompanyId(themeDisplay.getCompanyId()); - serviceContext.setUserId(themeDisplay.getUserId()); - - SocialActivityFeedEntry socialActivityFeedEntry = - SocialActivityInterpreterLocalServiceUtil.interpret( - StringPool.BLANK, socialActivity, serviceContext); - - activity.setBody(socialActivityFeedEntry.getBody()); - activity.setTitle(socialActivityFeedEntry.getTitle()); - activity.setUrl(socialActivityFeedEntry.getLink()); - } - - return activity; - } - - protected Activity getExternalActivity(SocialActivity socialActivity) - throws Exception { - - Activity activity = new ActivityImpl( - String.valueOf(socialActivity.getClassPK()), - String.valueOf(socialActivity.getUserId())); - - JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject( - socialActivity.getExtraData()); - - SerializerUtil.copyProperties( - extraDataJSONObject, activity, _ACTIVITY_FIELDS); - - return activity; - } - - protected List getMediaItems(JSONArray mediaItemsJSONArray) { - if (mediaItemsJSONArray == null) { - return null; - } - - List mediaItems = new ArrayList(); - - for (int i = 0; i < mediaItemsJSONArray.length(); i++) { - JSONObject mediaItemsJsonObject = mediaItemsJSONArray.getJSONObject( - i); - - MediaItem mediaItem = new MediaItemImpl( - mediaItemsJsonObject.getString("mimeType"), - Type.valueOf(mediaItemsJsonObject.getString("type")), - mediaItemsJsonObject.getString("url")); - - mediaItems.add(mediaItem); - } - - return mediaItems; - } - - protected JSONArray getMediaItems(List mediaItems) { - if (mediaItems == null) { - return null; - } - - JSONArray mediaItemsJSONArray = JSONFactoryUtil.createJSONArray(); - - for (MediaItem mediaItem : mediaItems) { - JSONObject mediaItemsJsonObject = - JSONFactoryUtil.createJSONObject(); - - mediaItemsJsonObject.put("mimeType", mediaItem.getMimeType()); - mediaItemsJsonObject.put( - "type", String.valueOf(mediaItem.getType())); - mediaItemsJsonObject.put("url", mediaItem.getUrl()); - - mediaItemsJSONArray.put(mediaItemsJsonObject); - } - - return mediaItemsJSONArray; - } - - protected Map getTemplateParams( - JSONArray templateParamsJSONArray) { - - if (templateParamsJSONArray == null) { - return null; - } - - Map templateParams = new HashMap(); - - for (int i = 0; i < templateParamsJSONArray.length(); i++) { - JSONObject templateParamJSONObject = - templateParamsJSONArray.getJSONObject(i); - - JSONArray namesJSONArray = templateParamJSONObject.names(); - - for (int j = 0; j < namesJSONArray.length(); j++) { - String name = namesJSONArray.getString(j); - - String value = templateParamJSONObject.getString(name); - - templateParams.put(name, value); - } - } - - return templateParams; - } - - protected JSONArray getTemplateParams(Map map) { - if (map == null) { - return null; - } - - JSONArray templateParamsJSONArray = JSONFactoryUtil.createJSONArray(); - - for (Entry entry : map.entrySet()) { - JSONObject templateParamJSONObject = - JSONFactoryUtil.createJSONObject(); - - String name = entry.getKey(); - String value = entry.getValue(); - - templateParamJSONObject.put(name, value); - - templateParamsJSONArray.put(templateParamJSONObject); - } - - return templateParamsJSONArray; - } - - protected ThemeDisplay getThemeDisplay(SecurityToken securityToken) - throws Exception { - - long userIdLong = GetterUtil.getLong(securityToken.getViewerId()); - - User user = UserLocalServiceUtil.getUserById(userIdLong); - - Company company = CompanyLocalServiceUtil.getCompanyById( - user.getCompanyId()); - - ThemeDisplay themeDisplay = new ThemeDisplay(); - - themeDisplay.setCompany(company); - themeDisplay.setLocale(user.getLocale()); - themeDisplay.setUser(user); - - return themeDisplay; - } - - private static final Activity.Field[] _ACTIVITY_FIELDS = { - Activity.Field.APP_ID, Activity.Field.BODY, Activity.Field.BODY_ID, - Activity.Field.EXTERNAL_ID, Activity.Field.MEDIA_ITEMS, - Activity.Field.POSTED_TIME, Activity.Field.PRIORITY, - Activity.Field.STREAM_FAVICON_URL, Activity.Field.STREAM_SOURCE_URL, - Activity.Field.STREAM_TITLE, Activity.Field.STREAM_URL, - Activity.Field.TEMPLATE_PARAMS, Activity.Field.TITLE, - Activity.Field.TITLE_ID, Activity.Field.URL - }; - - private static Log _log = LogFactoryUtil.getLog( - LiferayActivityService.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayAlbumService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayAlbumService.java deleted file mode 100644 index 9e4d266602..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayAlbumService.java +++ /dev/null @@ -1,369 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.service; - -import com.liferay.opensocial.shindig.util.SerializerUtil; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.json.JSONException; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.repository.model.Folder; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.User; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portlet.documentlibrary.model.DLFolder; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; -import com.liferay.portlet.documentlibrary.service.DLAppServiceUtil; -import com.liferay.portlet.social.model.SocialRelationConstants; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.concurrent.Future; - -import javax.servlet.http.HttpServletResponse; - -import org.apache.shindig.auth.SecurityToken; -import org.apache.shindig.common.util.ImmediateFuture; -import org.apache.shindig.protocol.ProtocolException; -import org.apache.shindig.protocol.RestfulCollection; -import org.apache.shindig.social.core.model.AlbumImpl; -import org.apache.shindig.social.opensocial.model.Album; -import org.apache.shindig.social.opensocial.spi.AlbumService; -import org.apache.shindig.social.opensocial.spi.CollectionOptions; -import org.apache.shindig.social.opensocial.spi.GroupId; -import org.apache.shindig.social.opensocial.spi.UserId; - -/** - * @author Dennis Ju - */ -public class LiferayAlbumService implements AlbumService { - - public Future createAlbum( - UserId userId, String appId, Album album, - SecurityToken securityToken) - throws ProtocolException { - - try { - doCreateAlbum(userId, appId, album, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future deleteAlbum( - UserId userId, String appId, String albumId, - SecurityToken securityToken) - throws ProtocolException { - - try { - doDeleteAlbum(userId, appId, albumId, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future getAlbum( - UserId userId, String appId, Set fields, String albumId, - SecurityToken securityToken) - throws ProtocolException { - - try { - Album album = doGetAlbum( - userId, appId, fields, albumId, securityToken); - - return ImmediateFuture.newInstance(album); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future> getAlbums( - Set userIds, GroupId groupId, String appId, - Set fields, CollectionOptions collectionOptions, - SecurityToken securityToken) - throws ProtocolException { - - try { - RestfulCollection albums = doGetAlbums( - userIds, groupId, appId, fields, collectionOptions, - securityToken); - - return ImmediateFuture.newInstance(albums); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future> getAlbums( - UserId userId, String appId, Set fields, - CollectionOptions collectionOptions, Set albumIds, - SecurityToken securityToken) - throws ProtocolException { - - try { - RestfulCollection albums = doGetAlbums( - userId, appId, fields, collectionOptions, albumIds, - securityToken); - - return ImmediateFuture.newInstance(albums); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future updateAlbum( - UserId userId, String appId, Album album, String albumId, - SecurityToken securityToken) - throws ProtocolException { - - try { - doUpdateAlbum(userId, appId, album, albumId, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - protected void doCreateAlbum( - UserId userId, String appId, Album album, - SecurityToken securityToken) - throws Exception { - - doUpdateAlbum(userId, appId, album, null, securityToken); - } - - protected void doDeleteAlbum( - UserId userId, String appId, String albumId, - SecurityToken securityToken) - throws Exception { - - long albumIdLong = GetterUtil.getLong(albumId); - - DLAppServiceUtil.deleteFolder(albumIdLong); - } - - protected Album doGetAlbum( - UserId userId, String appId, Set fields, String albumId, - SecurityToken securityToken) - throws Exception { - - long albumIdLong = GetterUtil.getLong(albumId); - - Folder folder = DLAppServiceUtil.getFolder(albumIdLong); - - return toAlbum(folder, fields, securityToken); - } - - protected RestfulCollection doGetAlbums( - Set userIds, GroupId groupId, String appId, - Set fields, CollectionOptions collectionOptions, - SecurityToken securityToken) - throws Exception { - - List albums = new ArrayList(); - - for (UserId userId : userIds) { - String userIdString = userId.getUserId(securityToken); - - long userIdLong = GetterUtil.getLong(userIdString); - - User user = UserLocalServiceUtil.getUserById(userIdLong); - - if (!ShindigUtil.isValidUser(user)) { - continue; - } - - List folders = new ArrayList(); - - GroupId.Type groupIdType = groupId.getType(); - - if (groupIdType.equals(GroupId.Type.all) || - groupIdType.equals(GroupId.Type.friends) || - groupIdType.equals(GroupId.Type.groupId)) { - - List socialUsers = UserLocalServiceUtil.getSocialUsers( - user.getUserId(), SocialRelationConstants.TYPE_BI_FRIEND, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - - for (User socialUser : socialUsers) { - Group group = socialUser.getGroup(); - - List friendFolders = DLAppServiceUtil.getFolders( - group.getGroupId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID); - - folders.addAll(friendFolders); - } - } - else if (groupIdType.equals(GroupId.Type.self)) { - Group group = user.getGroup(); - - folders = DLAppServiceUtil.getFolders( - group.getGroupId(), - DLFolderConstants.DEFAULT_PARENT_FOLDER_ID); - } - - for (Folder folder : folders) { - Album album = toAlbum(folder, fields, securityToken); - - albums.add(album); - } - } - - return new RestfulCollection( - albums, collectionOptions.getFirst(), albums.size(), - collectionOptions.getMax()); - } - - protected RestfulCollection doGetAlbums( - UserId userId, String appId, Set fields, - CollectionOptions collectionOptions, Set albumIds, - SecurityToken securityToken) - throws Exception { - - List albums = new ArrayList(); - - for (String albumId : albumIds) { - Folder folder = DLAppServiceUtil.getFolder( - GetterUtil.getLong(albumId)); - - Album album = toAlbum(folder, fields, securityToken); - - albums.add(album); - } - - return new RestfulCollection( - albums, collectionOptions.getFirst(), albums.size(), - collectionOptions.getMax()); - } - - protected void doUpdateAlbum( - UserId userId, String appId, Album album, String albumId, - SecurityToken securityToken) - throws Exception { - - long userIdLong = GetterUtil.getLong(userId.getUserId(securityToken)); - - User user = UserLocalServiceUtil.getUserById(userIdLong); - - if (!ShindigUtil.isValidUser(user)) { - return; - } - - Group group = user.getGroup(); - - long groupIdLong = group.getGroupId(); - - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - serviceContext.setExpandoBridgeAttributes( - SerializerUtil.toExpandoAttributes( - album, _ALBUM_FIELDS, user.getCompanyId(), - DLFolder.class.getName())); - serviceContext.setScopeGroupId(groupIdLong); - - if (albumId == null) { - DLAppServiceUtil.addFolder( - groupIdLong, DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - album.getTitle(), album.getDescription(), serviceContext); - } - else { - Folder folder = DLAppLocalServiceUtil.getFolder( - GetterUtil.getLong(albumId)); - - DLAppServiceUtil.updateFolder( - folder.getFolderId(), album.getTitle(), album.getDescription(), - serviceContext); - } - } - - protected Album toAlbum( - Folder folder, Set fields, SecurityToken securityToken) - throws JSONException { - - Album album = new AlbumImpl(); - - album.setDescription(folder.getDescription()); - album.setId(String.valueOf(folder.getFolderId())); - album.setOwnerId(String.valueOf(folder.getUserId())); - album.setTitle(folder.getName()); - - SerializerUtil.copyProperties( - folder.getAttributes(), album, _ALBUM_FIELDS); - - return album; - } - - private static final Album.Field[] _ALBUM_FIELDS = { - Album.Field.LOCATION, Album.Field.THUMBNAIL_URL - }; - - private static Log _log = LogFactoryUtil.getLog(LiferayAlbumService.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayAppDataService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayAppDataService.java deleted file mode 100644 index 8ac2a26fb5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayAppDataService.java +++ /dev/null @@ -1,295 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.service; - -import com.liferay.opensocial.shindig.util.ShindigUtil; -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.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.User; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portlet.expando.NoSuchTableException; -import com.liferay.portlet.expando.model.ExpandoColumn; -import com.liferay.portlet.expando.model.ExpandoColumnConstants; -import com.liferay.portlet.expando.model.ExpandoTable; -import com.liferay.portlet.expando.model.ExpandoValue; -import com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil; -import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; -import com.liferay.portlet.expando.service.ExpandoValueLocalServiceUtil; - -import java.util.HashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.Future; - -import javax.servlet.http.HttpServletResponse; - -import org.apache.shindig.auth.SecurityToken; -import org.apache.shindig.common.util.ImmediateFuture; -import org.apache.shindig.protocol.DataCollection; -import org.apache.shindig.protocol.ProtocolException; -import org.apache.shindig.social.opensocial.spi.AppDataService; -import org.apache.shindig.social.opensocial.spi.GroupId; -import org.apache.shindig.social.opensocial.spi.UserId; - -/** - * @author Michael Young - */ -public class LiferayAppDataService implements AppDataService { - - public Future deletePersonData( - UserId userId, GroupId groupId, String appId, Set fields, - SecurityToken securityToken) - throws ProtocolException { - - try { - doDeletePersonData(userId, groupId, appId, fields, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future getPersonData( - Set userIds, GroupId groupId, String appId, - Set fields, SecurityToken securityToken) - throws ProtocolException { - - try { - DataCollection dataCollection = doGetPersonData( - userIds, groupId, appId, fields, securityToken); - - return ImmediateFuture.newInstance(dataCollection); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future updatePersonData( - UserId userId, GroupId groupId, String appId, Set fields, - Map values, SecurityToken securityToken) - throws ProtocolException { - - try { - doUpdatePersonData( - userId, groupId, appId, fields, values, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - protected void doDeletePersonData( - UserId userId, GroupId groupId, String appId, Set fields, - SecurityToken securityToken) - throws Exception { - - long companyId = getCompanyId(securityToken); - - long userIdLong = GetterUtil.getLong(userId.getUserId(securityToken)); - - for (String field : fields) { - ExpandoColumn expandoColumn = getExpandoColumn( - companyId, getColumnName(appId, field)); - - ExpandoValueLocalServiceUtil.deleteValue( - companyId, User.class.getName(), - ShindigUtil.getTableOpenSocial(), expandoColumn.getName(), - userIdLong); - } - - return; - } - - protected DataCollection doGetPersonData( - Set userIds, GroupId groupId, String appId, - Set fields, SecurityToken securityToken) - throws Exception { - - long companyId = getCompanyId(securityToken); - - Map> peopleAppData = - new HashMap>(); - - List expandoColumns = getExpandoColumns( - companyId, appId); - - if (expandoColumns == null) { - return null; - } - - if (fields.isEmpty()) { - fields = new LinkedHashSet(); - - for (ExpandoColumn expandoColumn : expandoColumns) { - fields.add(expandoColumn.getName()); - } - } - - for (UserId userId : userIds) { - String userIdString = userId.getUserId(securityToken); - - long userIdLong = GetterUtil.getLong(userIdString); - - Map personAppData = new HashMap(); - - for (String field : fields) { - String value = getExpandoValue( - companyId, appId, userIdLong, getColumnName(appId, field)); - - personAppData.put(field, value); - } - - peopleAppData.put(userIdString, personAppData); - } - - return new DataCollection(peopleAppData); - } - - protected void doUpdatePersonData( - UserId userId, GroupId groupId, String appId, Set fields, - Map values, SecurityToken securityToken) - throws Exception { - - long companyId = getCompanyId(securityToken); - - long userIdLong = GetterUtil.getLong(userId.getUserId(securityToken)); - - for (String key : values.keySet()) { - - // Workaround for a Shindig bug that stores a Long in value instead - // of the expected String so we cannot use generics here - - String value = String.valueOf(values.get(key)); - - ExpandoColumn expandoColumn = getExpandoColumn( - companyId, getColumnName(appId, key)); - - ExpandoValueLocalServiceUtil.addValue( - companyId, User.class.getName(), - ShindigUtil.getTableOpenSocial(), expandoColumn.getName(), - userIdLong, value); - } - - return; - } - - protected String getColumnName(String appId, String field) { - if (Validator.isNotNull(appId)) { - return appId.concat(field); - } - else { - return field; - } - } - - protected long getCompanyId(SecurityToken securityToken) throws Exception { - long userIdLong = GetterUtil.getLong(securityToken.getViewerId()); - - User user = UserLocalServiceUtil.getUser(userIdLong); - - return user.getCompanyId(); - } - - protected ExpandoColumn getExpandoColumn(long companyId, String columnName) - throws Exception { - - ExpandoTable expandoTable = null; - - try { - expandoTable = ExpandoTableLocalServiceUtil.getTable( - companyId, User.class.getName(), - ShindigUtil.getTableOpenSocial()); - } - catch (NoSuchTableException nste) { - _log.error(nste, nste); - } - - ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn( - expandoTable.getTableId(), columnName); - - if (expandoColumn == null) { - expandoColumn = ExpandoColumnLocalServiceUtil.addColumn( - expandoTable.getTableId(), columnName, - ExpandoColumnConstants.STRING); - } - - return expandoColumn; - } - - protected List getExpandoColumns( - long companyId, String appId) { - - try { - List expandoColumns = - ExpandoColumnLocalServiceUtil.getColumns( - companyId, User.class.getName(), - ShindigUtil.getTableOpenSocial()); - - return expandoColumns; - } - catch (Exception e) { - return null; - } - } - - protected String getExpandoValue( - long companyId, String appId, long userId, String columnName) { - - try { - getExpandoColumn(companyId, columnName); - - ExpandoValue expandoValue = ExpandoValueLocalServiceUtil.getValue( - companyId, User.class.getName(), - ShindigUtil.getTableOpenSocial(), columnName, userId); - - return expandoValue.getData(); - } - catch (Exception e) { - return StringPool.BLANK; - } - } - - private static Log _log = LogFactoryUtil.getLog( - LiferayAppDataService.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayMediaItemService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayMediaItemService.java deleted file mode 100644 index 77a71c290b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayMediaItemService.java +++ /dev/null @@ -1,565 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.service; - -import com.liferay.opensocial.shindig.util.SerializerUtil; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.repository.model.FileVersion; -import com.liferay.portal.kernel.servlet.HttpHeaders; -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.Http; -import com.liferay.portal.kernel.util.HttpUtil; -import com.liferay.portal.kernel.util.MimeTypesUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.User; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portlet.documentlibrary.model.DLFileEntry; -import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; -import com.liferay.portlet.documentlibrary.service.DLAppServiceUtil; -import com.liferay.portlet.social.model.SocialRelationConstants; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.concurrent.Future; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.servlet.http.HttpServletResponse; - -import org.apache.shindig.auth.SecurityToken; -import org.apache.shindig.common.util.ImmediateFuture; -import org.apache.shindig.protocol.ProtocolException; -import org.apache.shindig.protocol.RestfulCollection; -import org.apache.shindig.social.core.model.MediaItemImpl; -import org.apache.shindig.social.opensocial.model.MediaItem; -import org.apache.shindig.social.opensocial.model.MediaItem.Type; -import org.apache.shindig.social.opensocial.spi.CollectionOptions; -import org.apache.shindig.social.opensocial.spi.GroupId; -import org.apache.shindig.social.opensocial.spi.MediaItemService; -import org.apache.shindig.social.opensocial.spi.UserId; - -/** - * @author Dennis Ju - */ -public class LiferayMediaItemService implements MediaItemService { - - public Future createMediaItem( - UserId userId, String appId, String albumId, MediaItem mediaItem, - SecurityToken securityToken) - throws ProtocolException { - - try { - doCreateMediaItem(userId, appId, albumId, mediaItem, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future deleteMediaItem( - UserId userId, String appId, String albumId, String mediaItemId, - SecurityToken securityToken) - throws ProtocolException { - - try { - doDeleteMediaItem( - userId, appId, albumId, mediaItemId, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future getMediaItem( - UserId userId, String appId, String albumId, String mediaItemId, - Set fields, SecurityToken securityToken) - throws ProtocolException { - - try { - MediaItem mediaItem = doGetMediaItem( - userId, appId, albumId, mediaItemId, fields, securityToken); - - return ImmediateFuture.newInstance(mediaItem); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future> getMediaItems( - Set userIds, GroupId groupId, String appId, - Set fields, CollectionOptions collectionOptions, - SecurityToken securityToken) - throws ProtocolException { - - try { - RestfulCollection mediaItems = doGetMediaItems( - userIds, groupId, appId, fields, collectionOptions, - securityToken); - - return ImmediateFuture.newInstance(mediaItems); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future> getMediaItems( - UserId userId, String appId, String albumId, Set fields, - CollectionOptions collectionOptions, SecurityToken securityToken) - throws ProtocolException { - - try { - RestfulCollection mediaItems = doGetMediaItems( - userId, appId, albumId, fields, collectionOptions, - securityToken); - - return ImmediateFuture.newInstance(mediaItems); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future> getMediaItems( - UserId userId, String appId, String albumId, - Set mediaItemIds, Set fields, - CollectionOptions collectionOptions, SecurityToken securityToken) - throws ProtocolException { - - try { - RestfulCollection mediaItems = doGetMediaItems( - userId, appId, albumId, mediaItemIds, fields, collectionOptions, - securityToken); - - return ImmediateFuture.newInstance(mediaItems); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future updateMediaItem( - UserId userId, String appId, String albumId, String mediaItemId, - MediaItem mediaItem, SecurityToken securityToken) - throws ProtocolException { - - try { - doUpdateMediaItem( - userId, appId, albumId, mediaItemId, mediaItem, securityToken); - - return ImmediateFuture.newInstance(null); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - protected void doCreateMediaItem( - UserId userId, String appId, String albumId, MediaItem mediaItem, - SecurityToken securityToken) - throws Exception { - - doUpdateMediaItem( - userId, appId, albumId, null, mediaItem, securityToken); - } - - protected void doDeleteMediaItem( - UserId userId, String appId, String albumId, String mediaItemId, - SecurityToken securityToken) - throws Exception { - - long mediaItemIdLong = GetterUtil.getLong(mediaItemId); - - DLAppServiceUtil.deleteFileEntry(mediaItemIdLong); - } - - protected MediaItem doGetMediaItem( - UserId userId, String appId, String albumId, String mediaItemId, - Set fields, SecurityToken securityToken) - throws Exception { - - long mediaItemIdLong = GetterUtil.getLong(mediaItemId); - - FileEntry fileEntry = DLAppServiceUtil.getFileEntry(mediaItemIdLong); - - return toMediaItem(fileEntry, fields, securityToken); - } - - protected RestfulCollection doGetMediaItems( - Set userIds, GroupId groupId, String appId, - Set fields, CollectionOptions collectionOptions, - SecurityToken securityToken) - throws Exception { - - List mediaItems = new ArrayList(); - - for (UserId userId : userIds) { - long userIdLong = GetterUtil.getLong( - userId.getUserId(securityToken)); - - User user = UserLocalServiceUtil.getUserById(userIdLong); - - if (!ShindigUtil.isValidUser(user)) { - continue; - } - - List fileEntries = new ArrayList(); - - GroupId.Type groupIdType = groupId.getType(); - - if (groupIdType.equals(GroupId.Type.all) || - groupIdType.equals(GroupId.Type.friends) || - groupIdType.equals(GroupId.Type.groupId)) { - - List socialUsers = UserLocalServiceUtil.getSocialUsers( - user.getUserId(), SocialRelationConstants.TYPE_BI_FRIEND, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - - for (User socialUser : socialUsers) { - Group group = socialUser.getGroup(); - - List friendFileEntries = - DLAppServiceUtil.getGroupFileEntries( - group.getGroupId(), socialUser.getUserId(), - collectionOptions.getFirst(), - collectionOptions.getMax()); - - fileEntries.addAll(friendFileEntries); - } - } - else if (groupIdType.equals(GroupId.Type.self)) { - Group group = user.getGroup(); - - fileEntries = DLAppServiceUtil.getGroupFileEntries( - group.getGroupId(), user.getUserId(), - collectionOptions.getFirst(), collectionOptions.getMax()); - } - - for (FileEntry fileEntry : fileEntries) { - MediaItem.Type mediaItemType = toMediaItemType( - StringPool.PERIOD.concat(fileEntry.getExtension())); - - if (mediaItemType == null) { - continue; - } - - MediaItem mediaItem = toMediaItem( - fileEntry, fields, securityToken); - - mediaItems.add(mediaItem); - } - } - - return new RestfulCollection( - mediaItems, collectionOptions.getFirst(), mediaItems.size(), - collectionOptions.getMax()); - } - - protected RestfulCollection doGetMediaItems( - UserId userId, String appId, String albumId, Set fields, - CollectionOptions collectionOptions, SecurityToken securityToken) - throws Exception { - - long userIdLong = GetterUtil.getLong(userId.getUserId(securityToken)); - - User user = UserLocalServiceUtil.getUserById(userIdLong); - - List mediaItems = new ArrayList(); - - if (!ShindigUtil.isValidUser(user)) { - return new RestfulCollection( - mediaItems, collectionOptions.getFirst(), mediaItems.size(), - collectionOptions.getMax()); - } - - Group group = user.getGroup(); - - long groupIdLong = group.getGroupId(); - - long albumIdLong = GetterUtil.getLong(albumId); - - List fileEntries = DLAppServiceUtil.getFileEntries( - groupIdLong, albumIdLong); - - for (FileEntry fileEntry : fileEntries) { - MediaItem.Type mediaItemType = toMediaItemType( - StringPool.PERIOD.concat(fileEntry.getExtension())); - - if (mediaItemType == null) { - continue; - } - - MediaItem mediaItem = toMediaItem(fileEntry, fields, securityToken); - - mediaItems.add(mediaItem); - } - - return new RestfulCollection( - mediaItems, collectionOptions.getFirst(), mediaItems.size(), - collectionOptions.getMax()); - } - - protected RestfulCollection doGetMediaItems( - UserId userId, String appId, String albumId, - Set mediaItemIds, Set fields, - CollectionOptions collectionOptions, SecurityToken securityToken) - throws Exception { - - long userIdLong = GetterUtil.getLong(userId.getUserId(securityToken)); - - User user = UserLocalServiceUtil.getUserById(userIdLong); - - List mediaItems = new ArrayList(); - - if (!ShindigUtil.isValidUser(user)) { - return new RestfulCollection( - mediaItems, collectionOptions.getFirst(), mediaItems.size(), - collectionOptions.getMax()); - } - - Group group = user.getGroup(); - - long groupIdLong = group.getGroupId(); - - long albumIdLong = GetterUtil.getLong(albumId); - - List fileEntries = DLAppServiceUtil.getFileEntries( - groupIdLong, albumIdLong); - - for (FileEntry fileEntry : fileEntries) { - MediaItem.Type mediaItemType = toMediaItemType( - StringPool.PERIOD.concat(fileEntry.getExtension())); - - if (mediaItemType == null) { - continue; - } - - MediaItem mediaItem = toMediaItem(fileEntry, fields, securityToken); - - if (mediaItemIds.contains(mediaItem.getId())) { - mediaItems.add(mediaItem); - } - } - - return new RestfulCollection( - mediaItems, collectionOptions.getFirst(), mediaItems.size(), - collectionOptions.getMax()); - } - - protected void doUpdateMediaItem( - UserId userId, String appId, String albumId, String mediaItemId, - MediaItem mediaItem, SecurityToken securityToken) - throws Exception { - - long userIdLong = GetterUtil.getLong(userId.getUserId(securityToken)); - - User user = UserLocalServiceUtil.getUserById(userIdLong); - - if (!ShindigUtil.isValidUser(user)) { - return; - } - - Group group = user.getGroup(); - - long groupIdLong = group.getGroupId(); - - Http.Options options = new Http.Options(); - - options.setLocation(mediaItem.getUrl()); - - byte[] byteArray = HttpUtil.URLtoByteArray(options); - - String fileName = getFileName(mediaItem, options); - String contentType = MimeTypesUtil.getContentType(fileName); - - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setAddGroupPermissions(true); - serviceContext.setAddGuestPermissions(true); - - serviceContext.setAttribute("sourceFileName", fileName); - - serviceContext.setExpandoBridgeAttributes( - SerializerUtil.toExpandoAttributes( - mediaItem, _MEDIA_ITEM_FIELDS, user.getCompanyId(), - DLFileEntry.class.getName())); - serviceContext.setScopeGroupId(groupIdLong); - - if (mediaItemId == null) { - long albumIdLong = GetterUtil.getLong(albumId); - - DLAppServiceUtil.addFileEntry( - groupIdLong, albumIdLong, fileName, contentType, - mediaItem.getTitle(), mediaItem.getDescription(), - StringPool.BLANK, byteArray, serviceContext); - } - else { - long mediaItemIdLong = GetterUtil.getLong(mediaItemId); - - FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry( - mediaItemIdLong); - - serviceContext.setCreateDate(fileEntry.getCreateDate()); - serviceContext.setModifiedDate(fileEntry.getModifiedDate()); - - DLAppServiceUtil.updateFileEntry( - fileEntry.getFileEntryId(), fileName, contentType, - mediaItem.getTitle(), mediaItem.getDescription(), - StringPool.BLANK, false, byteArray, serviceContext); - } - } - - protected String getFileName(MediaItem mediaItem, Http.Options options) { - Http.Response response = options.getResponse(); - - String contentDisposition = response.getHeader( - HttpHeaders.CONTENT_DISPOSITION); - - if (contentDisposition == null) { - return FileUtil.getShortFileName(mediaItem.getUrl()); - } - - Matcher fileNameMatcher = _fileNamePattern.matcher(contentDisposition); - - if (fileNameMatcher.find()) { - return fileNameMatcher.group(1); - } - else { - return mediaItem.getTitle(); - } - } - - protected MediaItem toMediaItem( - FileEntry fileEntry, Set fields, - SecurityToken securityToken) - throws Exception { - - MediaItem mediaItem = new MediaItemImpl(); - - mediaItem.setAlbumId(String.valueOf(fileEntry.getFolderId())); - mediaItem.setCreated(String.valueOf(fileEntry.getCreateDate())); - mediaItem.setDescription(fileEntry.getDescription()); - mediaItem.setId(String.valueOf(fileEntry.getFileEntryId())); - mediaItem.setLastUpdated(String.valueOf(fileEntry.getModifiedDate())); - mediaItem.setMimeType( - MimeTypesUtil.getContentType( - StringPool.PERIOD.concat(fileEntry.getExtension()))); - mediaItem.setNumViews(String.valueOf(fileEntry.getReadCount())); - mediaItem.setTitle(fileEntry.getTitle()); - mediaItem.setType( - toMediaItemType( - StringPool.PERIOD.concat(fileEntry.getExtension()))); - - String fileEntryURL = ShindigUtil.getFileEntryURL( - securityToken.getDomain(), fileEntry.getFileEntryId()); - - mediaItem.setUrl(fileEntryURL); - - FileVersion fileVersion = fileEntry.getLatestFileVersion(); - - SerializerUtil.copyProperties( - fileVersion.getAttributes(), mediaItem, _MEDIA_ITEM_FIELDS); - - return mediaItem; - } - - protected MediaItem.Type toMediaItemType(String fileName) { - String contentType = MimeTypesUtil.getContentType(fileName); - - if (contentType.startsWith("audio")) { - return Type.AUDIO; - } - else if (contentType.startsWith("image")) { - return Type.IMAGE; - } - else if (contentType.startsWith("video")) { - return Type.VIDEO; - } - else { - return null; - } - } - - private static final MediaItem.Field[] _MEDIA_ITEM_FIELDS = { - MediaItem.Field.DURATION, MediaItem.Field.FILE_SIZE, - MediaItem.Field.LANGUAGE, MediaItem.Field.LOCATION, - MediaItem.Field.NUM_COMMENTS, MediaItem.Field.NUM_VOTES, - MediaItem.Field.RATING, MediaItem.Field.START_TIME, - MediaItem.Field.TAGGED_PEOPLE, MediaItem.Field.TAGS, - MediaItem.Field.THUMBNAIL_URL - }; - - private static Log _log = LogFactoryUtil.getLog( - LiferayMediaItemService.class); - - private static Pattern _fileNamePattern = Pattern.compile( - ".*?filename=\"?([^\";]+)"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayPersonService.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayPersonService.java deleted file mode 100644 index fdda243452..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayPersonService.java +++ /dev/null @@ -1,356 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.service; - -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -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.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.model.Contact; -import com.liferay.portal.model.EmailAddress; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.Organization; -import com.liferay.portal.model.User; -import com.liferay.portal.service.EmailAddressLocalServiceUtil; -import com.liferay.portal.service.GroupLocalServiceUtil; -import com.liferay.portal.service.OrganizationLocalServiceUtil; -import com.liferay.portal.service.PhoneServiceUtil; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portal.webserver.WebServerServletTokenUtil; -import com.liferay.portlet.social.model.SocialRelationConstants; - -import java.util.ArrayList; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.List; -import java.util.Set; -import java.util.concurrent.Future; - -import javax.servlet.http.HttpServletResponse; - -import org.apache.shindig.auth.SecurityToken; -import org.apache.shindig.common.util.ImmediateFuture; -import org.apache.shindig.protocol.ProtocolException; -import org.apache.shindig.protocol.RestfulCollection; -import org.apache.shindig.social.core.model.ListFieldImpl; -import org.apache.shindig.social.core.model.NameImpl; -import org.apache.shindig.social.core.model.PersonImpl; -import org.apache.shindig.social.opensocial.model.ListField; -import org.apache.shindig.social.opensocial.model.ListField.Field; -import org.apache.shindig.social.opensocial.model.Name; -import org.apache.shindig.social.opensocial.model.Person; -import org.apache.shindig.social.opensocial.model.Person.Gender; -import org.apache.shindig.social.opensocial.spi.CollectionOptions; -import org.apache.shindig.social.opensocial.spi.GroupId; -import org.apache.shindig.social.opensocial.spi.PersonService; -import org.apache.shindig.social.opensocial.spi.UserId; - -/** - * @author Michael Young - */ -public class LiferayPersonService implements PersonService { - - public Future> getPeople( - Set userIds, GroupId groupId, - CollectionOptions collectionOptions, Set fields, - SecurityToken securityToken) - throws ProtocolException { - - try { - RestfulCollection people = doGetPeople( - userIds, groupId, collectionOptions, fields, securityToken); - - return ImmediateFuture.newInstance(people); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - public Future getPerson( - UserId userId, Set fields, SecurityToken securityToken) - throws ProtocolException { - - try { - Person person = doGetPerson(userId, fields, securityToken); - - return ImmediateFuture.newInstance(person); - } - catch (Exception e) { - if (_log.isDebugEnabled()) { - _log.debug(e, e); - } - - throw new ProtocolException( - HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(), - e); - } - } - - protected RestfulCollection doGetPeople( - Set userIds, GroupId groupId, - CollectionOptions collectionOptions, Set fields, - SecurityToken securityToken) - throws Exception { - - List people = new ArrayList(); - - for (UserId userId : userIds) { - Person person = null; - - String userIdString = userId.getUserId(securityToken); - - GroupId.Type groupIdType = groupId.getType(); - - if (groupIdType.equals(GroupId.Type.all) || - groupIdType.equals(GroupId.Type.friends) || - groupIdType.equals(GroupId.Type.groupId)) { - - long userIdLong = GetterUtil.getLong(userIdString); - - User user = UserLocalServiceUtil.getUserById(userIdLong); - - List friends = UserLocalServiceUtil.getSocialUsers( - user.getUserId(), SocialRelationConstants.TYPE_BI_FRIEND, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - - for (User friend : friends) { - person = getUserPerson(friend, fields, securityToken); - - people.add(person); - } - } - else if (groupIdType.equals(GroupId.Type.self)) { - person = doGetPerson(userId, fields, securityToken); - - people.add(person); - } - } - - return new RestfulCollection( - people, collectionOptions.getFirst(), people.size(), - collectionOptions.getMax()); - } - - protected Person doGetPerson( - UserId userId, Set fields, SecurityToken securityToken) - throws Exception { - - String userIdString = userId.getUserId(securityToken); - - Person person = null; - - if (userIdString.startsWith("G-")) { - String groupId = userIdString.substring("G-".length()); - - person = getGroupPerson(groupId); - } - else { - long userIdLong = GetterUtil.getLong(userIdString); - - User user = UserLocalServiceUtil.getUserById(userIdLong); - - if (!ShindigUtil.isValidUser(user)) { - return null; - } - - person = getUserPerson(user, fields, securityToken); - } - - return person; - } - - protected List getEmails(User user) throws Exception { - List emails = new ArrayList(); - - ListField email = new ListFieldImpl( - Field.PRIMARY.toString(), user.getEmailAddress()); - - emails.add(email); - - List emailAddresses = - EmailAddressLocalServiceUtil.getEmailAddresses( - user.getCompanyId(), User.class.getName(), user.getUserId()); - - for (EmailAddress emailAddress : emailAddresses) { - email = new ListFieldImpl( - emailAddress.getType().getName(), emailAddress.getAddress()); - - emails.add(email); - } - - return emails; - } - - protected Person getGroupPerson(String groupId) throws Exception { - Person person = null; - - long groupIdLong = GetterUtil.getLong(groupId); - - Group group = GroupLocalServiceUtil.getGroup(groupIdLong); - - if (group.isOrganization()) { - Organization organization = - OrganizationLocalServiceUtil.getOrganization( - group.getClassPK()); - - Name name = new NameImpl( - organization.getName() + " (Organization)"); - - person = new PersonImpl(groupId, name.getFormatted(), name); - - List phoneNumbers = getPhoneNumbers( - Organization.class.getName(), organization.getOrganizationId()); - - person.setPhoneNumbers(phoneNumbers); - } - else if (group.isRegularSite()) { - Name name = new NameImpl(group.getName() + " (Site)"); - - person = new PersonImpl(groupId, name.getFormatted(), name); - } - - person.setGender(Gender.male); - - return person; - } - - protected List getPhoneNumbers(String className, long classPK) - throws Exception { - - List phoneNumbers = new ArrayList(); - - List liferayPhones = - PhoneServiceUtil.getPhones(className, classPK); - - for (com.liferay.portal.model.Phone liferayPhone : liferayPhones) { - ListField phoneNumber = new ListFieldImpl( - liferayPhone.getType().getName(), liferayPhone.getNumber()); - - phoneNumbers.add(phoneNumber); - } - - return phoneNumbers; - } - - protected Person getUserPerson( - User user, Set fields, SecurityToken securityToken) - throws Exception { - - Name name = new NameImpl(user.getFullName()); - - Person person = new PersonImpl( - String.valueOf(user.getUserId()), user.getScreenName(), name); - - StringBundler sb = new StringBundler(4); - - sb.append(securityToken.getDomain()); - sb.append(PortalUtil.getPathFriendlyURLPublic()); - sb.append(StringPool.SLASH); - sb.append(user.getScreenName()); - - person.setProfileUrl(sb.toString()); - - sb.setIndex(0); - - sb.append(securityToken.getDomain()); - sb.append(PortalUtil.getPathImage()); - sb.append("/user_"); - sb.append(user.isFemale() ? "female" : "male"); - sb.append("_portrait?img_id="); - sb.append(user.getPortraitId()); - sb.append("&t="); - sb.append(WebServerServletTokenUtil.getToken(user.getPortraitId())); - - person.setThumbnailUrl(sb.toString()); - - if (fields.contains(Person.Field.ABOUT_ME.toString())) { - person.setAboutMe(user.getComments()); - } - - if (fields.contains(Person.Field.AGE.toString())) { - Calendar birthday = new GregorianCalendar(); - - birthday.setTime(user.getBirthday()); - - Calendar today = Calendar.getInstance(); - - int age = today.get(Calendar.YEAR) - birthday.get(Calendar.YEAR); - - birthday.add(Calendar.YEAR, age); - - if (today.before(birthday)) { - age--; - } - - person.setAge(age); - } - - if (fields.contains(Person.Field.BIRTHDAY.toString())) { - person.setBirthday(user.getBirthday()); - } - - if (fields.contains(Person.Field.EMAILS)) { - person.setEmails(getEmails(user)); - } - - if (fields.contains(Person.Field.GENDER.toString())) { - if (user.isFemale()) { - person.setGender(Gender.female); - } - else { - person.setGender(Gender.male); - } - } - - if (fields.contains(Person.Field.NICKNAME.toString())) { - person.setNickname(user.getScreenName()); - } - - if (fields.contains(Person.Field.PHONE_NUMBERS.toString())) { - List phoneNumbers = getPhoneNumbers( - Contact.class.getName(), user.getContactId()); - - person.setPhoneNumbers(phoneNumbers); - } - - if (fields.contains(Person.Field.UTC_OFFSET.toString())) { - person.setUtcOffset(new Long(user.getTimeZone().getRawOffset())); - } - - if (securityToken.getOwnerId().equals(person.getId())) { - person.setIsOwner(true); - } - - if (securityToken.getViewerId().equals(person.getId())) { - person.setIsViewer(true); - } - - return person; - } - - private static Log _log = LogFactoryUtil.getLog(LiferayPersonService.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/servlet/AuthenticationServletFilter.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/servlet/AuthenticationServletFilter.java deleted file mode 100644 index 9fc46c875c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/servlet/AuthenticationServletFilter.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.servlet; - -import com.google.inject.Injector; - -import java.io.IOException; - -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.UnavailableException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.apache.shindig.common.servlet.GuiceServletContextListener; - -/** - * @author Igor Spasic - */ -public class AuthenticationServletFilter - extends org.apache.shindig.auth.AuthenticationServletFilter { - - @Override - public void doFilter( - ServletRequest servletRequest, ServletResponse servletResponse, - FilterChain filterChain) - throws IOException, ServletException { - - if (injector == null) { - HttpServletRequest request = (HttpServletRequest)servletRequest; - - HttpSession session = request.getSession(); - - _init(session.getServletContext()); - } - - super.doFilter(servletRequest, servletResponse, filterChain); - } - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - - // LPS-23577 and LPS-41715 - - injector = null; - } - - private void _init(ServletContext servletContext) throws ServletException { - injector = (Injector)servletContext.getAttribute( - GuiceServletContextListener.INJECTOR_ATTRIBUTE); - - if (injector == null) { - injector = (Injector)servletContext.getAttribute( - GuiceServletContextListener.INJECTOR_NAME); - - if (injector == null) { - throw new UnavailableException( - "Guice injector is not available. Please register " + - GuiceServletContextListener.class.getName() + "."); - } - } - - injector.injectMembers(this); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/servlet/GuiceServletContextListener.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/servlet/GuiceServletContextListener.java deleted file mode 100644 index 5a8aca7934..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/servlet/GuiceServletContextListener.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.servlet; - -import com.liferay.portal.kernel.util.BasePortalLifecycle; - -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; - -/** - * @author Michael Young - */ -public class GuiceServletContextListener extends BasePortalLifecycle - implements ServletContextListener { - - public static ServletContextEvent getInitializedServletContextEvent() { - return _initializedServletContextEvent; - } - - @Override - public void contextDestroyed(ServletContextEvent servletContextEvent) { - } - - @Override - public void contextInitialized(ServletContextEvent servletContextEvent) { - setInitializedServletContextEvent(servletContextEvent); - - registerPortalLifecycle(); - } - - @Override - protected void doPortalDestroy() throws Exception { - } - - @Override - protected void doPortalInit() throws Exception { - } - - protected void setInitializedServletContextEvent( - ServletContextEvent servletContextEvent) { - - _initializedServletContextEvent = servletContextEvent; - } - - private static ServletContextEvent _initializedServletContextEvent; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/servlet/ShindigFilter.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/servlet/ShindigFilter.java deleted file mode 100644 index 761c3d7dc3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/servlet/ShindigFilter.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.servlet; - -import com.google.inject.Injector; - -import com.liferay.opensocial.shindig.util.HttpServletRequestThreadLocal; -import com.liferay.opensocial.shindig.util.ShindigUtil; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.CookieKeys; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.Company; -import com.liferay.portal.model.User; -import com.liferay.portal.security.auth.AuthenticatedUserUUIDStoreUtil; -import com.liferay.portal.security.auth.PrincipalThreadLocal; -import com.liferay.portal.security.permission.PermissionChecker; -import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil; -import com.liferay.portal.security.permission.PermissionThreadLocal; -import com.liferay.portal.service.CompanyLocalServiceUtil; -import com.liferay.portal.service.UserLocalServiceUtil; -import com.liferay.util.Encryptor; -import com.liferay.util.EncryptorException; - -import java.io.IOException; - -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.UnavailableException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.apache.shindig.common.servlet.GuiceServletContextListener; -import org.apache.shindig.common.servlet.InjectedFilter; - -/** - * @author Michael Young - * @author Dennis Ju - */ -public class ShindigFilter extends InjectedFilter { - - public void destroy() { - } - - public void doFilter( - ServletRequest servletRequest, ServletResponse servletResponse, - FilterChain filterChain) - throws IOException, ServletException { - - HttpServletRequest request = (HttpServletRequest)servletRequest; - - if (injector == null) { - HttpSession session = request.getSession(); - - _init(session.getServletContext()); - } - - PermissionChecker permissionChecker = - PermissionThreadLocal.getPermissionChecker(); - - if (permissionChecker == null) { - setPermissionChecker(servletRequest); - } - - ShindigUtil.setScheme(servletRequest.getScheme()); - - String serverName = servletRequest.getServerName(); - - String host = serverName.concat(StringPool.COLON).concat( - String.valueOf(servletRequest.getServerPort())); - - ShindigUtil.setHost(host); - - HttpServletRequestThreadLocal.setHttpServletRequest(request); - - try { - filterChain.doFilter(servletRequest, servletResponse); - } - finally { - HttpServletRequestThreadLocal.setHttpServletRequest(null); - } - } - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - - // LPS-23577 and LPS-41715 - - injector = null; - } - - protected boolean setPermissionChecker(ServletRequest servletRequest) { - String companyIdString = CookieKeys.getCookie( - (HttpServletRequest)servletRequest, CookieKeys.COMPANY_ID); - - if (Validator.isNull(companyIdString)) { - return false; - } - - long companyId = GetterUtil.getLong(companyIdString); - - String userUUID = StringPool.BLANK; - - try { - Company company = CompanyLocalServiceUtil.fetchCompany(companyId); - - if (company == null) { - return false; - } - - String userUUIDString = CookieKeys.getCookie( - (HttpServletRequest)servletRequest, CookieKeys.USER_UUID); - - if (Validator.isNull(userUUIDString)) { - return false; - } - - userUUID = GetterUtil.getString( - Encryptor.decrypt(company.getKeyObj(), userUUIDString)); - } - catch (EncryptorException ee) { - return false; - } - catch (Exception e) { - _log.error(e, e); - - return false; - } - - if (!AuthenticatedUserUUIDStoreUtil.exists(userUUID)) { - return false; - } - - String userIdString = userUUID.substring( - 0, userUUID.indexOf(StringPool.PERIOD)); - - long userId = GetterUtil.getLong(userIdString); - - try { - User user = UserLocalServiceUtil.getUserById(userId); - - PrincipalThreadLocal.setName(userIdString); - - PermissionChecker permissionChecker = - PermissionCheckerFactoryUtil.create(user); - - PermissionThreadLocal.setPermissionChecker(permissionChecker); - } - catch (Exception e) { - _log.error(e, e); - - return false; - } - - return true; - } - - private void _init(ServletContext servletContext) throws ServletException { - injector = (Injector)servletContext.getAttribute( - GuiceServletContextListener.INJECTOR_ATTRIBUTE); - - if (injector == null) { - injector = (Injector)servletContext.getAttribute( - GuiceServletContextListener.INJECTOR_NAME); - - if (injector == null) { - throw new UnavailableException( - "Guice injector is not available. Please register " + - GuiceServletContextListener.class.getName() + "."); - } - } - - injector.injectMembers(this); - } - - private static Log _log = LogFactoryUtil.getLog(ShindigFilter.class); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/util/HttpServletRequestThreadLocal.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/util/HttpServletRequestThreadLocal.java deleted file mode 100644 index 31973b5634..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/util/HttpServletRequestThreadLocal.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.util; - -import javax.servlet.http.HttpServletRequest; - -/** - * @author Brian Wing Shun Chan - */ -public class HttpServletRequestThreadLocal { - - public static HttpServletRequest getHttpServletRequest() { - return _httpServletRequest.get(); - } - - public static void setHttpServletRequest( - HttpServletRequest httpServletRequest) { - - _httpServletRequest.set(httpServletRequest); - } - - private static ThreadLocal _httpServletRequest = - new ThreadLocal(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/util/SerializerUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/util/SerializerUtil.java deleted file mode 100644 index 51c402c4fb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/util/SerializerUtil.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.util; - -import com.liferay.portal.kernel.bean.BeanPropertiesUtil; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.json.JSONException; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portlet.expando.model.ExpandoBridge; -import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil; - -import java.io.Serializable; - -import java.util.LinkedHashMap; -import java.util.Map; - -import org.apache.shindig.social.core.model.AddressImpl; -import org.apache.shindig.social.opensocial.model.Address; - -/** - * @author Brian Wing Shun Chan - */ -public class SerializerUtil { - - public static void copyProperties( - JSONObject jsonObject, Object bean, Object[] fields) - throws JSONException { - - for (Object field : fields) { - copyProperty(jsonObject, bean, field); - } - } - - public static void copyProperties( - Map map, Object bean, Object[] fields) - throws JSONException { - - for (Object field : fields) { - copyProperty(map, bean, field); - } - } - - public static void copyProperties( - Object bean, JSONObject jsonObject, Object[] fields) { - - for (Object field : fields) { - copyProperty(bean, jsonObject, field); - } - } - - public static void copyProperties( - Object bean, Map map, Object[] fields) { - - for (Object field : fields) { - copyProperty(bean, map, field); - } - } - - public static void copyProperty( - JSONObject jsonObject, Object bean, Object field) - throws JSONException { - - String fieldName = field.toString(); - - if (jsonObject.has(fieldName)) { - String value = jsonObject.getString(fieldName); - - setBeanProperty(bean, fieldName, value); - } - } - - public static void copyProperty( - Map map, Object bean, Object field) - throws JSONException { - - String fieldName = field.toString(); - - if (map.containsKey(fieldName)) { - String value = (String)map.get(fieldName); - - setBeanProperty(bean, fieldName, value); - } - } - - public static void copyProperty( - Object bean, JSONObject jsonObject, Object field) { - - String fieldName = field.toString(); - - String value = getBeanProperty(bean, fieldName); - - if (value != null) { - jsonObject.put(fieldName, value); - } - } - - public static void copyProperty( - Object bean, Map map, Object field) { - - String fieldName = field.toString(); - - String value = getBeanProperty(bean, fieldName); - - if (value != null) { - map.put(fieldName, value); - } - } - - public static Map toExpandoAttributes( - Object bean, Object[] fields, long companyId, String className) - throws PortalException { - - ExpandoBridge expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge( - companyId, className); - - for (Object field : fields) { - String fieldName = field.toString(); - - String value = BeanPropertiesUtil.getString(bean, fieldName); - - if ((value != null) && !expandoBridge.hasAttribute(fieldName)) { - expandoBridge.addAttribute(fieldName); - } - } - - Map expandoBridgeAttributes = - new LinkedHashMap(); - - copyProperties(bean, expandoBridgeAttributes, fields); - - return expandoBridgeAttributes; - } - - protected static String getBeanProperty(Object bean, String fieldName) { - Object value = BeanPropertiesUtil.getObject(bean, fieldName); - - if (value == null) { - return null; - } - - if (fieldName.equals("location")) { - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - - copyProperties(value, jsonObject, _ADDRESS_FIELDS); - - return jsonObject.toString(); - } - else { - return (String)value; - } - } - - protected static void setBeanProperty( - Object bean, String fieldName, String value) - throws JSONException { - - if (Validator.isNull(value)) { - return; - } - - if (fieldName.equals("location")) { - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(value); - - Address address = new AddressImpl(); - - copyProperties(jsonObject, address, _ADDRESS_FIELDS); - - BeanPropertiesUtil.setProperty(bean, fieldName, address); - } - else { - BeanPropertiesUtil.setProperty(bean, fieldName, value); - } - } - - private static final Address.Field[] _ADDRESS_FIELDS = { - Address.Field.COUNTRY, Address.Field.FORMATTED, Address.Field.LATITUDE, - Address.Field.LOCALITY, Address.Field.LONGITUDE, - Address.Field.POSTAL_CODE, Address.Field.PRIMARY, Address.Field.REGION, - Address.Field.STREET_ADDRESS, Address.Field.TYPE - }; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/util/ShindigUtil.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/util/ShindigUtil.java deleted file mode 100644 index 2f6f8deec7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/shindig/util/ShindigUtil.java +++ /dev/null @@ -1,489 +0,0 @@ -/** - * 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 com.liferay.opensocial.shindig.util; - -import com.google.inject.Inject; - -import com.liferay.opensocial.GadgetURLException; -import com.liferay.opensocial.model.impl.GadgetImpl; -import com.liferay.opensocial.service.GadgetLocalServiceUtil; -import com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil; -import com.liferay.opensocial.util.PortletPropsValues; -import com.liferay.portal.kernel.concurrent.ConcurrentHashSet; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.repository.model.FileEntry; -import com.liferay.portal.kernel.repository.model.Folder; -import com.liferay.portal.kernel.util.ArrayUtil; -import com.liferay.portal.kernel.util.AutoResetThreadLocal; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.HttpUtil; -import com.liferay.portal.kernel.util.ParamUtil; -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.Validator; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.kernel.uuid.PortalUUIDUtil; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.Layout; -import com.liferay.portal.model.User; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.theme.ThemeDisplay; -import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; -import com.liferay.portlet.documentlibrary.service.DLAppServiceUtil; - -import java.io.File; - -import java.util.Map; -import java.util.Set; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequest; - -import org.apache.shindig.auth.BasicSecurityToken; -import org.apache.shindig.auth.BasicSecurityTokenCodec; -import org.apache.shindig.auth.BlobCrypterSecurityToken; -import org.apache.shindig.common.crypto.BasicBlobCrypter; -import org.apache.shindig.common.crypto.BlobCrypter; -import org.apache.shindig.config.ContainerConfig; -import org.apache.shindig.gadgets.Gadget; -import org.apache.shindig.gadgets.process.ProcessingException; -import org.apache.shindig.gadgets.process.Processor; -import org.apache.shindig.gadgets.servlet.JsonRpcGadgetContext; -import org.apache.shindig.gadgets.spec.GadgetSpec; -import org.apache.shindig.gadgets.spec.ModulePrefs; -import org.apache.shindig.gadgets.spec.OAuthService; -import org.apache.shindig.gadgets.spec.OAuthSpec; -import org.apache.shindig.gadgets.spec.UserPref; - -import org.json.JSONObject; - -/** - * @author Michael Young - * @author Dennis Ju - */ -public class ShindigUtil { - - public static void clearGadgetSpecCache(String url) { - _ignoreGadgetSpecCache.add(url); - } - - public static String createSecurityToken( - String ownerId, long viewerId, String appId, String domain, - String appUrl, long moduleId, String activeUrl) - throws Exception { - - String securityToken = StringPool.BLANK; - - String securityTokenType = _containerConfig.getString( - ContainerConfig.DEFAULT_CONTAINER, "gadgets.securityTokenType"); - - if (securityTokenType.equals("secure")) { - String securityTokenKeyPath = _containerConfig.getString( - ContainerConfig.DEFAULT_CONTAINER, - "gadgets.securityTokenKeyFile"); - - File securityTokenKeyFile = new File(securityTokenKeyPath); - - BlobCrypter blobCrypter = new BasicBlobCrypter( - securityTokenKeyFile); - - BlobCrypterSecurityToken blobCrypterSecurityToken = - new BlobCrypterSecurityToken( - blobCrypter, ContainerConfig.DEFAULT_CONTAINER, domain); - - blobCrypterSecurityToken.setAppUrl(appUrl); - blobCrypterSecurityToken.setModuleId(moduleId); - blobCrypterSecurityToken.setOwnerId(ownerId); - blobCrypterSecurityToken.setViewerId(String.valueOf(viewerId)); - - securityToken = blobCrypterSecurityToken.encrypt(); - } - else if (securityTokenType.equals("insecure")) { - BasicSecurityToken basicSecurityToken = new BasicSecurityToken( - ownerId, String.valueOf(viewerId), appId, domain, appUrl, - String.valueOf(moduleId), ContainerConfig.DEFAULT_CONTAINER, - activeUrl, null); - - securityToken = _basicSecurityTokenCodec.encodeToken( - basicSecurityToken); - } - - securityToken = HttpUtil.encodeURL(securityToken); - - return securityToken; - } - - public static String getColumnUserPrefs( - String namespace, ThemeDisplay themeDisplay) { - - StringBundler sb = new StringBundler(3); - - sb.append(_COLUMN_USER_PREFS); - sb.append(namespace); - - Layout layout = themeDisplay.getLayout(); - - sb.append(layout.getPlid()); - - return sb.toString(); - } - - public static String getFileEntryURL(String portalURL, long fileEntryId) - throws PortalException, SystemException { - - FileEntry fileEntry = DLAppServiceUtil.getFileEntry(fileEntryId); - - StringBundler sb = new StringBundler(6); - - sb.append(portalURL); - sb.append(PortalUtil.getPathContext()); - sb.append("/documents/"); - sb.append(fileEntry.getRepositoryId()); - sb.append(StringPool.SLASH); - sb.append(fileEntry.getUuid()); - - return sb.toString(); - } - - public static com.liferay.opensocial.model.Gadget getGadget( - PortletPreferences portletPreferences) - throws Exception { - - String url = portletPreferences.getValue("url", StringPool.BLANK); - - if (Validator.isNull(url)) { - return null; - } - - com.liferay.opensocial.model.Gadget gadget = new GadgetImpl(); - - GadgetSpec gadgetSpec = null; - - try { - gadgetSpec = ShindigUtil.getGadgetSpec(url); - } - catch (Exception e) { - throw new GadgetURLException(e); - } - - ModulePrefs modulePrefs = gadgetSpec.getModulePrefs(); - - gadget.setName(modulePrefs.getTitle()); - gadget.setUrl(url); - - return gadget; - } - - public static com.liferay.opensocial.model.Gadget getGadget( - String portletName, long companyId) - throws Exception { - - int pos = portletName.indexOf(StringPool.UNDERLINE); - - String uuid = GetterUtil.getString(portletName.substring(pos + 1)); - - uuid = PortalUUIDUtil.fromJsSafeUuid(uuid); - - com.liferay.opensocial.model.Gadget gadget = - GadgetLocalServiceUtil.getGadget(uuid, companyId); - - return gadget; - } - - public static Folder getGadgetEditorRootFolder(long repositoryId) - throws Exception { - - Folder folder = null; - - try { - folder = DLAppServiceUtil.getFolder( - repositoryId, DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - _GADGET_EDITOR_ROOT_FOLDER_NAME); - } - catch (Exception e) { - } - - if (folder == null) { - ServiceContext serviceContext = new ServiceContext(); - - serviceContext.setGroupPermissions( - new String[] { - ActionKeys.ADD_DOCUMENT, ActionKeys.DELETE, - ActionKeys.UPDATE, ActionKeys.VIEW}); - serviceContext.setGuestPermissions(new String[] {ActionKeys.VIEW}); - - serviceContext.setScopeGroupId(repositoryId); - - folder = DLAppServiceUtil.addFolder( - repositoryId, DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, - _GADGET_EDITOR_ROOT_FOLDER_NAME, StringPool.BLANK, - serviceContext); - } - - return folder; - } - - public static GadgetSpec getGadgetSpec(String url) throws Exception { - return getGadgetSpec( - url, PortletPropsValues.SHINDIG_JS_DEBUG, - PortletPropsValues.SHINDIG_NO_CACHE); - } - - public static GadgetSpec getGadgetSpec( - String url, boolean debug, boolean ignoreCache) - throws Exception { - - if (Validator.isNull(url)) { - throw new GadgetURLException(); - } - - JSONObject gadgetContextJSONObject = new JSONObject(); - - gadgetContextJSONObject.put("debug", debug); - - if (!ignoreCache && _ignoreGadgetSpecCache.contains(url)) { - ignoreCache = true; - } - - gadgetContextJSONObject.put("ignoreCache", ignoreCache); - - JSONObject gadgetRequestJSONObject = new JSONObject(); - - gadgetRequestJSONObject.put("url", url); - - JsonRpcGadgetContext jsonRpcGadgetContext = new JsonRpcGadgetContext( - gadgetContextJSONObject, gadgetRequestJSONObject); - - Gadget gadget = null; - - try { - gadget = _processor.process(jsonRpcGadgetContext); - - _ignoreGadgetSpecCache.remove(url); - } - catch (ProcessingException pe) { - _ignoreGadgetSpecCache.add(url); - - throw new GadgetURLException(pe); - } - - return gadget.getSpec(); - } - - public static String getHost() { - return _host.get(); - } - - public static long getModuleId(String namespace) { - return namespace.hashCode(); - } - - public static Map getOAuthServices(String url) - throws Exception { - - GadgetSpec gadgetSpec = getGadgetSpec(url); - - ModulePrefs modulePrefs = gadgetSpec.getModulePrefs(); - - if (modulePrefs == null) { - return null; - } - - OAuthSpec oAuthSpec = modulePrefs.getOAuthSpec(); - - if (oAuthSpec == null) { - return null; - } - - return oAuthSpec.getServices(); - } - - public static String getOwnerId(Layout layout) - throws PortalException, SystemException { - - Group group = layout.getGroup(); - - long classPK = group.getClassPK(); - - String ownerId = "G-" + classPK; - - if (group.isUser()) { - ownerId = String.valueOf(classPK); - } - - return ownerId; - } - - public static String getPortletResourceNamespace( - PortletRequest portletRequest, ThemeDisplay themeDisplay) - throws Exception { - - String portletId = ParamUtil.getString( - portletRequest, "portletResource"); - - return PortalUtil.getPortletNamespace(portletId); - } - - public static String getScheme() { - return _scheme.get(); - } - - public static String getTableOpenSocial() { - return _TABLE_OPEN_SOCIAL; - } - - public static boolean hasUserPrefs(GadgetSpec gadgetSpec) throws Exception { - if (gadgetSpec == null) { - return false; - } - - return hasUserPrefs(gadgetSpec.getUserPrefs()); - } - - public static boolean hasUserPrefs(Map userPrefs) - throws Exception { - - if (userPrefs == null) { - return false; - } - - for (UserPref userPref : userPrefs.values()) { - if (userPref.getDataType() != UserPref.DataType.HIDDEN) { - return true; - } - } - - return false; - } - - public static boolean isContentValid(String content) { - try { - new GadgetSpec(null, content); - - return true; - } - catch (Exception e) { - } - - return false; - } - - public static boolean isValidUser(User user) { - if (user.isDefaultUser()) { - return false; - } - else { - return true; - } - } - - public static void setHost(String host) { - _host.set(host); - } - - public static void setScheme(String scheme) { - _scheme.set(scheme); - } - - public static String transformURL(String url) { - return StringUtil.replace( - url, new String[] {"%host%", "%scheme%"}, - new String[] {getHost(), getScheme()}); - } - - public static void updateOAuthConsumers( - ActionRequest actionRequest, ActionResponse actionResponse) - throws Exception { - - ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( - WebKeys.THEME_DISPLAY); - - long[] oAuthConsumerIds = ParamUtil.getLongValues( - actionRequest, "oAuthConsumerId"); - - String gadgetKey = ParamUtil.getString(actionRequest, "gadgetKey"); - String[] serviceNames = ParamUtil.getParameterValues( - actionRequest, "serviceName"); - String[] consumerKeys = ParamUtil.getParameterValues( - actionRequest, "consumerKey"); - String[] consumerSecrets = ParamUtil.getParameterValues( - actionRequest, "consumerSecret"); - String[] keyTypes = ParamUtil.getParameterValues( - actionRequest, "keyType"); - - if ((serviceNames.length == 0) && (keyTypes.length != 0)) { - serviceNames = new String[] {StringPool.BLANK}; - } - - for (int i = 0; i < serviceNames.length; i++) { - String consumerKey = (String)ArrayUtil.getValue(consumerKeys, i); - - String consumerSecret = (String)ArrayUtil.getValue( - consumerSecrets, i); - - if (Validator.isNull(consumerKey)) { - consumerKey = StringPool.BLANK; - } - - if (Validator.isNull(consumerSecret)) { - consumerSecret = StringPool.BLANK; - } - - if (oAuthConsumerIds[i] <= 0) { - OAuthConsumerLocalServiceUtil.addOAuthConsumer( - themeDisplay.getCompanyId(), gadgetKey, serviceNames[i], - consumerKey, consumerSecret, keyTypes[i]); - } - else { - OAuthConsumerLocalServiceUtil.updateOAuthConsumer( - oAuthConsumerIds[i], consumerKey, consumerSecret, - keyTypes[i], StringPool.BLANK, StringPool.BLANK); - } - } - } - - private static final String _COLUMN_USER_PREFS = "USER_PREFS_"; - - private static final String _GADGET_EDITOR_ROOT_FOLDER_NAME = - "OpenSocial Gadgets"; - - private static final String _TABLE_OPEN_SOCIAL = "OPEN_SOCIAL_DATA_"; - - @Inject - private static BasicSecurityTokenCodec _basicSecurityTokenCodec; - - @Inject - private static ContainerConfig _containerConfig; - - private static AutoResetThreadLocal _host = - new AutoResetThreadLocal( - ShindigUtil.class + "._host", StringPool.BLANK); - private static Set _ignoreGadgetSpecCache = - new ConcurrentHashSet(); - - @Inject - private static Processor _processor; - - private static AutoResetThreadLocal _scheme = - new AutoResetThreadLocal( - ShindigUtil.class + "._scheme", StringPool.BLANK); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/ActionKeys.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/ActionKeys.java deleted file mode 100644 index bf4ed4b03a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/ActionKeys.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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 com.liferay.opensocial.util; - -/** - * @author Dennis Ju - */ -public class ActionKeys - extends com.liferay.portal.security.permission.ActionKeys { - - public static final String PUBLISH_GADGET = "PUBLISH_GADGET"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/PortletPropsKeys.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/PortletPropsKeys.java deleted file mode 100644 index 396b9d0646..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/PortletPropsKeys.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * 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 com.liferay.opensocial.util; - -/** - * @author Michael Young - */ -public class PortletPropsKeys { - - public static final String PUBSUB_URI_LOAD_TIMEOUT = - "pubsub.uri.load.timeout"; - - public static final String SHINDIG_JS_DEBUG = "shindig.js.debug"; - - public static final String SHINDIG_NO_CACHE = "shindig.no.cache"; - - public static final String SHINDIG_OAUTH_CALLBACK_URL = - "shindig.oauth.callback.url"; - - public static final String SHINDIG_OAUTH_KEY_FILE_NAME = - "shindig.oauth.key.file.name"; - - public static final String SHINDIG_OAUTH_KEY_NAME = - "shindig.oauth.key.name"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/PortletPropsValues.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/PortletPropsValues.java deleted file mode 100644 index 26e52fc13a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/PortletPropsValues.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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 com.liferay.opensocial.util; - -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.util.portlet.PortletProps; - -/** - * @author Michael Young - */ -public class PortletPropsValues { - - public static final int PUBSUB_URI_LOAD_TIMEOUT = GetterUtil.getInteger( - PortletProps.get(PortletPropsKeys.PUBSUB_URI_LOAD_TIMEOUT)); - - public static final boolean SHINDIG_JS_DEBUG = GetterUtil.getBoolean( - PortletProps.get(PortletPropsKeys.SHINDIG_JS_DEBUG)); - - public static final boolean SHINDIG_NO_CACHE = GetterUtil.getBoolean( - PortletProps.get(PortletPropsKeys.SHINDIG_NO_CACHE)); - - public static final String SHINDIG_OAUTH_CALLBACK_URL = - GetterUtil.getString( - PortletProps.get(PortletPropsKeys.SHINDIG_OAUTH_CALLBACK_URL)); - - public static final String SHINDIG_OAUTH_KEY_FILE_NAME = - GetterUtil.getString( - PortletProps.get(PortletPropsKeys.SHINDIG_OAUTH_KEY_FILE_NAME)); - - public static final String SHINDIG_OAUTH_KEY_NAME = GetterUtil.getString( - PortletProps.get(PortletPropsKeys.SHINDIG_OAUTH_KEY_NAME)); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/WebKeys.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/WebKeys.java deleted file mode 100644 index b4632ea6d6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/util/WebKeys.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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 com.liferay.opensocial.util; - -/** - * @author Michael Young - */ -public class WebKeys implements com.liferay.portal.kernel.util.WebKeys { - - public static final String GADGET = "GADGET"; - - public static final String OAUTH_SERVICES = "OAUTH_SERVICES"; - - public static final String USER_PREFS = "USER_PREFS"; - - public static final String VIEW = "VIEW"; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language.properties deleted file mode 100644 index 4364f52eb7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget -add-service=Add Service -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? -busy=Busy -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. -configure-gadget=Configure Gadget -consumer-key=Consumer Key -consumer-secret=Consumer Secret -edit-service=Edit Service -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor -key-type=Key Type -manage-oauth=Manage OAuth -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry -new-folder=New Folder -publish-gadget=Publish Gadget -refresh-gadgets=Refresh Gadgets -replace=Replace -replace-with=Replace with: -request-for-resource-id-failed=Request for resource ID {0} failed. -save-the-gadget-before-previewing=Save the gadget before previewing. -save-the-gadget-before-publishing=Save the gadget before publishing. -search-for=Search for: -select-at-least-one-category=Select at least one category. -service-name=Service Name -show-url=Show URL -unable-to-access-documents=Unable to access documents. -unpublish=Unpublish -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ar.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ar.properties deleted file mode 100644 index cec8d93780..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ar.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=نشر الأداة -add-service=Ø¥Ø¶Ø§ÙØ© الخدمة -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=تهيئة الأداة ليتم عرضها ÙÙŠ هذه البورتليت . -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Ù…ÙØªØ§Ø­ مستهلك -consumer-secret=سرية المستهلك -edit-service=تعديل الخدمة -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=أداة OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=أداة التحرير OpenSocial -key-type=نوع Ø§Ù„Ù…ÙØªØ§Ø­ -manage-oauth=إدارة OAuth -model.resource.com.liferay.opensocial=الأداة النشر Ù„ OpenSocial -model.resource.com.liferay.opensocial.model.Gadget=دخول الأداة الناشر Ù„ OpenSocial -new-folder=New Folder (Automatic Copy) -publish-gadget=نشر أداة -refresh-gadgets=تحديث الادوات -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=اختر على الأقل ÙØ¦Ø© واحدة. -service-name=اسم الخدمة -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL يشير مسبقا إلى أداة . -url-does-not-point-to-a-valid-gadget=URL لا يشير إلى أداة صالحة. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_bg.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_bg.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_bg.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ca.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ca.properties deleted file mode 100644 index cf7eac7e2d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ca.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publica Giny -add-service=Afegeix Servei -are-you-sure-you-want-to-delete=Esteu segur que voleu eliminar {0}? -are-you-sure-you-want-to-unpublish-and-delete=Esteu segur que voleu anul·lar la publicació i eliminar {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Esteu segur que voleu anul·lar la publicació del gadget {0}? -busy=Ocupat -configure-a-gadget-to-be-displayed-in-this-portlet=Configura un gadget per a ser visualitzat a aquest portlet. -configure-gadget=Configura giny -consumer-key=Clau del consumidor -consumer-secret=Secret del consumidor -edit-service=Edita servei -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} no ha estat desat. Esteu segur que voleu tancar la pestanya? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=Gadget OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=Editor de Gadget OpenSocial -key-type=Tipus de clau -manage-oauth=Gestiona OAuth -model.resource.com.liferay.opensocial=Publicador del gadget de OpenSocial -model.resource.com.liferay.opensocial.model.Gadget=Entrada del publicador del gadget de OpenSocial -new-folder=Nova carpeta -publish-gadget=Publica el gadget -refresh-gadgets=Refresca els gadgets -replace=Reemplaça -replace-with=Replace with: -request-for-resource-id-failed=La sol·licitud pel recurs amb ID {0} ha fallat. -save-the-gadget-before-previewing=Desa el gadget abans de la vista prèvia. -save-the-gadget-before-publishing=Desa el gadget abans de publicar. -search-for=Cerca per: -select-at-least-one-category=Seleccioneu almenys una categoria. -service-name=Nom del servei -show-url=Mostra l'URL -unable-to-access-documents=No és possible accedir als documents. -unpublish=Anul·lar publicació -url-already-points-to-an-existing-gadget=L'URL apunta a un gadget ja existent. -url-does-not-point-to-a-valid-gadget=L'URL no apunta a un gadget vàlid. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_cs.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_cs.properties deleted file mode 100644 index 7938ffef28..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_cs.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publikovat gadget -add-service=PÅ™idat službu -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Nastavit gadget, který má být zobrazen v tomto portletu. -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Zákaznický klÃ­Ä -consumer-secret=Zákaznický utajený klÃ­Ä -edit-service=Upravit službu -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial gadget -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial gadget editor -key-type=Typ klíÄe -manage-oauth=Spravovat OAuth -model.resource.com.liferay.opensocial=Vydavatel gadgetu -model.resource.com.liferay.opensocial.model.Gadget=Záznam o vydavateli gadgetu -new-folder=New Folder (Automatic Copy) -publish-gadget=Publikovat gadget -refresh-gadgets=Obnovit gadgety -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Vyberte nejménÄ› jednu kategorii. -service-name=Název služby -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL adresa ukazuje na existující gadget. -url-does-not-point-to-a-valid-gadget=URL adresa neukazuje na validní gadget. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_da.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_da.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_da.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_de.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_de.properties deleted file mode 100644 index acd5fdebe8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_de.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Gadget veröffentlichen -add-service=Service hinzufügen -are-you-sure-you-want-to-delete=Sind Sie sicher, dass Sie {0} löschen möchten? -are-you-sure-you-want-to-unpublish-and-delete=Sind Sie sicher, dass Sie {0} depublizieren und löschen möchten? -are-you-sure-you-want-to-unpublish-the-gadget=Sind Sie sicher, dass Sie das Gadget {0} depublizieren möchten? -busy=Beschäftigt -configure-a-gadget-to-be-displayed-in-this-portlet=Ein Gadget konfigurieren, das in diesem Portlet angezeigt werden soll. -configure-gadget=Gadget konfigurieren -consumer-key=Consumer Key -consumer-secret=Consumer Secret -edit-service=Service bearbeiten -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} wurde nicht gespeichert. Sind Sie sicher, dass Sie den Tab schließen möchten? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor -key-type=Schlüsselart -manage-oauth=OAuth verwalten -model.resource.com.liferay.opensocial=OpenSocial -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget -new-folder=Neuer Ordner -publish-gadget=Gadget publizieren -refresh-gadgets=Gadgets aktualisieren -replace=Ersetzen -replace-with=Replace with: -request-for-resource-id-failed=Anfrage von Resource-ID {0} ist fehlgeschlagen. -save-the-gadget-before-previewing=Speichern Sie das Gadget vor dem Anzeigen der Vorschau. -save-the-gadget-before-publishing=Speichern Sie das Gadget vor der Publikation. -search-for=Suche nach: -select-at-least-one-category=Es muss mindestens eine Kategorie ausgewählt sein. -service-name=Name des Services -show-url=URL anzeigen -unable-to-access-documents=Auf Dokumente kann nicht zugegriffen werden. -unpublish=Depublizieren -url-already-points-to-an-existing-gadget=Die URL verweist auf ein bereits vorhandenes Gadget. -url-does-not-point-to-a-valid-gadget=Die URL verweist auf ein nicht gültiges Gadget. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_el.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_el.properties deleted file mode 100644 index 929b065375..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_el.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=ΔημοσιεÏστε τη συσκευή (Automatic Translation) -add-service=ΠÏοσθέστε την υπηÏεσία (Automatic Translation) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Απασχολημένο (Automatic Translation) -configure-a-gadget-to-be-displayed-in-this-portlet=ΔιαμοÏφώστε μια συσκευή που επιδεικνÏεται σε αυτό το portlet. (Automatic Translation) -configure-gadget=ΔιαμοÏφώσετε το Gadget (Automatic Translation) -consumer-key=Καταναλωτικό κλειδί (Automatic Translation) -consumer-secret=Καταναλωτικό μυστικό (Automatic Translation) -edit-service=Εκδώστε την υπηÏεσία (Automatic Translation) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=Συσκευή OpenSocial (Automatic Translation) -javax.portlet.title.4_WAR_opensocialportlet=Συντάκτης συσκευών OpenSocial (Automatic Translation) -key-type=Βασικός Ï„Ïπος (Automatic Translation) -manage-oauth=ΔιαχειÏιστείτε OAuth (Automatic Translation) -model.resource.com.liferay.opensocial=Εκδότης συσκευών OpenSocial (Automatic Translation) -model.resource.com.liferay.opensocial.model.Gadget=Είσοδος εκδοτών συσκευών OpenSocial (Automatic Translation) -new-folder=Îέο φάκελο (Automatic Translation) -publish-gadget=ΔημοσιεÏστε τη συσκευή (Automatic Translation) -refresh-gadgets=Αναζωογονήστε τις συσκευές (Automatic Translation) -replace=Αντικατάσταση (Automatic Translation) -replace-with=Αντικατάσταση με: (Automatic Translation) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=ΑποθηκεÏσετε το gadget Ï€Ïιν από την Ï€Ïοεπισκόπηση. (Automatic Translation) -save-the-gadget-before-publishing=ΑποθηκεÏσετε το gadget Ï€Ïιν τη δημοσίευση. (Automatic Translation) -search-for=Αναζήτηση για: (Automatic Translation) -select-at-least-one-category=Επιλέξτε τουλάχιστον μια κατηγοÏία. (Automatic Translation) -service-name=Όνομα υπηÏεσιών (Automatic Translation) -show-url=Εμφάνιση URL (Automatic Translation) -unable-to-access-documents=Δεν είναι δυνατή η Ï€Ïόσβαση σε έγγÏαφα. (Automatic Translation) -unpublish=ΚατάÏγηση δημοσίευσης (Automatic Translation) -url-already-points-to-an-existing-gadget=URL δείχνει ήδη μια υπάÏχουσα συσκευή. (Automatic Translation) -url-does-not-point-to-a-valid-gadget=URL δεν δείχνει μια έγκυÏη συσκευή. (Automatic Translation) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_en.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_en.properties deleted file mode 100644 index 4364f52eb7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_en.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget -add-service=Add Service -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? -busy=Busy -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. -configure-gadget=Configure Gadget -consumer-key=Consumer Key -consumer-secret=Consumer Secret -edit-service=Edit Service -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor -key-type=Key Type -manage-oauth=Manage OAuth -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry -new-folder=New Folder -publish-gadget=Publish Gadget -refresh-gadgets=Refresh Gadgets -replace=Replace -replace-with=Replace with: -request-for-resource-id-failed=Request for resource ID {0} failed. -save-the-gadget-before-previewing=Save the gadget before previewing. -save-the-gadget-before-publishing=Save the gadget before publishing. -search-for=Search for: -select-at-least-one-category=Select at least one category. -service-name=Service Name -show-url=Show URL -unable-to-access-documents=Unable to access documents. -unpublish=Unpublish -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_es.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_es.properties deleted file mode 100644 index cadebfb3cd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_es.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publicar Gadget -add-service=Añadir servicio -are-you-sure-you-want-to-delete=¿Está seguro de que desea eliminar {0}? -are-you-sure-you-want-to-unpublish-and-delete=¿Está seguro de que desea dejar de publicar y eliminar {0}? -are-you-sure-you-want-to-unpublish-the-gadget=¿Está seguro de que desea dejar de publicar y eliminar el gadget {0}? -busy=Ocupado -configure-a-gadget-to-be-displayed-in-this-portlet=Configure un gadget para ser mostrado en este portlet. -configure-gadget=Configurar Gadget -consumer-key=Clave del consumidor -consumer-secret=Secreto del consumidor -edit-service=Editar servicio -has-not-been-saved-are-you-sure-you-want-to-close-the-tab=No se ha guardado {0}. ¿Está seguro de que desea cerrar la pestaña? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=Gadget OpenSocial (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=Gadget de OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=Editor de gadgets de Opensocial -key-type=Tipo de clave -manage-oauth=Gestionar OAuth -model.resource.com.liferay.opensocial=Publicador de OpenSocial Gadget -model.resource.com.liferay.opensocial.model.Gadget=Gadget -new-folder=Nueva carpeta -publish-gadget=Publicar el gadget -refresh-gadgets=Refrescar Gadgets -replace=Reemplazar -replace-with=Replace with: -request-for-resource-id-failed=Falló la solicitud del ID de recurso {0}. -save-the-gadget-before-previewing=Guardar el gadget antes de previsualizar. -save-the-gadget-before-publishing=Guardar el gadget antes de publicar. -search-for=Buscar por: -select-at-least-one-category=Seleccione al menos una categoría. -service-name=Nombre del servicio -show-url=Mostrar URL -unable-to-access-documents=No es posible acceder a los documentos. -unpublish=Quitar publicación -url-already-points-to-an-existing-gadget=La URL apunta a un gadget ya existente. -url-does-not-point-to-a-valid-gadget=La URL no apunta a un gadget válido. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_et.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_et.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_et.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_eu.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_eu.properties deleted file mode 100644 index f84246b907..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_eu.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Gadgeta Publikatu -add-service=Zerbitzua Gehitu -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Gadgeta portlet honetan bistaratzeko konfiguratu. -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Kontsumitzaile Gakoa -consumer-secret=Kontsumitzaile Isilekoa -edit-service=Zerbitzua Editatu -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadgeta -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editorea -key-type=Gako Mota -manage-oauth=OAuth Kudeatu -model.resource.com.liferay.opensocial=OpenSocial Gadgetaren Argitaratzailea -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadgetaren Argitaratzaile Sarrera -new-folder=New Folder (Automatic Copy) -publish-gadget=Gadgeta Publikatu -refresh-gadgets=Freskatu Gadgetak -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Gutxienez kategoria bat hautatu. -service-name=Zerbitzu Izena -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URLak existitzen den gadget batetara apuntatzen du. -url-does-not-point-to-a-valid-gadget=URLak ez du baliozko gadget batetara apuntatzen. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fa.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fa.properties deleted file mode 100644 index 3b489370c7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fa.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=انتشار ابزار -add-service=Ø§ÙØ²ÙˆØ¯Ù† سرویس -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=انجام تنظیمات مربوط به یک ابزار برای نمایش در این پورتلت -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=کلید مصرÙ‌کننده -consumer-secret=اسرار مصرÙ‌کننده -edit-service=ویرایش سرویس -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=ابزار اجنماع باز -javax.portlet.title.4_WAR_opensocialportlet=ویرایشگر ابزار اجتماع باز -key-type=نوع کلید -manage-oauth=مدیریت تایید -model.resource.com.liferay.opensocial=اجتماع باز -model.resource.com.liferay.opensocial.model.Gadget=ابزار -new-folder=New Folder (Automatic Copy) -publish-gadget=انتشار ابزار -refresh-gadgets=تازه‌سازی ابزارها -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=دست‌کم یک گروه را انتخاب نمایید. -service-name=نام سرویس -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=این آدرس مربوط به یک ابزار می‌باشد. -url-does-not-point-to-a-valid-gadget=آدرس مربوط به یک ابزار صحیح نمی‌باشد. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fi.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fi.properties deleted file mode 100644 index 9fde9714b1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fi.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Julkaise gadgetti -add-service=Lisää palvelu -are-you-sure-you-want-to-delete=Haluatko varmasti poistaa {0}? -are-you-sure-you-want-to-unpublish-and-delete=Oletko varma, että haluat perua julkaisun ja poistaa {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Oletko varma, että haluat perua gadgetin {0} julkaisun? -busy=Varattu -configure-a-gadget-to-be-displayed-in-this-portlet=Aseta gadget näytettäväksi tässä portletissa. -configure-gadget=Määrittele Gadget -consumer-key=Kuluttajan avain -consumer-secret=Kuluttajan salaisuus -edit-service=Muokkaa palvelua -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} ei ole tallennettu. Oletko varma, että haluat sulkea välilehden? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial gadgetti -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial gadget editori -key-type=Avaimen tyyppi -manage-oauth=Hallinnoi OAuth -model.resource.com.liferay.opensocial=OpenSocial Gadget julkaisija -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadgetin julkaisijan merkintä -new-folder=Uusi kansio -publish-gadget=Julkaise gadgetti -refresh-gadgets=Päivitä Gadgetit -replace=Korvaa -replace-with=Replace with: -request-for-resource-id-failed=Resurssi ID pyyntö {0} epäonnistui. -save-the-gadget-before-previewing=Tallenna gadget ennen esikatselua. -save-the-gadget-before-publishing=Tallenna gadget ennen julkaisua. -search-for=Hae: -select-at-least-one-category=Valitse ainakin yksi kategoria. -service-name=Palvelun nimi -show-url=Näytä URL-osoite -unable-to-access-documents=Ei pääsyä asiakirjoihin. -unpublish=Peru julkaisu -url-already-points-to-an-existing-gadget=URL osoittaa jo olemassa olevaan gadgettiin. -url-does-not-point-to-a-valid-gadget=URL ei osoita pätevään gadgettiin. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr.properties deleted file mode 100644 index 94a11dac28..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publier le Gadget -add-service=Ajouter un service -are-you-sure-you-want-to-delete=Etes vous sûr de vouloir supprimer {0}? -are-you-sure-you-want-to-unpublish-and-delete=Etes vous sûr de vouloir dépublier et supprimer {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Etes vous sûr de vouloir dépublier le gadget {0}? -busy=Occupé(e) -configure-a-gadget-to-be-displayed-in-this-portlet=Configurez un gadget qui sera affiché dans ce portlet. -configure-gadget=Configurer Gadget -consumer-key=Clef du consommateur -consumer-secret=Clef secrète du consommateur -edit-service=Editer le service -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} n'a pas été sauvegardé. Etes-vous sûr de vouloir fermer cet onglet? -javax.portlet.title.1_WAR_opensocialportlet=Admin OpenSocial -javax.portlet.title.2_WAR_opensocialportlet=Gadget OpenSocial -javax.portlet.title.3_WAR_opensocialportlet=Gadget OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=Editeur de Gadget OpenSocial -key-type=Type de clé -manage-oauth=Configurer OAuth -model.resource.com.liferay.opensocial=Éditeur d'OpenSocial -model.resource.com.liferay.opensocial.model.Gadget=Gadget -new-folder=Nouveau dossier -publish-gadget=Publier le Gadget -refresh-gadgets=Actualiser les gadgets -replace=Remplacer -replace-with=Replace with: -request-for-resource-id-failed=Requête pour l'ID de la ressource {0} a échoué. -save-the-gadget-before-previewing=Sauvegarder le gadget avant de prévisualiser. -save-the-gadget-before-publishing=Sauvegarder le gadget avant de publier. -search-for=Rechercher pour: -select-at-least-one-category=Choisissez au moins une catégorie. -service-name=Nom du Service -show-url=Voir l'URL -unable-to-access-documents=Impossible d'accéder aux documents. -unpublish=Dépublier -url-already-points-to-an-existing-gadget=L'URL pointe déjà sur un Gadget existant. -url-does-not-point-to-a-valid-gadget=L'URL ne pointe pas sur un Gadget valide. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr_CA.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_fr_CA.properties deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_gl.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_gl.properties deleted file mode 100644 index c477f2ad08..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_gl.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publicar gadget -add-service=Engadir servizo -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configurar un gadget para ser mostrado neste portlet. -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Clave do consumidor -consumer-secret=Segredo do consumidor -edit-service=Editar servizo -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=Editor de OpenSocial Gadget -key-type=Tipo de clave -manage-oauth=Xestionar OAuth -model.resource.com.liferay.opensocial=Gadget OpenSocial Publicador -model.resource.com.liferay.opensocial.model.Gadget=Gadget OpenSocial Publicador de entradas -new-folder=New Folder (Automatic Copy) -publish-gadget=Publicar gadget -refresh-gadgets=Actualizar Gadgets -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Seleccione polo menos unha categoría. -service-name=Nome do servizo -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=O URL apunta a un gadget que xa existe. -url-does-not-point-to-a-valid-gadget=O URL non apunto a un gadget válido. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hi_IN.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hi_IN.properties deleted file mode 100644 index 938a52cc1e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hi_IN.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=वà¥à¤¯à¤¸à¥à¤¤ (Automatic Translation) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=गैजेट को कॉनà¥à¤«à¤¼à¤¿à¤—र करें (Automatic Translation) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial वà¥à¤¯à¤µà¤¸à¥à¤¥à¤¾à¤ªà¤• (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial गैजेट (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=नया फ़ोलà¥à¤¡à¤° (Automatic Translation) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=की जगह (Automatic Translation) -replace-with=साथ बदलें: (Automatic Translation) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=गैजेट का पूरà¥à¤µà¤¾à¤µà¤²à¥‹à¤•न करने से पहले सहेजें। (Automatic Translation) -save-the-gadget-before-publishing=गैजेट के पà¥à¤°à¤•ाशन से पहले सहेजें। (Automatic Translation) -search-for=के लिठखोजें: (Automatic Translation) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=URL दिखाà¤à¤ (Automatic Translation) -unable-to-access-documents=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼à¥‹à¤‚ तक पहà¥à¤à¤šà¤¨à¥‡ में असमरà¥à¤¥à¥¤ (Automatic Translation) -unpublish=अपà¥à¤°à¤•ाशित करें (Automatic Translation) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hr.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hr.properties deleted file mode 100644 index f85bad4864..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hr.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Objavi Gadget -add-service=Dodaj Servis -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Konfiguriraj gadget za prikaz u ovom portletu. -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=PotroÅ¡aÄev KljuÄ -consumer-secret=PotroÅ¡aÄeva tajna -edit-service=Izmjeni Servis -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial urednik -key-type=Tip kljuÄa -manage-oauth=Upravljanje s OAuth -model.resource.com.liferay.opensocial=OpenSocial Gadget objavitelj -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget stavka objavitelja -new-folder=New Folder (Automatic Copy) -publish-gadget=Objavi Gadget -refresh-gadgets=Osvježi gadgete -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Odaberite bar jednu kategoriju. -service-name=Naziv usluge -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL već pokazuje na postojeći gadget. -url-does-not-point-to-a-valid-gadget=URL ne pokazuje na ispravni gadget. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hu.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hu.properties deleted file mode 100644 index af6fe0db97..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_hu.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Kütyü közzététele -add-service=Szolgáltatás hozzáadása -are-you-sure-you-want-to-delete=Biztos, hogy törölni akarod ezt: {0}? -are-you-sure-you-want-to-unpublish-and-delete=Biztos, hogy vissza akarod vonni a publikációját és törölni akarod ezt: {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Biztos, hogy vissza akarod vonni a publikációját ennek a kütyünek: {0}? -busy=Elfoglalt -configure-a-gadget-to-be-displayed-in-this-portlet=Egy kütyü beállítása a portletben való megjelenítéshez. -configure-gadget=Kütyü konfigurálása -consumer-key=Fogyasztói kulcs -consumer-secret=Fogyasztói titok -edit-service=Szolgáltatás szerkesztése -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} még nem lett elmentve. Biztos, hogy be akarod zárni a fület? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial kütyü -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial kütyüszerkesztÅ‘ -key-type=Kulcstípus -manage-oauth=OAuth kezelése -model.resource.com.liferay.opensocial=Nyílt közösségi kütyü megjelenítÅ‘ -model.resource.com.liferay.opensocial.model.Gadget=Nyílt közösségi kütyü megjelenítÅ‘ bejegyzés -new-folder=Új mappa -publish-gadget=Kütyü közzététele -refresh-gadgets=Kütyük frissítése -replace=Csere -replace-with=Replace with: -request-for-resource-id-failed=A(z) {0} erÅ‘forrás azonosítóra vonatkozó kérés sikertelen. -save-the-gadget-before-previewing=Mentsd el a kütyüt az elÅ‘nézet elÅ‘tt. -save-the-gadget-before-publishing=Mentsd el a kütyüt a publikálás elÅ‘tt. -search-for=Keresés erre: -select-at-least-one-category=Legalább egy kategóriát kell választani. -service-name=Szolgáltatás neve -show-url=URL megmutatása -unable-to-access-documents=A dokumentumok nem hozzáférhetÅ‘ek. -unpublish=Publikáció visszavonása -url-already-points-to-an-existing-gadget=Az URL már egy létezÅ‘ kütyüre mutat. -url-does-not-point-to-a-valid-gadget=Az URL nem egy érvényes kütyüre mutat. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_in.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_in.properties deleted file mode 100644 index b539a8b5ba..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_in.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publikasikan Gadget -add-service=Tambahkan Layanan -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Konfigurasi Gadget agar ditampilkan dalam portlet ini -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Kunci Konsumen -consumer-secret=Rahasia Konsumen -edit-service=Edit Layanan -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=Gadget OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=Editor Gadget OpenSocial -key-type=Jenis Kunci -manage-oauth=Mengelola OAuth -model.resource.com.liferay.opensocial=OpenSocial Penerbit Gadget -model.resource.com.liferay.opensocial.model.Gadget=Gadget OpenSocial Penerbit Entri -new-folder=New Folder (Automatic Copy) -publish-gadget=Publikasikan Gadget -refresh-gadgets=Menyegarkan Gadgets -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Pilih minimal satu kategori. -service-name=Nama Layanan -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL sudah menunjuk ke suatu gadget yang ada. -url-does-not-point-to-a-valid-gadget=URL tidak menunjuk ke sebuah gadget yang valid. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_it.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_it.properties deleted file mode 100644 index e35c3b80cb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_it.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Pubblica Gadget -add-service=Aggiungi Servizio -are-you-sure-you-want-to-delete=Sei sicuro di voler cancellare {0}? -are-you-sure-you-want-to-unpublish-and-delete=Sei sicuro di voler depubblicare e cancellare {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Sei sicuro di voler depubblicare il gadget {0}? -busy=Occupato -configure-a-gadget-to-be-displayed-in-this-portlet=Configura un gadget da visualizzare in questa portlet. -configure-gadget=Configura Gadget -consumer-key=Chiave del Consumer -consumer-secret=Password del Consumer -edit-service=Modifica Servizio -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} non è stato salvato. Sei sicuro di voler chiudere questo tab? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=Editor OpenSocial Gadget -key-type=Tipo Chiave -manage-oauth=Gestisci OAuth -model.resource.com.liferay.opensocial=Pubblicatore OpenSocial Gadget -model.resource.com.liferay.opensocial.model.Gadget=Opensocial Gadget Pubblicato -new-folder=Nuova Cartella -publish-gadget=Pubblica Gadget -refresh-gadgets=Aggiorna Gadgets -replace=Sostituisci -replace-with=Replace with: -request-for-resource-id-failed=Richiesta per la risorsa con ID {0} fallita. -save-the-gadget-before-previewing=Salva il gadget prima dell'anteprima. -save-the-gadget-before-publishing=Salva il gadget prima di pubblicarlo. -search-for=Cerca per: -select-at-least-one-category=Seleziona almeno una categoria. -service-name=Nome del Servizio -show-url=Mostra URL -unable-to-access-documents=Impossibile accedere ai documenti. -unpublish=Annulla pubblicazione -url-already-points-to-an-existing-gadget=L'URL punta a un gadget già esistente. -url-does-not-point-to-a-valid-gadget=L'URL non punta a un gadget valido. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_iw.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_iw.properties deleted file mode 100644 index 55c69baba9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_iw.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=×¤×¨×¡× ×”×ª×§×Ÿ -add-service=הוסף שירות -are-you-sure-you-want-to-delete=×”×× ×תה בטוחה שברצונך למחוק ×ת {0}? -are-you-sure-you-want-to-unpublish-and-delete=×”×× ×תה בטוח שברצונך לבטל ×ת פרסומו של {0} ולמחוק ×ותו? -are-you-sure-you-want-to-unpublish-the-gadget=×”×× ×תה בטוח שברצונך למחוק ×ת התקן {0}? -busy=עסוק -configure-a-gadget-to-be-displayed-in-this-portlet=הגדר התקן שיוצג בפורטלט ×–×”. -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=מפתח צרכן -consumer-secret=סוד צרכן -edit-service=ערוך שירות -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} ×œ× × ×©×ž×¨. ×”×× ×תה בטוח שברצונך לסגור לשונית זו? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=התקן OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=עורך התקן OpenSocial -key-type=סוג מפתח -manage-oauth=נהל OAuth -model.resource.com.liferay.opensocial=×ž×¤×¨×¡× ×”×ª×§×Ÿ OpenSocial -model.resource.com.liferay.opensocial.model.Gadget=רשומה של ×ž×¤×¨×¡× ×”×ª×§×Ÿ OpenSocial -new-folder=תיקייה חדשה -publish-gadget=×¤×¨×¡× ×”×ª×§×Ÿ -refresh-gadgets=רענן ×”×ª×§× ×™× -replace=החלף -replace-with=Replace with: -request-for-resource-id-failed=הבקשה לזיהוי מש×ב {0} נכשלה. -save-the-gadget-before-previewing=שמור ×ת ההתקן לפני הצגה מקדימה. -save-the-gadget-before-publishing=שמור ×ת ההתקן לפני פרסו×. -search-for=חפש ×ת: -select-at-least-one-category=בחר קטגוריה ×חת לפחות. -service-name=×©× ×©×™×¨×•×ª -show-url=הצג כתובת ×תר -unable-to-access-documents=×œ× × ×™×ª×Ÿ לגשת למסמכי×. -unpublish=בטל ×¤×¨×¡×•× -url-already-points-to-an-existing-gadget=כתובת ×”×תר מפנה כבר להתקן ×§×™×™×. -url-does-not-point-to-a-valid-gadget=כתובת ×”×תר ××™× ×” מפנה להתקן תקף. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ja.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ja.properties deleted file mode 100644 index 73cfdb807b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ja.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=ガジェットを公開ã™ã‚‹ -add-service=サービスã®è¿½åŠ  -are-you-sure-you-want-to-delete={0}を削除ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ -are-you-sure-you-want-to-unpublish-and-delete={0}を削除ã—ã¦éžå…¬é–‹ã«ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ -are-you-sure-you-want-to-unpublish-the-gadget=ガジェット{0}ã‚’éžå…¬é–‹ã«ã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ -busy=処ç†ä¸­ -configure-a-gadget-to-be-displayed-in-this-portlet=ãƒãƒ¼ãƒˆãƒ¬ãƒƒãƒˆã«è¡¨ç¤ºã™ã‚‹ã‚¬ã‚¸ã‚§ãƒƒãƒˆã®è¨­å®š -configure-gadget=ガジェットã®è¨­å®š -consumer-key=Consumer Key -consumer-secret=Consumer Secret -edit-service=サービスã®ç·¨é›† -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0}ã¯ä¿å­˜ã•れã¦ã„ã¾ã›ã‚“。タブを閉ã˜ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial 管ç†è€… (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial ガジェット (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocialガジェット -javax.portlet.title.4_WAR_opensocialportlet=OpenSocialガジェットエディタ -key-type=キータイプ -manage-oauth=OAuthã®ç®¡ç† -model.resource.com.liferay.opensocial=OpenSocial Gadget パブリッシャー -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadgetパブリッシャーã®ã‚¨ãƒ³ãƒˆãƒª -new-folder=æ–°è¦ãƒ•ォルダ -publish-gadget=ガジェットã®å…¬é–‹ -refresh-gadgets=ガジェットを更新 -replace=ç½®æ› -replace-with=Replace with: -request-for-resource-id-failed=リソースID {0}ã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒå¤±æ•—ã—ã¾ã—㟠-save-the-gadget-before-previewing=プレビューå‰ã«ã‚¬ã‚¸ã‚§ãƒƒãƒˆã‚’ä¿å­˜ã™ã‚‹ -save-the-gadget-before-publishing=公開å‰ã«ã‚¬ã‚¸ã‚§ãƒƒãƒˆã‚’ä¿å­˜ã™ã‚‹ -search-for=検索 : -select-at-least-one-category=å°‘ãªãã¨ã‚‚1ã‚«ãƒ†ã‚´ãƒªã‚’é¸æŠžã—ã¦ãã ã•ã„。 -service-name=サービスå -show-url=URLを表示 -unable-to-access-documents=ドキュメントã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“ -unpublish=公開をå–り消㙠-url-already-points-to-an-existing-gadget=URLãŒã™ã§ã«å­˜åœ¨ã™ã‚‹ã‚¬ã‚¸ã‚§ãƒƒãƒˆã‚’指ã—ã¦ã„ã¾ã™ã€‚ -url-does-not-point-to-a-valid-gadget=URLãŒæœ‰åйãªã‚¬ã‚¸ã‚§ãƒƒãƒˆã‚’指ã—ã¦ã„ã¾ã›ã‚“。 \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ko.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ko.properties deleted file mode 100644 index 2815b5b235..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ko.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=ë¶€ì†í’ˆì„ 간행하십시오 (Automatic Translation) -add-service=서비스를 추가하십시오 (Automatic Translation) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=ì•½ì† ì—†ìŒ (Automatic Translation) -configure-a-gadget-to-be-displayed-in-this-portlet=ë¶€ì†í’ˆì„ ì´ portletì—서 표시ë˜ê¸° 위하여 형성하십시오. (Automatic Translation) -configure-gadget=가젯 구성 (Automatic Translation) -consumer-key=ì†Œë¹„ìž ì—´ì‡  (Automatic Translation) -consumer-secret=ì†Œë¹„ìž ë¹„ë°€ (Automatic Translation) -edit-service=서비스를 편집하십시오 (Automatic Translation) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=오픈 소셜 ê´€ë¦¬ìž (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=오픈 소셜 가젯 (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial ë¶€ì†í’ˆ (Automatic Translation) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial ë¶€ì†í’ˆ íŽ¸ì§‘ìž (Automatic Translation) -key-type=중요한 유형 (Automatic Translation) -manage-oauth=OAuth를 처리하십시오 (Automatic Translation) -model.resource.com.liferay.opensocial=OpenSocial ë¶€ì†í’ˆ ë°œí–‰ì¸ (Automatic Translation) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial ë¶€ì†í’ˆ ë°œí–‰ì¸ ìž…ìž¥ (Automatic Translation) -new-folder=새 í´ë” (Automatic Translation) -publish-gadget=ë¶€ì†í’ˆì„ 간행하십시오 (Automatic Translation) -refresh-gadgets=ë¶€ì†í’ˆì„ ìƒì¾Œí•˜ê²Œ 하십시오 (Automatic Translation) -replace=바꾸기 (Automatic Translation) -replace-with=으로 바꿉니다. (Automatic Translation) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=미리 보기 ì „ì— ë„구를 저장 합니다. (Automatic Translation) -save-the-gadget-before-publishing=ê°€ì ¯ì„ ê²Œì‹œ 하기 ì „ì— ì €ìž¥ 합니다. (Automatic Translation) -search-for=검색: (Automatic Translation) -select-at-least-one-category=ì ì–´ë„ 1ê°œì˜ ì¢…ë¥˜ë¥¼ 선정하십시오. (Automatic Translation) -service-name=서비스 ì´ë¦„ (Automatic Translation) -show-url=표시 URL (Automatic Translation) -unable-to-access-documents=ë¬¸ì„œì— ì•¡ì„¸ìŠ¤í•  수 없습니다. (Automatic Translation) -unpublish=게시 취소 (Automatic Translation) -url-already-points-to-an-existing-gadget=URL는 기존하는 ë¶€ì†í’ˆì„ ì´ë¯¸ 가르킨다. (Automatic Translation) -url-does-not-point-to-a-valid-gadget=URL는 유효한 ë¶€ì†í’ˆì„ 가르키지 않는다. (Automatic Translation) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lo.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lo.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lo.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lt.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lt.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_lt.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nb.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nb.properties deleted file mode 100644 index 8ec2b71baf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nb.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publiser dings -add-service=Legg til tjeneste -are-you-sure-you-want-to-delete=Er du sikker pÃ¥ at du ønsker Ã¥ slette {0}? -are-you-sure-you-want-to-unpublish-and-delete=Er du sikker pÃ¥ at du ønsker Ã¥ avpublisere og slette {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Er du sikker pÃ¥ at du ønsker Ã¥ avpublisere dingsen {0}? -busy=Opptatt -configure-a-gadget-to-be-displayed-in-this-portlet=Konfigurer en dings som skal vises i dette portletet. -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Forbrukernøkkel -consumer-secret=Forbrukerhemmelighet -edit-service=Legg til tjeneste -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} er ikke blitt lagret. Er du sikker pÃ¥ at du ønsker Ã¥ lukke tab-en? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial dings -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial dings-editor -key-type=Nøkkeltype -manage-oauth=Administrer OAuth -model.resource.com.liferay.opensocial=OpenSocial dingsutgiver -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Dings publiseringsinnlegg -new-folder=Ny mappe -publish-gadget=Publiser dings -refresh-gadgets=Oppfrisk dings -replace=Erstatt -replace-with=Replace with: -request-for-resource-id-failed=Forespørsel for ressurs-ID {0} feilet. -save-the-gadget-before-previewing=Lagre dingsen før forhÃ¥ndsvisning. -save-the-gadget-before-publishing=Lagre dingsen før publisering. -search-for=Søk etter: -select-at-least-one-category=Velg minst en kategori. -service-name=Tjenestenavn -show-url=Vis URL -unable-to-access-documents=FÃ¥r ikke tilgang til dokumenter. -unpublish=Avpubliser -url-already-points-to-an-existing-gadget=URL peker allerede til en eksisterende dings. -url-does-not-point-to-a-valid-gadget=URL peker ikke til en gyldig dings. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl.properties deleted file mode 100644 index fcd85f5d5f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Gadget publiceren -add-service=Service toevoegen -are-you-sure-you-want-to-delete=Weet u zeker dat u {0} wilt verwijderen? -are-you-sure-you-want-to-unpublish-and-delete=Weet u zeker dat u {0} niet meer wilt publiceren en verwijderen? -are-you-sure-you-want-to-unpublish-the-gadget=Weet u zeker dat u gadget {0} niet meer wilt publiceren? -busy=Bezig -configure-a-gadget-to-be-displayed-in-this-portlet=Een gadget configureren voor weergave in deze portlet. -configure-gadget=Gadget configureren -consumer-key=Consumersleutel -consumer-secret=Consumergeheim -edit-service=Service bewerken -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} is niet opgeslagen. Weet u zeker dat u het tabblad wilt sluiten? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Beheerder -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor -key-type=Sleuteltype -manage-oauth=OAuth beheren -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher invoer -new-folder=Nieuwe map -publish-gadget=Gadget publiceren -refresh-gadgets=Gadgets verversen -replace=Vervangen -replace-with=Replace with: -request-for-resource-id-failed=Het verzoek om resource-ID {0} was niet succesvol. -save-the-gadget-before-previewing=Sla de gadget op voordat u previewt. -save-the-gadget-before-publishing=Sla de gadget op voordat u publiceert. -search-for=Zoeken naar: -select-at-least-one-category=Selecteer minstens een categorie. -service-name=Servicenaam -show-url=URL tonen -unable-to-access-documents=Het is niet mogelijk om toegang te krijgen tot de documenten. -unpublish=Publicatie ongedaan maken -url-already-points-to-an-existing-gadget=De URL verwijst al naar een bestaande gadget. -url-does-not-point-to-a-valid-gadget=De URL verwijst niet naar een geldige gadget \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl_BE.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl_BE.properties deleted file mode 100644 index 84654f0552..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_nl_BE.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Druk (Automatic Translation) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configureren van Gadget (Automatic Translation) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=De Uitgever van het Gadget van OpenSocial (Automatic Translation) -model.resource.com.liferay.opensocial.model.Gadget=De Ingang van de Uitgever van het Gadget van OpenSocial (Automatic Translation) -new-folder=Nieuwe map (Automatic Translation) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Verfris Gadgets (Automatic Translation) -replace=Vervangen (Automatic Translation) -replace-with=Vervangen door: (Automatic Translation) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Sla de gadget vooraleer previewing. (Automatic Translation) -save-the-gadget-before-publishing=Sla de gadget voordat u gaat publiceren. (Automatic Translation) -search-for=Zoek naar: (Automatic Translation) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Toon URL (Automatic Translation) -unable-to-access-documents=Geen toegang tot documenten. (Automatic Translation) -unpublish=Publicatie ongedaan maken (Automatic Translation) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pl.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pl.properties deleted file mode 100644 index 0cb28f8748..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pl.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publikuj gadżet -add-service=Dodaj usÅ‚ugÄ™ -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Skonfiguruj gadżet aby byÅ‚ wyÅ›wietlany w tym portlecie. -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Klucz klienta -consumer-secret=Consumer Secret -edit-service=Edytuj usÅ‚ugÄ™ -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=Gadżet OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=Edytor gadżeta OpenSocial -key-type=Typ klucza -manage-oauth=ZarzÄ…dzaj OAuth -model.resource.com.liferay.opensocial=OpenSocial -model.resource.com.liferay.opensocial.model.Gadget=Gadżet -new-folder=New Folder (Automatic Copy) -publish-gadget=Publikuj gadżet -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Wybierz przynajmniej jednÄ… kategoriÄ™. -service-name=Nazwa usÅ‚ugi -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL już kieruje do istniejÄ…cego gadżetu. -url-does-not-point-to-a-valid-gadget=URL nie kieruje do istniejÄ…cego gadżetu. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_BR.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_BR.properties deleted file mode 100644 index 003c921ac2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_BR.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publicar Gadget -add-service=Adicionar Serviço -are-you-sure-you-want-to-delete=Você tem certeza que deseja excluir {0}? -are-you-sure-you-want-to-unpublish-and-delete=Você tem certeza que deseja não publicar mais e excluir {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Você tem certeza que deseja não publicar mais o gadget {0}? -busy=Ocupado -configure-a-gadget-to-be-displayed-in-this-portlet=Configure um gadget a ser mostrado neste portlet. -configure-gadget=Configurar gadget -consumer-key=Chave do consumidor -consumer-secret=Segredo do consumidor -edit-service=Editar Serviço -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} não foi salvo. Você tem certeza que deseja fechar a tab? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=Gadget OpenSocial (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=Gadget OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=Editor de gadgets Opensocial -key-type=Tipo da Chave -manage-oauth=Gerenciar OAuth -model.resource.com.liferay.opensocial=Publicador Gadget OpenSocial -model.resource.com.liferay.opensocial.model.Gadget=Entrada do publicador de gadgets OpenSocial -new-folder=Nova pasta -publish-gadget=Publicar Gadget -refresh-gadgets=Atualizar gadgets -replace=Substituir -replace-with=Replace with: -request-for-resource-id-failed=A requisição pelo recurso de ID {0} falhou. -save-the-gadget-before-previewing=Salve o gadget antes de pré-visualizar. -save-the-gadget-before-publishing=Salve o gadget antes de publicar. -search-for=Buscar por: -select-at-least-one-category=Selecione ao menos uma categoria. -service-name=Nome do Serviço -show-url=Mostrar URL -unable-to-access-documents=Não foi possível acessar os documentos. -unpublish=Cancelar publicação -url-already-points-to-an-existing-gadget=A URL já aponta para um gadget existente. -url-does-not-point-to-a-valid-gadget=A URL não aponta para um gadget válido. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_PT.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_PT.properties deleted file mode 100644 index 543dd7e7e1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_pt_PT.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publicar Dispositivo -add-service=Adicionar Serviço -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Ocupado (Automatic Translation) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure o dispositivo a ser mostrado neste portlet. -configure-gadget=Configurar o Gadget (Automatic Translation) -consumer-key=Chave do Consumidor -consumer-secret=Segredo do Consumidor -edit-service=Editar Serviço -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=Gadget OpenSocial (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=Dispositivo OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=Editor de Dispositivos OpenSocial -key-type=Tipo de Chave -manage-oauth=Gerir OAuth -model.resource.com.liferay.opensocial=Publicação de Dispositivos OpenSocial -model.resource.com.liferay.opensocial.model.Gadget=Item da Publicação de Dispositivos OpenSocial -new-folder=Nova pasta (Automatic Translation) -publish-gadget=Publicar Dispositivo -refresh-gadgets=Refrescar Dispositivos -replace=Substituir (Automatic Translation) -replace-with=Substitua por: (Automatic Translation) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Salve o gadget antes de visualização. (Automatic Translation) -save-the-gadget-before-publishing=Salve o gadget antes de publicar. (Automatic Translation) -search-for=Pesquisar por: (Automatic Translation) -select-at-least-one-category=Seleccione pelo menos uma categoria. -service-name=Nome do Serviço -show-url=Mostrar a URL (Automatic Translation) -unable-to-access-documents=Não é possível acessar documentos. (Automatic Translation) -unpublish=Cancelar a publicação de (Automatic Translation) -url-already-points-to-an-existing-gadget=O URL já aponta para um dispositivo existente. -url-does-not-point-to-a-valid-gadget=O URL não aponta para um dispositivo válido. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ro.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ro.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ro.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ru.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ru.properties deleted file mode 100644 index e2a64ec908..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_ru.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Опубликовать гаджет -add-service=Добавить ÑÐµÑ€Ð²Ð¸Ñ -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=ÐаÑтроит гаджет Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð² Ñтом приложении. -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Ключ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ -consumer-secret=Секретный ключ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ -edit-service=Редактировать ÑÐµÑ€Ð²Ð¸Ñ -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=Гаджет OpenSocial -javax.portlet.title.4_WAR_opensocialportlet=Редактор Гаджетов OpenSocial -key-type=Тип ключа -manage-oauth=ÐаÑтроить OAuth -model.resource.com.liferay.opensocial=Публиктоар OpenSocial Gadget -model.resource.com.liferay.opensocial.model.Gadget=Гаджет -new-folder=New Folder (Automatic Copy) -publish-gadget=Опубликовать Гаджет -refresh-gadgets=Обновить гаджеты -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Выберите не менее одной категории. -service-name=Ð˜Ð¼Ñ ÑервиÑа -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL уже показывает на ÑущеÑтвующий гаджет. -url-does-not-point-to-a-valid-gadget=URL не указывает на гаджет. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sk.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sk.properties deleted file mode 100644 index 7e0609ce4c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sk.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=PublikovaÅ¥ gadget -add-service=PridaÅ¥ službu -are-you-sure-you-want-to-delete=Ste si istý, že chete vymazaÅ¥ {0}? -are-you-sure-you-want-to-unpublish-and-delete=Ste si istý, že chete stiahnuÅ¥ a vymazaÅ¥ {0}? -are-you-sure-you-want-to-unpublish-the-gadget=Ste si istý, že chete stiahnuÅ¥ z publikácie gadget {0}? -busy=Zaneprázdnený -configure-a-gadget-to-be-displayed-in-this-portlet=NastaviÅ¥ gadget, ktorý má byÅ¥ zobrazený v tomto portlete. -configure-gadget=KonfigurovaÅ¥ gadget. -consumer-key=Spotrebiteľov kÄ¾ÃºÄ -consumer-secret=Spotrebiteľov tajný kÄ¾ÃºÄ -edit-service=UpraviÅ¥ službu -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} nebol uložený. Ste si istý, že chcete zavrieÅ¥ zložku? -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor -key-type=Typ kľúÄa -manage-oauth=SpravovaÅ¥ OAuth -model.resource.com.liferay.opensocial=Vydavateľ OpenSocial gadgetu -model.resource.com.liferay.opensocial.model.Gadget=Záznam o vydavateľovi OpenSocial gadgetu -new-folder=Nový prieÄinok -publish-gadget=PublikovaÅ¥ gadget -refresh-gadgets=ObnoviÅ¥ gadgety -replace=NahradiÅ¥ -replace-with=Replace with: -request-for-resource-id-failed=Požiadavka pre zdroj ID {0} zlyhala. -save-the-gadget-before-previewing=UložiÅ¥ gadget pred náhľadom. -save-the-gadget-before-publishing=UložiÅ¥ gadget pred publikovaním. -search-for=HľadaÅ¥: -select-at-least-one-category=Vyberte aspoň jednu kategóriu. -service-name=Názov služby -show-url=ZobraziÅ¥ URL -unable-to-access-documents=Nemôžem pristúpiÅ¥ k dokumentom. -unpublish=ZruÅ¡iÅ¥ publikovanie -url-already-points-to-an-existing-gadget=URL adresa ukazuje už na existujúci gadget. -url-does-not-point-to-a-valid-gadget=URL adresa neukazuje na validný gadget. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sl.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sl.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sl.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS.properties deleted file mode 100644 index d99f7985a0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Објављени Геџет -add-service=Додај Ð¡ÐµÑ€Ð²Ð¸Ñ -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Конфигуриши геџет да би био приказан на овом портлету. -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=КориÑнички Кључ -consumer-secret=КориÑничка Тајна -edit-service=Уреди Ð¡ÐµÑ€Ð²Ð¸Ñ -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=ОпенСоцијал Геџет -javax.portlet.title.4_WAR_opensocialportlet=ОпенСоцијал Геџет Уређивач -key-type=Тип Кључа -manage-oauth=Управљање ОÐутх -model.resource.com.liferay.opensocial=ОпенСоцијал Геџет Издавач -model.resource.com.liferay.opensocial.model.Gadget=ОпенСоцијал Геџет Издавач Ð£Ð½Ð¾Ñ -new-folder=New Folder (Automatic Copy) -publish-gadget=Публикуј Геџет -refresh-gadgets=ОÑвежи Геџет -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Одаберите најмање једну категорију. -service-name=Ðазив СервиÑа -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=УРЛ адреÑа већ указује на поÑтојећи геџет. -url-does-not-point-to-a-valid-gadget=УРЛ адреÑа не указује на важећи геџет. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS_latin.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS_latin.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sr_RS_latin.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sv.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sv.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_sv.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_tr.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_tr.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_tr.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_uk.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_uk.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_uk.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_vi.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_vi.properties deleted file mode 100644 index fa98374543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_vi.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=Publish Gadget (Automatic Copy) -add-service=Add Service (Automatic Copy) -are-you-sure-you-want-to-delete=Are you sure you want to delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-and-delete=Are you sure you want to unpublish and delete {0}? (Automatic Copy) -are-you-sure-you-want-to-unpublish-the-gadget=Are you sure you want to unpublish the gadget {0}? (Automatic Copy) -busy=Busy (Automatic Copy) -configure-a-gadget-to-be-displayed-in-this-portlet=Configure a gadget to be displayed in this portlet. (Automatic Copy) -configure-gadget=Configure Gadget (Automatic Copy) -consumer-key=Consumer Key (Automatic Copy) -consumer-secret=Consumer Secret (Automatic Copy) -edit-service=Edit Service (Automatic Copy) -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} has not been saved. Are you sure you want to close the tab? (Automatic Copy) -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Copy) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget (Automatic Copy) -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget Editor (Automatic Copy) -key-type=Key Type (Automatic Copy) -manage-oauth=Manage OAuth (Automatic Copy) -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher (Automatic Copy) -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget Publisher Entry (Automatic Copy) -new-folder=New Folder (Automatic Copy) -publish-gadget=Publish Gadget (Automatic Copy) -refresh-gadgets=Refresh Gadgets (Automatic Copy) -replace=Replace (Automatic Copy) -replace-with=Replace with: (Automatic Copy) -request-for-resource-id-failed=Request for resource ID {0} failed. (Automatic Copy) -save-the-gadget-before-previewing=Save the gadget before previewing. (Automatic Copy) -save-the-gadget-before-publishing=Save the gadget before publishing. (Automatic Copy) -search-for=Search for: (Automatic Copy) -select-at-least-one-category=Select at least one category. (Automatic Copy) -service-name=Service Name (Automatic Copy) -show-url=Show URL (Automatic Copy) -unable-to-access-documents=Unable to access documents. (Automatic Copy) -unpublish=Unpublish (Automatic Copy) -url-already-points-to-an-existing-gadget=URL already points to an existing gadget. (Automatic Copy) -url-does-not-point-to-a-valid-gadget=URL does not point to a valid gadget. (Automatic Copy) \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_CN.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_CN.properties deleted file mode 100644 index c417c98543..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_CN.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=å‘布Gadget -add-service=添加æœåŠ¡ -are-you-sure-you-want-to-delete=您确定è¦åˆ é™¤{0}么? -are-you-sure-you-want-to-unpublish-and-delete=您确定è¦å–消å‘布并删除{0}么? -are-you-sure-you-want-to-unpublish-the-gadget=您确定è¦å–消å‘布并删除gadget{0}么? -busy=忙碌 -configure-a-gadget-to-be-displayed-in-this-portlet=é…置一个gadget让其在这个portlet中显示。 -configure-gadget=é…ç½®Gadget -consumer-key=用户Key -consumer-secret=用户机密 -edit-service=编辑æœåŠ¡ -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0}已被ä¿å­˜ã€‚您确定è¦å…³é—­æ­¤æ ‡ç­¾ä¹ˆï¼Ÿ -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial çš„å°å·¥å…· (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget 编辑器 -key-type=Key类型 -manage-oauth=管ç†OAuth -model.resource.com.liferay.opensocial=OpenSocial Gadget Publisher -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadgetå‘è¡Œäººå…¥å£ -new-folder=新文件夹 -publish-gadget=å‘布Gadget -refresh-gadgets=刷新Gadgets -replace=æ›¿æ¢ -replace-with=Replace with: -request-for-resource-id-failed=资æºID{0}请求失败。 -save-the-gadget-before-previewing=预览å‰è¯·ä¿å­˜æ­¤gadget。 -save-the-gadget-before-publishing=å‘布å‰è¯·ä¿å­˜æ­¤gadget。 -search-for=æœç´¢ï¼š -select-at-least-one-category=至少选择一个类别。 -service-name=æœåŠ¡åç§° -show-url=显示URL -unable-to-access-documents=无法访问文档。 -unpublish=未å‘布 -url-already-points-to-an-existing-gadget=URLå·²ç»æŒ‡å‘一个现有的Gadget。 -url-does-not-point-to-a-valid-gadget=URL没有指å‘一个有效的Gadget。 \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_TW.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_TW.properties deleted file mode 100644 index df24ccffd7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/content/Language_zh_TW.properties +++ /dev/null @@ -1,36 +0,0 @@ -action.PUBLISH_GADGET=出版Gadget -add-service=增加æœå‹™ -are-you-sure-you-want-to-delete=您確定è¦åˆªé™¤ {0}? -are-you-sure-you-want-to-unpublish-and-delete=您確定è¦åœæ­¢å‡ºç‰ˆèˆ‡åˆªé™¤ {0}? -are-you-sure-you-want-to-unpublish-the-gadget=您確定è¦åœæ­¢å‡ºç‰ˆé€™Gadget {0}? -busy=忙碌 -configure-a-gadget-to-be-displayed-in-this-portlet=在這個Portleté…置一個å¯é¡¯ç¤ºGadget。 -configure-gadget=設定Gadget -consumer-key=消費者éµå€¼ -consumer-secret=消費者秘密 -edit-service=編輯æœå‹™ -has-not-been-saved-are-you-sure-you-want-to-close-the-tab={0} 已經儲存。您確定è¦é—œé–‰é€™å€‹é ç±¤ï¼Ÿ -javax.portlet.title.1_WAR_opensocialportlet=OpenSocial Admin (Automatic Translation) -javax.portlet.title.2_WAR_opensocialportlet=OpenSocial çš„å°å·¥å…· (Automatic Translation) -javax.portlet.title.3_WAR_opensocialportlet=OpenSocial Gadget -javax.portlet.title.4_WAR_opensocialportlet=OpenSocial Gadget編輯器 -key-type=éµå€¼é¡žåž‹ -manage-oauth=管ç†OAuth -model.resource.com.liferay.opensocial=OpenSocial Gadget出版器 -model.resource.com.liferay.opensocial.model.Gadget=OpenSocial Gadget出版器æ¢ç›® -new-folder=新資料夾 -publish-gadget=出版Gadget -refresh-gadgets=釿–°æ•´ç†Gadget -replace=å–代 -replace-with=Replace with: -request-for-resource-id-failed=å°è³‡æºID {0} 的請求失敗。 -save-the-gadget-before-previewing=在é è¦½é€™Gadgetå‰å„²å­˜ã€‚ -save-the-gadget-before-publishing=在出版這Gadgetå‰å„²å­˜ã€‚ -search-for=æœå°‹ï¼š -select-at-least-one-category=è‡³å°‘é¸æ“‡ä¸€å€‹åˆ†é¡žã€‚ -service-name=æœå‹™å稱 -show-url=é¡¯ç¤ºç¶²å€ -unable-to-access-documents=ç„¡æ³•å­˜å–æ–‡ä»¶ã€‚ -unpublish=åœæ­¢å‡ºç‰ˆ -url-already-points-to-an-existing-gadget=ç¶²å€å·²ç¶“æŒ‡åˆ°ä¸€å€‹ç¾æœ‰çš„Gadget。 -url-does-not-point-to-a-valid-gadget=ç¶²å€æ²’有指到一個正確的Gadget。 \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/features/rpc/rpc.js b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/features/rpc/rpc.js deleted file mode 100644 index 8256a0f675..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/features/rpc/rpc.js +++ /dev/null @@ -1,1002 +0,0 @@ -/* @generated */ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -/** - * @fileoverview Remote procedure call library for gadget-to-container, - * container-to-gadget, and gadget-to-gadget (thru container) communication. - */ - -/** - * gadgets.rpc Transports - * - * All transports are stored in object gadgets.rpctx, and are provided - * to the core gadgets.rpc library by various build rules. - * - * Transports used by core gadgets.rpc code to actually pass messages. - * each transport implements the same interface exposing hooks that - * the core library calls at strategic points to set up and use - * the transport. - * - * The methods each transport must implement are: - * + getCode(): returns a string identifying the transport. For debugging. - * + isParentVerifiable(): indicates (via boolean) whether the method - * has the property that its relay URL verifies for certain the - * receiver's protocol://host:port. - * + init(processFn, readyFn): Performs any global initialization needed. Called - * before any other gadgets.rpc methods are invoked. processFn is - * the function in gadgets.rpc used to process an rpc packet. readyFn is - * a function that must be called when the transport is ready to send - * and receive messages bidirectionally. Returns - * true if successful, false otherwise. - * + setup(receiverId, token): Performs per-receiver initialization, if any. - * receiverId will be '..' for gadget-to-container. Returns true if - * successful, false otherwise. - * + call(targetId, from, rpc): Invoked to send an actual - * message to the given targetId, with the given serviceName, from - * the sender identified by 'from'. Payload is an rpc packet. Returns - * true if successful, false otherwise. - */ - -if (!gadgets.rpc) { // make lib resilient to double-inclusion - -/** - * @static - * @namespace Provides operations for making rpc calls. - * @name gadgets.rpc - */ - -gadgets.rpc = function() { - /** -* @const -* @private -*/ - var CALLBACK_NAME = '__cb'; - - /** -* @const -* @private -*/ - var DEFAULT_NAME = ''; - - /** Exported constant, for use by transports only. -* @const -* @type {string} -* @member gadgets.rpc -*/ - var ACK = '__ack'; - - /** -* Timeout and number of attempts made to setup a transport receiver. -* @const -* @private -*/ - var SETUP_FRAME_TIMEOUT = 500; - - /** -* @const -* @private -*/ - var SETUP_FRAME_MAX_TRIES = 10; - - var services = {}; - var relayUrl = {}; - var useLegacyProtocol = {}; - var authToken = {}; - var callId = 0; - var callbacks = {}; - var setup = {}; - var sameDomain = {}; - var params = {}; - var receiverTx = {}; - var earlyRpcQueue = {}; - - // isGadget =~ isChild for the purposes of rpc (used only in setup). - var isChild = (window.top !== window.self); - - // Set the current rpc ID from window.name immediately, to prevent - // shadowing of window.name by a "var name" declaration, or similar. - var rpcId = window.name; - - var securityCallback = function() {}; - var LOAD_TIMEOUT = 0; - var FRAME_PHISH = 1; - var FORGED_MSG = 2; - - // Fallback transport is simply a dummy impl that emits no errors - // and logs info on calls it receives, to avoid undesired side-effects - // from falling back to IFPC or some other transport. - var fallbackTransport = (function() { - function logFn(name) { - return function() { - gadgets.log('gadgets.rpc.' + name + '(' + - gadgets.json.stringify(Array.prototype.slice.call(arguments)) + - '): call ignored. [caller: ' + document.location + - ', isChild: ' + isChild + ']'); - }; - } - return { - getCode: function() { - return 'noop'; - }, - isParentVerifiable: function() { - return true; // Not really, but prevents transport assignment to IFPC. - }, - init: logFn('init'), - setup: logFn('setup'), - call: logFn('call') - }; - })(); - - // Load the authentication token for speaking to the container - // from the gadget's parameters, or default to '0' if not found. - if (gadgets.util) { - params = gadgets.util.getUrlParameters(); - } - - /** -* Return a transport representing the best available cross-domain -* message-passing mechanism available to the browser. -* -*

    Transports are selected on a cascading basis determined by browser -* capability and other checks. The order of preference is: -*

      -*
    1. wpm: Uses window.postMessage standard. -*
    2. dpm: Uses document.postMessage, similar to wpm but pre-standard. -*
    3. nix: Uses IE-specific browser hacks. -*
    4. rmr: Signals message passing using relay file's onresize handler. -*
    5. fe: Uses FF2-specific window.frameElement hack. -*
    6. ifpc: Sends messages via active load of a relay file. -*
    -*

    See each transport's commentary/documentation for details. -* @return {Object} -* @member gadgets.rpc -*/ - function getTransport() { - return typeof window.postMessage === 'function' ? gadgets.rpctx.wpm : - typeof window.postMessage === 'object' ? gadgets.rpctx.wpm : - window.ActiveXObject ? gadgets.rpctx.nix : - navigator.userAgent.indexOf('WebKit') > 0 ? gadgets.rpctx.rmr : - navigator.product === 'Gecko' ? gadgets.rpctx.frameElement : - gadgets.rpctx.ifpc; - } - - /** -* Function passed to, and called by, a transport indicating it's ready to -* send and receive messages. -*/ - function transportReady(receiverId, readySuccess) { - var tx = transport; - if (!readySuccess) { - tx = fallbackTransport; - } - receiverTx[receiverId] = tx; - - // If there are any early-queued messages, send them now directly through - // the needed transport. - var earlyQueue = earlyRpcQueue[receiverId] || []; - for (var i = 0; i < earlyQueue.length; ++i) { - var rpc = earlyQueue[i]; - // There was no auth/rpc token set before, so set it now. - rpc.t = getAuthToken(receiverId); - tx.call(receiverId, rpc.f, rpc); - } - - // Clear the queue so it won't be sent again. - earlyRpcQueue[receiverId] = []; - } - - // Track when this main page is closed or navigated to a different location - // ("unload" event). - // NOTE: The use of the "unload" handler here and for the relay iframe - // prevents the use of the in-memory page cache in modern browsers. - // See: https://developer.mozilla.org/en/using_firefox_1.5_caching - // See: http://webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/ - var mainPageUnloading = false, - hookedUnload = false; - - function hookMainPageUnload() { - if (hookedUnload) { - return; - } - function onunload() { - mainPageUnloading = true; - } - gadgets.util.attachBrowserEvent(window, 'unload', onunload, false); - hookedUnload = true; - } - - function relayOnload(targetId, sourceId, token, data, relayWindow) { - // Validate auth token. - if (!authToken[sourceId] || authToken[sourceId] !== token) { - gadgets.error('Invalid auth token. ' + authToken[sourceId] + ' vs ' + token); - securityCallback(sourceId, FORGED_MSG); - } - - relayWindow.onunload = function() { - if (setup[sourceId] && !mainPageUnloading) { - securityCallback(sourceId, FRAME_PHISH); - gadgets.rpc.removeReceiver(sourceId); - } - }; - hookMainPageUnload(); - - data = gadgets.json.parse(decodeURIComponent(data)); - transport.relayOnload(sourceId, data); - } - - /** -* Helper function to process an RPC request -* @param {Object} rpc RPC request object. -* @private -*/ - function process(rpc) { - // - // RPC object contents: - // s: Service Name - // f: From - // c: The callback ID or 0 if none. - // a: The arguments for this RPC call. - // t: The authentication token. - // - if (rpc && typeof rpc.s === 'string' && typeof rpc.f === 'string' && - rpc.a instanceof Array) { - - // Validate auth token. - if (authToken[rpc.f]) { - // We don't do type coercion here because all entries in the authToken - // object are strings, as are all url params. See setupReceiver(...). - if (authToken[rpc.f] !== rpc.t) { - gadgets.error('Invalid auth token. ' + authToken[rpc.f] + ' vs ' + rpc.t); - securityCallback(rpc.f, FORGED_MSG); - } - } - - if (rpc.s === ACK) { - // Acknowledgement API, used to indicate a receiver is ready. - window.setTimeout(function() { transportReady(rpc.f, true); }, 0); - return; - } - - // If there is a callback for this service, attach a callback function - // to the rpc context object for asynchronous rpc services. - // - // Synchronous rpc request handlers should simply ignore it and return a - // value as usual. - // Asynchronous rpc request handlers, on the other hand, should pass its - // result to this callback function and not return a value on exit. - // - // For example, the following rpc handler passes the first parameter back - // to its rpc client with a one-second delay. - // - // function asyncRpcHandler(param) { - // var me = this; - // setTimeout(function() { - // me.callback(param); - // }, 1000); - // } - if (rpc.c) { - rpc.callback = function(result) { - gadgets.rpc.call(rpc.f, CALLBACK_NAME, null, rpc.c, result); - }; - } - - // Call the requested RPC service. - var result = (services[rpc.s] || - services[DEFAULT_NAME]).apply(rpc, rpc.a); - - // If the rpc request handler returns a value, immediately pass it back - // to the callback. Otherwise, do nothing, assuming that the rpc handler - // will make an asynchronous call later. - if (rpc.c && typeof result !== 'undefined') { - gadgets.rpc.call(rpc.f, CALLBACK_NAME, null, rpc.c, result); - } - } - } - - /** -* Helper method returning a canonicalized protocol://host[:port] for -* a given input URL, provided as a string. Used to compute convenient -* relay URLs and to determine whether a call is coming from the same -* domain as its receiver (bypassing the try/catch capability detection -* flow, thereby obviating Firebug and other tools reporting an exception). -* -* @param {string} url Base URL to canonicalize. -* @memberOf gadgets.rpc -*/ - - function getOrigin(url) { - if (!url) { - return ''; - } - url = url.toLowerCase(); - if (url.indexOf('//') == 0) { - url = window.location.protocol + url; - } - if (url.indexOf('://') == -1) { - // Assumed to be schemaless. Default to current protocol. - url = window.location.protocol + '//' + url; - } - // At this point we guarantee that "://" is in the URL and defines - // current protocol. Skip past this to search for host:port. - var host = url.substring(url.indexOf('://') + 3); - - // Find the first slash char, delimiting the host:port. - var slashPos = host.indexOf('/'); - if (slashPos != -1) { - host = host.substring(0, slashPos); - } - - var protocol = url.substring(0, url.indexOf('://')); - - // Use port only if it's not default for the protocol. - var portStr = ''; - var portPos = host.indexOf(':'); - if (portPos != -1) { - var port = host.substring(portPos + 1); - host = host.substring(0, portPos); - if ((protocol === 'http' && port !== '80') || - (protocol === 'https' && port !== '443')) { - portStr = ':' + port; - } - } - - // Return ://[] - return protocol + '://' + host + portStr; - } - - function getTargetWin(id) { - if (typeof id === 'undefined' || - id === '..') { - return window.parent; - } - - // Cast to a String to avoid an index lookup. - id = String(id); - - // Try window.frames first - // var target = window.frames[id]; - // if (target) { - // return target; - // } - - // Fall back to getElementById() - target = document.getElementById(id); - if (target && target.contentWindow) { - return target.contentWindow; - } - - return null; - } - - // Pick the most efficient RPC relay mechanism. - var transport = getTransport(); - - // Create the Default RPC handler. - services[DEFAULT_NAME] = function() { - gadgets.warn('Unknown RPC service: ' + this.s); - }; - - // Create a Special RPC handler for callbacks. - services[CALLBACK_NAME] = function(callbackId, result) { - var callback = callbacks[callbackId]; - if (callback) { - delete callbacks[callbackId]; - callback(result); - } - }; - - /** -* Conducts any frame-specific work necessary to setup -* the channel type chosen. This method is called when -* the container page first registers the gadget in the -* RPC mechanism. Gadgets, in turn, will complete the setup -* of the channel once they send their first messages. -*/ - function setupFrame(frameId, token, forcesecure) { - if (setup[frameId] === true) { - return; - } - - if (typeof setup[frameId] === 'undefined') { - setup[frameId] = 0; - } - - var tgtFrame = document.getElementById(frameId); - if (frameId === '..' || tgtFrame != null) { - if (transport.setup(frameId, token, forcesecure) === true) { - setup[frameId] = true; - return; - } - } - - if (setup[frameId] !== true && setup[frameId]++ < SETUP_FRAME_MAX_TRIES) { - // Try again in a bit, assuming that frame will soon exist. - window.setTimeout(function() { setupFrame(frameId, token, forcesecure); }, - SETUP_FRAME_TIMEOUT); - } else { - // Fail: fall back for this gadget. - receiverTx[frameId] = fallbackTransport; - setup[frameId] = true; - } - } - - /** -* Attempts to make an rpc by calling the target's receive method directly. -* This works when gadgets are rendered on the same domain as their container, -* a potentially useful optimization for trusted content which keeps -* RPC behind a consistent interface. -* -* @param {string} target Module id of the rpc service provider. -* @param {Object} rpc RPC data. -* @return {boolean} -*/ - function callSameDomain(target, rpc) { - //if (typeof sameDomain[target] === 'undefined') { - // Seed with a negative, typed value to avoid - // hitting this code path repeatedly. - sameDomain[target] = false; - var targetRelay = gadgets.rpc.getRelayUrl(target); - if (getOrigin(targetRelay) !== getOrigin(window.location.href)) { - // Not worth trying -- avoid the error and just return. - return false; - } - - var targetEl = getTargetWin(target); - try { - // If this succeeds, then same-domain policy applied - sameDomain[target] = targetEl.gadgets.rpc.receiveSameDomain; - } catch (e) { - // Shouldn't happen due to origin check. Caught to emit - // more meaningful error to the caller. - gadgets.error('Same domain call failed: parent= incorrectly set.'); - } - //} - - if (typeof sameDomain[target] === 'function') { - // Call target's receive method - sameDomain[target](rpc); - return true; - } - - return false; - } - - /** -* Sets the relay URL of a target frame. -* @param {string} targetId Name of the target frame. -* @param {string} url Full relay URL of the target frame. -* @param {boolean=} opt_useLegacy True if this relay needs the legacy IFPC -* wire format. -* -* @member gadgets.rpc -* @deprecated -*/ - function setRelayUrl(targetId, url, opt_useLegacy) { - // make URL absolute if necessary - if (!/http(s)?:\/\/.+/.test(url)) { - if (url.indexOf('//') == 0) { - url = window.location.protocol + url; - } else if (url.charAt(0) == '/') { - url = window.location.protocol + '//' + window.location.host + url; - } else if (url.indexOf('://') == -1) { - // Assumed to be schemaless. Default to current protocol. - url = window.location.protocol + '//' + url; - } - } - relayUrl[targetId] = url; - useLegacyProtocol[targetId] = !!opt_useLegacy; - } - - /** -* Helper method to retrieve the authToken for a given gadget. -* Not to be used directly. -* @member gadgets.rpc -* @return {string} -*/ - function getAuthToken(targetId) { - return authToken[targetId]; - } - - /** -* Sets the auth token of a target frame. -* @param {string} targetId Name of the target frame. -* @param {string} token The authentication token to use for all -* calls to or from this target id. -* -* @member gadgets.rpc -* @deprecated -*/ - function setAuthToken(targetId, token, forcesecure) { - token = token || ''; - - // Coerce token to a String, ensuring that all authToken values - // are strings. This ensures correct comparison with URL params - // in the process(rpc) method. - authToken[targetId] = String(token); - - setupFrame(targetId, token, forcesecure); - } - - function setupContainerGadgetContext(rpctoken, opt_forcesecure) { - /** - * Initializes gadget to container RPC params from the provided configuration. - */ - function init(config) { - var configRpc = config ? config.rpc : {}; - var parentRelayUrl = configRpc.parentRelayUrl; - - // Allow for wild card parent relay files as long as it's from a - // white listed domain. This is enforced by the rendering servlet. - if (parentRelayUrl.substring(0, 7) !== 'http://' && - parentRelayUrl.substring(0, 8) !== 'https://' && - parentRelayUrl.substring(0, 2) !== '//') { - // Relative path: we append to the parent. - // We're relying on the server validating the parent parameter in this - // case. Because of this, parent may only be passed in the query, not fragment. - if (typeof params.parent === 'string' && params.parent !== '') { - // Otherwise, relayUrl['..'] will be null, signaling transport - // code to ignore rpc calls since they cannot work without a - // relay URL with host qualification. - if (parentRelayUrl.substring(0, 1) !== '/') { - // Path-relative. Trust that parent is passed in appropriately. - var lastSlash = params.parent.lastIndexOf('/'); - parentRelayUrl = params.parent.substring(0, lastSlash + 1) + parentRelayUrl; - } else { - // Host-relative. - parentRelayUrl = getOrigin(params.parent) + parentRelayUrl; - } - } - } - - var useLegacy = !!configRpc.useLegacyProtocol; - setRelayUrl('..', parentRelayUrl, useLegacy); - - if (useLegacy) { - transport = gadgets.rpctx.ifpc; - transport.init(process, transportReady); - } - - // Sets the auth token and signals transport to setup connection to container. - var forceSecure = opt_forcesecure || params.forcesecure || false; - setAuthToken('..', rpctoken, forceSecure); - } - - var requiredConfig = { - parentRelayUrl: gadgets.config.NonEmptyStringValidator - }; - gadgets.config.register('rpc', requiredConfig, init); - } - - function setupContainerGenericIframe(rpctoken, opt_parent, opt_forcesecure) { - // Generic child IFRAME setting up connection w/ its container. - // Use the opt_parent param if provided, or the "parent" query param - // if found -- otherwise, do nothing since this call might be initiated - // automatically at first, then actively later in IFRAME code. - var forcesecure = opt_forcesecure || params.forcesecure || false; - var parent = opt_parent || params.parent; - if (parent) { - setRelayUrl('..', parent); - setAuthToken('..', rpctoken, forcesecure); - } - } - - function setupChildIframe(gadgetId, opt_frameurl, opt_authtoken, opt_forcesecure) { - if (!gadgets.util) { - return; - } - var childIframe = document.getElementById(gadgetId); - if (!childIframe) { - throw new Error('Cannot set up gadgets.rpc receiver with ID: ' + gadgetId + - ', element not found.'); - } - - // The "relay URL" can either be explicitly specified or is set as - // the child IFRAME URL verbatim. - var relayUrl = opt_frameurl || childIframe.src; - setRelayUrl(gadgetId, relayUrl); - - // The auth token is parsed from child params (rpctoken) or overridden. - var childParams = gadgets.util.getUrlParameters(childIframe.src); - var rpctoken = opt_authtoken || childParams.rpctoken; - var forcesecure = opt_forcesecure || childParams.forcesecure; - setAuthToken(gadgetId, rpctoken, forcesecure); - } - - /** -* Sets up the gadgets.rpc library to communicate with the receiver. -*

    This method replaces setRelayUrl(...) and setAuthToken(...) -* -*

    Simplified instructions - highly recommended: -*

      -*
    1. Generate <iframe id="<ID>" src="...#parent=<PARENTURL>&rpctoken=<RANDOM>"/> -* and add to DOM. -*
    2. Call gadgets.rpc.setupReceiver("<ID>"); -*

      All parent/child communication initializes automatically from here. -* Naturally, both sides need to include the library. -*

    -* -*

    Detailed container/parent instructions: -*

      -*
    1. Create the target IFRAME (eg. gadget) with a given <ID> and params -* rpctoken= (eg. #rpctoken=1234), which is a random/unguessbable -* string, and parent=<url>, where <url> is the URL of the container. -*
    2. Append IFRAME to the document. -*
    3. Call gadgets.rpc.setupReceiver(<ID>) -*

      [Optional]. Strictly speaking, you may omit rpctoken and parent. This -* practice earns little but is occasionally useful for testing. -* If you omit parent, you MUST pass your container URL as the 2nd -* parameter to this method. -*

    -* -*

    Detailed gadget/child IFRAME instructions: -*

      -*
    1. If your container/parent passed parent and rpctoken params (query string -* or fragment are both OK), you needn't do anything. The library will self- -* initialize. -*
    2. If "parent" is omitted, you MUST call this method with targetId '..' -* and the second param set to the parent URL. -*
    3. If "rpctoken" is omitted, but the container set an authToken manually -* for this frame, you MUST pass that ID (however acquired) as the 2nd param -* to this method. -*
    -* -* @member gadgets.rpc -* @param {string} targetId -* @param {string=} opt_receiverurl -* @param {string=} opt_authtoken -* @param {boolean=} opt_forcesecure -*/ - function setupReceiver(targetId, opt_receiverurl, opt_authtoken, opt_forcesecure) { - if (targetId === '..') { - // Gadget/IFRAME to container. - var rpctoken = opt_authtoken || params.rpctoken || params.ifpctok || ''; - if (window['__isgadget'] === true) { - setupContainerGadgetContext(rpctoken, opt_forcesecure); - } else { - setupContainerGenericIframe(rpctoken, opt_receiverurl, opt_forcesecure); - } - } else { - // Container to child. - setupChildIframe(targetId, opt_receiverurl, opt_authtoken, opt_forcesecure); - } - } - - return /** @scope gadgets.rpc */ { - config: function(config) { - if (typeof config.securityCallback === 'function') { - securityCallback = config.securityCallback; - } - }, - - /** - * Registers an RPC service. - * @param {string} serviceName Service name to register. - * @param {function(Object,Object)} handler Service handler. - * - * @member gadgets.rpc - */ - register: function(serviceName, handler) { - if (serviceName === CALLBACK_NAME || serviceName === ACK) { - throw new Error('Cannot overwrite callback/ack service'); - } - - if (serviceName === DEFAULT_NAME) { - throw new Error('Cannot overwrite default service:' - + ' use registerDefault'); - } - - services[serviceName] = handler; - }, - - /** - * Unregisters an RPC service. - * @param {string} serviceName Service name to unregister. - * - * @member gadgets.rpc - */ - unregister: function(serviceName) { - if (serviceName === CALLBACK_NAME || serviceName === ACK) { - throw new Error('Cannot delete callback/ack service'); - } - - if (serviceName === DEFAULT_NAME) { - throw new Error('Cannot delete default service:' - + ' use unregisterDefault'); - } - - delete services[serviceName]; - }, - - /** - * Registers a default service handler to processes all unknown - * RPC calls which raise an exception by default. - * @param {function(Object,Object)} handler Service handler. - * - * @member gadgets.rpc - */ - registerDefault: function(handler) { - services[DEFAULT_NAME] = handler; - }, - - /** - * Unregisters the default service handler. Future unknown RPC - * calls will fail silently. - * - * @member gadgets.rpc - */ - unregisterDefault: function() { - delete services[DEFAULT_NAME]; - }, - - /** - * Forces all subsequent calls to be made by a transport - * method that allows the caller to verify the message receiver - * (by way of the parent parameter, through getRelayUrl(...)). - * At present this means IFPC or WPM. - * @member gadgets.rpc - */ - forceParentVerifiable: function() { - if (!transport.isParentVerifiable()) { - transport = gadgets.rpctx.ifpc; - } - }, - - /** - * Calls an RPC service. - * @param {string} targetId Module Id of the RPC service provider. - * Empty if calling the parent container. - * @param {string} serviceName Service name to call. - * @param {function()|null} callback Callback function(if any) to process - * the return value of the RPC request. - * @param {*} var_args Parameters for the RPC request. - * - * @member gadgets.rpc - */ - call: function(targetId, serviceName, callback, var_args) { - targetId = targetId || '..'; - // Default to the container calling. - var from = '..'; - - if (targetId === '..') { - from = rpcId; - } - - ++callId; - if (callback) { - callbacks[callId] = callback; - } - - var rpc = { - s: serviceName, - f: from, - c: callback ? callId : 0, - a: Array.prototype.slice.call(arguments, 3), - t: authToken[targetId], - l: useLegacyProtocol[targetId] - }; - - if (targetId !== '..' && !document.getElementById(targetId)) { - // The target has been removed from the DOM. Don't even try. - gadgets.log('WARNING: attempted send to nonexistent frame: ' + targetId); - return; - } - - // If target is on the same domain, call method directly - if (callSameDomain(targetId, rpc)) { - return; - } - - // Attempt to make call via a cross-domain transport. - // Retrieve the transport for the given target - if one - // target is misconfigured, it won't affect the others. - var channel = receiverTx[targetId]; - - if (!channel) { - // Not set up yet. Enqueue the rpc for such time as it is. - if (!earlyRpcQueue[targetId]) { - earlyRpcQueue[targetId] = [rpc]; - } else { - earlyRpcQueue[targetId].push(rpc); - } - return; - } - - // If we are told to use the legacy format, then we must - // default to IFPC. - if (useLegacyProtocol[targetId]) { - channel = gadgets.rpctx.ifpc; - } - - if (channel.call(targetId, from, rpc) === false) { - // Fall back to IFPC. This behavior may be removed as IFPC is as well. - receiverTx[targetId] = fallbackTransport; - transport.call(targetId, from, rpc); - } - }, - - /** - * Gets the relay URL of a target frame. - * @param {string} targetId Name of the target frame. - * @return {string|undefined} Relay URL of the target frame. - * - * @member gadgets.rpc - */ - getRelayUrl: function(targetId) { - var url = relayUrl[targetId]; - // Some RPC methods (wpm, for one) are unhappy with schemeless URLs. - if (url && url.substring(0, 1) === '/') { - if (url.substring(1, 2) === '/') { // starts with '//' - url = document.location.protocol + url; - } else { // relative URL, starts with '/' - url = document.location.protocol + '//' + document.location.host + url; - } - } - - return url; - }, - - setRelayUrl: setRelayUrl, - setAuthToken: setAuthToken, - setupReceiver: setupReceiver, - getAuthToken: getAuthToken, - - // Note: Does not delete iframe - removeReceiver: function(receiverId) { - delete relayUrl[receiverId]; - delete useLegacyProtocol[receiverId]; - delete authToken[receiverId]; - delete setup[receiverId]; - delete sameDomain[receiverId]; - delete receiverTx[receiverId]; - }, - - /** - * Gets the RPC relay mechanism. - * @return {string} RPC relay mechanism. See above for - * a list of supported types. - * - * @member gadgets.rpc - */ - getRelayChannel: function() { - return transport.getCode(); - }, - - /** - * Receives and processes an RPC request. (Not to be used directly.) - * Only used by IFPC. - * @param {Array.} fragment An RPC request fragment encoded as - * an array. The first 4 elements are target id, source id & call id, - * total packet number, packet id. The last element stores the actual - * JSON-encoded and URI escaped packet data. - * - * @member gadgets.rpc - * @deprecated - */ - receive: function(fragment, otherWindow) { - if (fragment.length > 4) { - process(gadgets.json.parse( - decodeURIComponent(fragment[fragment.length - 1]))); - } else { - relayOnload.apply(null, fragment.concat(otherWindow)); - } - }, - - /** - * Receives and processes an RPC request sent via the same domain. - * (Not to be used directly). Converts the inbound rpc object's - * Array into a local Array to pass the process() Array test. - * @param {Object} rpc RPC object containing all request params. - * @member gadgets.rpc - */ - receiveSameDomain: function(rpc) { - // Pass through to local process method but converting to a local Array - rpc.a = Array.prototype.slice.call(rpc.a); - window.setTimeout(function() { process(rpc); }, 0); - }, - - // Helper method to get the protocol://host:port of an input URL. - // see docs above - getOrigin: getOrigin, - - getReceiverOrigin: function(receiverId) { - var channel = receiverTx[receiverId]; - if (!channel) { - // not set up yet - return null; - } - if (!channel.isParentVerifiable(receiverId)) { - // given transport cannot verify receiver origin - return null; - } - var origRelay = gadgets.rpc.getRelayUrl(receiverId) || - gadgets.util.getUrlParameters().parent; - return gadgets.rpc.getOrigin(origRelay); - }, - - /** - * Internal-only method used to initialize gadgets.rpc. - * @member gadgets.rpc - */ - init: function() { - // Conduct any global setup necessary for the chosen transport. - // Do so after gadgets.rpc definition to allow transport to access - // gadgets.rpc methods. - if (transport.init(process, transportReady) === false) { - transport = fallbackTransport; - } - if (isChild) { - setupReceiver('..'); - } - }, - - /** Returns the window keyed by the ID. null/".." for parent, else child */ - _getTargetWin: getTargetWin, - - /** Create an iframe for loading the relay URL. Used by child only. */ - _createRelayIframe: function(token, data) { - var relay = gadgets.rpc.getRelayUrl('..'); - if (!relay) { - return null; - } - - // Format: #targetId & sourceId & authToken & data - var src = relay + '#..&' + rpcId + '&' + token + '&' + - encodeURIComponent(gadgets.json.stringify(data)); - - var iframe = document.createElement('iframe'); - iframe.style.border = iframe.style.width = iframe.style.height = '0px'; - iframe.style.visibility = 'hidden'; - iframe.style.position = 'absolute'; - - function appendFn() { - // Append the iframe. - document.body.appendChild(iframe); - - // Set the src of the iframe to 'about:blank' first and then set it - // to the relay URI. This prevents the iframe from maintaining a src - // to the 'old' relay URI if the page is returned to from another. - // In other words, this fixes the bfcache issue that causes the iframe's - // src property to not be updated despite us assigning it a new value here. - iframe.src = 'javascript:""'; - iframe.src = src; - } - - if (document.body) { - appendFn(); - } else { - gadgets.util.registerOnLoadHandler(function() { appendFn(); }); - } - - return iframe; - }, - - ACK: ACK, - - RPC_ID: rpcId, - - SEC_ERROR_LOAD_TIMEOUT: LOAD_TIMEOUT, - SEC_ERROR_FRAME_PHISH: FRAME_PHISH, - SEC_ERROR_FORGED_MSG: FORGED_MSG - }; -}(); - -// Initialize library/transport. -gadgets.rpc.init(); - -} // !end of double-inclusion guard \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/org/apache/shindig/gadgets/oauth/OAuthRequest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/org/apache/shindig/gadgets/oauth/OAuthRequest.java deleted file mode 100644 index 7c40f19f8f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/org/apache/shindig/gadgets/oauth/OAuthRequest.java +++ /dev/null @@ -1,957 +0,0 @@ -/* @generated */ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with this - * work for additional information regarding copyright ownership. The ASF - * licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package org.apache.shindig.gadgets.oauth; - -import com.google.common.base.Charsets; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; - -import net.oauth.OAuth; -import net.oauth.OAuthAccessor; -import net.oauth.OAuthException; -import net.oauth.OAuthMessage; -import net.oauth.OAuthProblemException; -import net.oauth.OAuth.Parameter; - -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.codec.digest.DigestUtils; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; -import org.apache.shindig.auth.OAuthConstants; -import org.apache.shindig.auth.OAuthUtil; -import org.apache.shindig.common.crypto.Crypto; -import org.apache.shindig.common.uri.Uri; -import org.apache.shindig.common.uri.UriBuilder; -import org.apache.shindig.common.util.CharsetUtil; -import org.apache.shindig.gadgets.GadgetException; -import org.apache.shindig.gadgets.http.HttpFetcher; -import org.apache.shindig.gadgets.http.HttpRequest; -import org.apache.shindig.gadgets.http.HttpResponse; -import org.apache.shindig.gadgets.http.HttpResponseBuilder; -import org.apache.shindig.gadgets.oauth.AccessorInfo.HttpMethod; -import org.apache.shindig.gadgets.oauth.AccessorInfo.OAuthParamLocation; -import org.apache.shindig.gadgets.oauth.OAuthStore.TokenInfo; -import org.json.JSONObject; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.regex.Pattern; - -/** - * Implements both signed fetch and full OAuth for gadgets, as well as a combination of the two that - * is necessary to build OAuth enabled gadgets for social sites. - * - * Signed fetch sticks identity information in the query string, signed either with the container's - * private key, or else with a secret shared between the container and the gadget. - * - * Full OAuth redirects the user to the OAuth service provider site to obtain the user's permission - * to access their data. Read the example in the appendix to the OAuth spec for a summary of how - * this works (The spec is at http://oauth.net/core/1.0/). - * - * The combination protocol works by sending identity information in all requests, and allows the - * OAuth dance to happen as well when owner == viewer (by default) or for any viewer when the - * OAuthFetcherConfig#isViewerAccessTokensEnabled parameter is true. This lets OAuth service providers build up - * an identity mapping from ids on social network sites to their own local ids. - */ -public class OAuthRequest { - - // Maximum number of attempts at the protocol before giving up. - private static final int MAX_ATTEMPTS = 2; - - // names of additional OAuth parameters we include in outgoing requests - // TODO(beaton): can we do away with this bit in favor of the opensocial param? - public static final String XOAUTH_APP_URL = "xoauth_app_url"; - - protected static final String OPENSOCIAL_OWNERID = "opensocial_owner_id"; - - protected static final String OPENSOCIAL_VIEWERID = "opensocial_viewer_id"; - - protected static final String OPENSOCIAL_APPID = "opensocial_app_id"; - - // TODO(beaton): figure out if this is the name in the 0.8 spec. - protected static final String OPENSOCIAL_APPURL = "opensocial_app_url"; - - protected static final String OPENSOCIAL_PROXIED_CONTENT = "opensocial_proxied_content"; - - // old and new parameters for the public key - // TODO remove OLD in a far future release - protected static final String XOAUTH_PUBLIC_KEY_OLD = "xoauth_signature_publickey"; - protected static final String XOAUTH_PUBLIC_KEY_NEW = "xoauth_public_key"; - - protected static final Pattern ALLOWED_PARAM_NAME = Pattern.compile("[-:\\w~!@$*()_\\[\\]:,./ ]+"); - - private static final long ACCESS_TOKEN_EXPIRE_UNKNOWN = 0; - private static final long ACCESS_TOKEN_FORCE_EXPIRE = -1; - - - /** - * Configuration options for the fetcher. - */ - protected final OAuthFetcherConfig fetcherConfig; - - /** - * Next fetcher to use in chain. - */ - private final HttpFetcher fetcher; - - /** - * Additional trusted parameters to be included in the OAuth request. - */ - private final List trustedParams; - - /** - * State information from client - */ - protected OAuthClientState clientState; - - /** - * OAuth specific stuff to include in the response. - */ - protected OAuthResponseParams responseParams; - - /** - * The accessor we use for signing messages. This also holds metadata about - * the service provider, such as their URLs and the keys we use to access - * those URLs. - */ - protected AccessorInfo accessorInfo; - - /** - * The request the client really wants to make. - */ - protected HttpRequest realRequest; - - /** - * Data returned along with OAuth access token, null if this is not an access token request - */ - protected Map accessTokenData; - - /** - * @param fetcherConfig configuration options for the fetcher - * @param fetcher fetcher to use for actually making requests - */ - public OAuthRequest(OAuthFetcherConfig fetcherConfig, HttpFetcher fetcher) { - this(fetcherConfig, fetcher, null); - } - - /** - * @param fetcherConfig configuration options for the fetcher - * @param fetcher fetcher to use for actually making requests - * @param trustedParams additional parameters to include in all outgoing OAuth requests, useful - * for client data that can't be pulled from the security token but is still trustworthy. - */ - public OAuthRequest(OAuthFetcherConfig fetcherConfig, HttpFetcher fetcher, - List trustedParams) { - this.fetcherConfig = fetcherConfig; - this.fetcher = fetcher; - this.trustedParams = trustedParams; - } - - /** - * OAuth authenticated fetch. - */ - public HttpResponse fetch(HttpRequest request) { - realRequest = request; - clientState = new OAuthClientState( - fetcherConfig.getStateCrypter(), - request.getOAuthArguments().getOrigClientState()); - responseParams = new OAuthResponseParams(request.getSecurityToken(), request, - fetcherConfig.getStateCrypter()); - try { - return fetchNoThrow(); - } catch (RuntimeException e) { - // We log here to record the request/response pairs that created the failure. - responseParams.logDetailedWarning("OAuth fetch unexpected fatal error", e); - throw e; - } - } - - /** - * Fetch data and build a response to return to the client. We try to always return something - * reasonable to the calling app no matter what kind of madness happens along the way. If an - * unchecked exception occurs, well, then the client is out of luck. - */ - private HttpResponse fetchNoThrow() { - HttpResponseBuilder response = null; - try { - accessorInfo = fetcherConfig.getTokenStore().getOAuthAccessor( - realRequest.getSecurityToken(), realRequest.getOAuthArguments(), clientState, - responseParams, fetcherConfig); - response = fetchWithRetry(); - } catch (OAuthRequestException e) { - // No data for us. - if (OAuthError.UNAUTHENTICATED.name().equals(e.getError())) { - responseParams.logDetailedInfo("Unauthenticated OAuth fetch", e); - } else if (OAuthError.BAD_OAUTH_TOKEN_URL.name().equals(e.getError())) { - responseParams.logDetailedInfo("Invalid OAuth fetch request", e); - } else { - responseParams.logDetailedWarning("OAuth fetch fatal error", e); - } - responseParams.setSendTraceToClient(true); - response = new HttpResponseBuilder() - .setHttpStatusCode(HttpResponse.SC_FORBIDDEN) - .setStrictNoCache(); - responseParams.addToResponse(response, e); - return response.create(); - } - - // OK, got some data back, annotate it as necessary. - if (response.getHttpStatusCode() >= 400) { - responseParams.logDetailedWarning("OAuth fetch fatal error"); - responseParams.setSendTraceToClient(true); - } else if (responseParams.getAznUrl() != null && responseParams.sawErrorResponse()) { - responseParams.logDetailedWarning("OAuth fetch error, reprompting for user approval"); - responseParams.setSendTraceToClient(true); - } - - responseParams.addToResponse(response, null); - return response.create(); - } - - /** - * Fetch data, retrying in the event that that the service provider returns an error and we think - * we can recover by restarting the protocol flow. - */ - private HttpResponseBuilder fetchWithRetry() throws OAuthRequestException { - int attempts = 0; - boolean retry; - HttpResponseBuilder response = null; - do { - retry = false; - ++attempts; - try { - response = attemptFetch(); - } catch (OAuthProtocolException pe) { - retry = handleProtocolException(pe, attempts); - if (!retry) { - if (pe.getProblemCode() != null) { - throw new OAuthRequestException(pe.getProblemCode(), - "Service provider rejected request", pe); - } else { - throw new OAuthRequestException(OAuthError.UNKNOWN_PROBLEM, - "Service provider rejected request", pe); - } - } - } - } while (retry); - return response; - } - - private boolean handleProtocolException(OAuthProtocolException pe, int attempts) - throws OAuthRequestException { - if (pe.canExtend()) { - accessorInfo.setTokenExpireMillis(ACCESS_TOKEN_FORCE_EXPIRE); - } else if (pe.startFromScratch()) { - fetcherConfig.getTokenStore().removeToken(realRequest.getSecurityToken(), - accessorInfo.getConsumer(), realRequest.getOAuthArguments(), responseParams); - accessorInfo.getAccessor().accessToken = null; - accessorInfo.getAccessor().requestToken = null; - accessorInfo.getAccessor().tokenSecret = null; - accessorInfo.setSessionHandle(null); - accessorInfo.setTokenExpireMillis(ACCESS_TOKEN_EXPIRE_UNKNOWN); - } - return (attempts < MAX_ATTEMPTS && pe.canRetry()); - } - - /** - * Does one of the following: - * 1) Sends a request token request, and returns an approval URL to the calling app. - * 2) Sends an access token request to swap a request token for an access token, and then asks - * for data from the service provider. - * 3) Asks for data from the service provider. - */ - private HttpResponseBuilder attemptFetch() throws OAuthRequestException, OAuthProtocolException { - if (needApproval()) { - // This is section 6.1 of the OAuth spec. - checkCanApprove(); - fetchRequestToken(); - // This is section 6.2 of the OAuth spec. - buildClientApprovalState(); - buildAznUrl(); - // break out of the content fetching chain, we need permission from - // the user to do this - return new HttpResponseBuilder() - .setHttpStatusCode(HttpResponse.SC_OK) - .setStrictNoCache(); - } else if (needAccessToken()) { - // This is section 6.3 of the OAuth spec - checkCanApprove(); - exchangeRequestToken(); - saveAccessToken(); - buildClientAccessState(); - } - return fetchData(); - } - - /** - * Do we need to get the user's approval to access the data? - */ - private boolean needApproval() { - return (realRequest.getOAuthArguments().mustUseToken() - && accessorInfo.getAccessor().requestToken == null - && accessorInfo.getAccessor().accessToken == null); - } - - /** - * Make sure the user is authorized to approve access tokens. At the moment - * we restrict this to page owner's viewing their own pages. - */ - private void checkCanApprove() throws OAuthRequestException { - String pageOwner = realRequest.getSecurityToken().getOwnerId(); - String pageViewer = realRequest.getSecurityToken().getViewerId(); - String stateOwner = clientState.getOwner(); - if (pageOwner == null || pageViewer == null) { - throw new OAuthRequestException(OAuthError.UNAUTHENTICATED); - } - if (!fetcherConfig.isViewerAccessTokensEnabled() && !pageOwner.equals(pageViewer)) { - throw new OAuthRequestException(OAuthError.NOT_OWNER); - } - // if (stateOwner != null && !stateOwner.equals(pageViewer)) { - // throw new OAuthRequestException(OAuthError.UNKNOWN_PROBLEM, - // "Client state belongs to a different person " + - // "(state owner=" + stateOwner + ", pageViewer=" + pageViewer + ')'); - // } - } - - private void fetchRequestToken() throws OAuthRequestException, OAuthProtocolException { - OAuthAccessor accessor = accessorInfo.getAccessor(); - HttpRequest request = createRequestTokenRequest(accessor); - - List requestTokenParams = Lists.newArrayList(); - - addCallback(requestTokenParams); - - HttpRequest signed = sanitizeAndSign(request, requestTokenParams, true); - - OAuthMessage reply = sendOAuthMessage(signed); - - accessor.requestToken = OAuthUtil.getParameter(reply, OAuth.OAUTH_TOKEN); - accessor.tokenSecret = OAuthUtil.getParameter(reply, OAuth.OAUTH_TOKEN_SECRET); - } - - private HttpRequest createRequestTokenRequest(OAuthAccessor accessor) - throws OAuthRequestException { - if (accessor.consumer.serviceProvider.requestTokenURL == null) { - throw new OAuthRequestException(OAuthError.BAD_OAUTH_TOKEN_URL, "request token"); - } - HttpRequest request = new HttpRequest( - Uri.parse(accessor.consumer.serviceProvider.requestTokenURL)); - request.setMethod(accessorInfo.getHttpMethod().toString()); - if (accessorInfo.getHttpMethod() == HttpMethod.POST) { - request.setHeader("Content-Type", OAuth.FORM_ENCODED); - } - return request; - } - - private void addCallback(List requestTokenParams) throws OAuthRequestException { - // This will be either the consumer key callback URL or the global callback URL. - String baseCallback = StringUtils.trimToNull(accessorInfo.getConsumer().getCallbackUrl()); - if (baseCallback != null) { - String callbackUrl = fetcherConfig.getOAuthCallbackGenerator().generateCallback( - fetcherConfig, baseCallback, realRequest, responseParams); - if (callbackUrl != null) { - requestTokenParams.add(new Parameter(OAuth.OAUTH_CALLBACK, callbackUrl)); - } - } - } - - /** - * Strip out any owner or viewer identity information passed by the client. - */ - private List sanitize(List params) throws OAuthRequestException { - ArrayList list = Lists.newArrayList(); - for (Parameter p : params) { - String name = p.getKey(); - if (allowParam(name)) { - list.add(p); - } else { - throw new OAuthRequestException(OAuthError.INVALID_PARAMETER, name); - } - } - return list; - } - - protected boolean allowParam(String paramName) { - String canonParamName = paramName.toLowerCase(); - return (!(canonParamName.startsWith("oauth") || - canonParamName.startsWith("xoauth") || - canonParamName.startsWith("opensocial")) && - ALLOWED_PARAM_NAME.matcher(canonParamName).matches()); - } - - /** - * This gives a chance to override parameters by passing trusted parameters. - * - */ - private void overrideParameters(List authParams) - throws OAuthRequestException { - if (trustedParams == null) { - return; - } - - Map paramMap = Maps.newLinkedHashMap(); - for (Parameter param : authParams) { - paramMap.put(param.getKey(), param.getValue()); - } - for (Parameter param : trustedParams) { - if (!isContainerInjectedParameter(param.getKey())) { - throw new OAuthRequestException(OAuthError.INVALID_TRUSTED_PARAMETER, param.getKey()); - } - paramMap.put(param.getKey(), param.getValue()); - } - - authParams.clear(); - for (Entry entry : paramMap.entrySet()) { - authParams.add(new Parameter(entry.getKey(), entry.getValue())); - } - } - - /** - * Add identity information, such as owner/viewer/gadget. - */ - private void addIdentityParams(List params) { - // If no owner or viewer information is required, don't add any identity params. This lets - // us be compatible with strict OAuth service providers that reject extra parameters on - // requests. - if (!realRequest.getOAuthArguments().getSignOwner() && - !realRequest.getOAuthArguments().getSignViewer()) { - return; - } - - String owner = realRequest.getSecurityToken().getOwnerId(); - if (owner != null && realRequest.getOAuthArguments().getSignOwner()) { - params.add(new Parameter(OPENSOCIAL_OWNERID, owner)); - } - - String viewer = realRequest.getSecurityToken().getViewerId(); - if (viewer != null && realRequest.getOAuthArguments().getSignViewer()) { - params.add(new Parameter(OPENSOCIAL_VIEWERID, viewer)); - } - - String app = realRequest.getSecurityToken().getAppId(); - if (app != null) { - params.add(new Parameter(OPENSOCIAL_APPID, app)); - } - - String appUrl = realRequest.getSecurityToken().getAppUrl(); - if (appUrl != null) { - params.add(new Parameter(OPENSOCIAL_APPURL, appUrl)); - } - - if (realRequest.getOAuthArguments().isProxiedContentRequest()) { - params.add(new Parameter(OPENSOCIAL_PROXIED_CONTENT, "1")); - } - } - - /** - * Add signature type to the message. - */ - private void addSignatureParams(List params) { - if (accessorInfo.getConsumer().getConsumer().consumerKey == null) { - params.add( - new Parameter(OAuth.OAUTH_CONSUMER_KEY, realRequest.getSecurityToken().getDomain())); - } - if (accessorInfo.getConsumer().getKeyName() != null) { - params.add(new Parameter(XOAUTH_PUBLIC_KEY_OLD, accessorInfo.getConsumer().getKeyName())); - params.add(new Parameter(XOAUTH_PUBLIC_KEY_NEW, accessorInfo.getConsumer().getKeyName())); - } - params.add(new Parameter(OAuth.OAUTH_VERSION, OAuth.VERSION_1_0)); - params.add(new Parameter(OAuth.OAUTH_TIMESTAMP, - Long.toString(fetcherConfig.getClock().currentTimeMillis() / 1000L))); - // the oauth.net java code uses a clock to generate nonces, which causes nonce collisions - // under heavy load. A random nonce is more reliable. - params.add(new Parameter(OAuth.OAUTH_NONCE, String.valueOf(Math.abs(Crypto.RAND.nextLong())))); - } - - static String getAuthorizationHeader(List> oauthParams) { - StringBuilder result = new StringBuilder("OAuth "); - - boolean first = true; - for (Map.Entry parameter : oauthParams) { - if (!first) { - result.append(", "); - } else { - first = false; - } - result.append(OAuth.percentEncode(parameter.getKey())) - .append("=\"") - .append(OAuth.percentEncode(parameter.getValue())) - .append('"'); - } - return result.toString(); - } - - - /** - * Start with an HttpRequest. - * Throw if there are any attacks in the query. - * Throw if there are any attacks in the post body. - * Build up OAuth parameter list. - * Sign it. - * Add OAuth parameters to new request. - * Send it. - */ - public HttpRequest sanitizeAndSign(HttpRequest base, List params, - boolean tokenEndpoint) throws OAuthRequestException { - if (params == null) { - params = Lists.newArrayList(); - } - UriBuilder target = new UriBuilder(base.getUri()); - String query = target.getQuery(); - target.setQuery(null); - params.addAll(sanitize(OAuth.decodeForm(query))); - - switch(OAuthUtil.getSignatureType(tokenEndpoint, base.getHeader("Content-Type"))) { - case URL_ONLY: - break; - case URL_AND_FORM_PARAMS: - try { - params.addAll(sanitize(OAuth.decodeForm(base.getPostBodyAsString()))); - } catch (IllegalArgumentException e) { - // Occurs if OAuth.decodeForm finds an invalid URL to decode. - throw new OAuthRequestException(OAuthError.INVALID_REQUEST, - "Could not decode body", e); - } - break; - case URL_AND_BODY_HASH: - try { - byte[] body = IOUtils.toByteArray(base.getPostBody()); - byte[] hash = DigestUtils.sha(body); - String b64 = new String(Base64.encodeBase64(hash), Charsets.UTF_8.name()); - params.add(new Parameter(OAuthConstants.OAUTH_BODY_HASH, b64)); - } catch (IOException e) { - throw new OAuthRequestException(OAuthError.UNKNOWN_PROBLEM, - "Error taking body hash", e); - } - break; - } - - // authParams are parameters prefixed with 'xoauth' 'oauth' or 'opensocial', - // trusted parameters have ability to override these parameters. - List authParams = Lists.newArrayList(); - - addIdentityParams(authParams); - - addSignatureParams(authParams); - - overrideParameters(authParams); - - params.addAll(authParams); - - try { - OAuthMessage signed = OAuthUtil.newRequestMessage(accessorInfo.getAccessor(), - base.getMethod(), target.toString(), params); - HttpRequest oauthHttpRequest = createHttpRequest(base, selectOAuthParams(signed)); - // Following 302s on OAuth responses is unlikely to be productive. - oauthHttpRequest.setFollowRedirects(false); - return oauthHttpRequest; - } catch (OAuthException e) { - throw new OAuthRequestException(OAuthError.UNKNOWN_PROBLEM, - "Error signing message", e); - } - } - - private HttpRequest createHttpRequest(HttpRequest base, - List> oauthParams) throws OAuthRequestException { - - OAuthParamLocation paramLocation = accessorInfo.getParamLocation(); - - // paramLocation could be overriden by a run-time parameter to fetchRequest - - HttpRequest result = new HttpRequest(base); - - // If someone specifies that OAuth parameters go in the body, but then sends a request for - // data using GET, we've got a choice. We can throw some type of error, since a GET request - // can't have a body, or we can stick the parameters somewhere else, like, say, the header. - // We opt to put them in the header, since that stands some chance of working with some - // OAuth service providers. - if (paramLocation == OAuthParamLocation.POST_BODY && - !result.getMethod().equals("POST")) { - paramLocation = OAuthParamLocation.AUTH_HEADER; - } - - switch (paramLocation) { - case AUTH_HEADER: - result.addHeader("Authorization", getAuthorizationHeader(oauthParams)); - break; - - case POST_BODY: - String contentType = result.getHeader("Content-Type"); - if (!OAuth.isFormEncoded(contentType)) { - throw new OAuthRequestException(OAuthError.INVALID_REQUEST, - "OAuth param location can only be post_body if it is of " + - "type x-www-form-urlencoded"); - } - String oauthData = OAuthUtil.formEncode(oauthParams); - if (result.getPostBodyLength() == 0) { - result.setPostBody(CharsetUtil.getUtf8Bytes(oauthData)); - } else { - StringBuilder postBody = new StringBuilder(); - postBody.append(result.getPostBodyAsString()); - - if (!result.getPostBodyAsString().endsWith("&")) { - postBody.append('&'); - } - - postBody.append(oauthData); - result.setPostBody(postBody.toString().getBytes()); - } - break; - - case URI_QUERY: - result.setUri(Uri.parse(OAuthUtil.addParameters(result.getUri().toString(), oauthParams))); - break; - } - - return result; - } - - /** - * Sends OAuth request token and access token messages. - */ - private OAuthMessage sendOAuthMessage(HttpRequest request) - throws OAuthRequestException, OAuthProtocolException { - HttpResponse response = fetchFromServer(request); - checkForProtocolProblem(response); - OAuthMessage reply = new OAuthMessage(null, null, null); - - reply.addParameters(OAuth.decodeForm(response.getResponseAsString())); - reply = parseAuthHeader(reply, response); - if (OAuthUtil.getParameter(reply, OAuth.OAUTH_TOKEN) == null) { - throw new OAuthRequestException(OAuthError.MISSING_OAUTH_PARAMETER, - OAuth.OAUTH_TOKEN); - } - if (OAuthUtil.getParameter(reply, OAuth.OAUTH_TOKEN_SECRET) == null) { - throw new OAuthRequestException(OAuthError.MISSING_OAUTH_PARAMETER, - OAuth.OAUTH_TOKEN_SECRET); - } - return reply; - } - - /** - * Parse OAuth WWW-Authenticate header and either add them to an existing - * message or create a new message. - * - * @param msg - * @param resp - * @return the updated message. - */ - private OAuthMessage parseAuthHeader(OAuthMessage msg, HttpResponse resp) { - if (msg == null) { - msg = new OAuthMessage(null, null, null); - } - - for (String auth : resp.getHeaders("WWW-Authenticate")) { - msg.addParameters(OAuthMessage.decodeAuthorization(auth)); - } - - return msg; - } - - /** - * Builds the data we'll cache on the client while we wait for approval. - */ - private void buildClientApprovalState() { - OAuthAccessor accessor = accessorInfo.getAccessor(); - responseParams.getNewClientState().setRequestToken(accessor.requestToken); - responseParams.getNewClientState().setRequestTokenSecret(accessor.tokenSecret); - responseParams.getNewClientState().setOwner(realRequest.getSecurityToken().getOwnerId()); - } - - /** - * Builds the URL the client needs to visit to approve access. - */ - private void buildAznUrl() throws OAuthRequestException { - // We add the token, gadget is responsible for the callback URL. - OAuthAccessor accessor = accessorInfo.getAccessor(); - if (accessor.consumer.serviceProvider.userAuthorizationURL == null) { - throw new OAuthRequestException(OAuthError.BAD_OAUTH_TOKEN_URL, - "authorization"); - } - StringBuilder azn = new StringBuilder( - accessor.consumer.serviceProvider.userAuthorizationURL); - if (azn.indexOf("?") == -1) { - azn.append('?'); - } else { - azn.append('&'); - } - azn.append(OAuth.OAUTH_TOKEN); - azn.append('='); - azn.append(OAuth.percentEncode(accessor.requestToken)); - responseParams.setAznUrl(azn.toString()); - } - - /** - * Do we need to exchange a request token for an access token? - */ - private boolean needAccessToken() { - if (realRequest.getOAuthArguments().mustUseToken() - && accessorInfo.getAccessor().requestToken != null - && accessorInfo.getAccessor().accessToken == null) { - return true; - } - return realRequest.getOAuthArguments().mayUseToken() && accessTokenExpired(); - } - - private boolean accessTokenExpired() { - return (accessorInfo.getTokenExpireMillis() != ACCESS_TOKEN_EXPIRE_UNKNOWN - && accessorInfo.getTokenExpireMillis() < fetcherConfig.getClock().currentTimeMillis()); - } - - /** - * Implements section 6.3 of the OAuth spec. - */ - private void exchangeRequestToken() throws OAuthRequestException, OAuthProtocolException { - if (accessorInfo.getAccessor().accessToken != null) { - // session extension per - // http://oauth.googlecode.com/svn/spec/ext/session/1.0/drafts/1/spec.html - accessorInfo.getAccessor().requestToken = accessorInfo.getAccessor().accessToken; - accessorInfo.getAccessor().accessToken = null; - } - OAuthAccessor accessor = accessorInfo.getAccessor(); - - if (accessor.consumer.serviceProvider.accessTokenURL == null) { - throw new OAuthRequestException(OAuthError.BAD_OAUTH_TOKEN_URL, "access token"); - } - Uri accessTokenUri = Uri.parse(accessor.consumer.serviceProvider.accessTokenURL); - HttpRequest request = new HttpRequest(accessTokenUri); - request.setMethod(accessorInfo.getHttpMethod().toString()); - if (accessorInfo.getHttpMethod() == HttpMethod.POST) { - request.setHeader("Content-Type", OAuth.FORM_ENCODED); - } - - List msgParams = Lists.newArrayList(); - msgParams.add(new Parameter(OAuth.OAUTH_TOKEN, accessor.requestToken)); - if (accessorInfo.getSessionHandle() != null) { - msgParams.add(new Parameter(OAuthConstants.OAUTH_SESSION_HANDLE, - accessorInfo.getSessionHandle())); - } - String receivedCallback = realRequest.getOAuthArguments().getReceivedCallbackUrl(); - if (!StringUtils.isBlank(receivedCallback)) { - try { - Uri parsed = Uri.parse(receivedCallback); - String verifier = parsed.getQueryParameter(OAuth.OAUTH_VERIFIER); - if (verifier != null) { - msgParams.add(new Parameter(OAuth.OAUTH_VERIFIER, verifier)); - } - } catch (IllegalArgumentException e) { - throw new OAuthRequestException(OAuthError.INVALID_REQUEST, - "Invalid received callback URL: " + receivedCallback, e); - } - } - - HttpRequest signed = sanitizeAndSign(request, msgParams, true); - - OAuthMessage reply = sendOAuthMessage(signed); - - accessor.accessToken = OAuthUtil.getParameter(reply, OAuth.OAUTH_TOKEN); - accessor.tokenSecret = OAuthUtil.getParameter(reply, OAuth.OAUTH_TOKEN_SECRET); - accessorInfo.setSessionHandle(OAuthUtil.getParameter(reply, - OAuthConstants.OAUTH_SESSION_HANDLE)); - accessorInfo.setTokenExpireMillis(ACCESS_TOKEN_EXPIRE_UNKNOWN); - if (OAuthUtil.getParameter(reply, OAuthConstants.OAUTH_EXPIRES_IN) != null) { - try { - int expireSecs = Integer.parseInt(OAuthUtil.getParameter(reply, - OAuthConstants.OAUTH_EXPIRES_IN)); - long expireMillis = fetcherConfig.getClock().currentTimeMillis() + expireSecs * 1000L; - accessorInfo.setTokenExpireMillis(expireMillis); - } catch (NumberFormatException e) { - // Hrm. Bogus server. We can safely ignore this, we'll just wait for the server to - // tell us when the access token has expired. - responseParams.logDetailedWarning("server returned bogus expiration"); - } - } - - // Clients may want to retrieve extra information returned with the access token. Several - // OAuth service providers (e.g. Yahoo, NetFlix) return a user id along with the access - // token, and the user id is required to use their APIs. Clients signal that they need this - // extra data by sending a fetch request for the access token URL. - // - // We don't return oauth* parameters from the response, because we know how to handle those - // ourselves and some of them (such as oauth_token_secret) aren't supposed to be sent to the - // client. - // - // Note that this data is not stored server-side. Clients need to cache these user-ids or - // other data themselves, probably in user prefs, if they expect to need the data in the - // future. - if (accessTokenUri.equals(realRequest.getUri())) { - accessTokenData = Maps.newHashMap(); - for (Entry param : OAuthUtil.getParameters(reply)) { - if (!param.getKey().startsWith("oauth")) { - accessTokenData.put(param.getKey(), param.getValue()); - } - } - } - } - - /** - * Save off our new token and secret to the persistent store. - */ - private void saveAccessToken() throws OAuthRequestException { - OAuthAccessor accessor = accessorInfo.getAccessor(); - TokenInfo tokenInfo = new TokenInfo(accessor.accessToken, accessor.tokenSecret, - accessorInfo.getSessionHandle(), accessorInfo.getTokenExpireMillis()); - fetcherConfig.getTokenStore().storeTokenKeyAndSecret(realRequest.getSecurityToken(), - accessorInfo.getConsumer(), realRequest.getOAuthArguments(), tokenInfo, responseParams); - } - - /** - * Builds the data we'll cache on the client while we make requests. - */ - private void buildClientAccessState() { - OAuthAccessor accessor = accessorInfo.getAccessor(); - responseParams.getNewClientState().setAccessToken(accessor.accessToken); - responseParams.getNewClientState().setAccessTokenSecret(accessor.tokenSecret); - responseParams.getNewClientState().setOwner(realRequest.getSecurityToken().getOwnerId()); - responseParams.getNewClientState().setSessionHandle(accessorInfo.getSessionHandle()); - responseParams.getNewClientState().setTokenExpireMillis(accessorInfo.getTokenExpireMillis()); - } - - /** - * Get honest-to-goodness user data. - * - * @throws OAuthProtocolException if the service provider returns an OAuth - * related error instead of user data. - */ - private HttpResponseBuilder fetchData() throws OAuthRequestException, OAuthProtocolException { - HttpResponseBuilder builder = null; - if (accessTokenData != null) { - // This is a request for access token data, return it. - builder = formatAccessTokenData(); - } else { - HttpRequest signed = sanitizeAndSign(realRequest, null, false); - - HttpResponse response = fetchFromServer(signed); - - checkForProtocolProblem(response); - builder = new HttpResponseBuilder(response); - } - return builder; - } - - private HttpResponse fetchFromServer(HttpRequest request) throws OAuthRequestException { - HttpResponse response = null; - try { - response = fetcher.fetch(request); - if (response == null) { - throw new OAuthRequestException(OAuthError.MISSING_SERVER_RESPONSE); - } - return response; - } catch (GadgetException e) { - throw new OAuthRequestException(OAuthError.MISSING_SERVER_RESPONSE, "", e); - } finally { - responseParams.addRequestTrace(request, response); - } - } - - /** - * Access token data is returned to the gadget as json key/value pairs: - * - * { "user_id": "12345678" } - */ - private HttpResponseBuilder formatAccessTokenData() { - HttpResponseBuilder builder = new HttpResponseBuilder(); - builder.addHeader("Content-Type", "application/json; charset=utf-8"); - builder.setHttpStatusCode(HttpResponse.SC_OK); - // no need to cache this, these requests should be fairly rare, and the results should be - // cached in gadget. - builder.setStrictNoCache(); - JSONObject json = new JSONObject(accessTokenData); - builder.setResponseString(json.toString()); - return builder; - } - - /** - * Look for an OAuth protocol problem. For cases where no access token is in play - * @param response - * @throws OAuthProtocolException - */ - private void checkForProtocolProblem(HttpResponse response) throws OAuthProtocolException { - if (couldBeFullOAuthError(response)) { - // OK, might be OAuth related. - OAuthMessage message = parseAuthHeader(null, response); - if (OAuthUtil.getParameter(message, OAuthProblemException.OAUTH_PROBLEM) != null) { - // SP reported extended error information - throw new OAuthProtocolException(response.getHttpStatusCode(), message); - } - // No extended information, guess based on HTTP response code. - if (response.getHttpStatusCode() == HttpResponse.SC_UNAUTHORIZED) { - throw new OAuthProtocolException(response.getHttpStatusCode()); - } - } - } - - /** - * Check if a response might be due to an OAuth protocol error. We don't want to intercept - * errors for signed fetch, we only care about places where we are dealing with OAuth request - * and/or access tokens. - */ - private boolean couldBeFullOAuthError(HttpResponse response) { - // 400, 401 and 403 are likely to be authentication errors. Unfortunately there is - // significant overlap with other types of server errors as well, so we can't just assume - // that the root cause of these errors is a bad token or a bad consumer key. - if (response.getHttpStatusCode() != HttpResponse.SC_BAD_REQUEST - && response.getHttpStatusCode() != HttpResponse.SC_UNAUTHORIZED - && response.getHttpStatusCode() != HttpResponse.SC_FORBIDDEN) { - return false; - } - // If the client forced us to use full OAuth, this might be OAuth related. - if (realRequest.getOAuthArguments().mustUseToken()) { - return true; - } - // If we're using an access token, this might be OAuth related. - if (accessorInfo.getAccessor().accessToken != null) { - return true; - } - // Not OAuth related. - return false; - } - - /** - * Extracts only those parameters from an OAuthMessage that are OAuth-related. - * An OAuthMessage may hold a whole bunch of non-OAuth-related parameters - * because they were all needed for signing. But when constructing a request - * we need to be able to extract just the OAuth-related parameters because - * they, and only they, may have to be put into an Authorization: header or - * some such thing. - * - * @param message the OAuthMessage object, which holds non-OAuth parameters - * such as foo=bar (which may have been in the original URI query part, or - * perhaps in the POST body), as well as OAuth-related parameters (such as - * oauth_timestamp or oauth_signature). - * - * @return a list that contains only the oauth_related parameters. - */ - static List> selectOAuthParams(OAuthMessage message) { - List> result = Lists.newArrayList(); - for (Map.Entry param : OAuthUtil.getParameters(message)) { - if (isContainerInjectedParameter(param.getKey())) { - result.add(param); - } - } - return result; - } - - protected static boolean isContainerInjectedParameter(String key) { - key = key.toLowerCase(); - return key.startsWith("oauth") || key.startsWith("xoauth") || key.startsWith("opensocial"); - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/org/apache/shindig/social/opensocial/model/MediaItem.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/org/apache/shindig/social/opensocial/model/MediaItem.java deleted file mode 100644 index 13decc6518..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/org/apache/shindig/social/opensocial/model/MediaItem.java +++ /dev/null @@ -1,367 +0,0 @@ -/* @generated */ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package org.apache.shindig.social.opensocial.model; - -import org.apache.shindig.protocol.model.Exportablebean; -import org.apache.shindig.social.core.model.MediaItemImpl; - -import com.google.inject.ImplementedBy; - -/** - * A container for the media item. - */ -@ImplementedBy(MediaItemImpl.class) -@Exportablebean -public interface MediaItem { - - /** - * Fields for MediaItem. - */ - public static enum Field { - ALBUM_ID("albumId"), - CREATED("created"), - DESCRIPTION("description"), - DURATION("duration"), - FILE_SIZE("fileSize"), - ID("id"), - LANGUAGE("language"), - LAST_UPDATED("lastUpdated"), - LOCATION("location"), - MIME_TYPE("mimeType"), - NUM_COMMENTS("numComments"), - NUM_VIEWS("numViews"), - NUM_VOTES("numVotes"), - RATING("rating"), - START_TIME("startTime"), - TAGGED_PEOPLE("taggedPeople"), - TAGS("tags"), - THUMBNAIL_URL("thumbnailUrl"), - TITLE("title"), - TYPE("type"), - URL("url"); - - /** - * The field name that the instance represents. - */ - private final String jsonString; - - /** - * create a field base on the an element name. - * - * @param jsonString the name of the element - */ - private Field(String jsonString) { - this.jsonString = jsonString; - } - - /** - * @return a string representation of the enum. - */ - @Override - public String toString() { - return this.jsonString; - } - } - - /** - * An enumeration of potential media types. - */ - public enum Type { - AUDIO("audio"), - IMAGE("image"), - VIDEO("video"); - - /** - * The field type. - */ - private final String jsonString; - - /** - * Construct a field type based on the name. - * - * @param jsonString - */ - private Type(String jsonString) { - this.jsonString = jsonString; - } - - /** - * @return a string representation of the enum. - */ - @Override - public String toString() { - return this.jsonString; - } - } - - /** - * Get the mime type for this Media item. - * @return the mime type. - */ - String getMimeType(); - - /** - * Set the mimetype for this Media Item. - * @param mimeType the mimeType - */ - void setMimeType(String mimeType); - - /** - * Get the Type of this media item, either audio, image or video. - * @return the Type of this media item - */ - Type getType(); - - /** - * Get the Type of this media item, either audio, image or video. - * @param type the type of this media item - */ - void setType(Type type); - - /** - * Get a URL for the media item. - * @return the url of the media item - */ - String getUrl(); - - /** - * Set a URL for the media item. - * @param url the media item URL - */ - void setUrl(String url); - - /** - * Get the thumbnail URL for the media item. - * @return the thumbnail url of the MediaItem - */ - String getThumbnailUrl(); - - /** - * Set a thumbnail URL for the media item. - * @param url the thumbnail URL of the MediaItem - */ - void setThumbnailUrl(String url); - - /** - * Get the album which the media item belongs to. - * @return the album id. - */ - String getAlbumId(); - - /** - * Set the album id which the media item belongs to. - * @param albumId the album id - */ - void setAlbumId(String albumId); - - /** - * Get the creation time - * @return creation time associated with the media item in UTC. - */ - String getCreated(); - - /** - * Set the creation time - * @param created creation time associated with the media item in UTC. - */ - void setCreated(String created); - - /** - * Get the description of the media item - * @return description - */ - String getDescription(); - - /** - * Set the description of the media item - * @param description - */ - void setDescription(String description); - - /** - * Get the playtime length in seconds of the MediaItem - * @return playtime - */ - String getDuration(); - - /** - * Set the playtime length in seconds of the MediaItem - * @param duration - */ - void setDuration(String duration); - - /** - * Get the MediaItem's file size - * @return fileSize - */ - String getFileSize(); - - /** - * Set the number of bytes for the MediaItem - * @param fileSize - */ - void setFileSize(String fileSize); - - /** - * Get the MediaItem's id - * @return id - */ - String getId(); - - /** - * Set the MediaItem's id - * @param id - */ - void setId(String id); - - /** - * Get the language associated with the media item in ISO 639-3 format - * @return - */ - String getLanguage(); - - /** - * Set the language associated with the media item in ISO 639-3 format - * @param language - */ - void setLanguage(String language); - - /** - * Get the update time associated with the media item - * @return lastUpdated - */ - String getLastUpdated(); - - /** - * Set the update time associated with the media item - * @param lastUpdated - */ - void setLastUpdated(String lastUpdated); - - /** - * Get the location corresponding to the media item - * @return location - */ - Address getLocation(); - - /** - * Set the location corresponding to the media item - * @param location - */ - void setLocation(Address location); - - - /** - * Get the number of comments on the media item - * @return numComments - */ - String getNumComments(); - - /** - * Set the number of comments on the media item - * @param numComments - */ - void setNumComments(String numComments); - - /** - * Get the number of views for the media item - * @return numViews - */ - String getNumViews(); - - /** - * Set the number of views for the media item - * @param numViews - */ - void setNumViews(String numViews); - - - /** - * Get the number of votes received for voting. - * @return numVotes - */ - String getNumVotes(); - - /** - * Set the number of votes received for voting. - * @param numVotes - */ - void setNumVotes(String numVotes); - - /** - * Get the average rating of the media item on a scale of 0-10 - * @return rating - */ - String getRating(); - - /** - * Set the average rating of the media item on a scale of 0-10 - * @param rating - */ - void setRating(String rating); - - /** - * Get the time when the content is available. - * @return startTime - */ - String getStartTime(); - - /** - * Set the the time when the content is available. - * @param startTime - */ - void setStartTime(String startTime); - - /** - * Get people tagged in the media item. - * @return taggedPeople - */ - String getTaggedPeople(); - - /** - * Set people tagged in the media item. - * @param taggedPeople - */ - void setTaggedPeople(String taggedPeople); - - - /** - * Get tags associated with this media item. - * @return tags - */ - String getTags(); - - /** - * Set tags associated with this media item. - * @param tags - */ - void setTags(String tags); - - /** - * Get the title for this media item - * @return title - */ - String getTitle(); - - /** - * Set the title for this media item - * @param title - */ - void setTitle(String title); -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/portal.properties deleted file mode 100644 index 45c7e3ebf9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/portal.properties +++ /dev/null @@ -1 +0,0 @@ -dockbar.add.portlets=3_WAR_opensocialportlet \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/portlet.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/portlet.properties deleted file mode 100644 index f23f197f1e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/portlet.properties +++ /dev/null @@ -1,12 +0,0 @@ -include-and-override=portlet-ext.properties - -#pubsub.uri.load.timeout=15000 - -resource.actions.configs=resource-actions/default.xml - -#shindig.js.debug=1 -#shindig.no.cache=1 - -shindig.oauth.callback.url=%scheme%://%host%/opensocial-portlet/gadgets/oauthcallback -shindig.oauth.key.file.name=rsaSigningKey.pem -shindig.oauth.key.name=rsaKeyName \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/resource-actions/default.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/resource-actions/default.xml deleted file mode 100644 index 51dc680132..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/resource-actions/default.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - 1 - - - ACCESS_IN_CONTROL_PANEL - CONFIGURATION - VIEW - - - VIEW - - - - - ACCESS_IN_CONTROL_PANEL - CONFIGURATION - - - - - 2 - - - ADD_TO_PAGE - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - CONFIGURATION - - - - - 3 - - - ADD_TO_PAGE - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - CONFIGURATION - - - - - 4 - - - ACCESS_IN_CONTROL_PANEL - CONFIGURATION - VIEW - - - VIEW - - - VIEW - - - ACCESS_IN_CONTROL_PANEL - CONFIGURATION - - - - - com.liferay.opensocial - - 1 - - - - PERMISSIONS - PUBLISH_GADGET - - - PUBLISH_GADGET - - - - PERMISSIONS - PUBLISH_GADGET - - - - - com.liferay.opensocial.model.Gadget - - 1 - - - - DELETE - PERMISSIONS - UPDATE - VIEW - - - VIEW - - - VIEW - - - DELETE - PERMISSIONS - UPDATE - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/service.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/service.properties deleted file mode 100644 index 6afe1530b4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/service.properties +++ /dev/null @@ -1,41 +0,0 @@ -## -## 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=OpenSocial - build.number=4 - build.date=1343264401607 - 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/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/web.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/web.xml deleted file mode 100644 index 38a5d68a9d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - portalContextConfigLocation - /WEB-INF/classes/META-INF/messaging-spring.xml - - - authFilter - com.liferay.opensocial.shindig.servlet.AuthenticationServletFilter - - - Shindig Filter - com.liferay.opensocial.shindig.servlet.ShindigFilter - - - Shindig Filter - /* - - - - http://java.sun.com/jsp/jstl/core - /WEB-INF/tld/c.tld - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/web.xml.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/web.xml.properties deleted file mode 100644 index 76c56faf1e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/WEB-INF/web.xml.properties +++ /dev/null @@ -1,57 +0,0 @@ -auth.filter.replace=\ - \ - authFilter\ - /gadgets/api/rest/*\ - \ - \ - authFilter\ - /gadgets/api/rpc/*\ - \ - \ - authFilter\ - /gadgets/ifr\ - \ - \ - authFilter\ - /gadgets/makeRequest\ - \ - \ - authFilter\ - /rest/*\ - \ - \ - authFilter\ - /rpc/*\ - \ - \ - authFilter\ - /social/*\ - - -json.rpc.servlet.replace=\ - \ - jsonRpcServlet\ - /gadgets/api/rpc/*\ - \ - \ - jsonRpcServlet\ - /rpc/*\ - \ - \ - jsonRpcServlet\ - /social/rpc/*\ - - -rest.api.servlet.replace=\ - \ - restapiServlet\ - /gadgets/api/rest/*\ - \ - \ - restapiServlet\ - /rest/*\ - \ - \ - restapiServlet\ - /social/rest/*\ - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/adhoc_gadget/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/adhoc_gadget/configuration.jsp deleted file mode 100644 index 8543ef2ea4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/adhoc_gadget/configuration.jsp +++ /dev/null @@ -1,88 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -String tabs2 = ParamUtil.getString(request, "tabs2", "gadget"); - -String url = PrefsParamUtil.getString(portletPreferences, request, "url", StringPool.BLANK); - -Map userPrefs = (Map)renderRequest.getAttribute(WebKeys.USER_PREFS); - -Map oAuthServices = (Map)renderRequest.getAttribute(WebKeys.OAUTH_SERVICES); -%> - - - - - - - - - - - - - - <% - String tabs2Names = "gadget"; - %> - - - - <% - tabs2Names = tabs2Names.concat(",manage-oauth"); - %> - - - - - - <% - tabs2Names = tabs2Names.concat(",preferences"); - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/adhoc_gadget/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/adhoc_gadget/view.jsp deleted file mode 100644 index 9e1febbb90..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/adhoc_gadget/view.jsp +++ /dev/null @@ -1,43 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -Gadget gadget = (Gadget)renderRequest.getAttribute(WebKeys.GADGET); -%> - - - -
    - - - -
    - - -
    - - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/css/main.css deleted file mode 100644 index 96d9630f02..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/css/main.css +++ /dev/null @@ -1,7 +0,0 @@ -.opensocial-portlet-admin .category-treeview .tree-label { - cursor: pointer; - - &:hover { - color: #06C; - } -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/edit_gadget.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/edit_gadget.jsp deleted file mode 100644 index 871491f4b1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/edit_gadget.jsp +++ /dev/null @@ -1,217 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -long gadgetId = ParamUtil.getLong(request, "gadgetId"); - -Gadget gadget = null; - -try { - gadget = GadgetLocalServiceUtil.getGadget(gadgetId); -} -catch (NoSuchGadgetException nsge) { -} - -String portletCategoryNames = StringPool.BLANK; - -if (gadget != null) { - portletCategoryNames = gadget.getPortletCategoryNames(); -} - -String editorGadgetURL = ParamUtil.getString(request, "editorGadgetURL"); - -boolean editorGadget = false; - -String publishGadgetRedirect = StringPool.BLANK; - -if (Validator.isNotNull(editorGadgetURL)) { - editorGadget = true; - - PortletURL publishGadgetRedirectURL = renderResponse.createRenderURL(); - - publishGadgetRedirectURL.setParameter("mvcPath", "/editor/publish_gadget_redirect.jsp"); - - publishGadgetRedirectURL.setWindowState(LiferayWindowState.POP_UP); - - publishGadgetRedirect = publishGadgetRedirectURL.toString(); -} -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    - -
    - - - - - - -
    -
    - - - function saveGadget() { - submitForm(document.fm); - } - - Liferay.Util.focusFormField(document.fm.name); - - - - var selectedPortletCategoryNamesNode = A.one('#portletCategoryNames'); - - var portletCategoryNames = selectedPortletCategoryNamesNode.val(); - - var selectedPortletCategoryNames = []; - - if (portletCategoryNames) { - selectedPortletCategoryNames = portletCategoryNames.split(','); - } - - var CategoryTreeNode = A.Component.create( - { - ATTRS: { - category: { - value: '' - } - }, - - EXTENDS: A.TreeNodeCheck, - - NAME: 'CategoryTreeNode' - } - ); - - var onCheckedChange = function(event) { - var category = event.target.get('category') - - if (event.newVal) { - if (A.Array.indexOf(selectedPortletCategoryNames, category) == -1) { - selectedPortletCategoryNames.push(category); - - selectedPortletCategoryNamesNode.val(selectedPortletCategoryNames.join()); - } - } - else { - A.Array.removeItem(selectedPortletCategoryNames, category); - - selectedPortletCategoryNamesNode.val(selectedPortletCategoryNames.join()); - } - }; - - var treeView = new A.TreeView( - { - boundingBox: '#categoryTreeView', - on: { - '*:checkedChange': onCheckedChange - }, - type: 'normal' - } - ).render(); - - <% - PortletLister portletLister = PortletListerFactoryUtil.getPortletLister(); - - portletLister.setIteratePortlets(false); - portletLister.setThemeDisplay(themeDisplay); - portletLister.setUser(user); - - TreeView treeView = portletLister.getTreeView(); - - for (TreeNodeView treeNodeView : treeView.getList()) { - %> - - var category = '<%= treeNodeView.getObjId() %>'; - - var checked = ((<%= gadget == null %> && category == 'root//category.gadgets') || A.Array.indexOf(selectedPortletCategoryNames, category) > -1); - - var categoryTreeNode = new CategoryTreeNode( - { - alwaysShowHitArea: false, - checked: checked, - category: category, - id: '<%= treeNodeView.getId() %>', - label: '<%= UnicodeFormatter.toString(LanguageUtil.get(user.getLocale(), treeNodeView.getName())) %>', - leaf: false - } - ); - - var parentNode = treeView.getNodeById('<%= treeNodeView.getParentId() %>') || treeView; - - parentNode.appendChild(categoryTreeNode); - - <% - } - %> - - treeView.expandAll(); - - -<% -if (gadget == null) { - PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "publish-gadget"), currentURL); -} -else { - PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "edit"), currentURL); -} -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/edit_oauth_consumers.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/edit_oauth_consumers.jsp deleted file mode 100644 index a07107497c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/edit_oauth_consumers.jsp +++ /dev/null @@ -1,166 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -long gadgetId = ParamUtil.getLong(request, "gadgetId"); - -String gadgetKey = StringPool.BLANK; - -Gadget gadget = null; - -if (gadgetId > 0) { - gadget = GadgetLocalServiceUtil.fetchGadget(gadgetId); - - gadgetKey = GadgetConstants.toPublishedGadgetKey(gadgetId); -} -else { - redirect = StringPool.BLANK; - - gadget = ShindigUtil.getGadget(portletPreferences); - - String namespace = ShindigUtil.getPortletResourceNamespace(renderRequest, themeDisplay); - - long moduleId = ShindigUtil.getModuleId(namespace); - - gadgetKey = GadgetConstants.toAdhocGadgetKey(moduleId); -} - -Map oAuthServices = null; - -try { - oAuthServices = ShindigUtil.getOAuthServices(gadget.getUrl()); -} -catch (Exception e) { -} - -int oAuthServiceCount = 0; -%> - - - - - - - - - - - - - <% - for (Map.Entry entry : oAuthServices.entrySet()) { - OAuthService oAuthService = entry.getValue(); - - String serviceName = oAuthService.getName(); - - long oAuthConsumerId = 0; - - OAuthConsumer oAuthConsumer = OAuthConsumerLocalServiceUtil.fetchOAuthConsumer(gadgetKey, serviceName); - - if (oAuthConsumer != null) { - oAuthConsumerId = oAuthConsumer.getOAuthConsumerId(); - } - %> - -

    <%= serviceName %>

    - - - - - - - - - - - - - - - - -
    - -
    -
    - - <% - oAuthServiceCount++; - } - %> - - - - - - - - -
    - - - function saveOAuthConsumers() { - submitForm(document.fm); - } - - Liferay.Util.focusFormField(document.fm.name); - - - - function renderConsumerSecretRow(rowCount) { - var consumerSecretField = A.one('#consumerSecretField' + rowCount); - - A.one('#keyType' + rowCount).get('options').each( - function() { - if (this.get('selected') && (this.get('value') == '<%= OAuthConsumerConstants.KEY_TYPE_RSA_PRIVATE %>')) { - consumerSecretField.hide(); - } - else { - consumerSecretField.show(); - } - } - ) - }; - - <% - for (int rowCount = 0; rowCount < oAuthServiceCount; rowCount++) { - %> - - A.one('#keyType<%= rowCount %>').on( - 'change', - function() { - renderConsumerSecretRow(<%= rowCount %>); - } - ); - - renderConsumerSecretRow(<%= rowCount %>); - - <% - } - %> - - - -<% -PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(pageContext, "manage-oauth"), currentURL); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/gadget_action.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/gadget_action.jsp deleted file mode 100644 index 3db0cba72a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/gadget_action.jsp +++ /dev/null @@ -1,87 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); - -Gadget gadget = (Gadget)row.getObject(); - -Map oAuthServices = null; - -try { - oAuthServices = ShindigUtil.getOAuthServices(gadget.getUrl()); -} -catch (Exception e) { - row.setRestricted(true); -} -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/view.jsp deleted file mode 100644 index 74c8d616ef..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/admin/view.jsp +++ /dev/null @@ -1,84 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -PortletURL portletURL = renderResponse.createRenderURL(); -%> - - - - - - - - <% - String gadgetURL = gadget.getUrl(); - %> - - - - - - -
    - - - - - - - - - - - - - - - - - - -
    - -
    - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/css/main.css deleted file mode 100644 index 89e05507f8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/css/main.css +++ /dev/null @@ -1,136 +0,0 @@ -@import "compass"; - -.opensocial-portlet-editor { - .tree-view-editor { - background: #FFF; - height: 100%; - } - - .tree-view-editor-column { - float: left; - height: 100%; - width: 20%; - } - - .main-editor-column { - float: right; - height: 100%; - width: 80%; - } - - .tree-view-editor { - .tree-node { - .tree-node-loaded { - color: #06C; - font-weight: bold; - } - - .tree-label:hover { - color: #06C; - } - - .tree-node-loaded .tree-label { - font-weight: bold; - } - } - - .tree-node-selected { - background: #E4F5FC; - - .tree-label { - font-weight: normal; - } - } - - .tree-node-content:hover .gadget-editor-tree-node-contextmenuicon, .gadget-editor-tree-node-contextmenuicon-open { - background-repeat: no-repeat; - color: #555; - float: right; - margin-right: 4px; - text-decoration: none; - } - - .tree-node-content { - .gadget-editor-tree-node-contextmenuicon { - display: none; - } - - .gadget-editor-tree-node-contextmenuicon-open { - display: inline; - - @include opacity(0.5); - } - - &:hover { - .gadget-editor-tree-node-contextmenuicon { - display: inline; - - @include opacity(0.5); - - &:hover { - @include opacity(1); - } - } - } - } - } - - .panel-bd { - background: #FFFFFF; - overflow: auto; - } - - .nav-tabs { - margin-bottom: 0px; - - .tab { - cursor: pointer; - - .gadget-editor-tab-close { - color: #555; - margin-left: 4px; - - @include opacity(0.5); - - &:hover { - @include opacity(1); - - text-decoration: none; - } - } - } - } - - .gadget { - height: 100%; - width: 100%; - } -} - -.gadget-editor-contextmenu-toolbar { - background: #EEF0F2; - - .btn { - width: 100%; - text-align: left; - } -} - -.editable { - z-index: 10; -} - -.ie .opensocial-portlet-editor .tabview-list .tab-content .gadget-editor-tab-close { - @include opacity(0.2); - - &:hover { - @include opacity(1); - - zoom: 1; - } -} - -/* ---------- Extras ---------- */ -.gadget-editor-contextmenu-toolbar { - box-shadow: 4px 4px 8px #888888; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/js/gadget-editor-tabs.js b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/js/gadget-editor-tabs.js deleted file mode 100644 index 608b766c7f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/js/gadget-editor-tabs.js +++ /dev/null @@ -1,406 +0,0 @@ -AUI.add( - 'gadget-editor-tabs', - function(A) { - var Lang = A.Lang; - var AArray = A.Array; - - var ACE_EDITOR = 'aceEditor'; - - var CONTENT_BOX = 'contentBox'; - - var DIRTY_INDICATOR_NODE = 'dirtyIndicatorNode'; - - var ENTRY_ID = 'entryId'; - - var FILE_NAME = 'fileName'; - - var ID = 'id'; - - var IS_DIRTY = 'isDirty'; - - var STR_EMPTY = ''; - - var TPL_CLOSE_BUTTON = ''; - - var TPL_DIV = '
    '; - - var TPL_DIRTY_INDICATOR = '*'; - - var TabViewEditor = A.Component.create( - { - EXTENDS: A.TabView, - - NAME: 'tab-view-editor', - - prototype: { - addExistingDocument: function(entryId, label, editorContent) { - var instance = this; - - var contentNode = A.Node.create(TPL_DIV); - - var tab = new TabEditor( - { - active: true, - contentNode: contentNode, - editorContent: editorContent, - entryId: entryId, - isDirty: false, - isNew: false, - label: label - } - ); - - instance._addTab(tab); - - instance.selectTabById(tab.get(ID)); - - return tab; - }, - - addNewTab: function() { - var instance = this; - - var newTabCounter = instance._newTabCounter || 0; - - newTabCounter++; - - var entryId = 'newTab' + newTabCounter; - - var contentNode = A.Node.create(TPL_DIV); - - var tab = new TabEditor( - { - active: true, - contentNode: contentNode, - editorContent: STR_EMPTY, - entryId: entryId, - isDirty: false, - isNew: true, - label: 'new ' + newTabCounter - } - ); - - instance._addTab(tab); - - instance._newTabCounter = newTabCounter; - - instance.selectTabById(tab.get(ID)); - - return tab; - }, - - closeTabById: function(id) { - var instance = this; - - var tab = instance.getTabById(id); - - if (tab) { - if (instance.size() === 1) { - instance.addNewTab(); - } - - instance.removeTabById(id); - } - }, - - getSelectedTab: function() { - var instance = this; - - return instance.get('selection'); - }, - - getTabById: function(id) { - var instance = this; - - var tab = null; - - instance.some( - function(item, index) { - if (item.get(ID) === id) { - tab = item; - - return true; - } - }, - instance - ); - - return tab; - }, - - removeTabById: function(id) { - var instance = this; - - var tab = instance.getTabById(id); - - var index = instance.indexOf(tab); - - instance.remove(index); - - var tabContentBox = tab.get(CONTENT_BOX); - var tabViewContentBox = instance.get(CONTENT_BOX); - - if (tabViewContentBox.contains(tabContentBox)) { - tabViewContentBox.removeChild(tabContentBox); - } - }, - - selectTabById: function(id) { - var instance = this; - - var index = instance.indexOf(instance.getTabById(id)); - - instance.selectChild(index); - }, - - _addTab: function(tab) { - var instance = this; - - tab.addTarget(instance); - - tab.fire('add'); - - TabViewEditor.superclass.add.apply(instance, arguments); - }, - - _validateAceEditor: function(value) { - return (value instanceof A.AceEditor); - }, - - _validateDirtyIndicatorNode: function(value) { - return (value instanceof A.Node); - } - } - } - ); - - A.TabViewEditor = TabViewEditor; - - var TabEditor = A.Component.create( - { - ATTRS: { - aceEditor: { - validator: '_validateAceEditor' - }, - - dirtyIndicatorNode: { - validator: '_validateDirtyIndicatorNode' - }, - - entryId: { - setter: function(value) { - return String(value); - }, - value: STR_EMPTY - }, - - fileName: { - validator: Lang.isString - }, - - isDirty: { - validator: Lang.isBoolean, - value: false - }, - - isNew: { - validator: Lang.isBoolean, - value: true - }, - - isRendered: { - validator: Lang.isBoolean, - value: false - }, - - label: { - validator: Lang.isString - } - }, - - EXTENDS: A.Tab, - - NAME: 'tab-editor', - - prototype: { - initializer: function(config) { - var instance = this; - - instance._editorModes = { - css: { - 'css': 1 - }, - gadget: { - 'xml': 1 - }, - html: { - 'htm': 1, - 'html': 1, - 'shtm': 1, - 'shtml': 1, - 'xhtml': 1 - }, - javascript: { - 'js': 1 - }, - xml: { - 'kml': 1, - 'wsdl': 1, - 'xsd': 1, - 'xsl': 1, - 'xsml': 1 - } - }; - - instance._createEditor(instance.get('panelNode'), config.editorContent); - - instance.updateEditorMode(config.label); - }, - - renderUI: function() { - var instance = this; - - TabEditor.superclass.renderUI.apply(this, arguments); - }, - - bindUI: function() { - var instance = this; - - TabEditor.superclass.bindUI.apply(this, arguments); - - instance.on('isDirtyChange', instance._onIsDirtyChange); - instance.on('labelChange', instance._onLabelChange); - }, - - searchEditorText: function(searchText, caseInsensitive, replaceText, doReplace) { - var instance = this; - - if (searchText) { - var editor = instance.get(ACE_EDITOR).getEditor(); - - if (doReplace) { - editor.replace(replaceText); - } - else { - editor.find(searchText); - } - } - }, - - updateEditorMode: function(fileName) { - var instance = this; - - var mode = 'ace/mode/text'; - - var extension = fileName.substr(fileName.lastIndexOf('.') + 1); - - var editorModes = instance._editorModes; - - if (editorModes.css[extension]) { - mode = 'ace/mode/css'; - } - else if (editorModes.gadget[extension] || editorModes.html[extension]) { - mode = 'ace/mode/html'; - } - else if (editorModes.javascript[extension]) { - mode = 'ace/mode/javascript'; - } - else if (editorModes.xml[extension]) { - mode = 'ace/mode/xml'; - } - - instance.get(ACE_EDITOR).getEditor().getSession().setMode(mode); - }, - - _createEditor: function(node, content) { - var instance = this; - - var aceEditor = new A.AceEditor( - { - boundingBox: node, - height: '600', - value: content, - width: '100%' - } - ).render(); - - var session = aceEditor.getSession(); - - session.on( - 'change', - function(event) { - instance.set(IS_DIRTY, true); - - instance.fire('onEditorChange'); - } - ); - - instance.set(ACE_EDITOR, aceEditor); - - return aceEditor; - }, - - _onCloseButtonClick: function(event) { - var instance = this; - - event.preventDefault(); - - instance.fire( - 'close', - { - entryId: instance.get(ENTRY_ID) - } - ); - }, - - _onIsDirtyChange: function(event) { - var instance = this; - - instance.get(DIRTY_INDICATOR_NODE).toggleView(event.newVal); - }, - - _onLabelChange: function(event) { - var instance = this; - - instance.get(CONTENT_BOX).setHTML(event.newVal); - - instance._renderDirtyIndicator(); - instance._renderCloseButton(); - - instance.set(FILE_NAME, event.newVal); - - event.preventDefault(); - }, - - _renderCloseButton: function() { - var instance = this; - - var closeButton = A.Node.create(TPL_CLOSE_BUTTON); - - closeButton.on('click', instance._onCloseButtonClick, instance); - - instance.get(CONTENT_BOX).append(closeButton); - }, - - _renderDirtyIndicator: function() { - var instance = this; - - var dirtyIndicatorNode = A.Node.create(TPL_DIRTY_INDICATOR); - - dirtyIndicatorNode.toggleView(instance.get(IS_DIRTY)); - - instance.get(CONTENT_BOX).prepend(dirtyIndicatorNode); - - instance.set(DIRTY_INDICATOR_NODE, dirtyIndicatorNode); - } - } - } - ); - - A.TabEditor = TabEditor; - }, - '', - { - requires: ['aui-ace-editor', 'aui-tabs-base', 'aui-tabview'] - } -); \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/js/gadget-editor-tree.js b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/js/gadget-editor-tree.js deleted file mode 100644 index b65377d50a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/js/gadget-editor-tree.js +++ /dev/null @@ -1,846 +0,0 @@ -AUI.add( - 'gadget-editor-tree', - function(A) { - var Lang = A.Lang; - var AArray = A.Array; - var isString = Lang.isString; - var isValue = Lang.isValue; - - var ACTIVE_EDITABLE = 'activeEditable'; - - var AUTO = 'auto'; - - var BOUNDING_BOX = 'boundingBox'; - - var CLICK = 'click'; - - var CONTENT_BOX = 'contentBox'; - - var CSS_CONTEXT_MENU = 'gadget-editor-tree-node-contextmenuicon icon-sort-down icon-large'; - - var CSS_CONTEXT_MENU_OPEN = 'gadget-editor-tree-node-contextmenuicon-open icon-sort-down icon-large'; - - var DISABLED = 'disabled'; - - var EDITABLE = 'editable'; - - var ENTRY_ID = 'entryId'; - - var GADGET_ID = 'gadgetId'; - - var ID = 'id'; - - var IS_ROOT_NODE = 'isRootNode'; - - var LABEL = 'label'; - - var NEW_NODE = 'newNode'; - - var OWNER_TREE = 'ownerTree'; - - var OVERFLOW = 'overflow'; - - var PARENT_NODE = 'parentNode'; - - var PERMISSIONS = 'permissions'; - - var RENDERED = 'rendered'; - - var STR_EMPTY = ''; - - var TPL_ICON_CONTEXT_MENU = ''; - - var VISIBLE = 'visible'; - - var TreeViewEditor = A.Component.create( - { - - ATTRS: { - activeEditable: { - validator: Lang.isObject - }, - - publishGadgetPermission: { - validator: Lang.isBoolean - }, - - treeActionOverlayManager: { - validator: Lang.isObject, - valueFn: function() { - return new A.OverlayManager(); - } - } - }, - - EXTENDS: A.TreeView, - - NAME: 'tree-view-editor', - - prototype: { - addNewNodeToFolder: function(label, isLeaf, parentId) { - var instance = this; - - var node = new TreeNodeEditor( - { - entryId: NEW_NODE + label, - fileEntryLoaded: true, - isNewEntry: true, - label: label, - leaf: isLeaf - } - ); - - if (instance.get(ID) === parentId) { - instance.appendChild(node); - } - else { - instance.getNodeById(parentId).appendChild(node); - } - - node.sort(); - - node.get(EDITABLE).fire('startEditing'); - - return node; - }, - - addRootNode: function(label, folderId) { - var instance = this; - - var node = new TreeNodeEditor( - { - entryId: folderId, - isNewEntry: false, - isRootNode: true, - label: label, - leaf: false - } - ); - - instance.appendChild(node); - - node.sort(); - - return node; - }, - - appendChild: function(node) { - var instance = this; - - TreeViewEditor.superclass.appendChild.apply(instance, arguments); - - node.addTarget(instance); - }, - - getSelectedFolderId: function() { - var instance = this; - - var folderId = 0; - - var lastSelected = instance.get('lastSelected'); - - if (lastSelected && !lastSelected.isLeaf() && lastSelected.isSelected()) { - folderId = lastSelected.get(ID); - } - - return folderId; - }, - - sortChildren: function() { - var instance = this; - - var children = instance.getChildren(); - - var fileEntryChildren = []; - var folderChildren = []; - - AArray.each( - children, - function(item, index) { - if (item.isLeaf()) { - fileEntryChildren.push(item); - } - else { - folderChildren.push(item); - } - } - ); - - fileEntryChildren.sort(arraySort); - folderChildren.sort(arraySort); - - AArray.each( - folderChildren, - function(item, index, collection) { - if (index != 0) { - instance.insertAfter(item, collection[index - 1]); - } - } - ); - - AArray.each( - fileEntryChildren, - function(item, index, collection) { - if (index === 0) { - if (folderChildren.length > 0) { - instance.insertAfter(item, folderChildren[folderChildren.length - 1]); - } - } - else { - instance.insertAfter(item, collection[index - 1]); - } - } - ); - } - } - } - ); - - A.TreeViewEditor = TreeViewEditor; - - var TreeNodeEditor = A.Component.create( - { - ATTRS: { - editable: {}, - - entryId: { - setter: function(value) { - return String(value); - }, - value: STR_EMPTY - }, - - fileEntryLoaded: { - value: false - }, - - fileEntryURL: { - value: STR_EMPTY - }, - - gadgetId: { - value: 0 - }, - - isNewEntry: { - value: false - }, - - isRootNode: { - value: false - }, - - permissions: { - value: {} - } - }, - - EXTENDS: A.TreeNodeIO, - - NAME: 'tree-node-editor', - - prototype: { - renderUI: function() { - var instance = this; - - TreeNodeEditor.superclass.renderUI.apply(this, arguments); - - instance._renderContextMenu(); - instance._renderEditable(); - instance._renderFileEntryLoaded(); - }, - - bindUI: function() { - var instance = this; - - TreeNodeEditor.superclass.bindUI.apply(this, arguments); - - instance.after('fileEntryLoadedChange', instance._afterFileEntryLoadedChange); - instance.after('gadgetIdChange', instance._afterGadgetIdChange); - instance.after('labelChange', instance._afterLabelChange); - instance.after('permissionsChange', instance._afterPermissionsChange); - - instance.on('entryIdChange', instance._onEntryIdChange); - }, - - appendChild: function(node) { - var instance = this; - - TreeNodeEditor.superclass.appendChild.apply(instance, arguments); - - node.addTarget(instance.get(OWNER_TREE)); - }, - - sort: function() { - var instance = this; - - var parentNode = instance.get(PARENT_NODE); - - if (parentNode) { - var siblings = parentNode.getChildren(); - - var filteredSiblings = []; - - var isLeaf = instance.isLeaf(); - - var ownerTree = instance.get(OWNER_TREE); - - AArray.each( - siblings, - function(sibling) { - if (sibling.isLeaf() === isLeaf) { - filteredSiblings.push(sibling); - } - } - ); - - filteredSiblings.sort(arraySort); - - if (filteredSiblings.length === 1) { - if (siblings.length > 1) { - if (isLeaf) { - var lastNode = siblings[siblings.length - 1]; - - ownerTree.insertAfter(instance, lastNode); - } - else { - var firstNode = siblings[0]; - - ownerTree.insertBefore(instance, firstNode); - } - } - } - else { - var nodeIndex = filteredSiblings.indexOf(instance); - - if (nodeIndex > 0) { - var nodeBefore = filteredSiblings[nodeIndex - 1]; - - ownerTree.insertAfter(instance, nodeBefore); - } - else { - var nodeAfter = filteredSiblings[nodeIndex + 1]; - - ownerTree.insertBefore(instance, nodeAfter); - } - } - } - }, - - sortChildren: function() { - var instance = this; - - var children = instance.getChildren(); - - var fileEntryChildren = []; - var folderChildren = []; - - var ownerTree = instance.get(OWNER_TREE); - - AArray.each( - children, - function(item, index) { - if (item.isLeaf()) { - fileEntryChildren.push(item); - } - else { - folderChildren.push(item); - } - } - ); - - fileEntryChildren.sort(arraySort); - folderChildren.sort(arraySort); - - AArray.each( - folderChildren, - function(item, index, collection) { - if (index != 0) { - ownerTree.insertAfter(item, collection[index - 1]); - } - } - ); - - AArray.each( - fileEntryChildren, - function(item, index, collection) { - if (index === 0) { - if (folderChildren.length > 0) { - ownerTree.insertAfter(item, folderChildren[folderChildren.length - 1]); - } - } - else { - ownerTree.insertAfter(item, collection[index - 1]); - } - } - ); - }, - - _afterFileEntryLoadedChange: function(event) { - var instance = this; - - instance._renderFileEntryLoaded(); - }, - - _afterGadgetIdChange: function(event) { - var instance = this; - - instance._updatePublishButtons(); - }, - - _afterLabelChange: function(event) { - var instance = this; - - if (instance.isLeaf()) { - instance._updatePublishButtons(); - } - }, - - _afterPermissionsChange: function(event) { - var instance = this; - - instance._updatePublishButtons(); - }, - - _onEntryIdChange: function(event) { - var instance = this; - - event.target.get(EDITABLE).set(ENTRY_ID, event.newVal); - }, - - _renderButtons: function(isLeaf) { - var instance = this; - - if (isLeaf) { - var closeContextMenuButton = new A.Button( - { - cssClass: 'close-file-entry', - disabled: true, - icon: 'icon-remove', - label: Liferay.Language.get('close') - } - ); - - var publishMenuButton = new A.Button( - { - cssClass: 'publish', - disabled: !instance.get(OWNER_TREE).get('publishGadgetPermission'), - icon: 'icon-bullhorn', - label: Liferay.Language.get('publish') - } - ); - - var showURLContextMenuButton = new A.Button( - { - cssClass: 'show-url', - icon: 'icon-link', - label: Liferay.Language.get('show-url') - } - ); - - var unpublishMenuButton = new A.Button( - { - cssClass: 'unpublish', - icon: 'icon-bullhorn', - label: Liferay.Language.get('unpublish') - } - ); - - closeContextMenuButton.addTarget(instance); - publishMenuButton.addTarget(instance); - showURLContextMenuButton.addTarget(instance); - unpublishMenuButton.addTarget(instance); - - instance._closeContextMenuButton = closeContextMenuButton; - instance._publishMenuButton = publishMenuButton; - instance._showURLContextMenuButton = showURLContextMenuButton; - instance._unpublishMenuButton = unpublishMenuButton; - } - else { - var newFolderContextMenuButton = new A.Button( - { - cssClass: 'add-folder', - icon: 'icon-folder-close', - label: Liferay.Language.get('new-folder') - } - ); - - newFolderContextMenuButton.addTarget(instance); - - instance._newFolderContextMenuButton = newFolderContextMenuButton; - } - - var deleteContextMenuButton = new A.Button( - { - cssClass: 'delete-entry', - disabled: instance.get(IS_ROOT_NODE), - icon: 'icon-remove', - label: Liferay.Language.get('delete') - } - ); - - var renameContextMenuButton = new A.Button( - { - cssClass: 'rename-entry', - disabled: instance.get(IS_ROOT_NODE), - icon: 'icon-pencil', - label: Liferay.Language.get('rename') - } - ); - - deleteContextMenuButton.addTarget(instance); - renameContextMenuButton.addTarget(instance); - - instance._deleteContextMenuButton = deleteContextMenuButton; - instance._renameContextMenuButton = renameContextMenuButton; - }, - - _renderContextMenu: function() { - var instance = this; - - var isLeaf = instance.isLeaf(); - - instance._renderButtons(isLeaf); - - if (isLeaf) { - instance._renderFileEntryContextMenu(); - } - else { - instance._renderFolderContextMenu(); - } - - var contextMenu = instance._contextMenu; - - contextMenu.get(CONTENT_BOX).addClass('gadget-editor-contextmenu-toolbar'); - - var contextMenuIcon = A.Node.create(TPL_ICON_CONTEXT_MENU); - - contextMenuIcon.addClass(CSS_CONTEXT_MENU); - - instance.get(CONTENT_BOX).append(contextMenuIcon); - - var ownerTree = instance.get(OWNER_TREE); - - var treeActionOverlayManager = ownerTree.get('treeActionOverlayManager'); - - var contextMenuOverlay = new A.OverlayContext( - { - after: { - visibleChange: function(event) { - contextMenuIcon.toggleClass(CSS_CONTEXT_MENU_OPEN, event.target.get(VISIBLE)); - } - }, - boundingBox: contextMenu.get(BOUNDING_BOX), - hideOn: CLICK, - on: { - show: function(event) { - var overlayContext = event.target; - - if (!overlayContext.get(RENDERED)) { - contextMenu.render(); - - AArray.each( - contextMenu.get('children')[0], - function(item, index) { - if (A.instanceOf(item, A.Button)) { - item.render(); - } - } - ); - - overlayContext.render(); - } - - treeActionOverlayManager.hideAll(); - - var activeEditable = ownerTree.get(ACTIVE_EDITABLE); - - if (activeEditable) { - activeEditable.fire('stopEditing', true); - } - } - }, - showOn: CLICK, - trigger: contextMenuIcon - } - ); - - treeActionOverlayManager.register(contextMenuOverlay); - - instance._contextMenuOverlay = contextMenuOverlay; - - instance._renderContextMenuDelegate(contextMenuOverlay); - }, - - _renderContextMenuDelegate: function(overlay) { - var instance = this; - - var entry = {}; - - overlay.get(BOUNDING_BOX).delegate( - CLICK, - function(event) { - var buttonItem = event.currentTarget; - - entry.entryId = instance.get(ENTRY_ID); - - if (!buttonItem.get(DISABLED)) { - if (buttonItem.hasClass('add-folder')) { - instance.fire( - 'addFolderNode', - { - parentFolderId: instance.get(ID) - } - ); - } - else if (buttonItem.hasClass('close-file-entry')) { - instance.fire('closeFileEntry', entry); - } - else if (buttonItem.hasClass('delete-entry')) { - instance.fire('deleteEntry', entry); - } - else if (buttonItem.hasClass('publish')) { - instance.fire('publish', entry); - } - else if (buttonItem.hasClass('rename-entry')) { - instance.fire('renameEntry', entry); - } - else if (buttonItem.hasClass('show-url')) { - instance.fire('showURL', entry); - } - else if (buttonItem.hasClass('unpublish')) { - instance.fire('unpublish', entry); - } - - instance._contextMenuOverlay.hide(); - } - }, - 'button' - ); - }, - - _renderEditable: function() { - var instance = this; - - var ownerTree = instance.get(OWNER_TREE); - - var ownerTreeBoundingBox = ownerTree.get(BOUNDING_BOX); - - var editable = new EditableEditor( - { - after: { - startEditing: function(event) { - ownerTree.set(ACTIVE_EDITABLE, event.target); - }, - stopEditing: function(event) { - ownerTree.set(ACTIVE_EDITABLE, null); - } - }, - entryId: instance.get(ENTRY_ID), - eventType: STR_EMPTY, - node: instance.get('labelEl'), - on: { - startEditing: function(event) { - var editable = event.target; - - if (!editable.get(RENDERED)) { - editable.render(); - } - - var region = ownerTreeBoundingBox.get('region'); - - var editableY = editable.get('node').getXY()[1]; - - if (editableY >= region.bottom) { - ownerTreeBoundingBox.set('scrollTop', editableY); - } - - ownerTreeBoundingBox.setStyle(OVERFLOW, 'hidden'); - }, - stopEditing: function(event) { - ownerTreeBoundingBox.setStyle(OVERFLOW, AUTO); - } - } - } - ); - - editable.addTarget(instance); - - instance.set(EDITABLE, editable); - }, - - _renderFileEntryContextMenu: function() { - var instance = this; - - instance._updatePublishButtons(); - - var children = [ - [ - STR_EMPTY, - 'vertical', - instance._closeContextMenuButton, - instance._renameContextMenuButton, - instance._deleteContextMenuButton, - instance._publishMenuButton, - instance._unpublishMenuButton, - instance._showURLContextMenuButton - ] - ]; - - var contextMenu = new A.Toolbar( - { - children: children - } - ); - - instance._contextMenu = contextMenu; - }, - - _renderFileEntryLoaded: function() { - var instance = this; - - if (instance.isLeaf()) { - var fileEntryLoaded = instance.get('fileEntryLoaded'); - - instance._closeContextMenuButton.set(DISABLED, !fileEntryLoaded); - - instance.get(CONTENT_BOX).toggleClass('tree-node-loaded', fileEntryLoaded); - } - }, - - _renderFolderContextMenu: function() { - var instance = this; - - var children = [ - [ - STR_EMPTY, - 'vertical', - instance._newFolderContextMenuButton, - instance._renameContextMenuButton, - instance._deleteContextMenuButton - ] - ]; - - var contextMenu = new A.Toolbar( - { - children: children - } - ); - - instance._contextMenu = contextMenu; - }, - - _updatePublishButtons: function() { - var instance = this; - - var publishMenuButton = instance._publishMenuButton; - var showURLContextMenuButton = instance._showURLContextMenuButton; - var unpublishMenuButton = instance._unpublishMenuButton; - - var label = instance.get(LABEL); - - var extension = label.substr(label.lastIndexOf('.') + 1); - - if (extension === 'xml') { - if (instance.get(GADGET_ID) > 0) { - var unpublishPermission = instance.get(PERMISSIONS).unpublishPermission; - - unpublishMenuButton.set(DISABLED, !unpublishPermission); - - publishMenuButton.hide(); - unpublishMenuButton.show(); - } - else { - publishMenuButton.show(); - publishMenuButton.get('boundingBox').addClass('last', true) - unpublishMenuButton.hide(); - } - } - else { - publishMenuButton.hide(); - unpublishMenuButton.hide(); - } - } - } - } - ); - - var EditableEditor = A.Component.create( - { - ATTRS: { - entryId: { - setter: function(value) { - return String(value); - }, - value: STR_EMPTY - } - }, - - EXTENDS: A.Editable, - - NAME: 'editable-editor', - - prototype: { - _afterFocusedChangeEditable: function(event) { - var instance = this; - - if (instance.get(VISIBLE)) { - instance.save(); - } - }, - - _defStartEditingFn: function(event) { - var instance = this; - - EditableEditor.superclass._defStartEditingFn.apply(this, arguments); - - var inputField = instance._comboBox._field; - } - } - } - ); - - var arraySort = function(node1, node2) { - var instance = this; - - var label1 = node1.get(LABEL); - var label2 = node2.get(LABEL); - - var returnValue = 0; - - if (!isValue(label1)) { - if (isValue(label2)) { - returnValue = 1; - } - } - else if (!isValue(label2)) { - returnValue = -1; - } - - if (isString(label1)) { - label1 = label1.toLowerCase(); - } - - if (isString(label2)) { - label2 = label2.toLowerCase(); - } - - if (label1 < label2) { - returnValue = -1; - } - else if (label1 > label2) { - returnValue = 1; - } - - return returnValue; - }; - - A.TreeNodeEditor = TreeNodeEditor; - - A.TreeNode.nodeTypes.editor = TreeNodeEditor; - }, - '', - { - requires: ['aui-editable-deprecated', 'aui-overlay-context-deprecated', 'aui-overlay-manager-deprecated', 'aui-toolbar', 'aui-tree-node', 'aui-tree-view'] - } -); \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/js/main.js b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/js/main.js deleted file mode 100644 index e4e26c16ce..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/js/main.js +++ /dev/null @@ -1,1857 +0,0 @@ -AUI.add( - 'opensocial-editor', - function(A) { - var Lang = A.Lang; - - var AArray = A.Array; - - var ACE_EDITOR = 'aceEditor'; - - var BODY_CONTENT = 'bodyContent'; - - var BOUNDING_BOX = 'boundingBox'; - - var CONTENT_BOX = 'contentBox'; - - var DISABLED = 'disabled'; - - var EDITABLE = 'editable'; - - var ENTRY_ID = 'entryId'; - - var EVENT_ADD_FILE_ENTRY_NODE = 'addFileEntryNode'; - - var EVENT_ADD_FOLDER_NODE = 'addFolderNode'; - - var EVENT_CANCEL_RENAME_ENTRY = 'cancelRenameEntry'; - - var EVENT_CLOSE_FILE_ENTRY = 'closeFileEntry'; - - var EVENT_DELETE_ENTRY = 'deleteEntry'; - - var EVENT_LOAD_CONTENT = 'loadContent'; - - var EVENT_RENDER_GADGET = 'renderGadget'; - - var EVENT_SAVE_CONTENT = 'saveContent'; - - var EVENT_SAVE_RENAME_ENTRY = 'saveRenameEntry'; - - var EVENT_START_RENAME_ENTRY = 'startRenameEntry'; - - var FILE_ENTRY_LOADED = 'fileEntryLoaded'; - - var FILE_ENTRY_URL = 'fileEntryURL'; - - var GADGET_ID = 'gadgetId'; - - var GET_FOLDER_CHILDREN = 'getFolderChildren'; - - var ID = 'id'; - - var INCREASE = 'increase'; - - var IS_DIRTY = 'isDirty'; - - var IS_NEW = 'isNew'; - - var IS_NEW_ENTRY = 'isNewEntry'; - - var LABEL = 'label'; - - var LAST_SELECTED = 'lastSelected'; - - var LOADED_CHANGE = 'loadedChange'; - - var NEW_FOLDER = 'New Folder'; - - var PARENT_NODE = 'parentNode'; - - var REPOSITORY_ID = 'repositoryId'; - - var ROOT_FOLDER_ID = 'rootFolderId'; - - var STR_EMPTY = ''; - - var TPL_EDITOR = '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    '; - - var TPL_ERROR_MESSAGE = '{name}

    {message}'; - - var TPL_URL_DISPLAY = '"{0}" URL:

    {1}'; - - var UNTITLED = 'Untitled'; - - var XML = '.xml'; - - var UNTITLED_XML = UNTITLED + XML; - - var VALUE = 'value'; - - var Editor = A.Component.create( - { - ATTRS: { - baseRenderURL: { - validator: Lang.isString - }, - - editorGadgetURL: {}, - - gadgetPortletId: {}, - - gadgetServerBase: {}, - - publishGadgetPermission: {}, - - repositoryId: {}, - - resourceURL: {}, - - rootFolderId: {} - }, - - AUGMENTS: [Liferay.PortletBase], - - NAME: 'gadget-editor', - - prototype: { - initializer: function() { - var instance = this; - - instance._io = {}; - - instance._createEvents(); - instance._createIndexMap(); - }, - - renderUI: function() { - var instance = this; - - var container = A.Node.create(TPL_EDITOR); - - instance.get(CONTENT_BOX).appendChild(container); - - instance._container = container; - - instance._gadgetEditorHeight = container.one('#gadgetEditorContent').height(); - - instance._renderLoadingMask(); - instance._renderToolbar(); - instance._renderTreeViewEditor(); - instance._renderTabViewEditor(); - }, - - bindUI: function() { - var instance = this; - - instance.after('tree-view-editor:append', instance._afterTreeViewAppend); - - instance.after('tree-node-editor:addFolderNode', instance._afterTreeNodeAddNewFolder); - instance.after('tree-node-editor:append', instance._afterTreeNodeAppend); - instance.after('tree-node-editor:closeFileEntry', instance._afterTreeNodeCloseFileEntry); - instance.after('tree-node-editor:deleteEntry', instance._afterTreeNodeDeleteEntry); - instance.after('tree-node-editor:entryIdChange', instance._afterTreeNodeEntryIdChange); - instance.after('tree-node-editor:publish', instance._afterTreeNodePublish); - instance.after('tree-node-editor:renameEntry', instance._afterTreeNodeRenameEntry); - instance.after('tree-node-editor:select', instance._afterTreeNodeSelect); - instance.after('tree-node-editor:showURL', instance._afterTreeNodeShowURL); - instance.after('tree-node-editor:unpublish', instance._afterTreeNodeUnpublish); - - instance.after('editable-editor:cancel', instance._afterEditableCancel); - - instance.on('editable-editor:save', instance._onEditableSave); - - instance.after('tab-view-editor:selectionChange', instance._afterSelectionChange); - - instance.after('tab-editor:add', instance._afterTabAdd); - instance.after('tab-editor:close', instance._afterTabClose); - instance.after('tab-editor:entryIdChange', instance._afterTabEntryIdChange); - instance.after('tab-editor:isDirtyChange', instance._afterTabIsDirtyChange); - instance.after('tab-editor:isNewChange', instance._afterTabIsNewChange); - - instance.on('tab-editor:onEditorChange', instance._onTabEditorChange); - instance.on('tab-editor:onEditorFocus', instance._onTabEditorFocus); - - Liferay.after('publishGadgetSuccess', instance._afterPublishGadgetSuccess, instance); - }, - - syncUI: function() { - var instance = this; - - instance._tabViewEditor.addNewTab(); - - var tabViewEditorBoundingBox = instance._tabViewEditor.get(BOUNDING_BOX); - }, - - _addEntryToMap: function(object) { - var instance = this; - - var entryId = object.get(ENTRY_ID); - - if (entryId != STR_EMPTY) { - var item = {}; - - var containsKey = instance._indexMap.has(entryId); - - if (containsKey) { - item = instance._indexMap.getValue(entryId); - } - - var addEntry = true; - - if (A.instanceOf(object, A.TreeNode)) { - item.node = object; - } - else if (A.instanceOf(object, A.Tab)) { - item.tab = object; - } - else { - addEntry = false; - } - - if (addEntry) { - instance._indexMap.put(entryId, item); - } - } - }, - - _addNewEntryToTreeNode: function(isLeaf, parentFolderId) { - var instance = this; - - var rootFolder = false; - - var parentFolderNode = instance._treeViewEditor.getNodeById(parentFolderId); - - if (!parentFolderNode) { - parentFolderNode = instance._treeViewEditor; - - rootFolder = true; - } - - if (rootFolder || parentFolderNode.get('loaded')) { - if (!rootFolder) { - parentFolderNode.expand(); - } - - A.setTimeout( - function() { - var entryLabel = instance._getNextNewEntryName(isLeaf, parentFolderNode); - - instance._treeViewEditor.addNewNodeToFolder(entryLabel, isLeaf, parentFolderId); - }, - 0 - ); - - if (!rootFolder) { - parentFolderNode.detach(LOADED_CHANGE); - } - } - else { - parentFolderNode.after( - LOADED_CHANGE, - function() { - instance._addNewEntryToTreeNode(isLeaf, parentFolderId); - } - ); - - parentFolderNode.expand(); - } - }, - - _afterEditableCancel: function(event) { - var instance = this; - - instance.fire( - EVENT_CANCEL_RENAME_ENTRY, - { - entryId: event.target.get(ENTRY_ID) - } - ); - }, - - _afterPublishGadgetSuccess: function(event) { - var instance = this; - - var entryId = instance._publishGadgetDialog.get(ID); - - var node = instance._getNodeFromDataSet(entryId); - - var permissions = node.get('permissions'); - - permissions.unpublishPermission = event.unpublishPermission; - - node.setAttrs( - { - gadgetId: event.gadgetId, - permissions: permissions - } - ); - - instance._publishGadgetDialog.destroy(); - }, - - _afterSelectionChange: function(event) { - var instance = this; - - var activeTab = event.newVal; - var previousTab = event.prevVal; - - var entryId = activeTab.get(ENTRY_ID); - - var node = instance._getNodeFromDataSet(entryId); - - if (activeTab.get(IS_NEW)) { - var lastSelected = instance._treeViewEditor.get(LAST_SELECTED); - - if (lastSelected && lastSelected.isLeaf()) { - lastSelected.unselect(); - - var folderNode = lastSelected.get(PARENT_NODE); - - folderNode.select(); - } - } - else if (node && !node.isSelected()) { - var lastSelected = instance._treeViewEditor.get(LAST_SELECTED); - - if (lastSelected) { - lastSelected.unselect(); - } - - node.select(); - - var parentNode = node.get(PARENT_NODE); - - while (parentNode && A.instanceOf(parentNode, A.TreeNode)) { - parentNode.expand(); - - parentNode = parentNode.get(PARENT_NODE); - } - } - - instance._saveButton.set(DISABLED, !activeTab.get(IS_DIRTY)); - - instance._deleteButton.set(DISABLED, activeTab.get(IS_NEW)); - }, - - _afterTabAdd: function(event) { - var instance = this; - - instance._addEntryToMap(event.target); - }, - - _afterTabClose: function(event) { - var instance = this; - - instance.fire( - EVENT_CLOSE_FILE_ENTRY, - { - entryId: event.entryId - } - ); - }, - - _afterTabEntryIdChange: function(event) { - var instance = this; - - instance._removeEntryFromDataSet(event.prevVal); - - instance._addEntryToMap(event.target); - }, - - _afterTabIsDirtyChange: function(event) { - var instance = this; - - instance._saveButton.set(DISABLED, !event.newVal); - }, - - _afterTabIsNewChange: function(event) { - var instance = this; - - instance._deleteButton.set(DISABLED, event.newVal); - }, - - _afterTreeNodeAddNewFolder: function(event) { - var instance = this; - - instance.fire( - EVENT_ADD_FOLDER_NODE, - { - parentFolderId: event.parentFolderId - } - ); - }, - - _afterTreeNodeAppend: function(event) { - var instance = this; - - instance._addEntryToMap(event.tree.node); - }, - - _afterTreeNodeCloseFileEntry: function(event) { - var instance = this; - - instance.fire( - EVENT_CLOSE_FILE_ENTRY, - { - entryId: event.entryId - } - ); - }, - - _afterTreeNodeDeleteEntry: function(event) { - var instance = this; - - instance.fire( - EVENT_DELETE_ENTRY, - { - entryId: event.entryId - } - ); - }, - _afterTreeNodeEntryIdChange: function(event) { - var instance = this; - - instance._removeEntryFromDataSet(event.prevVal); - - instance._addEntryToMap(event.target); - }, - - _afterTreeNodePublish: function(event) { - var instance = this; - - var entryId = event.entryId; - - var tab = instance._getTabFromDataSet(entryId); - - if (tab && tab.get(IS_DIRTY)) { - instance._showErrorDialog(Liferay.Language.get('save-the-gadget-before-publishing')); - } - else { - var node = instance._getNodeFromDataSet(entryId); - - var uri = instance.get('editorGadgetURL').replace('editorGadgetURLPlaceholder', node.get(FILE_ENTRY_URL)); - - var publishGadgetDialog = Liferay.Util.Window.getWindow( - { - cache: false, - dialog: { - centered: true, - destroyOnHide: true, - id: entryId, - modal: true, - width: 700 - }, - dialogIframe: { - uri: uri - }, - title: Liferay.Language.get('publish-gadget'), - uri: uri - } - ); - - instance._publishGadgetDialog = publishGadgetDialog; - } - }, - - _afterTreeNodeRenameEntry: function(event) { - var instance = this; - - instance.fire( - EVENT_START_RENAME_ENTRY, - { - entryId: event.entryId - } - ); - }, - - _afterTreeNodeSelect: function(event) { - var instance = this; - - var target = event.target; - - if (target.isLeaf()) { - instance.fire( - EVENT_LOAD_CONTENT, - { - entryId: target.get(ENTRY_ID) - } - ); - } - }, - - _afterTreeNodeShowURL: function(event) { - var instance = this; - - var node = instance._getNodeFromDataSet(event.entryId); - - var bodyContent = Lang.sub(TPL_URL_DISPLAY, [node.get(LABEL), node.get(FILE_ENTRY_URL)]); - - instance._createDialog('URL', bodyContent); - }, - - _afterTreeNodeUnpublish: function(event) { - var instance = this; - - var entryId = event.entryId; - - var node = instance._getNodeFromDataSet(entryId); - - var gadgetId = node.get(GADGET_ID); - - var message = Liferay.Language.get('are-you-sure-you-want-to-unpublish-the-gadget', node.get(LABEL)); - - instance._showConfirmationDialog(message, instance._unpublishGadget, node, gadgetId); - }, - - _afterTreeViewAppend: function(event) { - var instance = this; - - instance._addEntryToMap(event.tree.node); - }, - - _appendEditorChildren: function(data) { - var instance = this; - - if (data.error) { - instance._showErrorDialog(data.error); - } - else { - var treeViewEditor = instance._treeViewEditor; - - AArray.each( - data, - function(item, index) { - var node = new A.TreeNodeEditor( - { - entryId: item.entryId, - fileEntryURL: item.fileEntryURL, - gadgetId: item.gadgetId, - label: item.label, - leaf: item.leaf, - permissions: item.permissions, - type: item.type - } - ); - - treeViewEditor.appendChild(node); - } - ); - - treeViewEditor.sortChildren(); - } - }, - - _changeEditorFontSize: function(action) { - var instance = this; - - var aceEditor = instance._tabViewEditor.getSelectedTab().get(ACE_EDITOR).getEditor(); - - var fontSize = aceEditor.getFontSize(); - - if (action == INCREASE) { - fontSize += 2; - - if (fontSize >= 64) { - instance._increaseEditorFontSizeButton.disable(); - } - - instance._decreaseEditorFontSizeButton.enable(); - } - else { - fontSize -= 2; - - if (fontSize <= 2) { - instance._decreaseEditorFontSizeButton.disable(); - } - - instance._increaseEditorFontSizeButton.enable(); - } - - aceEditor.setFontSize(fontSize); - }, - - _closeFileEntry: function(entryId) { - var instance = this; - - var tab = instance._getTabFromDataSet(entryId); - - if (tab) { - instance._tabViewEditor.closeTabById(tab.get(ID)); - } - - var node = instance._getNodeFromDataSet(entryId); - - if (node) { - if (node.isSelected()) { - node.unselect(); - } - - node.set(FILE_ENTRY_LOADED, false); - } - }, - - _closeSearchDialog: function() { - var instance = this; - - instance._searchDialog.destroy(); - - var tab = instance._tabViewEditor.getSelectedTab(); - - instance._searchEditorButton.toggle(); - }, - - _createDialog: function(title, bodyContent, options) { - var instance = this; - - var dialog = { - bodyContent: bodyContent, - centered: true, - height: 250, - modal: true, - width: 400 - }; - - if (options) { - if ('buttons' in options) { - dialog['toolbars.footer'] = options['buttons']; - } - - if ('centered' in options) { - dialog.centered = options['centered']; - } - - if ('height' in options) { - dialog.height = options['height']; - } - - if ('modal' in options) { - dialog.modal = options['modal']; - } - - if ('width' in options) { - dialog.width = options['width']; - } - } - - return Liferay.Util.Window.getWindow( - { - dialog: dialog, - title: title - } - ); - }, - - _createEvents: function() { - var instance = this; - - instance.publish( - EVENT_ADD_FILE_ENTRY_NODE, - { - defaultFn: instance._defAddFileEntryNodeFn - } - ); - - instance.publish( - EVENT_ADD_FOLDER_NODE, - { - defaultFn: instance._defAddFolderNodeFn - } - ); - - instance.publish( - EVENT_CANCEL_RENAME_ENTRY, - { - defaultFn: instance._defCancelRenameEntryFn - } - ); - - instance.publish( - EVENT_CLOSE_FILE_ENTRY, - { - defaultFn: instance._defCloseFileEntryFn - } - ); - - instance.publish( - EVENT_DELETE_ENTRY, - { - defaultFn: instance._defDeleteEntryFn - } - ); - - instance.publish( - EVENT_LOAD_CONTENT, - { - defaultFn: instance._defLoadContentFn - } - ); - - instance.publish( - EVENT_RENDER_GADGET, - { - defaultFn: instance._defRenderGadgetFn - } - ); - - instance.publish( - EVENT_SAVE_CONTENT, - { - defaultFn: instance._defSaveContentFn - } - ); - - instance.publish( - EVENT_SAVE_RENAME_ENTRY, - { - defaultFn: instance._defSaveRenameEntryFn - } - ); - - instance.publish( - EVENT_START_RENAME_ENTRY, - { - defaultFn: instance._defStartRenameEntryFn - } - ); - }, - - _createIndexMap: function() { - var instance = this; - - instance._indexMap = new A.Map(); - }, - - _defAddFileEntryNodeFn: function() { - var instance = this; - - instance._tabViewEditor.addNewTab(); - }, - - _defAddFolderNodeFn: function(event) { - var instance = this; - - instance._addNewEntryToTreeNode(false, event.parentFolderId); - }, - - _defCancelRenameEntryFn: function(event) { - var instance = this; - - var node = instance._getNodeFromDataSet(event.entryId); - - if (node.get(IS_NEW_ENTRY)) { - node.get(PARENT_NODE).removeChild(node); - } - }, - - _defCloseFileEntryFn: function(event) { - var instance = this; - - var entryId = event.entryId; - - var tab = instance._getTabFromDataSet(event.entryId); - - if (tab && tab.get(IS_DIRTY) && !event.noConfirm) { - var tabFileName = tab.get('fileName'); - var message = Liferay.Language.get('has-not-been-saved-are-you-sure-you-want-to-close-the-tab', tabFileName); - - instance._showConfirmationDialog(message, instance._closeFileEntry, entryId); - } - else { - instance._closeFileEntry(entryId); - } - }, - - _defDeleteEntryFn: function(event) { - var instance = this; - - var entryId = event.entryId; - - var unpublish = STR_EMPTY; - - var node = instance._getNodeFromDataSet(entryId); - - var message; - - if (node.get(GADGET_ID) > 0) { - message = Liferay.Language.get('are-you-sure-you-want-to-unpublish-and-delete', node.get(LABEL)); - } - else { - message = Liferay.Language.get('are-you-sure-you-want-to-delete', node.get(LABEL)); - } - - instance._showConfirmationDialog(message, instance._deleteEntry, node, entryId); - }, - - _defLoadContentFn: function(event) { - var instance = this; - - var node = instance._getNodeFromDataSet(event.entryId); - - if (node.get(FILE_ENTRY_LOADED)) { - if (event.entryId != instance._tabViewEditor.getSelectedTab().get(ENTRY_ID)) { - var tabId = instance._getTabFromDataSet(event.entryId).get(ID); - - instance._tabViewEditor.selectTabById(tabId); - } - } - else { - var callback = function(data) { - if (data.error) { - node.unselect(); - - instance._showErrorDialog(data.error); - - return; - } - - var tab = instance._tabViewEditor.addExistingDocument(event.entryId, node.get(LABEL), data.content); - - node.set(FILE_ENTRY_LOADED, true); - }; - - instance._requestGetFileEntryContent(node.get(ENTRY_ID), callback); - } - }, - - _defRenderGadgetFn: function(event) { - var instance = this; - - var previewDialog = Liferay.Util.Window.getWindow( - { - dialog: { - centered: true, - destroyOnHide: true, - height: 400, - modal: true, - width: 600 - }, - title: 'Preview' - } - ); - - var tab = instance._getTabFromDataSet(event.entryId); - - if (tab.get(IS_DIRTY) || tab.get(IS_NEW)) { - var message = Liferay.Language.get('save-the-gadget-before-previewing'); - - previewDialog.set(BODY_CONTENT, message); - - return; - } - - var node = instance._getNodeFromDataSet(event.entryId); - - var fileEntryURL = node.get(FILE_ENTRY_URL); - - var callback = function(data) { - if (data.error) { - var error; - - if (data.error.name == 'ProcessingException') { - error = data.error.message; - } - else { - error = data.error; - } - - previewDialog.set(BODY_CONTENT, error); - } - else { - new Liferay.OpenSocial.Gadget( - { - appId: fileEntryURL, - baseRenderURL: instance.get('baseRenderURL'), - debug: 1, - height: data.height, - moduleId: data.moduleId, - nocache: 1, - portletId: instance.get('gadgetPortletId'), - requiresPubsub: data.requiresPubsub, - scrolling: data.scrolling, - secureToken: data.secureToken, - serverBase: instance.get('gadgetServerBase'), - specUrl: fileEntryURL, - view: 'default' - } - ).render(previewDialog.bodyNode); - } - }; - - instance._requestGetRenderParameters(fileEntryURL, callback); - }, - - _defSaveContentFn: function(event) { - var instance = this; - - var tab = instance._getTabFromDataSet(event.entryId); - - if (tab.get(IS_NEW) && tab.get(IS_DIRTY)) { - var parentFolderId = instance._treeViewEditor.getSelectedFolderId(); - - if (parentFolderId == 0) { - parentFolderId = instance._rootNode.get(ID); - } - - instance._addNewEntryToTreeNode(true, parentFolderId); - } - else if (tab.get(IS_DIRTY)) { - var callback = function(data) { - if (data.error) { - instance._showErrorDialog(data.error); - } - else { - tab.set(IS_DIRTY, false); - } - }; - - instance._requestUpdateFileEntryContent(event.entryId, tab.get(ACE_EDITOR).getEditor().getValue(), callback); - } - }, - - _defSaveRenameEntryFn: function(event) { - var instance = this; - - var node = instance._getNodeFromDataSet(event.entryId); - - if (node.get(IS_NEW_ENTRY)) { - instance._saveRenameNewEntry(node); - } - else { - instance._saveRenameExistingEntry(node); - } - }, - - _defStartRenameEntryFn: function(event) { - var instance = this; - - var editable = instance._getNodeFromDataSet(event.entryId).get(EDITABLE); - - instance._visibleEditable = editable; - - editable.fire('startEditing'); - }, - - _deleteEntry: function(node, entryId) { - var instance = this; - - var deleteEntryCallback = function(data) { - if (data && data.error) { - instance._showErrorDialog(data.error); - } - else { - if (node.isLeaf()) { - instance.fire( - EVENT_CLOSE_FILE_ENTRY, - { - entryId: entryId, - noConfirm: true - } - ); - } - else { - var children = node.getChildren(true); - - AArray.each( - children, - function(item, index) { - if (item.isLeaf()) { - instance.fire( - EVENT_CLOSE_FILE_ENTRY, - { - entryId: item.get(ENTRY_ID), - noConfirm: true - } - ); - } - } - ); - } - - var parentNode = node.get(PARENT_NODE); - - parentNode.removeChild(node); - } - }; - - if (node.isLeaf()) { - var gadgetId = node.get(GADGET_ID); - - if (gadgetId > 0) { - instance._unpublishGadget(node, gadgetId); - } - - instance._requestDeleteFileEntry(entryId, deleteEntryCallback); - } - else { - instance._requestDeleteFolder(entryId, deleteEntryCallback); - } - }, - - _getIORequest: function(resourceId, callback) { - var instance = this; - - var io = instance._io[resourceId]; - - if (!io) { - io = A.io.request( - instance._getResourceURL(resourceId), - { - autoLoad: false, - dataType: 'json', - on: { - failure: function(event) { - instance._loadingMask.hide(); - - var message = Liferay.Language.get('request-for-resource-id-failed', resourceId); - - instance._showErrorDialog(message); - } - } - } - ); - - instance._io[resourceId] = io; - } - - io.once( - 'success', - function(event) { - instance._loadingMask.hide(); - - if (callback) { - var message = this.get('responseData'); - - callback.apply(instance, [message]); - } - } - ); - - return io; - }, - - _getNextNewEntryName: function(leafNode, parentNode) { - var instance = this; - - var children = parentNode.getChildren(); - - var label; - - if (leafNode) { - label = UNTITLED_XML; - } - else { - label = NEW_FOLDER; - } - - var i = 0; - - var duplicateLabel = false; - - do { - duplicateLabel = AArray.some( - children, - function(item, index) { - if (item.isLeaf() == leafNode && item.get(LABEL).toLowerCase() == label.toLowerCase()) { - i++; - - if (leafNode) { - label = UNTITLED + i + XML; - } - else { - label = NEW_FOLDER + i; - } - - return true; - } - } - ); - } - while (duplicateLabel); - - return label; - }, - - _getNodeFromDataSet: function(entryId) { - var instance = this; - - var node = null; - - if (entryId != STR_EMPTY) { - var item = instance._indexMap.getValue(entryId); - - node = item && item.node; - } - - return node; - }, - - _getResourceURL: function(id) { - var instance = this; - - var resourceURL = instance.get('resourceURL'); - - resourceURL += '&p_p_resource_id=' + id; - - return resourceURL; - }, - - _getTabFromDataSet: function(entryId) { - var instance = this; - - var tab = null; - - if (entryId != '') { - var item = instance._indexMap.getValue(entryId); - - tab = item && item.tab; - } - - return tab; - }, - - _onEditableSave: function(event) { - var instance = this; - - event.preventDefault(); - - instance.fire( - EVENT_SAVE_RENAME_ENTRY, - { - entryId: event.target.get(ENTRY_ID) - } - ); - }, - - _onTabEditorFocus: function(event) { - var instance = this; - - instance._treeViewEditor.get('treeActionOverlayManager').hideAll(); - - var activeEditable = instance._treeViewEditor.get('activeEditable'); - - if (activeEditable) { - activeEditable.save(); - } - }, - - _removeEntryFromDataSet: function(entryId) { - var instance = this; - - instance._indexMap.remove(entryId); - }, - - _renderLoadingMask: function() { - var instance = this; - - var loadingMask = A.one('#editorPortlet').plug( - A.LoadingMask, - { - background: 'none', - strings: { - loading: Liferay.Language.get('busy') - } - } - ).loadingmask; - - instance._loadingMask = loadingMask; - }, - - _renderTabViewEditor: function() { - var instance = this; - - var tabViewEditor = new A.TabViewEditor( - { - boundingBox: '#tabViewEditor' - } - ).render(); - - tabViewEditor.addTarget(instance); - - instance._tabViewEditor = tabViewEditor; - }, - - _renderToolbar: function() { - var instance = this; - - var newFileEntryButton = new A.Button( - { - icon: 'icon-file', - on: { - click: function(event) { - instance.fire(EVENT_ADD_FILE_ENTRY_NODE); - } - } - } - ); - - var newFolderButton = new A.Button( - { - icon: 'icon-folder-close', - on: { - click: function(event) { - var parentFolderId = instance._treeViewEditor.getSelectedFolderId(); - - if (parentFolderId == 0) { - parentFolderId = instance._treeViewEditor.getChildren(false)[0].get(ID); - } - - instance.fire( - EVENT_ADD_FOLDER_NODE, - { - parentFolderId: parentFolderId - } - ); - } - } - } - ); - - var saveButton = new A.Button( - { - disabled: true, - icon: 'icon-save', - on: { - click: function(event) { - var entryId = instance._tabViewEditor.getSelectedTab().get(ENTRY_ID); - - instance.fire( - EVENT_SAVE_CONTENT, - { - entryId: entryId - } - ); - } - } - } - ); - - var deleteButton = new A.Button( - { - disabled: true, - icon: 'icon-remove', - on: { - click: function(event) { - var entryId = instance._tabViewEditor.getSelectedTab().get(ENTRY_ID); - - instance.fire( - EVENT_DELETE_ENTRY, - { - entryId: entryId - } - ); - } - } - } - ); - - var previewButton = new A.Button( - { - icon: 'icon-eye-open', - label: Liferay.Language.get('preview'), - on: { - click: function(event) { - var entryId = instance._tabViewEditor.getSelectedTab().get(ENTRY_ID); - - instance.fire( - EVENT_RENDER_GADGET, - { - entryId: entryId - } - ); - } - } - } - ); - - var increaseFontSizeButton = new A.Button( - { - icon: 'icon-zoom-in', - on: { - click: function(event) { - instance._changeEditorFontSize(INCREASE); - } - } - } - ); - - var decreaseFontSizeButton = new A.Button( - { - icon: 'icon-zoom-out', - on: { - click: function(event) { - instance._changeEditorFontSize('decrease'); - } - } - } - ); - - var searchEditorButton = new A.ToggleButton( - { - activeState: true, - icon: 'icon-search', - label: Liferay.Language.get('search'), - on: { - click: function(event) { - if (event.target.get('pressed')) { - instance._showSearchDialog(); - } - else { - instance._closeSearchDialog(); - - event.target.toggle(); - } - } - } - } - ); - - var editorToolbar = new A.Toolbar( - { - boundingBox: '#gadgetEditorToolbar', - children: [ - [ - newFileEntryButton, - newFolderButton, - saveButton, - deleteButton - ], - [ - previewButton - ], - [ - increaseFontSizeButton, - decreaseFontSizeButton - ], - [ - searchEditorButton - ] - ] - } - ).render(); - - instance._newFileEntryButton = newFileEntryButton; - instance._newFolderButton = newFolderButton; - instance._saveButton = saveButton; - instance._deleteButton = deleteButton; - instance._previewButton = previewButton; - instance._increaseEditorFontSizeButton = increaseFontSizeButton; - instance._decreaseEditorFontSizeButton = decreaseFontSizeButton; - instance._searchEditorButton = searchEditorButton; - - instance._editorToolbar = editorToolbar; - }, - - _renderTreeViewEditor: function() { - var instance = this; - - var treeViewEditor = new A.TreeViewEditor( - { - boundingBox: '#treeViewEditor', - io: { - cfg: { - data: function(node) { - return instance.ns( - { - folderId: node.get(ENTRY_ID), - getFileEntries: true, - p_auth: Liferay.authToken, - repositoryId: instance.get(REPOSITORY_ID) - } - ); - }, - on: { - failure: function(event) { - var message = Liferay.Language.get('unable-to-access-documents'); - - instance._showErrorDialog(message); - }, - success: function(event) { - this.sortChildren(); - } - } - }, - url: instance._getResourceURL(GET_FOLDER_CHILDREN) - }, - publishGadgetPermission: instance.get('publishGadgetPermission') - } - ).render(); - - var node = treeViewEditor.addRootNode('OpenSocial Gadgets', instance.get(ROOT_FOLDER_ID)); - - node.expand(); - - node.select(); - - treeViewEditor.addTarget(instance); - - instance._treeViewEditor = treeViewEditor; - }, - - _requestAddFileEntry: function(name, content, folderId, callback) { - var instance = this; - - instance._loadingMask.show(); - - instance._sendIORequest( - 'addFileEntry', - { - content: content, - fileEntryTitle: name, - folderId: folderId - }, - callback - ); - }, - - _requestAddFolder: function(name, parentFolderId, callback) { - var instance = this; - - instance._loadingMask.show(); - - instance._sendIORequest( - 'addFolder', - { - folderName: name, - parentFolderId: parentFolderId - }, - callback - ); - }, - - _requestDeleteFileEntry: function(fileEntryId, callback) { - var instance = this; - - instance._loadingMask.show(); - - instance._sendIORequest( - 'deleteFileEntry', - { - fileEntryId: fileEntryId - }, - callback - ); - }, - - _requestDeleteFolder: function(folderId, callback) { - var instance = this; - - instance._loadingMask.show(); - - instance._sendIORequest( - 'deleteFolder', - { - folderId: folderId - }, - callback - ); - }, - - _requestGetFileEntryContent: function(fileEntryId, callback) { - var instance = this; - - instance._loadingMask.show(); - - instance._sendIORequest( - 'getFileEntryContent', - { - fileEntryId: fileEntryId - }, - callback - ); - }, - - _requestGetRenderParameters: function(fileEntryURL, callback) { - var instance = this; - - instance._loadingMask.show(); - - instance._sendIORequest( - 'getRenderParameters', - { - fileEntryURL: fileEntryURL - }, - callback - ); - }, - - _requestUpdateFileEntryContent: function(fileEntryId, content, callback) { - var instance = this; - - instance._loadingMask.show(); - - instance._sendIORequest( - 'updateFileEntryContent', - { - content: content, - fileEntryId: fileEntryId - }, - callback - ); - }, - - _requestUpdateFileEntryTitle: function(fileEntryId, title, callback) { - var instance = this; - - instance._loadingMask.show(); - - instance._sendIORequest( - 'updateFileEntryTitle', - { - fileEntryId: fileEntryId, - fileEntryTitle: title - }, - callback - ); - }, - - _requestUpdateFolderName: function(folderId, name, callback) { - var instance = this; - - instance._loadingMask.show(); - - instance._sendIORequest( - 'updateFolderName', - { - folderId: folderId, - folderName: name - }, - callback - ); - }, - - _saveRenameExistingEntry: function(node) { - var instance = this; - - var editable = node.get(EDITABLE); - - var label = editable.inputNode.get(VALUE); - - var entryId = node.get(ENTRY_ID); - - var callback = function(data) { - var dataError = data.error; - - editable.fire('stopEditing', !dataError); - - if (dataError) { - instance._showErrorDialog(dataError); - } - else { - node.set(LABEL, label); - - node.sort(); - - if (node.isLeaf()) { - var tab = instance._getTabFromDataSet(entryId); - - if (tab) { - tab.set(LABEL, label); - - tab.updateEditorMode(label); - } - } - } - }; - - if (node.isLeaf()) { - instance._requestUpdateFileEntryTitle(entryId, label, callback); - } - else { - instance._requestUpdateFolderName(entryId, label, callback); - } - }, - - _saveRenameNewEntry: function(node) { - var instance = this; - - var editable = node.get(EDITABLE); - - var label = editable.inputNode.get(VALUE); - - var parentFolderNode = node.get(PARENT_NODE); - - var parentFolderEntryId; - - var tabViewEditor = instance._tabViewEditor; - - if (parentFolderNode.get(ID) == instance._treeViewEditor.get(ID)) { - parentFolderEntryId = instance.get(ROOT_FOLDER_ID); - } - else { - parentFolderEntryId = parentFolderNode.get(ENTRY_ID); - } - - var callback = function(data) { - var dataError = data.error; - - editable.fire('stopEditing', !dataError); - - if (dataError) { - instance._showErrorDialog(dataError); - - parentFolderNode.removeChild(node); - } - else { - if (node.isLeaf()) { - var fileEntryId = data.fileEntryId; - - node.setAttrs( - { - entryId: fileEntryId, - fileEntryLoaded: true, - fileEntryURL: data.fileEntryURL, - isNewEntry: false, - label: label - } - ); - - var tab = tabViewEditor.getSelectedTab(); - - tab.setAttrs( - { - entryId: fileEntryId, - isDirty: false, - isNew: false, - label: label - } - ); - - instance._addEntryToMap(tab); - - tab.updateEditorMode(label); - } - else { - node.setAttrs( - { - entryId: data.folderId, - isNewEntry: false, - label: label - } - ); - } - - node.sort(); - - var lastSelected = instance._treeViewEditor.get(LAST_SELECTED); - - if (lastSelected) { - lastSelected.unselect(); - } - - node.select(); - } - }; - - if (node.isLeaf()) { - instance._requestAddFileEntry(label, tabViewEditor.getSelectedTab().get(ACE_EDITOR).getEditor().getValue(), parentFolderEntryId, callback); - } - else { - instance._requestAddFolder(label, parentFolderEntryId, callback); - } - }, - - _sendIORequest: function(name, data, callback) { - var instance = this; - - var io = instance._getIORequest(name, callback); - - data = A.merge( - data, - { - p_auth: Liferay.authToken - } - ); - - io.set('data', instance.ns(data)); - - io.start(); - - return io; - }, - - _showConfirmationDialog: function(message, callback) { - var instance = this; - - var args = arguments; - - var buttons = [ - { - icon: 'icon-ok', - label: Liferay.Language.get('yes'), - on: { - click: function(event) { - var node = args[2]; - - if (A.instanceOf(node, A.TreeNodeEditor)) { - var parentNode = node.get(PARENT_NODE); - - if (parentNode) { - parentNode.select(); - } - } - - if (callback) { - callback.apply(instance, AArray(args, 2, true)); - } - - instance._confirmationDialog.destroy(); - } - } - }, - { - icon: 'icon-remove', - label: Liferay.Language.get('no'), - on: { - click: function(event) { - instance._confirmationDialog.destroy(); - } - } - } - ]; - - var options = { - buttons: buttons - }; - - var confirmationDialog = instance._createDialog(Liferay.Language.get('confirm'), message, options); - - instance._confirmationDialog = confirmationDialog; - }, - - _showErrorDialog: function(error) { - var instance = this; - - var bodyContent; - - if (Lang.isString(error)) { - bodyContent = error; - } - else { - bodyContent = Lang.sub(TPL_ERROR_MESSAGE, error); - } - - instance._createDialog(Liferay.Language.get('error'), bodyContent); - }, - - _showSearchDialog: function() { - var instance = this; - - var form = new A.Form().render(); - - var searchField = new A.Textfield( - { - labelText: Liferay.Language.get('search-for') - } - ); - - var replaceField = new A.Textfield( - { - labelText: Liferay.Language.get('replace-with') - } - ); - - form.add(searchField, true); - form.add(replaceField, true); - - var buttons = [ - new A.Button( - { - icon: 'icon-search', - label: Liferay.Language.get('find'), - on: { - click: function(event) { - var tab = instance._tabViewEditor.getSelectedTab(); - - var searchText = searchField.get(VALUE); - - tab.searchEditorText(searchText, false); - } - } - } - ), - new A.Button( - { - icon: 'icon-random', - label: Liferay.Language.get('replace'), - on: { - click: function(event) { - var tab = instance._tabViewEditor.getSelectedTab(); - - var searchText = searchField.get(VALUE); - - var replaceText = replaceField.get(VALUE); - - tab.searchEditorText(searchText, false, replaceText, true); - } - } - } - ), - new A.Button( - { - icon: 'icon-remove', - label: Liferay.Language.get('close'), - on: { - click: function(event) { - instance._closeSearchDialog(); - } - } - } - ) - ]; - - var options = { - buttons: buttons, - height: 300, - modal: false, - width: 400 - }; - - instance._searchDialog = instance._createDialog('Search', form.get(BOUNDING_BOX), options); - }, - - _unpublishGadget: function(node, gadgetId) { - var instance = this; - - instance._loadingMask.show(); - - Liferay.Service( - '/opensocial-portlet.gadget/delete-gadget', - { - gadgetId: gadgetId - }, - function(response) { - instance._loadingMask.hide(); - - if (response.exception) { - instance._showErrorDialog(response.exception); - } - else { - node.set(GADGET_ID, 0); - } - } - ); - } - } - } - ); - - var OpenSocial = Liferay.namespace('OpenSocial'); - - OpenSocial.Editor = Editor; - }, - '', - { - requires: ['aui-button-core', 'aui-form-deprecated', 'aui-map', 'aui-panel-deprecated', 'aui-tabs-base', 'aui-toolbar', 'gadget-editor-tabs', 'gadget-editor-tree', 'liferay-open-social-gadget', 'liferay-portlet-base', 'liferay-util-window' ] - } -); \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/publish_gadget_redirect.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/publish_gadget_redirect.jsp deleted file mode 100644 index b99e855c80..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/publish_gadget_redirect.jsp +++ /dev/null @@ -1,33 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -long gadgetId = ParamUtil.getLong(request, "gadgetId"); - -boolean unpublishPermission = ParamUtil.getBoolean(request, "unpublishPermission"); -%> - - - Liferay.Util.getOpener().Liferay.fire( - 'publishGadgetSuccess', - { - gadgetId: <%= gadgetId %>, - unpublishPermission: <%= unpublishPermission %> - } - ); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/view.jsp deleted file mode 100644 index df8426d51a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/editor/view.jsp +++ /dev/null @@ -1,47 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -long repositoryId = themeDisplay.getScopeGroupId(); - -Folder rootFolder = ShindigUtil.getGadgetEditorRootFolder(repositoryId); -%> - -
    - - - new Liferay.OpenSocial.Editor( - { - baseRenderURL: '<%= PortletURLFactoryUtil.create(request, portletDisplay.getId(), themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>', - - - - - - - editorGadgetURL: '<%= editorGadgetURL %>', - gadgetPortletId: '<%= portletDisplay.getId() %>', - gadgetServerBase: '<%= PortalUtil.getPathContext(renderRequest) %>/gadgets/', - namespace: '', - publishGadgetPermission: <%= GadgetPermission.contains(themeDisplay.getPermissionChecker(), themeDisplay.getScopeGroupId(), ActionKeys.PUBLISH_GADGET) %>, - repositoryId: '<%= repositoryId %>', - resourceURL: '', - rootFolderId: '<%= rootFolder.getFolderId() %>' - } - ).render('#editor'); - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/configuration.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/configuration.jsp deleted file mode 100644 index 47a306b6a9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/configuration.jsp +++ /dev/null @@ -1,85 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -Map userPrefs = (Map)renderRequest.getAttribute(WebKeys.USER_PREFS); - -String namespace = ShindigUtil.getPortletResourceNamespace(renderRequest, themeDisplay); - -JSONObject jsonObject = ExpandoValueServiceUtil.getJSONData(themeDisplay.getCompanyId(), Layout.class.getName(), ShindigUtil.getTableOpenSocial(), ShindigUtil.getColumnUserPrefs(namespace, themeDisplay), themeDisplay.getPlid()); -%> - - - - - - - <% - for (UserPref userPref : userPrefs.values()) { - UserPref.DataType dataType = userPref.getDataType(); - String displayName = userPref.getDisplayName(); - String name = userPref.getName(); - - String value = userPref.getDefaultValue(); - - if (jsonObject != null) { - value = GetterUtil.getString(jsonObject.getString(name), value); - } - %> - - - - - - - - - - - - <% - for (UserPref.EnumValuePair enumValuePair : userPref.getOrderedEnumValues()) { - String enumDisplayValue = enumValuePair.getDisplayValue(); - String enumValue = enumValuePair.getValue(); - %> - - - - <% - } - %> - - - - - - - - - - - <% - } - %> - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/css/main.css deleted file mode 100644 index 0e6fdde7d2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/css/main.css +++ /dev/null @@ -1,4 +0,0 @@ -.opensocial-portlet-gadget .gadget { - border-width: 0; - width: 100%; -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/js/main.js b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/js/main.js deleted file mode 100644 index 32c1993fda..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/js/main.js +++ /dev/null @@ -1,893 +0,0 @@ -AUI.add( - 'liferay-open-social-gadget', - function(A) { - var Lang = A.Lang; - - var containsString = Lang.String.contains; - - var getClassName = A.getClassName; - - var isArray = Lang.isArray; - - var isString = Lang.isString; - - var CSS_CLASS_GADGET = getClassName('gadget'); - - var GADGET_IFRAME_PREFIX = 'remote_iframe_'; - - var MAP = {}; - - var PREFIX = 'gadget:'; - - var STR_EMPTY = ''; - - var TPL_IFRAME = ''; - - var Gadget = A.Component.create( - { - _id: 0, - - NAME: 'liferaygadget', - - ATTRS: { - additionalParams: {}, - appId: {}, - baseRenderURL: { - validator: Lang.isString - }, - checksum: {}, - content: {}, - country: { - setter: function(v) { - if (v) { - return v; - } - else { - return 'ALL'; - } - } - }, - debug: {}, - height: { - setter: function(v) { - if (v > 0) { - return v; - } - else { - return null; - } - } - }, - iframeId: { - getter: '_getIframeId' - }, - iframeUrl: { - getter: '_getIframeUrl' - }, - language: { - setter: function(v) { - if (v) { - return v; - } - else { - return 'ALL'; - } - } - }, - moduleId: { - valueFn: function() { - return Gadget._id++; - } - }, - nocache: {}, - parentUrl: { - value: document.location.protocol + '://' + document.location.host, - setter: '_setParentUrl' - }, - portletId:{}, - pubsubURILoadTimeout: { - setter: function(v) { - if (v > 0) { - return v; - } - else { - return null; - } - } - }, - requiresPubsub:{}, - rpcRelay: {}, - rpcToken: { - value: Math.round(0x7FFFFFFF * Math.random()) - }, - scrolling: { - setter: function(v) { - if (v) { - return 'yes'; - } - else { - return 'no'; - } - } - }, - serverBase: {}, - secureToken: { - value: 'john.doe:john.doe:appid:cont:url:0:default' - }, - specUrl: {}, - store: { - valueFn: function() { - return new ExpandoStore(); - } - }, - userPrefs: { - setter: function(v) { - if (v) { - return v; - } - else { - return {}; - } - } - }, - view: { - value: 'default' - }, - viewParams: {}, - width: { - setter: function(v) { - if (v > 0) { - return v; - } - else { - return null; - } - } - } - }, - - prototype: { - initializer: function() { - var instance = this; - - Gadget.register(instance); - - gadgets.pubsub2router.init( - { - hub: managedHub - } - ); - }, - - renderUI: function() { - var instance = this; - - var height = instance.get('height'); - var iframeId = instance.get('iframeId'); - var scrolling = instance.get('scrolling'); - var secureToken = instance.get('secureToken'); - var width = instance.get('width'); - - if (instance.get('requiresPubsub')) { - var iframeAttrs = { - className: CSS_CLASS_GADGET, - frameborder: 'no', - scrolling: scrolling - }; - - if (height) { - iframeAttrs.height = height; - } - - if (width) { - iframeAttrs.width = width; - } - - var container = gadgets.pubsub2router.hub.getContainer(iframeId); - - if (container) { - delete gadgets.pubsub2router.hub._containers[iframeId]; - } - - container = new OpenAjax.hub.IframeContainer( - gadgets.pubsub2router.hub, - iframeId, - { - Container: { - onSecurityAlert: function(source, alertType) { - gadgets.error('Security error for container ' + source.getClientID() + ' : ' + alertType); - source.getIframe().src = 'about:blank'; - } - }, - IframeContainer: { - iframeAttrs: iframeAttrs, - parent: instance.get('contentBox'), - timeout: instance.get('pubsubURILoadTimeout'), - tunnelURI: shindig.uri(instance.get('serverBase') + instance.get('rpcRelay')).resolve(shindig.uri(window.location.href)), - uri: instance.get('iframeUrl') - } - } - ); - - instance._iframe = container.getIframe(); - } - else { - var iframe = Lang.sub( - TPL_IFRAME, - { - height: (height ? 'height="' + height + '"' : STR_EMPTY), - iframeId: iframeId, - scrolling: scrolling, - src: instance.get('iframeUrl'), - width: (width ? 'width="' + width + '"' : STR_EMPTY) - } - ); - - var iframeNode = A.Node.create(iframe); - - instance.get('contentBox').appendChild(iframeNode); - - instance._iframe = iframeNode.getDOM(); - - gadgets.rpc.setRelayUrl(iframeId, instance.get('serverBase') + instance.get('rpcRelay')); - gadgets.rpc.setAuthToken(iframeId, instance.get('rpcToken')); - } - }, - - bindUI: function() { - var instance = this; - - instance.after( - { - additionalParamsChange: instance._afterAdditionalParamsChange, - countryChange: instance._afterCountryChange, - debugChange: instance._afterDebugChange, - heightChange: instance._afterIframeHeightChange, - languageChange: instance._afterLanguageChange, - nocacheChange: instance._afterNocacheChange, - parentUrlChange: instance._afterParentUrlChange, - scrollingChange: instance._afterIframeScrollingChange, - secureTokenChange: instance._afterSecureTokenChange, - specUrlChange: instance._afterSpecUrlChange, - userPrefsChange: instance._afterUserPrefsChange, - viewChange: instance._afterViewChange, - viewParamsChange: instance._afterViewParamsChange, - widthChange: instance._afterIframeWidthChange - } - ); - }, - - _afterAdditionalParamsChange: function(event) { - var instance = this; - - var src = instance._iframe.src; - - var prevAdditionalParams = event.prevVal; - - for (var i in prevAdditionalParams) { - src = instance._setSrcParameter(encodeURIComponent(i), '', src); - } - - var newAdditionalParams = event.newVal; - - for (var i in newAdditionalParams) { - src = instance._setSrcParameter(encodeURIComponent(i), encodeURIComponent(newAdditionalParams[i]), src); - } - - instance._iframe.src = src; - }, - - _afterCountryChange: function(event) { - var instance = this; - - instance._refreshSrcParameter('country', event.newVal); - }, - - _afterDebugChange: function(event) { - var instance = this; - - var debug = 0; - - if (instance.get('debug')) { - debug = 1; - } - - instance._refreshSrcParameter('debug', debug); - }, - - _afterIframeHeightChange: function(event) { - var instance = this; - - instance._uiSetIframeHeight(event.newVal); - }, - - _afterIframeScrollingChange: function(event) { - var instance = this; - - instance._uiSetIframeScrolling(event.newVal); - }, - - _afterIframeWidthChange: function(event) { - var instance = this; - - instance._uiSetIframeWidth(event.newVal); - }, - - _afterLanguageChange: function(event) { - var instance = this; - - instance._refreshSrcParameter('lang', event.newVal); - }, - - _afterNocacheChange: function(event) { - var instance = this; - - instance._refreshSrcParameter('nocache', event.newVal); - }, - - _afterParentUrlChange: function(event) { - var instance = this; - - var parentUrl = event.newVal; - - if (parentUrl) { - instance._refreshSrcParameter('parent', parentUrl); - } - }, - - _afterSecureTokenChange: function(event) { - var instance = this; - - var secureToken = event.newVal; - - if (secureToken) { - instance._refreshSrcParameter('st', secureToken); - } - }, - - _afterSpecUrlChange: function(event) { - var instance = this; - - instance._refreshSrcParameter('url', event.newVal); - }, - - _afterUserPrefsChange: function(event) { - var instance = this; - - if (!event.SYNC) { - instance.get('store').savePrefs(instance); - } - - instance._refreshUserPrefs(); - }, - - _afterViewChange: function(event) { - var instance = this; - - instance._refreshSrcParameter('view', event.newVal); - }, - - _afterViewParamsChange: function(event) { - var instance = this; - - var viewParams = event.newVal; - - if (parentUrl) { - instance._refreshSrcParameter('view-params', encodeURIComponent(A.JSON.stringify(viewParams))); - } - }, - - _getIframeId: function(value) { - var instance = this; - - return GADGET_IFRAME_PREFIX + instance.get('moduleId'); - }, - - _getIframeUrl: function(value) { - var instance = this; - - var url = STR_EMPTY; - - var urlData = { - aid: instance.get('appId'), - checksum: instance.get('checksum'), - container: instance._CONTAINER, - mid: instance.get('moduleId'), - country: instance.get('country'), - lang: instance.get('language'), - view: instance.get('view'), - url: instance.get('specUrl') - }; - - if (instance.get('debug')) { - urlData.debug = 1; - } - - if (instance.get('nocache')) { - urlData.nocache = 1; - } - - var parentUrl = instance.get('parentUrl'); - - if (parentUrl) { - urlData.parent = parentUrl; - } - - url = instance.get('serverBase') + 'ifr?' + A.QueryString.stringify(urlData); - - var content = instance.get('content'); - - if (content) { - url += '&rawxml=' + content; - } - - var secureToken = instance.get('secureToken'); - - url += instance.get('additionalParams'); - - url += instance._getUserPrefParams(); - - if (secureToken) { - url += '&st=' + secureToken; - } - - if (!instance.get('requiresPubsub')) { - url += '#rpctoken=' + instance.get('rpcToken'); - } - - var viewParams = instance.get('viewParams'); - - if (viewParams) { - url += '&view-params=' + encodeURIComponent(A.JSON.stringify(viewParams)); - } - - return url; - }, - - _getUserPrefParams: function() { - var instance = this; - - var userPrefs = instance.get('userPrefs'); - - var buffer = []; - - for (var i in userPrefs) { - buffer.push('&up_' + encodeURIComponent(i) + '=' + encodeURIComponent(userPrefs[i])); - } - - return buffer.join(STR_EMPTY); - }, - - _refreshSrcParameter: function(key, value) { - var instance = this; - - var src = instance._iframe.src; - - src = instance._setSrcParameter(key, value, src); - - instance._iframe.src = src; - }, - - _refreshUserPrefs: function() { - var instance = this; - - var src = instance._iframe.src; - - var userPrefs = instance.get('userPrefs'); - - for (var i in userPrefs) { - src = instance._setSrcParameter('&up_' + encodeURIComponent(i), encodeURIComponent(userPrefs[i]), src); - } - - instance._iframe.src = src; - }, - - _setParentUrl: function(value) { - var instance = this; - - if (!value.match(/^http[s]?:\/\//)) { - value = document.location.href.match(/^[^?#]+\//)[0] + value; - } - - return value; - }, - - _setSrcParameter: function(key, value, src) { - var instance = this; - - var parameters = src.split('&'); - - var parameterFound = false; - - for (var i = 0; i < parameters.length; i++) { - var parameter = parameters[i].split('='); - - if (parameter[0] == key) { - parameter[1] = value; - - parameters[i] = parameter.join('='); - - parameterFound = true; - - break; - } - } - - if (!parameterFound) { - var newParameter = key + '=' + value; - - parameters[parameters.length] = newParameter; - } - - return parameters.join('&'); - }, - - _uiSetIframeHeight: function(value) { - var instance = this; - - instance._iframe.setAttribute('height', value); - }, - - _uiSetIframeScrolling: function(value) { - var instance = this; - - instance._iframe.setAttribute('scrolling', value); - }, - - _uiSetIframeWidth: function(value) { - var instance = this; - - instance._iframe.setAttribute('width', value); - }, - - _CONTAINER: 'default' - } - } - ); - - var DefaultStore = A.Component.create( - { - ATTRS: { - userPrefsKey: {} - }, - EXTENDS: A.Base, - NAME: 'gadgetstoredefault', - prototype: { - savePrefs: Lang.emptyFn - } - } - ); - - var CookieStore = A.Component.create( - { - EXTENDS: DefaultStore, - NAME: 'gadgetstorecookie', - prototype: { - savePrefs: function(gadget) { - var instance = this; - - return A.Cookie.setSubs(instance.get('userPrefsKey'), gadget.get('userPrefs')); - } - } - } - ); - - var ExpandoStore = A.Component.create( - { - EXTENDS: DefaultStore, - NAME: 'gadgetstoreexpando', - prototype: { - savePrefs: function(gadget) { - var instance = this; - - Liferay.Service( - '/expandovalue/add-value', - { - companyId: themeDisplay.getCompanyId(), - className: instance._CLASS_NAME, - tableName: instance._TABLE_NAME, - columnName: instance.get('userPrefsKey'), - classPK: themeDisplay.getPlid(), - data: A.JSON.stringify(gadget.get('userPrefs')) - } - ); - }, - - _CLASS_NAME: 'com.liferay.portal.model.Layout', - _TABLE_NAME: 'OPEN_SOCIAL_DATA_' - } - } - ); - - var Store = { - Cookie: CookieStore, - Default: DefaultStore, - Expando: ExpandoStore - }; - - var _instances = {}; - - Gadget.register = function(gadget) { - if (gadget) { - var id = gadget.get('moduleId'); - - _instances[id] = gadget; - } - - return gadget; - }; - - Gadget.get = function(id) { - id = String(id); - - if (id.indexOf(GADGET_IFRAME_PREFIX) === 0) { - id = id.replace(GADGET_IFRAME_PREFIX, STR_EMPTY); - } - - return _instances[id]; - }; - - Liferay._detachInitialFn = Liferay.detach; - Liferay._fireInitialFn = Liferay.fire; - Liferay._onInitialFn = Liferay.on; - - Liferay.detach = function(topic, fn) { - var handle = topic; - var gadgetTopic = topic; - var subscriptionId; - - if (handle && !handle.detach) { - subscriptionId = getSubscriptionId(topic, fn); - } - - if (subscriptionId) { - unsubscribeTopic(gadgetTopic, subscriptionId); - } - - return Liferay._detachInitialFn.apply(Liferay, arguments); - }; - - Liferay.fire = function(topic, data) { - if (containsString(topic, PREFIX)) { - var eventType = topic.replace(PREFIX, STR_EMPTY); - - gadgets.pubsub2router.hub.publish(eventType, data); - } - - return Liferay._fireInitialFn.apply(Liferay, arguments); - }; - - Liferay.on = function(topic, fn) { - var handle; - var gadgetTopic; - var subscriptionId; - - if (isArray(topic)) { - gadgetTopic = []; - subscriptionId = []; - - var eventName; - - for (var i = 0; i < topic.length; i++) { - eventName = topic[i]; - - if (containsString(eventName, PREFIX)) { - gadgetTopic.push(eventName); - subscriptionId.push(subscribeGadgetEvent(eventName, fn)); - } - } - } - else if (containsString(topic, PREFIX)) { - gadgetTopic = topic; - subscriptionId = subscribeGadgetEvent(topic, fn); - } - - if (subscriptionId && subscriptionId.length) { - handle = Liferay._onInitialFn(topic, Lang.emptyFn); - - handle._LFR_HANDLE_DETACH = handle.detach; - - handle._LFR_GADGET_TOPIC = gadgetTopic; - - handle._LFR_SUB_ID = subscriptionId; - - handle.detach = function() { - handle.detach = handle._LFR_HANDLE_DETACH; - - unsubscribeTopic(topic, subscriptionId); - }; - } - else { - handle = Liferay._onInitialFn.apply(Liferay, arguments); - } - - return handle; - }; - - var getSubscriptionId = function(topic, fn) { - var subscriptionId = null; - - if (topic) { - var eventType = topic.replace(PREFIX, STR_EMPTY); - - var eventMap = MAP[eventType]; - - var allIds = (!fn); - - if (allIds) { - subscriptionId = []; - } - - if (eventMap) { - for (var i in eventMap) { - if (allIds) { - subscriptionId.push(i); - } - else if (eventMap[i] == fn) { - subscriptionId = i; - - break; - } - } - } - } - - return subscriptionId; - }; - - var subscribeGadgetEvent = function(topic, fn) { - var eventType = topic.replace(PREFIX, STR_EMPTY); - - var eventMap = MAP[eventType] || {}; - - var subscriptionId = gadgets.pubsub2router.hub.subscribe(eventType, fn); - - eventMap[subscriptionId] = fn; - - MAP[eventType] = eventMap; - - return subscriptionId; - }; - - var unsubscribeGadgetEvent = function(topic, subscriptionId, fn) { - var eventType = topic.replace(PREFIX, STR_EMPTY); - - var eventMap = MAP[eventType]; - - if (!fn || eventMap[subscriptionId] == fn) { - gadgets.pubsub2router.hub.unsubscribe(subscriptionId); - - delete eventMap[subscriptionId]; - } - }; - - var unsubscribeTopic = function(topic, subscriptionId, fn) { - if (isString(topic) && isString(subscriptionId)) { - unsubscribeGadgetEvent(topic, subscriptionId, fn); - } - else if (isString(topic) && isArray(subscriptionId)) { - for (var i = 0; i < subscriptionId.length; i++) { - unsubscribeGadgetEvent(topic, subscriptionId[i], fn); - } - } - else if (isArray(topic) && isArray(subscriptionId)) { - for (var i = 0; i < subscriptionId.length; i++) { - unsubscribeGadgetEvent(topic[i], subscriptionId[i]); - } - } - }; - - var managedHub = new OpenAjax.hub.ManagedHub( - { - onPublish: function(topic, data, pcont, scont) { - if (!containsString(topic, PREFIX)) { - var eventType = PREFIX + topic; - - Liferay._fireInitialFn(eventType, data); - } - - return true; - }, - - onSubscribe: Lang.emptyFnTrue, - onUnsubscribe: Lang.emptyFn - } - ); - - var inlineContainer = new OpenAjax.hub.InlineContainer(managedHub , "liferay", - { - Container: { - onSecurityAlert: function(source, alertType) {}, - onConnect: function(container) {}, - onDisconnect: function(container) {} - } - } - ); - - var hubClient = new OpenAjax.hub.InlineHubClient( - { - HubClient: { - onSecurityAlert: function(source, alertType) {} - }, - InlineHubClient: { - container: inlineContainer - } - } - ); - - gadgets.rpc.register( - 'resize_iframe', - function(height) { - var gadget = Gadget.get(this.f); - - if (gadget) { - gadget.set('height', height); - } - } - ); - - var viewWindowStateMap = { - canvas: 'maximized', - 'default': 'normal', - home: 'normal', - profile: 'normal' - }; - - gadgets.rpc.register( - 'requestNavigateTo', - function(view, viewParams) { - var gadget = Gadget.get(this.f); - - var portletURL = new Liferay.PortletURL.createURL(gadget.get('baseRenderURL')); - - portletURL.setPortletId(gadget.get('portletId')); - portletURL.setParameter('returnToFullPageURL', document.location.href); - portletURL.setParameter('view', view); - - var windowState = viewWindowStateMap[view]; - - if (windowState) { - portletURL.setWindowState(windowState); - } - - if (Lang.isString(viewParams)) { - portletURL.setParameter('viewParams', viewParams); - } - - document.location.href = portletURL.toString(); - } - ); - - gadgets.rpc.register( - 'set_pref', - function(editToken, name, value) { - var gadget = Gadget.get(this.f); - - if (gadget) { - var length = arguments.length; - var userPrefs = gadget.get('userPrefs'); - - for (var i = 1; i < length; i += 2) { - arg = arguments[i]; - - userPrefs[arg] = arguments[i + 1]; - } - - gadget.set('userPrefs', userPrefs); - } - } - ); - - gadgets.rpc.register('set_title', Lang.emptyFn); - gadgets.rpc.register('requestSendMessage', Lang.emptyFn); - - var OpenSocial = Liferay.namespace('OpenSocial'); - - OpenSocial.Gadget = Gadget; - OpenSocial.Store = Store; - }, - '', - { - requires: ['aui-base', 'aui-io-deprecated', 'cookie', 'json', 'liferay-portlet-url', 'querystring'] - } -); \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/view.jsp deleted file mode 100644 index dd427100ae..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/gadget/view.jsp +++ /dev/null @@ -1,105 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ include file="/init.jsp" %> - -<% -Gadget gadget = (Gadget)renderRequest.getAttribute(WebKeys.GADGET); -String view = (String)renderRequest.getAttribute(WebKeys.VIEW); - -String ownerId = ShindigUtil.getOwnerId(layout); -long moduleId = ShindigUtil.getModuleId(renderResponse.getNamespace()); - -long gadgetId = gadget.getGadgetId(); - -String gadgetKey = StringPool.BLANK; - -if (gadgetId > 0) { - gadgetKey = GadgetConstants.toPublishedGadgetKey(gadgetId); -} -else { - gadgetKey = GadgetConstants.toAdhocGadgetKey(moduleId); -} - -GadgetSpec gadgetSpec = ShindigUtil.getGadgetSpec(gadget.getUrl()); - -ModulePrefs modulePrefs = gadgetSpec.getModulePrefs(); - -Map features = modulePrefs.getFeatures(); - -boolean requiresPubsub = features.containsKey("pubsub-2"); - -String secureToken = ShindigUtil.createSecurityToken(ownerId, themeDisplay.getUserId(), gadgetKey, PortalUtil.getPortalURL(themeDisplay), gadget.getUrl(), moduleId, currentURL); - -String userPrefsKey = ShindigUtil.getColumnUserPrefs(renderResponse.getNamespace(), themeDisplay); - -JSONObject userPrefsJSONObject = ExpandoValueServiceUtil.getJSONData(themeDisplay.getCompanyId(), Layout.class.getName(), ShindigUtil.getTableOpenSocial(), userPrefsKey, themeDisplay.getPlid()); - -String userPrefsJSON = "{}"; - -if (userPrefsJSONObject != null) { - userPrefsJSON = String.valueOf(userPrefsJSONObject); - - userPrefsJSON = userPrefsJSON.replace(StringPool.BACK_SLASH, StringPool.DOUBLE_BACK_SLASH); -} -%> - -
    - - - new Liferay.OpenSocial.Gadget( - { - appId: '<%= gadget.getUrl() %>', - baseRenderURL: '<%= PortletURLFactoryUtil.create(request, portletDisplay.getId(), themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>', - checksum: '<%= gadgetSpec.getChecksum() %>', - country: '<%= locale.getCountry() %>', - debug: <%= PortletPropsValues.SHINDIG_JS_DEBUG %>, - height: <%= modulePrefs.getHeight() %>, - language: '<%= _getLanguage(locale) %>', - moduleId: '<%= moduleId %>', - nocache: <%= PortletPropsValues.SHINDIG_NO_CACHE %>, - portletId: '<%= portletDisplay.getId() %>', - pubsubURILoadTimeout: <%= PortletPropsValues.PUBSUB_URI_LOAD_TIMEOUT %>, - requiresPubsub: <%= requiresPubsub %>, - scrolling: <%= modulePrefs.getScrolling() %>, - secureToken: '<%= secureToken %>', - serverBase: '<%= PortalUtil.getPathContext(renderRequest) %>/gadgets/', - specUrl: '<%= gadget.getUrl() %>', - store: new Liferay.OpenSocial.Store.Expando( - { - userPrefsKey: '<%= userPrefsKey %>' - } - ), - userPrefs: A.JSON.parse('<%= userPrefsJSON %>'), - view: '<%= view %>', - viewParams: '<%= ParamUtil.getString(renderRequest, "viewParams") %>' - } - ).render('#gadget'); - - -<%! -private String _getLanguage(Locale locale) { - String language = locale.getLanguage(); - - // See http://docs.opensocial.org/display/OSREF/Gadgets+XML+Reference - - if (language.equals(LocaleUtil.CHINESE.getLanguage())) { - language = language + StringPool.DASH + locale.getCountry(); - } - - return language; -} -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/init.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/init.jsp deleted file mode 100644 index 383fa7080c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/opensocial-portlet-6.2.x/docroot/init.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%-- -/** - * 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. - */ ---%> - -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - -<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %> -<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> -<%@ taglib uri="http://liferay.com/tld/security" prefix="liferay-security" %> -<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %> -<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> -<%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %> - -<%@ page import="com.liferay.opensocial.DuplicateGadgetURLException" %><%@ -page import="com.liferay.opensocial.GadgetPortletCategoryNamesException" %><%@ -page import="com.liferay.opensocial.GadgetURLException" %><%@ -page import="com.liferay.opensocial.NoSuchGadgetException" %><%@ -page import="com.liferay.opensocial.model.Gadget" %><%@ -page import="com.liferay.opensocial.model.OAuthConsumer" %><%@ -page import="com.liferay.opensocial.model.OAuthConsumerConstants" %><%@ -page import="com.liferay.opensocial.model.impl.GadgetConstants" %><%@ -page import="com.liferay.opensocial.service.GadgetLocalServiceUtil" %><%@ -page import="com.liferay.opensocial.service.OAuthConsumerLocalServiceUtil" %><%@ -page import="com.liferay.opensocial.service.permission.GadgetPermission" %><%@ -page import="com.liferay.opensocial.shindig.util.ShindigUtil" %><%@ -page import="com.liferay.opensocial.util.ActionKeys" %><%@ -page import="com.liferay.opensocial.util.PortletPropsValues" %><%@ -page import="com.liferay.opensocial.util.WebKeys" %><%@ -page import="com.liferay.portal.kernel.dao.search.ResultRow" %><%@ -page import="com.liferay.portal.kernel.json.JSONObject" %><%@ -page import="com.liferay.portal.kernel.language.LanguageUtil" %><%@ -page import="com.liferay.portal.kernel.portlet.LiferayWindowState" %><%@ -page import="com.liferay.portal.kernel.repository.model.Folder" %><%@ -page import="com.liferay.portal.kernel.util.Constants" %><%@ -page import="com.liferay.portal.kernel.util.GetterUtil" %><%@ -page import="com.liferay.portal.kernel.util.LocaleUtil" %><%@ -page import="com.liferay.portal.kernel.util.ParamUtil" %><%@ -page import="com.liferay.portal.kernel.util.PrefsParamUtil" %><%@ -page import="com.liferay.portal.kernel.util.StringPool" %><%@ -page import="com.liferay.portal.kernel.util.TreeNodeView" %><%@ -page import="com.liferay.portal.kernel.util.TreeView" %><%@ -page import="com.liferay.portal.kernel.util.UnicodeFormatter" %><%@ -page import="com.liferay.portal.kernel.util.Validator" %><%@ -page import="com.liferay.portal.model.Layout" %><%@ -page import="com.liferay.portal.util.PortalUtil" %><%@ -page import="com.liferay.portal.util.PortletLister" %><%@ -page import="com.liferay.portal.util.PortletListerFactoryUtil" %><%@ -page import="com.liferay.portlet.PortletURLFactoryUtil" %><%@ -page import="com.liferay.portlet.expando.service.ExpandoValueServiceUtil" %> - -<%@ page import="java.util.Locale" %><%@ -page import="java.util.Map" %> - -<%@ page import="javax.portlet.PortletRequest" %><%@ -page import="javax.portlet.PortletURL" %> - -<%@ page import="org.apache.shindig.gadgets.spec.Feature" %><%@ -page import="org.apache.shindig.gadgets.spec.GadgetSpec" %><%@ -page import="org.apache.shindig.gadgets.spec.ModulePrefs" %><%@ -page import="org.apache.shindig.gadgets.spec.OAuthService" %><%@ -page import="org.apache.shindig.gadgets.spec.UserPref" %> - - - - - -<% -String currentURL = PortalUtil.getCurrentURL(request); -%> \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/portal-impl-6.2.x/src/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/portal-impl-6.2.x/src/portal.properties deleted file mode 100644 index 20e01a9fea..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/portal-impl-6.2.x/src/portal.properties +++ /dev/null @@ -1,253 +0,0 @@ -## -## Journal Portlet -## - - # - # Set the list of supported display views. - # - journal.display.views=icon,descriptive,list - - # - # Set the default display view. - # - journal.default.display.view=descriptive - - # - # Set this to true to expire all article versions when expiring an article. - # Set this to false to only expire the latest approved article version when - # expiring an article. - # - journal.article.expire.all.versions=true - - # - # Input a list of sections that will be included as part of the article form - # when adding an article. - # - journal.article.form.add=content,abstract,categorization,schedule,display-page,related-assets,permissions,custom-fields - - # - # Input a list of sections that will be included as part of the article form - # when defining the default values of a structure. - # - journal.article.form.default.values=content,abstract,categorization,display-page,related-assets,custom-fields - - # - # Input a list of sections that will be included as part of the article form - # when translating an article. - # - journal.article.form.translate=content,abstract - - # - # Input a list of sections that will be included as part of the article form - # when updating an article. - # - journal.article.form.update=content,abstract,categorization,schedule,display-page,related-assets,custom-fields - - # - # Set this to true if article ids should always be autogenerated. - # - journal.article.force.autogenerate.id=true - - # - # Set the list of article types. The display text of each of the article - # types is set in content/Language.properties. - # - journal.article.types=announcements,blogs,general,news,press-release,test - - # - # Set a list of custom tokens that will be replaced when article content is - # rendered. For example, if set to "custom_token_1", then "@custom_token_1@" - # will be replaced with its token value before an article is displayed. - # - #journal.article.custom.tokens=custom_token_1,custom_token_2 - #journal.article.custom.token.value[custom_token_1]=This is the first custom token. - #journal.article.custom.token.value[custom_token_2]=This is the second custom token. - - # - # Set the token used when inserting simple page breaks in articles. - # - journal.article.token.page.break=@page_break@ - - # - # Set the interval in minutes on how often CheckArticleMessageListener will - # run to check for and send email on web content due for review. - # - journal.article.check.interval=15 - - # - # Set the storage type that will be used to store the Journal articles. - # Valid values are: expando and xml. - # - journal.article.storage.type=xml - - # - # Set this to true to check that a user has the VIEW permission on a - # Journal article when its content is rendered. - # - journal.article.view.permission.check.enabled=false - - # - # Set this to true to enable comments for journal articles. - # - journal.article.comments.enabled=true - - # - # Set this to false to ignore article content when performing keyword - # searches on the database for journal articles. - # - journal.article.database.keyword.search.content=true - - # - # Set this to true if feed ids should always be autogenerated. - # - journal.feed.force.autogenerate.id=true - - # - # Set the location of the default content for each language type. - # - journal.template.language.content[css]=com/liferay/portlet/journal/dependencies/template.css - journal.template.language.content[ftl]=com/liferay/portlet/journal/dependencies/template.ftl - journal.template.language.content[vm]=com/liferay/portlet/journal/dependencies/template.vm - journal.template.language.content[xsl]=com/liferay/portlet/journal/dependencies/template.xsl - - # - # Set the maximum file size and valid file extensions for images. A value of - # 0 for the maximum file size can be used to indicate unlimited file size. - # However, the maximum file size allowed is set in the property - # "com.liferay.portal.upload.UploadServletRequestImpl.max.size". - # - journal.image.small.max.size=51200 - - # - # A file extension of * will permit all file extensions. - # - journal.image.extensions=.gif,.jpeg,.jpg,.png - - # - # Input a list of comma delimited class names that extend - # com.liferay.portal.kernel.templateparser.BaseTransformerListener. These - # classes will run in sequence to allow you to modify the XML and XSL before - # it is transformed and allow you to modify the final output. - # - journal.transformer.listener=\ - com.liferay.portlet.journal.util.TokensTransformerListener,\ - #com.liferay.portlet.journal.util.PropertiesTransformerListener,\ - com.liferay.portlet.journal.util.ContentTransformerListener,\ - com.liferay.portlet.journal.util.LocaleTransformerListener,\ - com.liferay.portlet.journal.util.RegexTransformerListener,\ - com.liferay.portlet.journal.util.ViewCounterTransformerListener - - # - # Enter a list of regular expression patterns and replacements that will be - # applied to outputted Journal content. The list of properties must end with - # a subsequent integer (0, 1, etc.) and it is assumed that the list has - # reached an end when the pattern or replacement is not set. See - # com.liferay.portlet.journal.util.RegexTransformerListener for - # implementation details. - # - #journal.transformer.regex.pattern.0=beta.sample.com - #journal.transformer.regex.replacement.0=production.sample.com - #journal.transformer.regex.pattern.1=staging.sample.com - #journal.transformer.regex.replacement.1=production.sample.com - - # - # Set this to true if journal articles should be published to live by - # default. - # - journal.publish.to.live.by.default=true - - # - # Set this to false if only the latest approved version of journal articles - # should be published by default. - # - journal.publish.version.history.by.default=true - - # - # Set whether to synchronize content searches when the server starts. - # - journal.sync.content.search.on.startup=false - - # - # Configure email notification settings. - # - journal.email.from.name= - journal.email.from.address= - - journal.email.article.added.enabled=true - journal.email.article.added.subject=com/liferay/portlet/journal/dependencies/email_article_added_subject.tmpl - journal.email.article.added.body=com/liferay/portlet/journal/dependencies/email_article_added_body.tmpl - - journal.email.article.approval.denied.enabled=false - journal.email.article.approval.denied.subject=com/liferay/portlet/journal/dependencies/email_article_approval_denied_subject.tmpl - journal.email.article.approval.denied.body=com/liferay/portlet/journal/dependencies/email_article_approval_denied_body.tmpl - - journal.email.article.approval.granted.enabled=false - journal.email.article.approval.granted.subject=com/liferay/portlet/journal/dependencies/email_article_approval_granted_subject.tmpl - journal.email.article.approval.granted.body=com/liferay/portlet/journal/dependencies/email_article_approval_granted_body.tmpl - - journal.email.article.approval.requested.enabled=false - journal.email.article.approval.requested.subject=com/liferay/portlet/journal/dependencies/email_article_approval_requested_subject.tmpl - journal.email.article.approval.requested.body=com/liferay/portlet/journal/dependencies/email_article_approval_requested_body.tmpl - - journal.email.article.review.enabled=true - journal.email.article.review.subject=com/liferay/portlet/journal/dependencies/email_article_review_subject.tmpl - journal.email.article.review.body=com/liferay/portlet/journal/dependencies/email_article_review_body.tmpl - - journal.email.article.updated.enabled=true - journal.email.article.updated.subject=com/liferay/portlet/journal/dependencies/email_article_updated_subject.tmpl - journal.email.article.updated.body=com/liferay/portlet/journal/dependencies/email_article_updated_body.tmpl - - # - # Specify the strategy used when Journal content is imported using the LAR - # system. - # - journal.lar.creation.strategy=com.liferay.portlet.journal.lar.JournalCreationStrategyImpl - - # - # Specify the path to the template used for providing error messages on - # Journal templates. - # - journal.error.template[ftl]=com/liferay/portlet/journal/dependencies/error.ftl - journal.error.template[vm]=com/liferay/portlet/journal/dependencies/error.vm - journal.error.template[xsl]=com/liferay/portlet/journal/dependencies/error.xsl - -## -## Journal Articles Portlet -## - - # - # Set the available values for the number of articles to display per page. - # - journal.articles.page.delta.values=5,10,20,30,50,75 - - # - # Set this to true to search articles from the index. Set this to false to - # search articles from the database. Note that setting this to false will - # disable searching articles based on Expando attributes or Message Boards - # discussions or article versions. - # - journal.articles.search.with.index=true - - # - # Set this to true to index all article versions. Set this to false to index - # only the last indexable version. - # - journal.articles.index.all.versions=true - -## -## Journal Content Portlet -## - # - # Set this to true if journal content should be published to live by - # default. - # - journal.content.publish.to.live.by.default=true - -## -## Journal Content Search Portlet -## - - # - # Set whether unlisted articles are excluded from search results. - # - journal.content.search.show.listed=true \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-location/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-location/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-61/build.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-61/build.properties deleted file mode 100644 index 00e172fe94..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-61/build.properties +++ /dev/null @@ -1 +0,0 @@ -lp.version=6.1.0 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-61/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-61/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-61/portlets/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-61/portlets/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-61/portlets/test-portlet/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-61/portlets/test-portlet/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-70/build.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-70/build.properties deleted file mode 100644 index b1f5d04988..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-70/build.properties +++ /dev/null @@ -1 +0,0 @@ -lp.version=7.0.0 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-70/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-70/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-70/portlets/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-70/portlets/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-70/portlets/test-portlet/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project-bad-version-70/portlets/test-portlet/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project/build.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project/build.properties deleted file mode 100644 index 48535bbfb9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project/build.properties +++ /dev/null @@ -1 +0,0 @@ -lp.version=6.2.0 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project/portlets/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project/portlets/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project/portlets/test-portlet/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/sdk-project/portlets/test-portlet/build.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/source_formatter.ignore b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/source_formatter.ignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/build.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/build.xml deleted file mode 100644 index ee76d8bf06..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/build.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/classes/com/liferay/test/TestUtil.class b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/classes/com/liferay/test/TestUtil.class deleted file mode 100644 index 549abd67fb..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/classes/com/liferay/test/TestUtil.class and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/AssetPubliserUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/AssetPubliserUtilTest.java deleted file mode 100644 index 366c56fd10..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/AssetPubliserUtilTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.liferay.test; - -import com.liferay.portal.kernel.search.HitsImpl; -import com.liferay.portlet.wiki.util.WikiUtil; -import com.liferay.portal.util.PortalUtil; - -public class AssetPubliserUtilTest { - - public void assetPubliserUtilTest() { - AssetPublisherUtil.getEntries(new HitsImpl()); - AssetPublisherUtil.foo(); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLAppHelperLocalServiceUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLAppHelperLocalServiceUtilTest.java deleted file mode 100644 index 9962501517..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLAppHelperLocalServiceUtilTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.liferay.test; - -import com.liferay.portlet.documentlibrary.service.DLAppHelperLocalServiceUtil; - -public class DLAppHelperLocalServiceUtilTest { - - public void deleteFileEntry() { - DLAppHelperLocalServiceUtil.deleteFileEntry(null); - } - - public void deleteFolder() { - DLAppHelperLocalServiceUtil.deleteFolder(null); - } - - public void moveFileEntry() { - DLAppHelperLocalServiceUtil.moveFileEntry(null); - } - - public void moveFolder() { - DLAppHelperLocalServiceUtil.moveFolder(null); - } - - public void addFileEntry() { - DLAppHelperLocalServiceUtil.addFileEntry(null); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLAppServiceUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLAppServiceUtilTest.java deleted file mode 100644 index 3d71c3ceca..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLAppServiceUtilTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.liferay.test; - -import com.liferay.document.library.kernel.service.DLAppServiceUtil; -import com.liferay.document.library.kernel.service.DLAppLocalServiceUtil; - - -public class DLAppServiceUtilTest { - - public void moveFileEntryFromTrash() { - DLAppServiceUtil.moveFileEntryFromTrash(null); - } - - public void moveFileEntryToTrash() { - DLAppServiceUtil.moveFileEntryToTrash(null); - } - - public void moveFileShortcutFromTrash() { - DLAppServiceUtil.moveFileShortcutFromTrash(null); - } - - public void moveFileShortcutToTrash() { - DLAppServiceUtil.moveFileShortcutToTrash(null); - } - - public void moveFolderFromTrash() { - DLAppServiceUtil.moveFolderFromTrash(null); - } - - public void moveFolderToTrash() { - DLAppServiceUtil.moveFolderToTrash(null); - } - - public void restoreFileEntryFromTrash() { - DLAppServiceUtil.restoreFileEntryFromTrash(null); - } - - public void restoreFileShortcutFromTrash() { - DLAppServiceUtil.restoreFileShortcutFromTrash(null); - } - - public void restoreFolderFromTrash() { - DLAppServiceUtil.restoreFolderFromTrash(null); - } - - public void moveFileEntryToTrash() { - DLAppLocalServiceUtil.moveFileEntryToTrash(null); - } - - public void restoreFileEntryFromTrash() { - DLAppLocalServiceUtil.restoreFileEntryFromTrash(null); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLFileEntryTypeLocalServiceUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLFileEntryTypeLocalServiceUtilTest.java deleted file mode 100644 index a81d0aec82..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLFileEntryTypeLocalServiceUtilTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.liferay.test; - -import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalServiceUtil; - -public class DLFileEntyTypeLocalServiceUtilTest { - - public void addDDMStructureDLFileEntryType() { - DLFileEntryTypeLocalServiceUtil.addDDMStructureDLFileEntryType(0, 0); - } - - public void addDDMStructureDLFileEntryTypes() { - DLFileEntryTypeLocalServiceUtil.addDDMStructureDLFileEntryTypes( - 0, null); - } - - public void clearDDMStructureDLFileEntryTypes() { - DLFileEntryTypeLocalServiceUtil.clearDDMStructureDLFileEntryTypes(0); - } - - public void deleteDDMStructureDLFileEntryType() { - DLFileEntryTypeLocalServiceUtil.deleteDDMStructureDLFileEntryType(0, 0); - } - - public void deleteDDMStructureDLFileEntryTypes() { - DLFileEntryTypeLocalServiceUtil.deleteDDMStructureDLFileEntryTypes(0, null); - } - - public void getDDMStructureDLFileEntryTypes() { - DLFileEntryTypeLocalServiceUtil.getDDMStructureDLFileEntryTypes(0); - } - - public void getDDMStructureDLFileEntryTypesCount() { - DLFileEntryTypeLocalServiceUtil.getDDMStructureDLFileEntryTypesCount( - 0, 0, 0); - } - - public void hasDDMStructureDLFileEntryType() { - DLFileEntryTypeLocalServiceUtil.hasDDMStructureDLFileEntryType(0, 0); - } - - public void hasDDMStructureDLFileEntryTypes() { - DLFileEntryTypeLocalServiceUtil.hasDDMStructureDLFileEntryTypes(0); - } - - public void setDDMStructureDLFileEntryTypes() { - DLFileEntryTypeLocalServiceUtil.setDDMStructureDLFileEntryTypes(0, 0); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/FlagsEntryServiceTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/FlagsEntryServiceTest.java deleted file mode 100644 index 0b98ab5af1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/FlagsEntryServiceTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.liferay.test; - -import com.liferay.portlet.flags.service.FlagsEntryServiceUtil; - -public class FlagsEntryServiceTest { - - public void flagsEntryServiceaddEntry() { - FlagsEntryServiceUtil.addEntry(); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/PortalUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/PortalUtilTest.java deleted file mode 100644 index 39f6afaeb3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/PortalUtilTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.liferay.test; - -import com.liferay.portal.kernel.search.HitsImpl; -import com.liferay.portlet.wiki.util.WikiUtil; -import com.liferay.portal.util.PortalUtil; - -public class PortalUtilTest { - - public void portalUtilGetClassNamePortletId() { - PortalUtil.getClassNamePortletId(""); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/WikiUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/WikiUtilTest.java deleted file mode 100644 index 4ccb3dbe11..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/WikiUtilTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.liferay.test; - -import com.liferay.portal.kernel.search.HitsImpl; -import com.liferay.portlet.wiki.util.WikiUtil; -import com.liferay.portal.util.PortalUtil; - -public class WikiUtilTest { - - public void wikiUtilGetEntries() { - WikiUtil.getEntries(new HitsImpl()); - } - - public void wikiUtilGetPageOrderByComparator() { - WikiUtil.getPageOrderByComparator("modifiedDate","asc"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/portal.properties deleted file mode 100644 index 3c6a53b6ec..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-impl/src/portal.properties +++ /dev/null @@ -1 +0,0 @@ -editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_message.bb_code.jsp=ckeditor_bbcode \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1c0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/liferay-portlet-ext.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/liferay-portlet-ext.xml deleted file mode 100644 index e1a6a9be92..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/liferay-portlet-ext.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/portlet-ext.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/portlet-ext.xml deleted file mode 100644 index 11a6e3e3c2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/portlet-ext.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/struts-config-ext.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/struts-config-ext.xml deleted file mode 100644 index 989a32c103..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/struts-config-ext.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/tiles-defs-ext.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/tiles-defs-ext.xml deleted file mode 100644 index 8d8c8de334..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/tiles-defs-ext.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/web.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/web.xml deleted file mode 100644 index 7d8c082599..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/ext-web/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/lib/liferay-look-and-feel.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/lib/liferay-look-and-feel.xml deleted file mode 100644 index 18ba403578..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/lib/liferay-look-and-feel.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 7.1.2+ - - - jsp - - - - - - _styled - jsp - - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/liferay-plugin-package.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 62b8bb6f87..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,11 +0,0 @@ -name=Test -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+ \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/web.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/web.xml deleted file mode 100644 index 1aa8cdb8d7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-ext/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1c0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-display.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index 16b027939e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-hook.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-hook.xml deleted file mode 100644 index 36a785f969..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-hook.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - portal.properties - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-plugin-package.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 62b8bb6f87..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,11 +0,0 @@ -name=Test -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+ \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index 522e6a2249..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - test - /icon.png - site_administration.pages - /css/main.css - /js/main.js - test-portlet - - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 5818fcd9b6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - test - Test - com.liferay.util.bridges.mvc.MVCPortlet - - view-template - /view.jsp - - 0 - - text/html - - - Test - Test - Test - - - administrator - - - guest - - - power-user - - - user - - - - test2 - Test2 - com.liferay.util.bridges.mvc.MVCPortlet - - view-template - /view.jsp - - 0 - - text/html - - - Test2 - Test2 - Test2 - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/src/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/src/portal.properties deleted file mode 100644 index 3be30a9a4a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/src/portal.properties +++ /dev/null @@ -1,9 +0,0 @@ -wiki.email.page.updated.body=A wiki page was updated. -wiki.email.page.updated.signature=For any doubts email the system administrator - -language.display.style.default=icon -language.display.style.options=icon,long-text - -asset.publisher.asset.entry.query.processors=com.liferay.portlet.assetpublisher.util.CustomUserAttributesAssetEntryQueryProcessor - -asset.entry.validator=com.liferay.portlet.asset.util.DefaultAssetEntryValidator \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/aui.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/aui.tld deleted file mode 100644 index 445a87739f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/aui.tld +++ /dev/null @@ -1,2851 +0,0 @@ - - - - aui:.]]> - 1.0 - aui - http://alloy.liferay.com/tld/aui - - - button-item - com.liferay.taglib.aui.ButtonItemTag - JSP - - ]]> - activeState - false - true - boolean - - - ]]> - boundingBox - false - true - java.lang.String - - - ]]> - classNames - false - true - java.lang.Object - - - ]]> - contentBox - false - true - java.lang.String - - - boundingBox.]]> - cssClass - false - true - java.lang.String - - - ]]> - defaultState - false - true - boolean - - - ]]> - depth - false - true - java.lang.Object - - - ]]> - destroyed - false - true - boolean - - - ]]> - disabled - false - true - boolean - - - ]]> - focused - false - true - boolean - - - {fn: // The function to execute - context: // The context to execute the function in - type: // The type of event to listen for (defaults to "click") - }]]> - handler - false - true - java.lang.Object - - - ]]> - height - false - true - java.lang.Object - - - boundingBox when - visible is set to - false.]]> - hideClass - false - true - java.lang.String - - - ]]> - hoverState - false - true - boolean - - - ]]> - icon - false - true - java.lang.String - - - aui-button-icon.]]> - iconNode - false - true - java.lang.String - - - ]]> - buttonitemId - false - true - java.lang.String - - - ]]> - index - false - true - java.lang.Object - - - ]]> - initialized - false - true - boolean - - - ]]> - label - false - true - java.lang.String - - - aui-button-label.]]> - labelNode - false - true - java.lang.String - - - ]]> - buttonitemParent - false - true - java.lang.Object - - - true the render phase will be autimatically invoked - preventing the .render() manual call.]]> - render - false - true - java.lang.Object - - - ]]> - rendered - false - true - boolean - - - ]]> - root - false - true - java.lang.Object - - - -
    0
    (Default) Not selected
    -
    1
    Fully selected
    -
    2
    Partially selected
    - ]]>
    - selected - false - true - java.lang.Object -
    - - ]]> - srcNode - false - true - java.lang.String - - - ]]> - strings - false - true - java.lang.Object - - - ]]> - tabIndex - false - true - java.lang.Object - - - ]]> - title - false - true - java.lang.String - - - ]]> - type - false - true - java.lang.String - - - ]]> - useARIA - false - true - boolean - - - ]]> - visible - false - true - boolean - - - ]]> - width - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterActiveStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterBoundingBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterClassNamesChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterContentBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterCssClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDefaultStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDepthChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after destruction is complete (and as a result cannot prevent - destruction). -

    ]]>
    - afterDestroy - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDestroyedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDisabledChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterFocusedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHandlerChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHeightChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHideClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHoverStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIconChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIconNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIdChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIndexChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" momemt of this event, will be notified - after initialization of the object is complete (and therefore - cannot prevent initialization). -

    ]]>
    - afterInit - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterInitializedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterLabelChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterLabelNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterParentChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterRenderChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterRenderedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterRootChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterSelectedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterSrcNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterStringsChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterTabIndexChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterTitleChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterTypeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterUseARIAChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterVisibleChange - false - true - java.lang.Object - - - ]]> - afterContentUpdate - false - true - java.lang.Object - - - - Subscribers to the "on" moment of this event, will be notified - before the widget is rendered. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after rendering is complete. -

    ]]>
    - afterRender - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterWidthChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onActiveStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onBoundingBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onClassNamesChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onContentBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onCssClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDefaultStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDepthChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after destruction is complete (and as a result cannot prevent - destruction). -

    ]]>
    - onDestroy - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDestroyedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDisabledChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onFocusedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHandlerChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHeightChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHideClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHoverStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIconChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIconNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIdChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIndexChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" momemt of this event, will be notified - after initialization of the object is complete (and therefore - cannot prevent initialization). -

    ]]>
    - onInit - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onInitializedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onLabelChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onLabelNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onParentChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onRenderChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onRenderedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onRootChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onSelectedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onSrcNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onStringsChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onTabIndexChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onTitleChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onTypeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onUseARIAChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onVisibleChange - false - true - java.lang.Object - - - ]]> - onContentUpdate - false - true - java.lang.Object - - - - Subscribers to the "on" moment of this event, will be notified - before the widget is rendered. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after rendering is complete. -

    ]]>
    - onRender - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onWidthChange - false - true - java.lang.Object - - true -
    - - - a - com.liferay.taglib.aui.ATag - JSP - - <p> tag could be used for something other than a paragraph.]]> - ariaRole - false - true - java.lang.String - - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.util.Map - - - - href - true - true - java.lang.String - - - - id - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - - lang - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - - - onClick - false - true - java.lang.String - - - self. Possible values are blank, self, parent, top, and a unique frame's name.]]> - target - false - true - java.lang.String - - - - title - false - true - java.lang.String - - true - - - alert - com.liferay.taglib.aui.AlertTag - JSP - - animated - false - true - boolean - - - closeable - false - true - boolean - - - cssClass - false - true - java.lang.String - - - destroyOnHide - false - true - boolean - - - duration - false - true - java.lang.Object - - - id - false - true - java.lang.String - - - type - false - true - java.lang.String - - true - - - audio - com.liferay.taglib.aui.AudioTag - JSP - - boundingBox - false - true - java.lang.String - - - cssClass - false - true - java.lang.String - - - id - false - true - java.lang.String - - - oggURL - false - true - java.lang.String - - - swfURL - false - true - java.lang.String - - - type - false - true - java.lang.String - - - url - true - true - java.lang.String - - true - - - - button - com.liferay.taglib.aui.ButtonTag - JSP - - primary attribute.]]> - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.lang.Object - - - false.]]> - disabled - false - true - boolean - - - - href - false - true - java.lang.String - - - here.]]> - icon - false - true - java.lang.String - - - left.]]> - iconAlign - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - name - false - true - java.lang.String - - - - onClick - false - true - java.lang.String - - - btn btn-primary CSS styling to the button. If the type attribute is set to submit, this value is set to true. For all other types, the value is set to false by default.]]> - primary - false - true - java.lang.Object - - - button, submit, cancel and reset. The default value is button.]]> - type - false - true - java.lang.String - - - href location when a user clicks the button. The default value is false.]]> - useDialog - false - true - boolean - - - true.]]> - useNamespace - false - true - boolean - - - - value - false - true - java.lang.String - - true - - - <div> tag to wrap <aui:button> components and offer additional styling.]]> - button-row - com.liferay.taglib.aui.ButtonRowTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - true - - - <aui:row> component.]]> - col - com.liferay.taglib.aui.ColTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - lg - false - true - java.lang.String - - - md - false - true - java.lang.String - - - sm - false - true - java.lang.String - - - 12. For example, a span of 4 would result in a column width 4/12 (or 1/3) of the total width of the containing row.]]> - span - false - true - int - - - span attribute. The width is then converted to a span expressed as ((width/100) x 12), rounded to the nearest whole number. For example, a width of 33 would be converted to 3.96, which would be rounded up to a span value of 4.]]> - width - false - true - int - - - xs - false - true - java.lang.String - - true - - - aui:col.]]> - column - com.liferay.taglib.aui.ColumnTag - JSP - - 20 would be 20%. The default value is 0.]]> - columnWidth - false - true - int - - - - cssClass - false - true - java.lang.String - - - false.]]> - first - false - true - boolean - - - - id - false - true - java.lang.String - - - false.]]> - last - false - true - boolean - - true - - - component - com.liferay.taglib.aui.ComponentTag - JSP - - defineVar - false - true - boolean - - - excludeAttributes - false - true - java.lang.String - - - javaScriptAttributes - false - true - java.lang.String - - - module - false - true - java.lang.String - - - name - false - true - java.lang.String - - - options - false - true - java.util.Map - - - scriptPosition - false - true - java.lang.String - - - tagPageContext - true - true - javax.servlet.jsp.JspContext - - - useJavaScript - false - true - java.io.Serializable - - - var - false - true - java.lang.String - - true - - - <div> tag to wrap <aui:row> components and offer additional styling.]]> - container - com.liferay.taglib.aui.ContainerTag - JSP - - - cssClass - false - true - java.lang.String - - - true.]]> - fluid - false - true - boolean - - - - id - false - true - java.lang.String - - true - - - <div> tag to wrap form fields and offer additional styling.]]> - field-wrapper - com.liferay.taglib.aui.FieldWrapperTag - JSP - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.lang.Object - - - false.]]> - first - false - true - boolean - - - - helpMessage - false - true - java.lang.String - - - false.]]> - inlineField - false - true - boolean - - - right and left.]]> - inlineLabel - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - false.]]> - last - false - true - boolean - - - true.]]> - localizeLabel - false - true - boolean - - - - name - false - true - java.lang.String - - - - required - false - true - boolean - - - - <div> tag to group related form elements and offer additional styling.]]> - fieldset - com.liferay.taglib.aui.FieldsetTag - JSP - - - column - false - true - boolean - - - - cssClass - false - true - java.lang.String - - - - helpMessage - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - true - - - - form - com.liferay.taglib.aui.FormTag - JSP - - - action - false - true - java.lang.String - - - - cssClass - false - true - java.lang.String - - - true.]]> - escapeXml - false - true - boolean - - - false.]]> - inlineLabels - false - true - boolean - - - post. Possible values are get and post.]]> - method - false - true - java.lang.String - - - fm.]]> - name - false - true - java.lang.String - - - - onSubmit - false - true - java.lang.String - - - - portletNamespace - false - true - java.lang.String - - - true.]]> - useNamespace - false - true - boolean - - true - - - - icon - com.liferay.taglib.aui.IconTag - JSP - - image attribute.]]> - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.util.Map - - - - id - false - true - java.lang.String - - - icon-edit CSS class by setting the value edit. If an icon image is referenced for cssClass and image, both icons are shown in the component.]]> - image - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - self. Possible values are blank, self, parent, top, and a unique frame's name.]]> - target - false - true - java.lang.String - - - - url - false - true - java.lang.String - - true - - - - input - com.liferay.taglib.aui.InputTag - JSP - - - autoFocus - false - true - boolean - - - - autoSize - false - true - boolean - - - - bean - false - true - java.lang.Object - - - false.]]> - changesContext - false - true - boolean - - - type is radio or checkbox.]]> - checked - false - true - boolean - - - 0.]]> - classPK - false - true - long - - - -1.]]> - classTypePK - false - true - long - - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.lang.Object - - - dateTogglerCheckboxLabel - false - true - java.lang.String - - - - defaultLanguageId - false - true - java.lang.String - - - false.]]> - disabled - false - true - boolean - - - field - false - true - java.lang.String - - - field of the component.]]> - fieldParam - false - true - java.lang.String - - - - first - false - true - boolean - - - - formName - false - true - java.lang.String - - - - helpMessage - false - true - java.lang.String - - - input-group-addon.]]> - helpTextCssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - false.]]> - ignoreRequestValue - false - true - boolean - - - false.]]> - inlineField - false - true - boolean - - - right and left.]]> - inlineLabel - false - true - java.lang.String - - - name attribute's value.]]> - label - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - - languageId - false - true - java.lang.String - - - - last - false - true - boolean - - - false.]]> - localized - false - true - boolean - - - type is number or range. Note that the max value is inclusive if the input's type is range.]]> - max - false - true - java.lang.Object - - - - model - false - true - java.lang.Class - - - type is number or range. Note that the min value is inclusive if the input's type is range.]]> - min - false - true - java.lang.Object - - - multiple - false - true - boolean - - - - name - true - true - java.lang.String - - - - onChange - false - true - java.lang.String - - - - onClick - false - true - java.lang.String - - - - placeholder - false - true - java.lang.String - - - - prefix - false - true - java.lang.String - - - - required - false - true - boolean - - - textarea.]]> - resizable - false - true - boolean - - - - showRequiredLabel - false - true - boolean - - - - suffix - false - true - java.lang.String - - - - title - false - true - java.lang.String - - - text, hidden, assetCategories, assetTags, textarea, timeZone, password, checkbox, radio, submit, button, color, email, number, range, resource, url, 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.]]> - type - false - true - java.lang.String - - - true.]]> - useNamespace - false - true - boolean - - - - value - false - true - java.lang.Object - - - div, that can be styled. The default value is false. If the wrapperCssClass attribute is configured, the value is set automatically to true.]]> - wrappedField - false - true - boolean - - - div that wraps the input component.]]> - wrapperCssClass - false - true - java.lang.String - - true - - - - layout - com.liferay.taglib.aui.LayoutTag - JSP - - - cssClass - false - true - java.lang.String - - true - - - - model-context - com.liferay.taglib.aui.ModelContextTag - JSP - - - bean - false - true - java.lang.Object - - - - defaultLanguageId - false - true - java.lang.String - - - - model - false - true - java.lang.Class - - - - <nav:item> components for an <aui:nav-bar> component.]]> - nav - com.liferay.taglib.aui.NavTag - JSP - - - ariaLabel - false - true - java.lang.String - - - <p> tag could be used for something other than a paragraph.]]> - ariaRole - false - true - java.lang.String - - - collapsible - false - true - boolean - - - - cssClass - false - true - java.lang.String - - - icon - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - searchContainer - false - true - com.liferay.portal.kernel.dao.search.SearchContainer - - - true.]]> - useNamespace - false - true - boolean - - true - - - - nav-bar - com.liferay.taglib.aui.NavBarTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - true - - - <aui:nav-bar> component.]]> - nav-bar-search - com.liferay.taglib.aui.NavBarSearchTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - file - false - true - java.lang.String - - - - searchContainer - false - true - com.liferay.portal.kernel.dao.search.SearchContainer - - true - - - <aui:nav> component.]]> - nav-item - com.liferay.taglib.aui.NavItemTag - JSP - - href attribute.]]> - anchorCssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - anchorData - false - true - java.lang.Object - - - href attribute.]]> - anchorId - false - true - java.lang.String - - - - ariaLabel - false - true - java.lang.String - - - <p> tag could be used for something other than a paragraph.]]> - ariaRole - false - true - java.lang.String - - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.lang.Object - - - false.]]> - dropdown - false - true - boolean - - - - href - false - true - java.lang.Object - - - - iconCssClass - false - true - java.lang.String - - - iconSrc - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - - false.]]> - selected - false - true - boolean - - - state - false - true - java.lang.String - - - target - false - true - java.lang.String - - - - title - false - true - java.lang.String - - - toggle - false - true - boolean - - - toggleTouch - false - true - boolean - - - href location when a user clicks the navigation item. The default value is false.]]> - useDialog - false - true - boolean - - - drop-down-menu class. The default value is true.]]> - wrapDropDownMenu - false - true - boolean - - true - - - <aui:select> component.]]> - option - com.liferay.taglib.aui.OptionTag - JSP - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.util.Map - - - false.]]> - disabled - false - true - boolean - - - - label - false - true - java.lang.Object - - - true.]]> - localizeLabel - false - true - boolean - - - false.]]> - selected - false - true - boolean - - - text-align:right;.]]> - style - false - true - java.lang.String - - - useModelValue - false - true - boolean - - - label attribute.]]> - value - false - true - java.lang.Object - - true - - - panel - com.liferay.taglib.aui.PanelTag - JSP - - collapsed - false - true - boolean - - - collapsible - false - true - boolean - - - id - false - true - java.lang.String - - - label - false - true - java.lang.String - - - localizeLabel - false - true - boolean - - - - <aui:col> components.]]> - row - com.liferay.taglib.aui.RowTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - true - - - - script - com.liferay.taglib.aui.ScriptTag - JSP - - - position - false - true - java.lang.String - - - sandbox - false - true - boolean - - - - use - false - true - java.lang.String - - - - <aui:option> components.]]> - select - com.liferay.taglib.aui.SelectTag - JSP - - - bean - false - true - java.lang.Object - - - false.]]> - changesContext - false - true - boolean - - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", "foo"> would render as the attribute data-class-name = "foo";.]]> - data - false - true - java.util.Map - - - false.]]> - disabled - false - true - boolean - - - false.]]> - first - false - true - boolean - - - - helpMessage - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - ignoreRequestValue - false - true - boolean - - - false.]]> - inlineField - false - true - boolean - - - right and left.]]> - inlineLabel - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - false.]]> - last - false - true - boolean - - - ListTypeImpl.java.]]> - listType - false - true - java.lang.String - - - listTypeFieldName - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - - true, the select field expands to allow for multiple selections. The default value is false.]]> - multiple - false - true - boolean - - - label attribute and takes the place of the label.]]> - name - true - true - java.lang.String - - - - onChange - false - true - java.lang.String - - - - onClick - false - true - java.lang.String - - - - prefix - false - true - java.lang.String - - - false.]]> - required - false - true - boolean - - - false.]]> - showEmptyOption - false - true - boolean - - - required attribute is set to true. The default value is false.]]> - showRequiredLabel - false - true - boolean - - - - suffix - false - true - java.lang.String - - - - title - false - true - java.lang.String - - - true.]]> - useNamespace - false - true - boolean - - - value - false - true - java.lang.Object - - - div that wraps the select field.]]> - wrapperCssClass - false - true - java.lang.String - - true - - - - spacer - com.liferay.taglib.aui.SpacerTag - JSP - - - - translation-manager - com.liferay.taglib.aui.TranslationManagerTag - JSP - - - availableLocales - false - true - java.util.Locale[] - - - - defaultLanguageId - false - true - java.lang.String - - - editingLanguageId - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - true. If this is set to false, the translation manager will not work entirely.]]> - initialize - false - true - boolean - - - false.]]> - readOnly - false - true - boolean - - - - - validator - com.liferay.taglib.aui.ValidatorTagImpl - JSP - - - errorMessage - false - true - java.lang.String - - - acceptFiles, alpha, alphanum, date, digits, email, equalTo, iri, max, maxLength, min, minLength, number, required, and url.]]> - name - true - true - java.lang.String - - - - video - com.liferay.taglib.aui.VideoTag - JSP - - boundingBox - false - true - java.lang.String - - - cssClass - false - true - java.lang.String - - - flashPlayerVersion - false - true - java.lang.String - - - height - false - true - java.lang.Object - - - id - false - true - java.lang.String - - - ogvURL - false - true - java.lang.String - - - poster - false - true - java.lang.String - - - swfURL - false - true - java.lang.String - - - url - true - true - java.lang.String - - - width - false - true - java.lang.Object - - true - - - - workflow-status - com.liferay.taglib.aui.WorkflowStatusTag - JSP - - - bean - false - true - java.lang.Object - - - - helpMessage - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - model - false - true - java.lang.Class - - - true.]]> - showIcon - false - true - boolean - - - true.]]> - showLabel - false - true - boolean - - - 0 (Approved), 1 (Pending), 2 (Draft), 3 (Expired), 4 (Denied), 5 (Inactive), 6 (Incomplete), 7 (Scheduled), and 8 (In-Trash). Any other value defaults to status (Any).]]> - status - false - true - java.lang.Integer - - - - statusMessage - false - true - java.lang.String - - - - version - false - true - java.lang.String - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-portlet-ext.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-portlet-ext.tld deleted file mode 100644 index c9a0a34183..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-portlet-ext.tld +++ /dev/null @@ -1,498 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-portlet - http://liferay.com/tld/portlet - - - - - actionURL - com.liferay.taglib.portlet.ActionURLTag - com.liferay.taglib.portlet.ActionURLTei - JSP - - allowEmptyParam - false - true - - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsGroupId - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - name - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - refererGroupId - false - true - - - refererPlid - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - icon-back - com.liferay.taglib.portletext.IconBackTag - JSP - - - icon-options - com.liferay.taglib.portletext.IconOptionsTag - JSP - - - icon-portlet - com.liferay.taglib.portletext.IconPortletTag - JSP - - ariaRole - false - true - - - id - false - true - - - label - false - true - - - portlet - false - true - - - url - false - true - - - - param - com.liferay.taglib.util.ParamTag - empty - - name - true - true - - - value - true - true - - - - preview - com.liferay.taglib.portletext.PreviewTag - JSP - - portletName - true - true - - - queryString - false - true - - - showBorders - false - true - - - width - false - true - - - - - - - renderURL - com.liferay.taglib.portlet.RenderURLTag - com.liferay.taglib.portlet.RenderURLTei - JSP - - allowEmptyParam - false - true - - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsGroupId - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - refererGroupId - false - true - - - refererPlid - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - renderURLParams - com.liferay.taglib.portlet.RenderURLParamsTag - JSP - - portletURL - false - true - - - varImpl - false - true - - - - - - - resourceURL - com.liferay.taglib.portlet.ResourceURLTag - com.liferay.taglib.portlet.ResourceURLTei - JSP - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsGroupId - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - id - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - refererGroupId - false - true - - - refererPlid - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - runtime - com.liferay.taglib.portletext.RuntimeTag - JSP - - defaultPreferences - false - true - - - portletName - false - true - - - portletProviderClassName - false - true - - - portletProviderAction - false - true - - - queryString - false - true - - - settingsScope - false - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-portlet.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-portlet.tld deleted file mode 100644 index a7cd2fdff2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-portlet.tld +++ /dev/null @@ -1,158 +0,0 @@ - - - - - 1.0 - 1.1 - portlet - http://java.sun.com/portlet - - actionURL - com.liferay.taglib.portlet.ActionURLTag - com.liferay.taglib.portlet.ActionURLTei - JSP - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - name - false - true - - - portletMode - false - true - - - secure - false - true - - - var - false - true - - - windowState - false - true - - - - defineObjects - com.liferay.taglib.portlet.DefineObjectsTag - com.liferay.taglib.portlet.DefineObjectsTei - empty - - - namespace - com.liferay.taglib.portlet.NamespaceTag - empty - - - param - com.liferay.taglib.util.ParamTag - empty - - name - true - true - - - value - true - true - - - - property - com.liferay.taglib.util.PropertyTag - empty - - name - true - true - - - value - true - true - - - - renderURL - com.liferay.taglib.portlet.RenderURLTag - com.liferay.taglib.portlet.RenderURLTei - JSP - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - portletMode - false - true - - - secure - false - true - - - var - false - true - - - windowState - false - true - - - - resourceURL - com.liferay.taglib.portlet.ResourceURLTag - com.liferay.taglib.portlet.ResourceURLTei - JSP - - cacheability - false - true - - - escapeXml - false - true - - - id - false - true - - - secure - false - true - - - var - false - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-security.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-security.tld deleted file mode 100644 index f8e6f6dd82..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-security.tld +++ /dev/null @@ -1,106 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-security - http://liferay.com/tld/security - - doAsURL - com.liferay.taglib.security.DoAsURLTag - com.liferay.taglib.security.DoAsURLTei - JSP - - doAsUserId - false - true - - - var - false - true - - - - encrypt - com.liferay.taglib.security.EncryptTag - JSP - - className - false - true - - - protocol - true - true - - - style - false - true - - - target - false - true - - - unencryptedParams - false - true - - - url - true - true - - - - permissionsURL - com.liferay.taglib.security.PermissionsURLTag - com.liferay.taglib.security.PermissionsURLTei - JSP - - modelResource - true - true - - - modelResourceDescription - true - true - - - redirect - false - true - - - resourceGroupId - false - true - - - resourcePrimKey - true - true - - - roleTypes - false - true - - - var - false - true - - - windowState - false - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-theme.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-theme.tld deleted file mode 100644 index 90ac81db71..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-theme.tld +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 1.0 - 1.1 - theme - http://liferay.com/tld/theme - - defineObjects - com.liferay.taglib.theme.DefineObjectsTag - com.liferay.taglib.theme.DefineObjectsTei - empty - - - include - com.liferay.taglib.theme.IncludeTag - JSP - - page - true - true - - - - layout-icon - com.liferay.taglib.theme.LayoutIconTag - JSP - - layout - true - true - - - - meta-tags - com.liferay.taglib.theme.MetaTagsTag - JSP - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - wrap-portlet - com.liferay.taglib.theme.WrapPortletTag - JSP - - page - true - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-ui.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-ui.tld deleted file mode 100644 index 3c3cb0fa5a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-ui.tld +++ /dev/null @@ -1,5573 +0,0 @@ - - - - Provides the Liferay UI component tags, prefixed with liferay-ui:]]>. - 1.0 - liferay-ui - http://liferay.com/tld/ui - - Deprecated as of 7.0.0, replaced by liferay-aui:nav-item]]>. - app-view-display-style - com.liferay.taglib.ui.AppViewDisplayStyleTag - empty - - displayStyle - true - true - - - displayStyles - true - true - - - displayStyleURL - false - true - - - eventName - false - true - - - requestParams - false - true - - - - 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. - app-view-entry - com.liferay.taglib.ui.AppViewEntryTag - empty - - The path to an action JSP page. - actionJsp - false - true - - - The service context of the actionJsp]]>. - actionJspServletContext - false - true - - - The Java class name for any categories added to the entry. - assetCategoryClassName - false - true - - - The Java class primary key for any categories added to the entry. This is a Java long]]>. - assetCategoryClassPK - false - true - - - The Java class name for any tags added to the entry. - assetTagClassName - false - true - - - The Java class primary key for any tags added to the entry. This is a Java long]]>. - assetTagClassPK - false - true - - - The name of the entry's author. - author - false - true - - - A name for the entry type. This is displayed in descriptive view as Type: classTypeName]]>. - classTypeName - false - true - - - The date the entry was created. - createDate - false - true - - - A CSS class for styling this component. - cssClass - false - true - - - Miscellaneous data to be stored via a map. This data is not shared with the browser. The map holds key value pairs of type <String, Object>]]>. - data - false - true - java.util.Map - - - A description of the entry. - description - false - true - - - A date to display the entry. - displayDate - false - true - - - A display style for the component. Options are list]]>, icon]]>, and descriptive]]>. - displayStyle - true - true - - - A date for the entry to expire and be automatically deleted. - expirationDate - false - true - - - Whether the entry is a folder. The default is false]]>. - folder - false - true - boolean - - - The group ID of the entry. This is a Java long]]>. - groupId - false - true - - - A class for the icon to be displayed next to the entry title. The icon also acts as a link to view the entry. - iconCssClass - false - true - - - The version number of the most recently published copy of the entry. - latestApprovedVersion - false - true - - - The author of the most recently published version of the entry. - latestApprovedVersionAuthor - false - true - - - Whether the entry is locked. The default value is false]]>. - locked - false - true - boolean - - - The date of the most recent modification to the entry. - modifiedDate - false - true - - - The date the entry was reviewed. - reviewDate - false - true - - - A checkbox input ID to be used for the entry row checker. - rowCheckerId - false - true - - - A name for the entry row checker. - rowCheckerName - false - true - - - Whether to show a shortcut icon link to the entry. The default value is false]]>. - shortcut - false - true - boolean - - - Whether the entry is selectable. An actual checkbox is used when the display style is icon]]> or descriptive]]>. The default value is false]]>. - showCheckbox - true - true - boolean - - - Whether to show the link title. The default value is true]]>. - showLinkTitle - false - true - boolean - - - The current status of the entry, as represented by an integer. Options are -1: STATUS_ANY]]>, 0: STATUS_APPROVED]]>, 1: ACTION_PUBLISH]]>, 2: STATUS_DRAFT]]>, and 4: STATUS_DENIED]]>. The default value is -1]]>. - status - false - true - int - - - A CSS style to be applied to the div containing the thumbnail for the entry. - thumbnailDivStyle - false - true - - - The source URL for an entry thumbnail image. - thumbnailSrc - false - true - - - A CSS style to be applied to the thumbnail for the entry. - thumbnailStyle - false - true - - - A title for the entry. - title - true - true - - - A URL to view the full entry. - url - false - true - - - The current version of the entry. - version - false - true - - - - Creates a navigation list item component for navigating app view entries. - app-view-navigation-entry - com.liferay.taglib.ui.AppViewNavigationEntryTag - empty - - The path for an action JSP page. - actionJsp - false - true - - - A CSS class for styling this component. - cssClass - false - true - - - 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 <String, Object>]]>. - dataView - false - true - java.util.Map - - - A title for the component. - entryTitle - true - true - - - A CSS class for setting the icon of the component. - iconImage - false - true - - - Deprecated as of 7.0.0, replaced by the attribute iconImage]]>. - iconSrc - false - true - - - Whether the entry is selected. - selected - false - true - boolean - - - A URL to view the entry. - viewURL - true - true - - - - Creates a toolbar for viewing items in app view. - app-view-toolbar - com.liferay.taglib.ui.AppViewToolbarTag - JSP - - Whether to include the option to choose a display style for component items. If the value is true]]>, a list of display style options is rendered. The default value is false]]>. - includeDisplayStyle - false - true - boolean - - - Whether to include an option to select all component items. The default value is false]]>. - includeSelectAll - false - true - boolean - - - The file path for a search JSP page. - searchJsp - false - true - - - - Creates a component for displaying search results of entries in app view. - app-view-search-entry - com.liferay.taglib.ui.AppViewSearchEntryTag - empty - - The file path for an action JSP page. - actionJsp - false - true - - - The service context of the actionJsp]]>. - actionJspServletContext - false - true - - - Deprecated as of 7.0.0, with no replacement. - containerIcon - false - true - - - The name of the container that the entry is in, such as the name of a folder. - containerName - false - true - - - Deprecated as of 7.0.0, with no replacement. - containerSrc - false - true - - - The type of container the entry is in, such as Folder]]>. - containerType - false - true - - - A CSS class for styling this component. - cssClass - false - true - - - A description of the entry. - description - true - true - - - A list of objects containing information such as content, user ID, and titles of the entry file attachments. - fileEntryTuples - false - true - - - Whether the entry is able to be highlighted where it matches the query terms. The default value is false]]>. - highlightEnabled - false - true - boolean - - - Whether the entry is locked. The default value is false]]>. - locked - false - true - boolean - - - 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. - mbMessages - false - true - - - Query terms of the search. - queryTerms - true - true - - - A checkbox input ID to be used for the entry row checker. This is a Java long]]>. - rowCheckerId - false - true - - - A name to be used for the entry row checker. - rowCheckerName - false - true - - - Whether the entry is selectable via a checkbox. The default value is true]]>. - showCheckbox - false - true - boolean - - - The current status of the entry as represented by an integer. Options are -1: STATUS_ANY]]>, 0: STATUS_APPROVED]]>, 1: ACTION_PUBLISH]]>, 2: STATUS_DRAFT]]>, and 4: STATUS_DENIED]]>. - status - false - true - - - The URL for an entry thumbnail image. - thumbnailSrc - false - true - - - A title for the entry. - title - true - true - - - A URL used to view the full entry. - url - true - true - - - The current and past versions of the entry. - versions - false - true - - - - asset-add-button - com.liferay.taglib.ui.AssetAddButtonTag - JSP - - - addDisplayPageParameter - false - true - - - allAssetCategoryIds - false - true - - - allAssetTagNames - false - true - - - classNameIds - false - true - - - classTypeIds - false - true - - - groupIds - false - true - - - redirect - false - true - - - - asset-addon-entry-display - com.liferay.taglib.ui.AssetAddonEntryDisplayTag - JSP - - assetAddonEntries - false - true - - - - asset-addon-entry-selector - com.liferay.taglib.ui.AssetAddonEntrySelectorTag - JSP - - assetAddonEntries - false - true - - - hiddenInput - false - true - - - id - false - true - - - selectedAssetAddonEntries - false - true - - - title - false - true - - - - asset-categories-available - com.liferay.taglib.ui.AssetCategoriesAvailableTag - JSP - - className - true - true - - - classPK - true - true - - - - asset-categories-error - com.liferay.taglib.ui.AssetCategoriesErrorTag - JSP - - - asset-categories-navigation - com.liferay.taglib.ui.AssetCategoriesNavigationTag - JSP - - hidePortletWhenEmpty - false - true - - - vocabularyIds - false - true - - - - asset-categories-selector - com.liferay.taglib.ui.AssetCategoriesSelectorTag - JSP - - className - false - true - - - classPK - false - true - - - classTypePK - false - true - - - contentCallback - false - true - - - curCategoryIds - false - true - - - groupIds - false - true - - - hiddenInput - false - true - - - ignoreRequestValue - false - true - - - - asset-categories-summary - com.liferay.taglib.ui.AssetCategoriesSummaryTag - JSP - - className - true - true - - - classPK - true - true - - - message - false - true - - - paramName - false - true - - - portletURL - false - true - - - - asset-display - com.liferay.taglib.ui.AssetDisplayTag - JSP - - abstractLength - false - true - - - assetEntry - false - true - - - assetRenderer - false - true - - - assetRendererFactory - false - true - - - className - false - true - - - classPK - false - true - - - renderer - false - true - - - showComments - false - true - - - showHeader - false - true - - - showExtraInfo - false - true - - - template - false - true - - - viewURL - false - true - - - - asset-links - com.liferay.taglib.ui.AssetLinksTag - JSP - - assetEntryId - false - true - - - className - false - true - - - classPK - false - true - - - - asset-metadata - com.liferay.taglib.ui.AssetMetadataTag - JSP - - className - true - true - - - classPK - true - true - - - filterByMetadata - false - true - - - metadataFields - true - true - - - - asset-tags-available - com.liferay.taglib.ui.AssetTagsAvailableTag - JSP - - className - true - true - - - classPK - true - true - - - - Creates a liferay-ui:error]]> component to display tag-related error messages. - asset-tags-error - com.liferay.taglib.ui.AssetTagsErrorTag - JSP - - - asset-tags-navigation - com.liferay.taglib.ui.AssetTagsNavigationTag - JSP - - classNameId - false - true - - - displayStyle - false - true - - - hidePortletWhenEmpty - false - true - - - maxAssetTags - false - true - - - showAssetCount - false - true - - - showZeroAssetCount - false - true - - - - Creates a Liferay.AssetTagsSelector]]> component to create and select tags to add to an asset, such as a blog entry, bookmark, or wiki page. - asset-tags-selector - com.liferay.taglib.ui.AssetTagsSelectorTag - JSP - - A function to be called when a tag is added. - addCallback - false - true - - - Whether to allow adding new tags to the list of tags. The default value is true]]>. - allowAddEntry - false - true - boolean - - - Whether to automatically focus the tag input field. The default value is false]]>. - autoFocus - false - true - boolean - - - The Java class of the asset. - className - false - true - - - The Java class primary key of an asset to associate with the tags. This is a Java long]]>. - classPK - false - true - - - A function to get tag suggestions based on the asset's content. - contentCallback - false - true - - - The current selected tags. - curTags - false - true - - - The group IDs of the asset tags. - groupIds - false - true - - - The name of the hidden input for passing in the asset's current tags. - hiddenInput - false - true - - - An ID for the component instance. - id - false - true - - - Whether to ignore the request value of the hidden input. The default value is false]]>. - ignoreRequestValue - false - true - boolean - - - A function to be called when a tag is removed. - removeCallback - false - true - - - - Creates a component to display all the tags associated with an asset, such as a blog entry, wiki page, or message boards message. - asset-tags-summary - com.liferay.taglib.ui.AssetTagsSummaryTag - JSP - - An array of the asset tag names. - assetTagNames - false - true - - - The Java class of the asset. - className - true - true - - - The Java class primary key of an asset. This is a Java long]]>. - classPK - true - true - - - A message to display before the tag labels. A standard example is tags]]>, which renders as Tags:]]>. - message - false - true - - - A parameter name for the tags. The default value is tag]]>. - paramName - false - true - - - The URL of a portlet to display the tags. - portletURL - false - true - - - - breadcrumb - com.liferay.taglib.ui.BreadcrumbTag - JSP - - ddmTemplateGroupId - false - true - - - ddmTemplateKey - false - true - - - showCurrentGroup - false - true - - - showGuestGroup - false - true - - - showLayout - false - true - - - showParentGroups - false - true - - - showPortletBreadcrumb - false - true - - - - Creates a calendar with configurable events. - calendar - com.liferay.taglib.ui.CalendarTag - JSP - - A given set of integers, corresponding to a day of the chosen month, and to mark with a dot. - data - false - true - java.util.Set - - - A day of the month to highlight in the calendar. - day - false - true - int - - - A format for the header. - headerFormat - false - true - java.text.Format - - - A pattern for the calendar header. A possible value is MMM/dd/yyyy]]>. - headerPattern - false - true - - - A month of the year to display at the top of the calendar. - month - true - true - int - - - 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 false]]>. - showAllPotentialWeeks - false - true - boolean - - - A year to display at the top of the calendar. - year - true - true - int - - - - Creates an image CAPTCHA with a corresponding verification input. - captcha - com.liferay.taglib.ui.CaptchaTag - JSP - - The source URL for the image CAPTCHA. - url - true - true - - - - categorization-filter - com.liferay.taglib.ui.CategorizationFilterTag - JSP - - assetType - false - true - - - portletURL - false - true - - - - custom-attribute - com.liferay.taglib.ui.CustomAttributeTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - label - false - true - - - name - true - true - - - - custom-attribute-list - com.liferay.taglib.ui.CustomAttributeListTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - ignoreAttributeNames - false - true - - - label - false - true - - - - custom-attributes-available - com.liferay.taglib.ui.CustomAttributesAvailableTag - JSP - - className - true - true - - - classPK - false - true - - - companyId - false - true - - - ignoreAttributeNames - false - true - - - editable - false - true - - - - ddm-template-renderer - com.liferay.taglib.ui.DDMTemplateRendererTag - JSP - - className - true - true - - - contextObjects - false - true - - - displayStyle - true - true - - - displayStyleGroupId - true - true - - - entries - true - true - - - - ddm-template-selector - com.liferay.taglib.ui.DDMTemplateSelectorTag - JSP - - className - true - true - - - defaultDisplayStyle - false - true - - - displayStyle - true - true - - - displayStyleGroupId - true - true - - - displayStyles - false - true - - - icon - false - true - - - label - false - true - - - refreshURL - false - true - - - showEmptyOption - false - true - - - - diff - com.liferay.taglib.ui.DiffTag - JSP - - diffResults - true - true - - - sourceName - true - true - - - targetName - true - true - - - - diff-html - com.liferay.taglib.ui.DiffHtmlTag - JSP - - diffHtmlResults - true - true - - - - diff-version-comparator - com.liferay.taglib.ui.DiffVersionComparatorTag - JSP - - availableLocales - false - true - - - diffHtmlResults - true - true - - - diffVersionsInfo - false - true - - - languageId - false - true - - - portletURL - true - true - - - resourceURL - true - true - - - sourceVersion - true - true - - - targetVersion - true - true - - - - discussion - com.liferay.taglib.ui.DiscussionTag - JSP - - assetEntryVisible - false - true - - - className - true - true - - - classPK - true - true - - - formAction - true - true - - - formName - false - true - - - hideControls - false - true - - - paginationURL - true - true - - - permissionClassName - false - true - - - permissionClassPK - false - true - - - ratingsEnabled - false - true - - - redirect - false - true - - - Deprecated as of 6.2.0, with no direct replacement - subject - false - true - - - userId - true - true - - - - drop-here-info - com.liferay.taglib.ui.DropHereInfoTag - JSP - - message - true - true - - - - email-notification-settings - com.liferay.taglib.ui.EmailNotificationSettingsTag - JSP - - bodyLabel - false - true - - - emailBody - false - true - - - emailDefinitionTerms - false - true - - - emailEnabled - false - true - - - emailParam - false - true - - - emailSubject - false - true - - - fieldPrefix - false - true - - - fieldPrefixSeparator - false - true - - - helpMessage - false - true - - - showEmailEnabled - false - true - - - showSubject - false - true - - - - Creates an error message to display to the user. - error - com.liferay.taglib.ui.ErrorTag - com.liferay.taglib.ui.ErrorTei - JSP - - A class for the exception. - exception - false - true - - - The name of a field on which to focus the error message. - focusField - false - true - - - A key to place in the SessionErrors]]> object to trigger the error message. - key - false - true - - - Explicit message text or a language key name from which to derive text for the message. - message - false - true - - - rowBreak - false - true - - - Whether to translate the message into the user's language. The default value is true]]>. - translateMessage - false - true - boolean - - - - Creates a liferay-ui:header]]> with a back button; it's for displaying above an error message. - error-header - com.liferay.taglib.ui.ErrorHeaderTag - JSP - - - error-marker - com.liferay.taglib.ui.ErrorMarkerTag - JSP - - key - false - true - - - value - false - true - - - - Creates a flag icon that lets users report inappropriate content. - flags - com.liferay.taglib.ui.FlagsTag - JSP - - The flagged asset's Java class name. - className - true - true - - - The flagged asset's entry ID. - classPK - true - true - - - The flagged asset's title. - contentTitle - true - true - - - Whether to show message text as a label next to the flag icon or as a tooltip. The default value is true]]>. - label - false - true - boolean - - - Text to display next to the flag icon. The default text is Flag]]>. - message - false - true - - - The user ID of the user who flagged the asset. - reportedUserId - true - true - - - - flash - com.liferay.taglib.ui.FlashTag - JSP - - align - false - true - - - allowFullScreen - false - true - - - allowScriptAccess - false - true - - - base - false - true - - - bgcolor - false - true - - - devicefont - false - true - - - flashvars - false - true - - - height - false - true - - - id - false - true - - - loop - false - true - - - menu - false - true - - - movie - true - true - - - play - false - true - - - quality - false - true - - - salign - false - true - - - scale - false - true - - - swliveconnect - false - true - - - version - false - true - - - width - false - true - - - wmode - false - true - - - - 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. - form-navigator - com.liferay.taglib.ui.FormNavigatorTag - JSP - - A URL for the form's cancel button. - backURL - false - true - - - The name of each category in the form. - categoryNames - false - true - - - The name of each section within a category. - categorySections - false - true - - - A type of navigation to be used. Options are steps]]> and panel]]>. The default display style is side navigation. - displayStyle - false - true - - - formModelBean - false - true - - - A name for the form. - formName - false - true - - - HTML to append to the navigator. Examples include alternate form buttons, form instructions, or information about the form. - htmlBottom - false - true - - - HTML to prepend to the navigator. - htmlTop - false - true - - - id - false - true - - - A path to the formSection.jsp]]> file's folder /path/to/jsp/folder/]]>. - jspPath - false - true - - - Whether to show the Submit]]> and Cancel]]> buttons. The default value is true]]>. - showButtons - false - true - boolean - - - - group-search - com.liferay.taglib.ui.GroupSearchTag - JSP - - groupParams - true - true - - - portletURL - true - true - - - rowChecker - false - true - - - - group-search-form - com.liferay.taglib.ui.GroupSearchFormTag - JSP - - - Creates a header that displays its text above a horizontal rule accompanied by a configurable back URL button. - header - com.liferay.taglib.ui.HeaderTag - JSP - - Text to display on mouse over of the back URL. The default value is Back]]>. - backLabel - false - true - - - A URL for navigating back to. - backURL - false - true - - - A CSS class for styling the header component. - cssClass - false - true - - - Whether to escape the header's XML tags. The default value is true]]>. - escapeXml - false - true - boolean - - - Whether to translate the header's title]]> into the localized language. The default value is true]]>. - localizeTitle - false - true - boolean - - - Whether to display the back URL. The default value is true]]>. - showBackURL - false - true - boolean - - - A title to display as the header text. - title - true - true - - - - Creates a fully configurable icon that provides access to current Liferay theme icons. - icon - com.liferay.taglib.ui.IconTag - JSP - - A value for the alt]]> attribute of the embedded img]]> tag. - alt - false - true - - - A role for assistive technologies to interpret for HTML elements that have been used for something other than their intended purpose. For example, the <p>]]> tag could be used for something other than a paragraph. - ariaRole - false - true - - - A CSS class for styling the component. - cssClass - false - true - - - Miscellaneous data to be stored via a map. This data is not shared with the browser. The map holds key value pairs of type <String, Object>]]>. - data - false - true - java.util.Map - - - An icon from a Bootstrap icon CSS Class. Note that any image for the image]]> attribute takes precedence. Icon CSS classes to specify for this attribute can be found at http://marcoceppi.github.io/bootstrap-glyphicons/]]>. - iconCssClass - false - true - - - An ID for the component instance. - id - false - true - - - An image for the icon, from the current theme. The value can be the filename prefix of any image file in the theme's common]]> image folder. This image takes precedence over any icon value set via the iconCssClass]]> attribute. - image - false - true - - - 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 common]]> image folder. - imageHover - false - true - - - Whether to display the message]]> attribute's value as the icon's label. - label - false - true - boolean - - - A language to associate with the icon, to assist search engines and web browsers in finding and rendering the icon appropriately. - lang - false - true - - - A CSS class for styling the icon's URL. - linkCssClass - false - true - - - Whether to translate the icon's message]]> into the user's language. - localizeMessage - false - true - boolean - - - Text to be displayed for the icon on mouse over. - message - false - true - - - An HTTP request method. Possible values are get]]> and post]]>. - method - false - true - - - A function to be called on a user clicking the icon. - onClick - false - true - - - The location of an image file to use in the icon. - src - false - true - - - The location of an image file to use on mouse over of the icon. This value takes precedence over the imageHover]]> attribute. This image takes precedence over icons set with the imageHover]]> attribute. - srcHover - false - true - - - A target window in which to open the URL. The default value is self]]>. Possible values are blank]]>, self]]>, parent]]>, top]]>, and a unique frame's name. - target - false - true - - - Whether to use a tooltip. The default value is true]]>. - toolTip - false - true - boolean - - - A URL to navigate to when the icon is clicked. - url - false - true - - - Whether to open the URL in a dialog window. The default value is false]]>. - useDialog - false - true - boolean - - - - Creates an icon to associate with deactivating an item. - icon-deactivate - com.liferay.taglib.ui.IconDeactivateTag - JSP - - Whether to display a message on the icon's label on mouse over of the icon. The default value is false]]>. - label - false - true - boolean - - - A URL navigated to when the icon is clicked. - url - true - true - - - - Creates a configurable icon to associate with deleting or removing an item. - icon-delete - com.liferay.taglib.ui.IconDeleteTag - JSP - - Text to use in place of the text from the default deletion confirmation message language key are-you-sure-you-want-to-delete-this]]>. If the trash]]> attribute is set to true]]>, no confirmation message is shown. - confirmation - false - true - - - A CSS class for styling the component. - cssClass - false - true - - - An ID for the component instance. - id - false - true - - - An image for the icon, from the current theme. The value can be the filename prefix of any image file in the theme's common]]> image folder. The image takes precedence over any default icon images. - image - false - true - - - Whether to display the message]]> attribute's value as the icon's label. The default value is false]]>. - label - false - true - boolean - - - Text to display on mouse over of the icon. - message - false - true - - - An HTTP request method to invoke. Possible values are get]]> and post]]>. - method - false - true - - - Whether to use the trash icon instead of the remove icon. The default value isfalse]]>. - trash - false - true - boolean - - - A URL navigated to when the icon is clicked. - url - true - true - - - - Creates a help icon that displays a custom message as a tooltip on mouse over of the help icon. - icon-help - com.liferay.taglib.ui.IconHelpTag - JSP - - Text to be displayed on mouse over of the icon. - message - true - true - - - - Creates a list of icons from a list of child components. - icon-list - com.liferay.taglib.ui.IconListTag - JSP - - Whether to render the icon list when there is only one child component. The default value is false]]>. - showWhenSingleIcon - false - true - boolean - - - - Creates an icon menu from a list of child components. - icon-menu - com.liferay.taglib.ui.IconMenuTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - A position from which to pop up the icon menu dialog in relation to the trigger. The default direction is left]]>. Possible values are up]]>, down]]>, left]]> or right]]>. - direction - false - true - - - Whether to disable the icon menu. - disabled - false - true - boolean - - - Whether to extend the icon menu trigger by wrapping it in a button. The default value is true]]>. - extended - false - true - boolean - - - The location of an image file to use in the icon. - icon - false - true - - - An ID for the component instance. - id - false - true - - - Whether to translate the message to the user's language. The default value is true]]>. - localizeMessage - false - true - boolean - - - The number of items to show in the icon menu before scrolling. The default value is 15. - maxDisplayItems - false - true - int - - - Text to display next to the icon menu trigger. The default value is actions]]>. - message - false - true - - - Whether to add the select]]> CSS class to the icon menu. If set to true]]>, the selected icon is added to the icon menu's trigger when the icon is selected. The default value is false]]>. - select - false - true - boolean - - - Whether to extend the icon menu by default. The default value is false]]>. - showExpanded - false - true - boolean - - - Whether to show an arrow, indicating a popup dialog, next to the icon menu's trigger icon. The default value is true]]>. - showArrow - false - true - boolean - - - Whether to show the icon menu when there is only one icon. The default value is false]]>. - showWhenSingleIcon - false - true - boolean - - - A CSS class for styling the trigger for the icon menu. The default value is btn btn-default]]>. - triggerCssClass - false - true - - - Whether the icon menu drop-down caret points to the direction set by the direction]]> attribute. - useIconCaret - false - true - boolean - - - - image-selector - com.liferay.taglib.ui.ImageSelectorTag - JSP - - draggableImage - false - true - - - fileEntryId - true - true - - - maxFileSize - false - true - - - paramName - false - true - - - uploadURL - true - true - - - validExtensions - false - true - - - - input-asset-links - com.liferay.taglib.ui.InputAssetLinksTag - JSP - - assetEntryId - false - true - - - className - false - true - - - classPK - false - true - - - - Creates a configurable input checkbox. - input-checkbox - com.liferay.taglib.ui.InputCheckBoxTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - Whether the checkbox is selected by default. - defaultValue - false - true - boolean - - - Whether the checkbox is disabled. - disabled - false - true - boolean - - - A name for the checkbox's form. - formName - false - true - - - An ID for the component instance. - id - false - true - - - A function to be called on a user clicking the checkbox. - onClick - false - true - - - A variable name for the component. - param - true - true - - - - Creates a date input field that displays a calendar for date selection. - input-date - com.liferay.taglib.ui.InputDateTag - JSP - - Whether the date field gets focus by default. The default value is false]]>. - autoFocus - false - true - boolean - - - A CSS class for styling the component. - cssClass - false - true - - - A variable name to refer to the day of the component. - dayParam - false - true - - - A day value to display in the input field. - dayValue - false - true - int - - - Whether to disable the namespace for the component. The default value is false]]>. - disableNamespace - false - true - boolean - - - Whether to disable the input field. The default value is false]]>. - disabled - false - true - boolean - - - A day to set as the first day of the week. The default value is Calendar.SUNDAY - 2]]>. - firstDayOfWeek - false - true - int - - - A date to set as the first selectable date in the datepicker. - firstEnabledDate - false - true - - - A name for the date input's form. - formName - false - true - - - A date to set as the latest selectable date in the datepicker. - lastEnabledDate - false - true - - - A variable name to refer to the combined month and year of the component. - monthAndYearParam - false - true - - - A variable name to refer to the month of the component. - monthParam - false - true - - - The numerical value for a month to display in the input field. Integer values for the month start with 0]]>. - monthValue - false - true - int - - - A name for the date input. - name - false - true - - - Whether the component's values can be set to null. - nullable - false - true - - - A variable name to refer to the year of the component. - yearParam - false - true - - - A year value to display in the input field. - yearValue - false - true - int - - - - Creates an input field for editing rich text. - input-editor - com.liferay.taglib.ui.InputEditorTag - JSP - - allowBrowseDocuments - false - true - - - autoCreate - false - true - - - configKey - false - true - - - A map of configuration parameters. The map holds key value pairs of type <String, String>]]>. - configParams - false - true - java.util.Map - - - contents - false - true - - - The ID of a language for the input editor's text. - contentsLanguageId - false - true - - - A CSS class for styling the component. - cssClass - false - true - - - data - false - true - - - Deprecated as of 7.0.0, replaced by the attribute editorName]]>. - editorImpl - false - true - - - editorName - false - true - - - inlineEdit - false - true - - - inlineEditSaveURL - false - true - - - A map of configuration parameters. The map holds key value pairs of <String, String>]]>. - fileBrowserParams - false - true - java.util.Map - - - height - false - true - - - Deprecated as of 7.0.0, replaced by the attribute contents]]>. - initMethod - false - true - - - A name for the input editor. The default value is editor]]>. - name - false - true - - - A function to be called when the input editor loses focus. - onBlurMethod - false - true - - - A function to be called on a change in the input editor. - onChangeMethod - false - true - - - A function to be called when the input editor gets focus. - onFocusMethod - false - true - - - A function to be called when the input editor initializes. - onInitMethod - false - true - - - Placeholder text to display in the input editor. - placeholder - false - true - - - Whether the field for the input editor is resizable. The default value is true]]>. - resizable - false - true - boolean - - - Whether to enable editing the HTML source code of the content. The default value is true]]>. - showSource - false - true - - - Whether to skip loading resources necessary for the CKEditor. The default value is false]]>. - skipEditorLoading - false - true - boolean - - - A toolbar for the input editor. The default value is liferay]]>. Possible values are bbcode]]>, creole]]>, editInPlace]]>, email]]>, liferay]]>, liferayArticle]]>, phone]]>, simple]]>, and tablet]]>. - toolbarSet - false - true - - - width - false - true - - - - input-field - com.liferay.taglib.ui.InputFieldTag - JSP - - autoComplete - false - true - - - autoFocus - false - true - - - autoSize - false - true - - - bean - false - true - - - cssClass - false - true - - - dateTogglerCheckboxLabel - false - true - - - defaultLanguageId - false - true - - - defaultValue - false - true - - - disabled - false - true - - - field - true - true - - - fieldParam - false - true - - - formName - false - true - - - format - false - true - - - id - false - true - - - ignoreRequestValue - false - true - - - languageId - false - true - - - model - true - true - - - placeholder - false - true - - - - input-localized - com.liferay.taglib.ui.InputLocalizedTag - JSP - - autoFocus - false - true - - - autoSize - false - true - - - availableLocales - false - true - - - cssClass - false - true - - - defaultLanguageId - false - true - - - disabled - false - true - - - displayWidth - false - true - - - fieldPrefix - false - true - - - fieldPrefixSeparator - false - true - - - formName - false - true - - - id - false - true - - - ignoreRequestValue - false - true - - - languageId - false - true - - - maxLength - false - true - - - name - true - true - - - toolbarSet - false - true - - - type - false - true - - - xml - true - true - - true - - - Creates an input move boxes component comprised of two columns of key value pairs that can be rearranged. - input-move-boxes - com.liferay.taglib.ui.InputMoveBoxesTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - A name for the left box. - leftBoxName - true - true - - - A list of key value pairs for the left box. - leftList - true - true - java.util.List - - - A function to be called on a change in selection in the left list. - leftOnChange - false - true - - - Whether the left list can be reordered. The default value is false]]>. - leftReorder - false - true - boolean - - - A title to display at the top of the right box. - leftTitle - true - true - - - A name for the right box. - rightBoxName - true - true - - - A list of key value pairs for the right box. - rightList - true - true - java.util.List - - - A function to be called on a change in selection in the right list. - rightOnChange - false - true - - - Whether the right list can be reordered. The default value is false]]>. - rightReorder - false - true - boolean - - - A title to display at the top of the right box. - rightTitle - true - true - - - - input-permissions - com.liferay.taglib.ui.InputPermissionsTag - JSP - - formName - false - true - - - modelName - false - true - - - - input-permissions-params - com.liferay.taglib.ui.InputPermissionsParamsTag - JSP - - modelName - true - true - - - - input-repeat - com.liferay.taglib.ui.InputRepeatTag - JSP - - cssClass - false - true - - - event - false - true - - - - input-resource - com.liferay.taglib.ui.InputResourceTag - JSP - - cssClass - false - true - - - id - false - true - - - title - false - true - - - url - true - true - - - - input-scheduler - com.liferay.taglib.ui.InputSchedulerTag - JSP - - - Creates a configurable search box. - input-search - com.liferay.taglib.ui.InputSearchTag - JSP - - Whether the search field gets focus by default. The default value is false]]>. - autoFocus - false - true - boolean - - - A text value for the search button's label. The default value is Search]]>. - buttonLabel - false - true - - - A CSS class for styling the component. - cssClass - false - true - - - An ID for the component instance. The default value is displayTerms.KEYWORDS]]>. - id - false - true - - - A name for the search box. The default value is displayTerms.KEYWORDS]]>. - name - false - true - - - Placeholder text for the search field. The default value is the value of the buttonLabel]]> attribute. - placeholder - false - true - - - Whether to show the search button. The default value is true]]>. - showButton - false - true - boolean - - - A title for the search box. - title - false - true - - - Whether to use a namespace with the search button. The default value is true]]>. - useNamespace - false - true - boolean - - - - Creates a select input component with yes or no options. - input-select - com.liferay.taglib.ui.InputSelectTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - Whether to select yes]]> as the input's default value. - defaultValue - false - true - boolean - - - Whether to disable input. - disabled - false - true - boolean - - - A name for the input select's form. - formName - false - true - - - A variable name for the component. - param - true - true - - - - Creates a configurable text area input field. - input-textarea - com.liferay.taglib.ui.InputTextAreaTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - Text to display in the text area. - defaultValue - false - true - - - Whether to disable input. The default value is false]]>. - disabled - false - true - boolean - - - A variable name for the component. - param - true - true - - - - Creates a time input field that provides a scrollable dropdown list of hours, in intervals designated by the minuteInterval]]> attribute. - input-time - com.liferay.taglib.ui.InputTimeTag - JSP - - The name of the AM/PM parameter for the time input. An acceptable value is ampm]]>. - amPmParam - true - true - - - A time to AM or PM. Acceptable values are 0]]> for AM and 1]]> for PM. The default value is 0]]>. - amPmValue - false - true - int - - - A CSS class for styling the time input. - cssClass - false - true - - - A date parameter for the time input. An acceptable value is date]]>. - dateParam - false - true - - - A date to associate with the time displayed. - dateValue - false - true - java.util.Date - - - Whether the input field is disabled. - disabled - false - true - boolean - - - The name of the hour parameter for the component. An acceptable value is hour]]>. - hourParam - true - true - - - An hour value for the time displayed. The default value is 12]]>. - hourValue - false - true - int - - - A minute interval displayed in the input. The default value is 30]]>. - minuteInterval - false - true - int - - - The name of the minute parameter for the component. An acceptable value is minute]]>. - minuteParam - true - true - - - A minute value for the time displayed. The default value is 00]]>. - minuteValue - false - true - int - - - A name for the time input. - name - false - true - - - - Creates a configurable timezone drop-down menu. - input-time-zone - com.liferay.taglib.ui.InputTimeZoneTag - JSP - - Whether the field gets focus by default. - autoFocus - false - true - boolean - - - A CSS class for styling the component. - cssClass - false - true - - - Whether to consider daylight savings for the times. The default value is true]]>. - daylight - false - true - boolean - - - Whether the field is disabled. - disabled - false - true - boolean - - - A style number corresponding to the time zone. A value of 0]]> displays the time zone's abbreviated name and a value of 1]]> displays its full name, e.g. "Pacific Standard Time." The default value is 0]]>. - displayStyle - false - true - int - - - A name for the component. - name - true - true - - - Whether the times can be null. - nullable - false - true - boolean - - - The ID of a time zone to associate with the component. For example, setting the value to PST]]> associates the component with the Pacific Standard Time zone. - value - false - true - - - - item-selector-browser - com.liferay.taglib.ui.ItemSelectorBrowserTag - JSP - - displayStyle - false - true - - - idPrefix - true - true - - - searchContainer - true - true - - - tabName - true - true - - - uploadMessage - false - true - - - - journal-article - com.liferay.taglib.ui.JournalArticleTag - JSP - - articleId - false - true - - - articlePage - false - true - - - articleResourcePrimKey - false - true - - - groupId - false - true - - - languageId - false - true - - - portletRequestModel - false - true - - - showAvailableLocales - false - true - - - showTitle - false - true - - - ddmTemplateKey - false - true - - - - journal-content-search - com.liferay.taglib.ui.JournalContentSearchTag - JSP - - showListed - false - true - - - targetPortletId - false - true - - - - language - com.liferay.taglib.ui.LanguageTag - JSP - - ddmTemplateGroupId - false - true - - - ddmTemplateKey - false - true - - - displayCurrentLocale - false - true - - - formAction - false - true - - - formName - false - true - - - languageId - false - true - - - languageIds - false - true - - - name - false - true - - - Whether to use a namespace in the tag. The default value is true]]>. - useNamespace - false - true - boolean - - - - layouts-tree - com.liferay.taglib.ui.LayoutsTreeTag - JSP - - checkContentDisplayPage - false - true - - - defaultStateChecked - false - true - - - draggableTree - false - true - - - expandFirstNode - false - true - - - groupId - false - true - - - incomplete - false - true - - - portletURL - false - true - - - privateLayout - false - true - - - rootNodeName - false - true - - - saveState - false - true - - - selectableTree - false - true - - - selectedLayoutIds - false - true - - - selPlid - false - true - - - treeId - false - true - - - - logo-selector - com.liferay.taglib.ui.LogoSelectorTag - JSP - - currentLogoURL - false - true - - - defaultLogo - false - true - - - defaultLogoURL - false - true - - - editLogoFn - false - true - - - logoDisplaySelector - false - true - - - maxFileSize - false - true - - - showBackground - false - true - - - tempImageFileName - false - true - - - - map - com.liferay.taglib.ui.MapTag - JSP - - apiKey - false - true - - - geolocation - false - true - - - latitude - false - true - - - longitude - false - true - - - name - false - true - - - points - false - true - - - provider - false - true - - - - menu - com.liferay.taglib.ui.MenuTag - JSP - - menu - true - true - - - - menu-item - com.liferay.taglib.ui.MenuItemTag - JSP - - menuItem - true - true - - - - membership-policy-error - com.liferay.taglib.ui.MembershipPolicyErrorTag - JSP - - - Creates a message to display to the user. - message - com.liferay.taglib.ui.MessageTag - JSP - - Arguments for the language key, if the language key is configured to recieve arguments. - arguments - false - true - - - Whether to escape the language key value so that it is safe to use in HTML. - escape - false - true - boolean - - - escapeAttribute - false - true - boolean - - - The name of a language key from which to derive the message to be displayed. - key - true - true - - - Whether to translate the language key value into the user's language. The default value is true]]>. - localizeKey - false - true - boolean - - - Whether to translate the arguments into the user's language. The default value is true]]>. - translateArguments - false - true - boolean - - - unicode - false - true - boolean - - - - my-sites - com.liferay.taglib.ui.MySitesTag - JSP - - classNames - false - true - - - cssClass - false - true - - - includeControlPanel - false - true - - - max - false - true - - - - navigation - com.liferay.taglib.ui.NavigationTag - JSP - - bulletStyle - false - true - - - displayStyleDefinition - false - true - - - headerType - false - true - - - includedLayouts - false - true - - - nestedChildren - false - true - - - preview - false - true - - - rootLayoutLevel - false - true - - - rootLayoutType - false - true - - - - organization-search-form - com.liferay.taglib.ui.OrganizationSearchFormTag - JSP - - - Creates a page iterator for paginating through lists of items. - page-iterator - com.liferay.taglib.ui.PageIteratorTag - JSP - - Which page of items to display (e.g., first, second, third, etc.). - cur - true - true - int - - - A variable name to refer to the cur]]> value of the component. - curParam - true - true - - - The number of items to display per page. - delta - false - true - int - - - Whether the user can choose the number of items displayed per page. The default value is false]]>. - deltaConfigurable - false - true - boolean - - - A variable name to refer to the delta value of the component. - deltaParam - false - true - - - A name for the form. - formName - false - true - - - An ID for the component instance. - id - false - true - - - JavaScript to be called when the first]]>, previous]]>, next]]>, or last]]> links are clicked if the URL property is not set. - jsCall - false - true - - - A maximum number of pages to iterate through. - maxPages - false - true - int - - - A target for the first]]>, previous]]>, next]]>, and last]]> link buttons. - target - false - true - - - The total number of items in the iterator. - total - true - true - int - - - A type of iterator to display. Options are approximate]]>, article]]>, more]]>, and regular]]>. - type - false - true - - - A base URL for the iterator. Parameters are added to and removed from this URL as the user navigates through pages. - url - false - true - - - - Creates a collapsible panel for housing content. - panel - com.liferay.taglib.ui.PanelTag - JSP - - Whether the panel can be collapsed. The default value is true]]>. - collapsible - false - true - boolean - - - A CSS class for styling the component. - cssClass - false - true - - - A default state for the component. Possible values are open]]> and any string other than open. Any string other than open]]> collapses the panel. The default value is open]]>. - defaultState - false - true - - - Whether the panel is extended. The default value is false]]>. - extended - false - true - boolean - - - Text to display as a help tool tip on mouse over of the panel's help icon. - helpMessage - false - true - - - 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 http://marcoceppi.github.io/bootstrap-glyphicons/]]>. - iconCssClass - false - true - - - An ID for the component instance. - id - false - true - - - The ID of the component that contains the panel. If a liferay-ui:panel-container]]> is used as the container for the panel, its ID is used as the value for the parentID]]>. - parentId - false - true - - - Whether to remember the component's state and persist it to the database. The default value is false]]>. - persistState - false - true - boolean - - - A state for the component. Possible values are open]]> and any string other than open. Any string other than open]]> collapses the panel. - state - false - true - - - A title to display at the top of the panel. - title - true - true - - - - Creates a collapsible container to house liferay-ui:panel]]> components. - panel-container - com.liferay.taglib.ui.PanelContainerTag - JSP - - 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 false]]>. - accordion - false - true - boolean - - - A CSS class for styling the component. - cssClass - false - true - - - Whether to extend the interface with additional styling. The default value is false]]>. - extended - false - true - boolean - - - An ID for the component instance. - id - false - true - - - Whether to remember the component's state and persist it to the database. The default value is false]]>. - persistState - false - true - boolean - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - Renders a PNG image with the source given for the image]]> attribute. - png-image - com.liferay.taglib.ui.PngImageTag - JSP - - The height of the image in pixels. A possible value would be 16]]>. px]]> is then appended to the end of the value. - height - true - true - int - - - The location of a PNG image file to use. - image - true - true - - - The height of the image in pixels. A possible value would be 16]]>. px]]> is then appended to the end of the value. - width - true - true - int - - - - progress - com.liferay.taglib.ui.ProgressTag - JSP - - height - false - true - - - id - true - true - - - message - false - true - - - sessionKey - true - true - - - updatePeriod - false - true - - - - ratings - com.liferay.taglib.ui.RatingsTag - JSP - - className - true - true - - - classPK - true - true - - - numberOfStars - false - true - - - ratingsEntry - false - true - - - ratingsStats - false - true - - - round - false - true - - - type - false - true - - - url - false - true - - - - ratings-score - com.liferay.taglib.ui.RatingsScoreTag - JSP - - score - true - true - - - - restore-entry - com.liferay.taglib.ui.RestoreEntryTag - JSP - - overrideMessage - false - true - - - renameMessage - false - true - - - restoreURL - true - true - - - - Creates a clickable link and/or icon to an RSS feed document. - rss - com.liferay.taglib.ui.RSSTag - JSP - - A default maximum number of items to display. The default value is 20]]>. - delta - false - true - int - - - A default style to display. - displayStyle - false - true - - - A default format for the RSS feed. Options are atom_1.0]]>, rss_1.0]]>, and rss_2.0]]>. - feedType - false - true - - - A message to display next to the RSS icon. - message - false - true - - - A name for the RSS feed. - name - false - true - - - A URL from which to retrieve feed information. - resourceURL - false - true - - - The URL for an RSS feed file. - url - false - true - - - - Creates a configuration component for users to define RSS settings, such as how many articles to display. - rss-settings - com.liferay.taglib.ui.RSSSettingsTag - JSP - - A default maximum number of items to display. The default value is 20]]>. - delta - false - true - int - - - A default style to display. - displayStyle - false - true - - - Available RSS display styles from which the user can choose. Options are abstract]]>, full-content]]>, and title]]>. - displayStyles - false - true - - - Whether users are able to subscribe. Default value is false]]>. - enabled - false - true - boolean - - - A default format for the RSS feed. Options are atom_1.0]]>, rss_1.0]]>, and rss_2.0]]>. - feedType - false - true - - - A name for the component. - name - false - true - - - Whether the RSS feed has a name. The default value is false]]>. - nameEnabled - false - true - boolean - - - - Creates a search form, with an additional select input to set the scope of the search. - search - com.liferay.taglib.ui.SearchTag - JSP - - - Creates a grid for displaying a list of objects and their properties. - search-container - com.liferay.taglib.ui.SearchContainerTag - com.liferay.taglib.ui.SearchContainerTei - JSP - - A variable for the search container's pagination. Different pagination variables ensure independent pagination when multiple search containers are on a JSP. - curParam - false - true - - - The number of items to show on each search container page. - delta - false - true - int - - - The delta]]> attribute as configurable by users. - deltaConfigurable - false - true - - - deltaParam - false - true - - - displayTerms - false - true - - - A message displayed when the search container is empty. - emptyResultsMessage - false - true - - - headerNames - false - true - - - hover - false - true - - - id - false - true - - - iteratorURL - false - true - - - orderByCol - false - true - - - orderByColParam - false - true - - - orderByComparator - false - true - - - An order type for the columns, either ascending or descending. Values are asc]]> or desc]]>. - orderByType - false - true - - - orderByTypeParam - false - true - - - Inserts a checkbox column in the search container. Value must be a RowChecker]]> object. - rowChecker - false - true - - - searchContainer - false - true - - - searchTerms - false - true - - - The total number of objects in the search container. - total - false - true - int - - - A variable name for the results of the total]]> attribute. The default is total]]>. - totalVar - false - true - - - A variable name for the SearchContainer]]> object. The default is searchContainer]]>. - var - false - true - - - - search-container-column-button - com.liferay.taglib.ui.SearchContainerColumnButtonTag - JSP - - align - false - true - - - colspan - false - true - - - cssClass - false - true - - - href - true - true - - - index - false - true - - - name - false - true - - - valign - false - true - - - - Creates a date column in a search container. - search-container-column-date - com.liferay.taglib.ui.SearchContainerColumnDateTag - JSP - - A horizontal alignment for the column contents. The default is left]]>. - align - false - true - - - The number of columns to span. The default is 1]]>. - colspan - false - true - int - - - A CSS class for styling the column. - cssClass - false - true - - - A URL for the items in the column. - href - false - true - - - index - false - true - - - A name for the column. - name - false - true - - - Whether to set the column as sortable. The default value is false]]>. - orderable - false - true - boolean - - - An object's property by which to sort the column. - orderableProperty - false - true - - - A property to request from the row object. - property - false - true - - - A vertical alignment for the column contents. The default is middle]]>. - valign - false - true - - - A value for the column. - value - false - true - - - - Creates a column in a search container with the contents of a JSP file. - search-container-column-jsp - com.liferay.taglib.ui.SearchContainerColumnJSPTag - JSP - - A horizontal alignment for the column contents. The default is left]]>. - align - false - true - - - The number of columns to span. The default is 1]]>. - colspan - false - true - int - - - A CSS class for styling the column. - cssClass - false - true - - - index - false - true - - - name - false - true - - - The JSP file's location. - path - true - true - - - valign - false - true - - - - Creates a column in a search container for the workflow status. - search-container-column-status - com.liferay.taglib.ui.SearchContainerColumnStatusTag - JSP - - A horizontal alignment for the column contents. The default is left]]>. - align - false - true - - - The number of columns to span. The default is 1]]>. - colspan - false - true - int - - - A CSS class for styling the column. - cssClass - false - true - - - A URL for the column's contents. - href - false - true - - - index - false - true - - - name - false - true - - - Whether to set the column as sortable. The default value is false]]>. - orderable - false - true - boolean - - - An object's property by which to sort the column. - orderableProperty - false - true - - - An object's property to use for the column. - property - false - true - - - A vertical alignment for the column contents. The default is middle]]>. - valign - false - true - - - A workflow status for the item. - status - false - true - - - statusByUserId - false - true - - - statusDate - false - true - - - - Creates a text column in a search container. - search-container-column-text - com.liferay.taglib.ui.SearchContainerColumnTextTag - com.liferay.taglib.ui.SearchContainerColumnTextTei - JSP - - A horizontal alignment for the column contents. - align - false - true - - - A string buffer variable for constructing a URL in a scriptlet. - buffer - false - true - - - The number of columns to span. The default is 1]]>. - colspan - false - true - int - - - A CSS class for styling the column. - cssClass - false - true - - - href - false - true - - - index - false - true - - - name - false - true - - - Whether to set the column as sortable. The default value is false]]>. - orderable - false - true - boolean - - - An object's property by which to sort the column. - orderableProperty - false - true - - - property - false - true - - - target - false - true - - - title - false - true - - - Whether to automatically translate values. The default value is false]]>. - translate - false - true - boolean - - - A vertical alignment for the column contents. The default is middle]]>. - valign - false - true - - - value - false - true - - - - search-container-column-user - com.liferay.taglib.ui.SearchContainerColumnUserTag - JSP - - align - false - true - - - colspan - false - true - - - cssClass - false - true - - - date - false - true - - - href - false - true - - - index - false - true - - - name - false - true - - - orderable - false - true - - - orderableProperty - false - true - - - property - false - true - - - userId - false - true - - - valign - false - true - - - - The list of objects to display in the search container. - search-container-results - com.liferay.taglib.ui.SearchContainerResultsTag - com.liferay.taglib.ui.SearchContainerResultsTei - JSP - - A list of objects to display in the search container. - results - false - true - - - A variable to use for the results. - resultsVar - false - true - - - Deprecated as of 6.2.0, replaced by the liferay-aui:search-container]]> attribute total]]>. - total - false - true - - - Deprecated as of 6.2.0, replaced by the liferay-aui:search-container]]> attribute totalVar]]>. - totalVar - false - true - - - - Creates rows in the search container for each object returned by liferay-ui:search-container-results]]>. - search-container-row - com.liferay.taglib.ui.SearchContainerRowTag - com.liferay.taglib.ui.SearchContainerRowTei - JSP - - bold - false - true - - - The class name of the objects to display in rows. - className - true - true - - - The returned model instances as HTML escaped. - escapedModel - false - true - - - A variable name to use for the rows' index. - indexVar - false - true - - - A property to use as the primary key for the object type in the className]]> attribute. - keyProperty - false - true - - - A variable name to use for each object as the search container iterates through the objects returned by liferay-ui:search-container-results]]>. - modelVar - false - true - - - A model property to use as the row ID. - rowIdProperty - false - true - - - A variable name to use for the rows. - rowVar - false - true - - - servletContext - false - true - - - stringKey - false - true - - - - Creates parameters for rows in the search container. The liferay-ui:search-container-row]]> tag is required. - search-container-row-parameter - com.liferay.taglib.ui.SearchContainerRowParameterTag - JSP - - A name for the row parameter. - name - true - true - - - A value for the row parameter. - value - true - true - - - - search-form - com.liferay.taglib.ui.SearchFormTag - JSP - - page - true - true - - - searchContainer - false - true - - - servletContext - false - true - - - showAddButton - false - true - - - - Creates a search results page iterator with an optional paginator. - search-iterator - com.liferay.taglib.ui.SearchIteratorTag - JSP - - Whether to add a liferay-ui:search-paginator]]> to the search container. The default value is true]]>. - paginate - false - true - boolean - - - All configurable properties of the search container, such as cur]]> and curParam]]>. These properties are set with searchContainer.getCur()]]> and searchContainer.getCurParam()]]> respectively. - searchContainer - false - true - - - A type of iterator to display. Options are approximate]]>, article]]>, more]]>, and regular]]>. - type - false - true - - - - Creates a page iterator to paginate through search results - search-paginator - com.liferay.taglib.ui.SearchPaginatorTag - JSP - - An ID for the component instance. - id - false - true - - - All configurable porperties of the search container, such as cur]]> and curParam]]>. These properties are set with searchContainer.getCur()]]> and searchContainer.getCurParam()]]> respectively. - searchContainer - true - true - - - A type of iterator to display. Options are approximate]]>, article]]>, more]]>, and regular]]>. - type - false - true - - - - search-speed - com.liferay.taglib.ui.SearchSpeedTag - JSP - - hits - true - true - - - searchContainer - true - true - - - - Creates a search instance that can be toggled between basic and advanced search. - search-toggle - com.liferay.taglib.ui.SearchToggleTag - JSP - - Whether the search input field is automatically focused. The default value is false]]>. - autoFocus - false - true - boolean - - - A label for the search button such as Search]]> or Go]]>. - buttonLabel - false - true - - - Terms to be used and displayed through the search instance. Term examples include keywords]]>, advancedSearch]]>, and description]]>. - displayTerms - true - true - - - An ID for the component instance. - id - true - true - - - - section - com.liferay.taglib.ui.SectionTag - com.liferay.taglib.ui.SectionTei - JSP - - - sites-directory - com.liferay.taglib.ui.SitesDirectoryTag - JSP - - displayStyle - false - true - - - sites - false - true - - - - social-activities - com.liferay.taglib.ui.SocialActivitiesTag - JSP - - activities - false - true - - - className - false - true - - - classPK - false - true - - - displayRSSFeed - false - true - - - feedDelta - false - true - - - feedDisplayStyle - false - true - - - feedEnabled - false - true - - - feedLink - false - true - - - feedLinkMessage - false - true - - - feedTitle - false - true - - - feedType - false - true - - - - social-bookmark - com.liferay.taglib.ui.SocialBookmarkTag - JSP - - contentId - false - true - - - icon - false - true - - - displayStyle - false - true - - - target - false - true - - - title - true - true - - - type - true - true - - - url - true - true - - - - social-bookmarks - com.liferay.taglib.ui.SocialBookmarksTag - JSP - - contentId - false - true - - - displayStyle - false - true - - - target - false - true - - - title - true - true - - - types - false - true - - - url - true - true - - - - social-bookmarks-settings - com.liferay.taglib.ui.SocialBookmarksSettingsTag - JSP - - displayPosition - false - true - - - displayStyle - false - true - - - enabled - false - true - - - types - false - true - - - - Creates a success message to display to the user. - success - com.liferay.taglib.ui.SuccessTag - empty - - A key to be placed in the SessionMessages]]> object to trigger the success message. - key - true - true - - - Explicit message text or the name of a language key from which to derive the message text. - message - true - true - - - Whether to translate the success message into the user's language. The default value is true]]>. - translateMessage - false - true - boolean - - - - table-iterator - com.liferay.taglib.ui.TableIteratorTag - com.liferay.taglib.ui.TableIteratorTei - JSP - - bodyPage - false - true - - - list - true - true - - - listType - true - true - - - rowBreak - false - true - - - rowLength - true - true - - - rowPadding - false - true - - - rowValign - false - true - - - width - false - true - - - - Creates a tabbed UI of section dividers that each house their own content. - tabs - com.liferay.taglib.ui.TabsTag - JSP - - - A label for the back URL. - backLabel - false - true - - - A URL for navigating back to. - backURL - false - true - - - A name for the tab's form. - formName - false - true - - - The names of the tabs. Each name must be separated by a comma with no spaces. - names - true - true - - - A function to be called on a user clicking any of the tabs. - onClick - false - true - - - A variable for the component. - param - false - true - - - A URL to refer to the portlet that contains the component. - portletURL - false - true - - - Whether the page refreshes when a tab is clicked. - refresh - false - true - boolean - - - Tab values that must follow the same order as the names]]> attribute. Each value must be separated by a comma with no spaces. - tabsValues - false - true - - - A design type for the tabs. Possible values are tabs]]> and pills]]>. - type - false - true - - - A URL to which all the tabs are linked when clicked. You can also set each tab's URL individually using url[number]]]> attribute. - url - false - true - - - urls - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url0 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url1 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url2 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url3 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url4 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url5 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url6 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url7 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url8 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url9 - false - true - - - An active tab from the value given in the attribute tabsValues]]>. No matter which tab a user selects, the tab given for this value always remains active. - value - false - true - - - - Creates a component that toggles the visibility of the content of the component matching the given id]]>. Default icons are used as the component's default mechanism for showing and hiding the content. - toggle - com.liferay.taglib.ui.ToggleTag - JSP - - Whether to initially show content by default. The default value is true]]>. - defaultShowContent - false - true - boolean - - - 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. - hideImage - false - true - - - Text to display as a link for hiding the content. It overrides the hideImage]]> attribute. Note that the showMessage]]> attribute must also be configured in order for the hide message to render. - hideMessage - false - true - - - The ID of a component instance whose content's visibility to toggle. - id - true - true - - - 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. - showImage - false - true - - - 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 showImage]]> attribute. If you specify a showMessage]]> attribute, you should also specify the hideMessage]]> attribute; a null]]> is otherwise displayed for the text of the hide link. - showMessage - false - true - - - Text to be prefixed to the Toggle()]]> function that is called to toggle visibility of the content. If this is not configured, a random key is generated and prefixed to the Toggle()]]> function. For example, a value of run]]> would result in a function named runToggle()]]>. - stateVar - false - true - - - - toggle-area - com.liferay.taglib.ui.ToggleAreaTag - JSP - - align - false - true - - - defaultShowContent - false - true - - - hideImage - false - true - - - hideMessage - false - true - - - id - false - true - - - showImage - false - true - - - showMessage - false - true - - - stateVar - false - true - - - - toggle-value - com.liferay.taglib.ui.ToggleValueTag - JSP - - defaultValue - false - true - - - id - true - true - - - - toolbar-item - com.liferay.taglib.ui.ToolbarItemTag - JSP - - toolbarItem - true - true - - - var - true - true - - - - Creates a component for users to permanently delete items such as images, articles, etc. from the recycle bin. - trash-empty - com.liferay.taglib.ui.TrashEmptyTag - empty - - A message to display to confirm that the user wants to remove the item(s) from the recycle bin. - confirmMessage - false - true - - - A message to be used for the empty-trash]]> button and link. - emptyMessage - false - true - - - A message to display to give users information about removing items from the recycle bin. - infoMessage - false - true - - - A URL for the empty-trash]]> button/link. - portletURL - true - true - - - The number of items to be removed from the recycle bin. - totalEntries - true - true - int - - - - Creates a message confirming items were moved to the recycle bin and presenting an option to restore them. - trash-undo - com.liferay.taglib.ui.TrashUndoTag - empty - - The URL of the undo link. - portletURL - true - true - - - A redirect URL. - redirect - false - true - - - - quick-access - com.liferay.taglib.ui.QuickAccessTag - JSP - - contentId - false - true - - - - quick-access-entry - com.liferay.taglib.ui.QuickAccessEntryTag - JSP - - label - false - true - - - onClick - false - true - - - url - false - true - - - - upload-progress - com.liferay.taglib.ui.UploadProgressTag - JSP - - height - false - true - - - id - true - true - - - message - false - true - - - redirect - false - true - - - updatePeriod - false - true - - - - user-display - com.liferay.taglib.ui.UserDisplayTag - com.liferay.taglib.ui.UserDisplayTei - JSP - - author - false - true - - - displayStyle - false - true - - - imageCssClass - false - true - - - showUserDetails - false - true - - - showUserName - false - true - - - url - false - true - - - userId - true - true - - - userName - false - true - - - - user-group-search-form - com.liferay.taglib.ui.UserGroupSearchFormTag - JSP - - - user-search - com.liferay.taglib.ui.UserSearchTag - JSP - - portletURL - true - true - - - rowChecker - false - true - - - userParams - true - true - - - - user-search-form - com.liferay.taglib.ui.UserSearchFormTag - JSP - - - webdav - com.liferay.taglib.ui.WebDAVTag - JSP - - path - true - true - - - - write - com.liferay.taglib.ui.WriteTag - JSP - - bean - true - true - - - property - true - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-util.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-util.tld deleted file mode 100644 index 73e0fc2916..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/tld/liferay-util.tld +++ /dev/null @@ -1,156 +0,0 @@ - - - - - 1.2 - 1.1 - liferay-util - http://liferay.com/tld/util - - body-bottom - com.liferay.taglib.util.BodyBottomTag - JSP - - outputKey - false - true - - - - body-top - com.liferay.taglib.util.BodyTopTag - JSP - - outputKey - false - true - - - - buffer - com.liferay.taglib.util.BufferTag - com.liferay.taglib.util.BufferTei - JSP - - var - true - true - - - - dynamic-include - com.liferay.taglib.util.DynamicIncludeTag - scriptless - - ascendingPriority - false - true - - - key - true - true - - - - get-url - com.liferay.taglib.util.GetUrlTag - com.liferay.taglib.util.GetUrlTei - JSP - - expires - false - true - - - url - true - true - - - var - false - true - - - - html-bottom - com.liferay.taglib.util.HtmlBottomTag - JSP - - outputKey - false - true - - - position - false - true - - - - html-top - com.liferay.taglib.util.HtmlTopTag - JSP - - outputKey - false - true - - - position - false - true - - - - include - com.liferay.taglib.util.IncludeTag - JSP - - page - true - true - - - portletId - false - true - - - servletContext - false - true - - - strict - false - true - - - useCustomPage - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - whitespace-remover - com.liferay.taglib.util.WhitespaceRemoverTag - JSP - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/web.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/web.xml deleted file mode 100644 index 1aa8cdb8d7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/css/main.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/icon.png b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/icon.png deleted file mode 100644 index 807b862cfc..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/icon.png and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/js/main.js b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/js/main.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/view.jsp deleted file mode 100644 index a258275a9e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/docroot/view.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<% -/** - * 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. - */ -%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - - - -This is the Test portlet. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/journal-portlet/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/journal-portlet/portal.properties deleted file mode 100644 index 9c2338281d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/journal-portlet/portal.properties +++ /dev/null @@ -1,13 +0,0 @@ - - # - # Set the maximum file size and valid file extensions for images. A value of - # 0 for the maximum file size can be used to indicate unlimited file size. - # However, the maximum file size allowed is set in the property - # "com.liferay.portal.upload.UploadServletRequestImpl.max.size". - # - journal.image.small.max.size=51200 - - # - # A file extension of * will permit all file extensions. - # - journal.image.extensions=.gif,.jpeg,.jpg,.png diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/shopping-portlet/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/shopping-portlet/portal.properties deleted file mode 100644 index 5af1417343..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/shopping-portlet/portal.properties +++ /dev/null @@ -1,61 +0,0 @@ -## -## Shopping Portlet -## - - # - # Set this to true if cart quantities must be a multiple of the item's - # minimum quantity. - # - shopping.cart.min.qty.multiple=true - - # - # Set this to true to forward to the cart page when adding an item from the - # category page. The item must not have dynamic fields. All items with - # dynamic fields will forward to the item's details page regardless of the - # following setting. - # - shopping.category.forward.to.cart=false - - # - # Set this to true to show special items when browsing a category. - # - shopping.category.show.special.items=false - - # - # Set this to true to show availability when viewing an item. - # - shopping.item.show.availability=true - - # - # Set the maximum file size and valid file extensions for images. A value of - # 0 for the maximum file size can be used to indicate unlimited file size. - # However, the maximum file size allowed is set in the property - # "com.liferay.portal.upload.UploadServletRequestImpl.max.size". - # - shopping.image.small.max.size=51200 - shopping.image.medium.max.size=153600 - shopping.image.large.max.size=307200 - - # - # A file extension of * will permit all file extensions. - # - shopping.image.extensions=.gif,.jpeg,.jpg,.png - - # - # Configure email notification settings. - # - shopping.email.from.name= - shopping.email.from.address= - - shopping.email.order.confirmation.enabled=true - shopping.email.order.confirmation.subject=com/liferay/portlet/shopping/dependencies/email_order_confirmation_subject.tmpl - shopping.email.order.confirmation.body=com/liferay/portlet/shopping/dependencies/email_order_confirmation_body.tmpl - - shopping.email.order.shipping.enabled=true - shopping.email.order.shipping.subject=com/liferay/portlet/shopping/dependencies/email_order_shipping_subject.tmpl - shopping.email.order.shipping.body=com/liferay/portlet/shopping/dependencies/email_order_shipping_body.tmpl - - # - # Set this to true to enable comments for shopping orders. - # - shopping.order.comments.enabled=true \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/social-activity-portlet/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/social-activity-portlet/portal.properties deleted file mode 100644 index fb8b641e87..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/social-activity-portlet/portal.properties +++ /dev/null @@ -1,6 +0,0 @@ - - # - # Set this to true if sets should be generated when new activities are - # added. - # - social.activity.sets.enabled=false diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/test/integration/arquillian.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/test/integration/arquillian.xml deleted file mode 100644 index 9413609b35..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet/test/integration/arquillian.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - 8099 - tomcat - tomcat - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1c0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-display.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index 16b027939e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-hook.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-hook.xml deleted file mode 100644 index 36a785f969..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-hook.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - portal.properties - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-plugin-package.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 62b8bb6f87..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,11 +0,0 @@ -name=Test -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+ \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index 522e6a2249..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - test - /icon.png - site_administration.pages - /css/main.css - /js/main.js - test-portlet - - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/portlet.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 5818fcd9b6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - test - Test - com.liferay.util.bridges.mvc.MVCPortlet - - view-template - /view.jsp - - 0 - - text/html - - - Test - Test - Test - - - administrator - - - guest - - - power-user - - - user - - - - test2 - Test2 - com.liferay.util.bridges.mvc.MVCPortlet - - view-template - /view.jsp - - 0 - - text/html - - - Test2 - Test2 - Test2 - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/src/portal.properties b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/src/portal.properties deleted file mode 100644 index a10dcbb587..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/src/portal.properties +++ /dev/null @@ -1,69 +0,0 @@ -users.image.check.token=true -users.image.max.size=307200 -users.image.max.height=120 -users.image.max.width=100 - -browser.cache.disabled=false -browser.cache.signed.in.disabled=false - -captcha.max.challenges=1 -captcha.check.portal.create_account=true -captcha.check.portal.send_password=true -captcha.check.portlet.message_boards.edit_category=false -captcha.check.portlet.message_boards.edit_message=false -captcha.engine.impl=com.liferay.captcha.simplecaptcha.SimpleCaptchaImpl -captcha.engine.recaptcha.key.private= -captcha.engine.recaptcha.key.public= -captcha.engine.recaptcha.url.script=https://www.google.com/recaptcha/api.js -captcha.engine.recaptcha.url.noscript=https://www.google.com/recaptcha/api/fallback?k= -captcha.engine.recaptcha.url.verify=https://www.google.com/recaptcha/api/siteverify -captcha.engine.simplecaptcha.height=50 -captcha.engine.simplecaptcha.width=150 -captcha.engine.simplecaptcha.background.producers=nl.captcha.backgrounds.FlatColorBackgroundProducer,nl.captcha.backgrounds.GradiatedBackgroundProducer,nl.captcha.backgrounds.SquigglesBackgroundProducer,nl.captcha.backgrounds.TransparentBackgroundProducer -captcha.engine.simplecaptcha.gimpy.renderers=nl.captcha.gimpy.BlockGimpyRenderer,nl.captcha.gimpy.DropShadowGimpyRenderer,nl.captcha.gimpy.FishEyeGimpyRenderer,nl.captcha.gimpy.RippleGimpyRenderer,nl.captcha.gimpy.ShearGimpyRenderer -captcha.engine.simplecaptcha.noise.producers=nl.captcha.noise.CurvedLineNoiseProducer,nl.captcha.noise.StraightLineNoiseProducer -captcha.engine.simplecaptcha.text.producers=com.liferay.captcha.simplecaptcha.PinNumberTextProducer -captcha.engine.simplecaptcha.word.renderers=nl.captcha.text.renderer.DefaultWordRenderer - -openoffice.server.enabled=false -openoffice.server.host=127.0.0.1 -openoffice.server.port=8100 -openoffice.cache.enabled=true - -organizations.types=regular-organization,location -organizations.rootable[regular-organization]=true -organizations.children.types[regular-organization]=regular-organization,location -organizations.country.enabled[regular-organization]=false -organizations.country.required[regular-organization]=false - -dl.file.entry.previewable.processor.max.size=26214400 -dl.file.extensions=.bmp, .jpg,.png, .jpeg -dl.file.max.size=26214400 - -com.liferay.portal.upload.UploadServletRequestImpl.max.size=104857600 -com.liferay.portal.upload.UploadServletRequestImpl.temp.dir=C:/Temp - -## -## YUI -## - - # - # Specify the YUI compressor settings used to compress CSS. - # - yui.compressor.css.line.break=-1 - - # - # Specify the YUI compressor settings used to compress JavaScript. - # - yui.compressor.js.disable.optimizations=false - yui.compressor.js.line.break=-1 - yui.compressor.js.munge=true - yui.compressor.js.preserve.all.semicolons=false - yui.compressor.js.verbose=false - # - # Input a class name that implements - # com.liferay.portal.minifier.JavaScriptMinifier. This class will be called - # to called to minify JavaScript. - # - minifier.javascript.impl=com.liferay.portal.minifier.GoogleJavaScriptMinifier - #minifier.javascript.impl=com.liferay.portal.minifier.YahooJavaScriptMinifier \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/aui.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/aui.tld deleted file mode 100644 index 445a87739f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/aui.tld +++ /dev/null @@ -1,2851 +0,0 @@ - - - - aui:.]]> - 1.0 - aui - http://alloy.liferay.com/tld/aui - - - button-item - com.liferay.taglib.aui.ButtonItemTag - JSP - - ]]> - activeState - false - true - boolean - - - ]]> - boundingBox - false - true - java.lang.String - - - ]]> - classNames - false - true - java.lang.Object - - - ]]> - contentBox - false - true - java.lang.String - - - boundingBox.]]> - cssClass - false - true - java.lang.String - - - ]]> - defaultState - false - true - boolean - - - ]]> - depth - false - true - java.lang.Object - - - ]]> - destroyed - false - true - boolean - - - ]]> - disabled - false - true - boolean - - - ]]> - focused - false - true - boolean - - - {fn: // The function to execute - context: // The context to execute the function in - type: // The type of event to listen for (defaults to "click") - }]]> - handler - false - true - java.lang.Object - - - ]]> - height - false - true - java.lang.Object - - - boundingBox when - visible is set to - false.]]> - hideClass - false - true - java.lang.String - - - ]]> - hoverState - false - true - boolean - - - ]]> - icon - false - true - java.lang.String - - - aui-button-icon.]]> - iconNode - false - true - java.lang.String - - - ]]> - buttonitemId - false - true - java.lang.String - - - ]]> - index - false - true - java.lang.Object - - - ]]> - initialized - false - true - boolean - - - ]]> - label - false - true - java.lang.String - - - aui-button-label.]]> - labelNode - false - true - java.lang.String - - - ]]> - buttonitemParent - false - true - java.lang.Object - - - true the render phase will be autimatically invoked - preventing the .render() manual call.]]> - render - false - true - java.lang.Object - - - ]]> - rendered - false - true - boolean - - - ]]> - root - false - true - java.lang.Object - - - -
    0
    (Default) Not selected
    -
    1
    Fully selected
    -
    2
    Partially selected
    - ]]>
    - selected - false - true - java.lang.Object -
    - - ]]> - srcNode - false - true - java.lang.String - - - ]]> - strings - false - true - java.lang.Object - - - ]]> - tabIndex - false - true - java.lang.Object - - - ]]> - title - false - true - java.lang.String - - - ]]> - type - false - true - java.lang.String - - - ]]> - useARIA - false - true - boolean - - - ]]> - visible - false - true - boolean - - - ]]> - width - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterActiveStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterBoundingBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterClassNamesChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterContentBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterCssClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDefaultStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDepthChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after destruction is complete (and as a result cannot prevent - destruction). -

    ]]>
    - afterDestroy - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDestroyedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterDisabledChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterFocusedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHandlerChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHeightChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHideClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterHoverStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIconChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIconNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIdChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterIndexChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" momemt of this event, will be notified - after initialization of the object is complete (and therefore - cannot prevent initialization). -

    ]]>
    - afterInit - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterInitializedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterLabelChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterLabelNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterParentChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterRenderChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterRenderedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterRootChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterSelectedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterSrcNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterStringsChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterTabIndexChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterTitleChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterTypeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterUseARIAChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterVisibleChange - false - true - java.lang.Object - - - ]]> - afterContentUpdate - false - true - java.lang.Object - - - - Subscribers to the "on" moment of this event, will be notified - before the widget is rendered. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after rendering is complete. -

    ]]>
    - afterRender - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - afterWidthChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onActiveStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onBoundingBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onClassNamesChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onContentBoxChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onCssClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDefaultStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDepthChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after destruction is complete (and as a result cannot prevent - destruction). -

    ]]>
    - onDestroy - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDestroyedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onDisabledChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onFocusedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHandlerChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHeightChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHideClassChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onHoverStateChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIconChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIconNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIdChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onIndexChange - false - true - java.lang.Object - - - - 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. -

    -

    - Subscribers to the "after" momemt of this event, will be notified - after initialization of the object is complete (and therefore - cannot prevent initialization). -

    ]]>
    - onInit - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onInitializedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onLabelChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onLabelNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onParentChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onRenderChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onRenderedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onRootChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onSelectedChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onSrcNodeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onStringsChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onTabIndexChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onTitleChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onTypeChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onUseARIAChange - false - true - java.lang.Object - - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onVisibleChange - false - true - java.lang.Object - - - ]]> - onContentUpdate - false - true - java.lang.Object - - - - Subscribers to the "on" moment of this event, will be notified - before the widget is rendered. -

    -

    - Subscribers to the "after" moment of this event, will be notified - after rendering is complete. -

    ]]>
    - onRender - false - true - java.lang.Object -
    - - on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.]]> - onWidthChange - false - true - java.lang.Object - - true -
    - - - a - com.liferay.taglib.aui.ATag - JSP - - <p> tag could be used for something other than a paragraph.]]> - ariaRole - false - true - java.lang.String - - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.util.Map - - - - href - true - true - java.lang.String - - - - id - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - - lang - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - - - onClick - false - true - java.lang.String - - - self. Possible values are blank, self, parent, top, and a unique frame's name.]]> - target - false - true - java.lang.String - - - - title - false - true - java.lang.String - - true - - - alert - com.liferay.taglib.aui.AlertTag - JSP - - animated - false - true - boolean - - - closeable - false - true - boolean - - - cssClass - false - true - java.lang.String - - - destroyOnHide - false - true - boolean - - - duration - false - true - java.lang.Object - - - id - false - true - java.lang.String - - - type - false - true - java.lang.String - - true - - - audio - com.liferay.taglib.aui.AudioTag - JSP - - boundingBox - false - true - java.lang.String - - - cssClass - false - true - java.lang.String - - - id - false - true - java.lang.String - - - oggURL - false - true - java.lang.String - - - swfURL - false - true - java.lang.String - - - type - false - true - java.lang.String - - - url - true - true - java.lang.String - - true - - - - button - com.liferay.taglib.aui.ButtonTag - JSP - - primary attribute.]]> - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.lang.Object - - - false.]]> - disabled - false - true - boolean - - - - href - false - true - java.lang.String - - - here.]]> - icon - false - true - java.lang.String - - - left.]]> - iconAlign - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - name - false - true - java.lang.String - - - - onClick - false - true - java.lang.String - - - btn btn-primary CSS styling to the button. If the type attribute is set to submit, this value is set to true. For all other types, the value is set to false by default.]]> - primary - false - true - java.lang.Object - - - button, submit, cancel and reset. The default value is button.]]> - type - false - true - java.lang.String - - - href location when a user clicks the button. The default value is false.]]> - useDialog - false - true - boolean - - - true.]]> - useNamespace - false - true - boolean - - - - value - false - true - java.lang.String - - true - - - <div> tag to wrap <aui:button> components and offer additional styling.]]> - button-row - com.liferay.taglib.aui.ButtonRowTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - true - - - <aui:row> component.]]> - col - com.liferay.taglib.aui.ColTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - lg - false - true - java.lang.String - - - md - false - true - java.lang.String - - - sm - false - true - java.lang.String - - - 12. For example, a span of 4 would result in a column width 4/12 (or 1/3) of the total width of the containing row.]]> - span - false - true - int - - - span attribute. The width is then converted to a span expressed as ((width/100) x 12), rounded to the nearest whole number. For example, a width of 33 would be converted to 3.96, which would be rounded up to a span value of 4.]]> - width - false - true - int - - - xs - false - true - java.lang.String - - true - - - aui:col.]]> - column - com.liferay.taglib.aui.ColumnTag - JSP - - 20 would be 20%. The default value is 0.]]> - columnWidth - false - true - int - - - - cssClass - false - true - java.lang.String - - - false.]]> - first - false - true - boolean - - - - id - false - true - java.lang.String - - - false.]]> - last - false - true - boolean - - true - - - component - com.liferay.taglib.aui.ComponentTag - JSP - - defineVar - false - true - boolean - - - excludeAttributes - false - true - java.lang.String - - - javaScriptAttributes - false - true - java.lang.String - - - module - false - true - java.lang.String - - - name - false - true - java.lang.String - - - options - false - true - java.util.Map - - - scriptPosition - false - true - java.lang.String - - - tagPageContext - true - true - javax.servlet.jsp.JspContext - - - useJavaScript - false - true - java.io.Serializable - - - var - false - true - java.lang.String - - true - - - <div> tag to wrap <aui:row> components and offer additional styling.]]> - container - com.liferay.taglib.aui.ContainerTag - JSP - - - cssClass - false - true - java.lang.String - - - true.]]> - fluid - false - true - boolean - - - - id - false - true - java.lang.String - - true - - - <div> tag to wrap form fields and offer additional styling.]]> - field-wrapper - com.liferay.taglib.aui.FieldWrapperTag - JSP - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.lang.Object - - - false.]]> - first - false - true - boolean - - - - helpMessage - false - true - java.lang.String - - - false.]]> - inlineField - false - true - boolean - - - right and left.]]> - inlineLabel - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - false.]]> - last - false - true - boolean - - - true.]]> - localizeLabel - false - true - boolean - - - - name - false - true - java.lang.String - - - - required - false - true - boolean - - - - <div> tag to group related form elements and offer additional styling.]]> - fieldset - com.liferay.taglib.aui.FieldsetTag - JSP - - - column - false - true - boolean - - - - cssClass - false - true - java.lang.String - - - - helpMessage - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - true - - - - form - com.liferay.taglib.aui.FormTag - JSP - - - action - false - true - java.lang.String - - - - cssClass - false - true - java.lang.String - - - true.]]> - escapeXml - false - true - boolean - - - false.]]> - inlineLabels - false - true - boolean - - - post. Possible values are get and post.]]> - method - false - true - java.lang.String - - - fm.]]> - name - false - true - java.lang.String - - - - onSubmit - false - true - java.lang.String - - - - portletNamespace - false - true - java.lang.String - - - true.]]> - useNamespace - false - true - boolean - - true - - - - icon - com.liferay.taglib.aui.IconTag - JSP - - image attribute.]]> - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.util.Map - - - - id - false - true - java.lang.String - - - icon-edit CSS class by setting the value edit. If an icon image is referenced for cssClass and image, both icons are shown in the component.]]> - image - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - self. Possible values are blank, self, parent, top, and a unique frame's name.]]> - target - false - true - java.lang.String - - - - url - false - true - java.lang.String - - true - - - - input - com.liferay.taglib.aui.InputTag - JSP - - - autoFocus - false - true - boolean - - - - autoSize - false - true - boolean - - - - bean - false - true - java.lang.Object - - - false.]]> - changesContext - false - true - boolean - - - type is radio or checkbox.]]> - checked - false - true - boolean - - - 0.]]> - classPK - false - true - long - - - -1.]]> - classTypePK - false - true - long - - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.lang.Object - - - dateTogglerCheckboxLabel - false - true - java.lang.String - - - - defaultLanguageId - false - true - java.lang.String - - - false.]]> - disabled - false - true - boolean - - - field - false - true - java.lang.String - - - field of the component.]]> - fieldParam - false - true - java.lang.String - - - - first - false - true - boolean - - - - formName - false - true - java.lang.String - - - - helpMessage - false - true - java.lang.String - - - input-group-addon.]]> - helpTextCssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - false.]]> - ignoreRequestValue - false - true - boolean - - - false.]]> - inlineField - false - true - boolean - - - right and left.]]> - inlineLabel - false - true - java.lang.String - - - name attribute's value.]]> - label - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - - languageId - false - true - java.lang.String - - - - last - false - true - boolean - - - false.]]> - localized - false - true - boolean - - - type is number or range. Note that the max value is inclusive if the input's type is range.]]> - max - false - true - java.lang.Object - - - - model - false - true - java.lang.Class - - - type is number or range. Note that the min value is inclusive if the input's type is range.]]> - min - false - true - java.lang.Object - - - multiple - false - true - boolean - - - - name - true - true - java.lang.String - - - - onChange - false - true - java.lang.String - - - - onClick - false - true - java.lang.String - - - - placeholder - false - true - java.lang.String - - - - prefix - false - true - java.lang.String - - - - required - false - true - boolean - - - textarea.]]> - resizable - false - true - boolean - - - - showRequiredLabel - false - true - boolean - - - - suffix - false - true - java.lang.String - - - - title - false - true - java.lang.String - - - text, hidden, assetCategories, assetTags, textarea, timeZone, password, checkbox, radio, submit, button, color, email, number, range, resource, url, 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.]]> - type - false - true - java.lang.String - - - true.]]> - useNamespace - false - true - boolean - - - - value - false - true - java.lang.Object - - - div, that can be styled. The default value is false. If the wrapperCssClass attribute is configured, the value is set automatically to true.]]> - wrappedField - false - true - boolean - - - div that wraps the input component.]]> - wrapperCssClass - false - true - java.lang.String - - true - - - - layout - com.liferay.taglib.aui.LayoutTag - JSP - - - cssClass - false - true - java.lang.String - - true - - - - model-context - com.liferay.taglib.aui.ModelContextTag - JSP - - - bean - false - true - java.lang.Object - - - - defaultLanguageId - false - true - java.lang.String - - - - model - false - true - java.lang.Class - - - - <nav:item> components for an <aui:nav-bar> component.]]> - nav - com.liferay.taglib.aui.NavTag - JSP - - - ariaLabel - false - true - java.lang.String - - - <p> tag could be used for something other than a paragraph.]]> - ariaRole - false - true - java.lang.String - - - collapsible - false - true - boolean - - - - cssClass - false - true - java.lang.String - - - icon - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - searchContainer - false - true - com.liferay.portal.kernel.dao.search.SearchContainer - - - true.]]> - useNamespace - false - true - boolean - - true - - - - nav-bar - com.liferay.taglib.aui.NavBarTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - true - - - <aui:nav-bar> component.]]> - nav-bar-search - com.liferay.taglib.aui.NavBarSearchTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - file - false - true - java.lang.String - - - - searchContainer - false - true - com.liferay.portal.kernel.dao.search.SearchContainer - - true - - - <aui:nav> component.]]> - nav-item - com.liferay.taglib.aui.NavItemTag - JSP - - href attribute.]]> - anchorCssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - anchorData - false - true - java.lang.Object - - - href attribute.]]> - anchorId - false - true - java.lang.String - - - - ariaLabel - false - true - java.lang.String - - - <p> tag could be used for something other than a paragraph.]]> - ariaRole - false - true - java.lang.String - - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.lang.Object - - - false.]]> - dropdown - false - true - boolean - - - - href - false - true - java.lang.Object - - - - iconCssClass - false - true - java.lang.String - - - iconSrc - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - - false.]]> - selected - false - true - boolean - - - state - false - true - java.lang.String - - - target - false - true - java.lang.String - - - - title - false - true - java.lang.String - - - toggle - false - true - boolean - - - toggleTouch - false - true - boolean - - - href location when a user clicks the navigation item. The default value is false.]]> - useDialog - false - true - boolean - - - drop-down-menu class. The default value is true.]]> - wrapDropDownMenu - false - true - boolean - - true - - - <aui:select> component.]]> - option - com.liferay.taglib.aui.OptionTag - JSP - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", foo> would render as the attribute data-class-name = foo;.]]> - data - false - true - java.util.Map - - - false.]]> - disabled - false - true - boolean - - - - label - false - true - java.lang.Object - - - true.]]> - localizeLabel - false - true - boolean - - - false.]]> - selected - false - true - boolean - - - text-align:right;.]]> - style - false - true - java.lang.String - - - useModelValue - false - true - boolean - - - label attribute.]]> - value - false - true - java.lang.Object - - true - - - panel - com.liferay.taglib.aui.PanelTag - JSP - - collapsed - false - true - boolean - - - collapsible - false - true - boolean - - - id - false - true - java.lang.String - - - label - false - true - java.lang.String - - - localizeLabel - false - true - boolean - - - - <aui:col> components.]]> - row - com.liferay.taglib.aui.RowTag - JSP - - - cssClass - false - true - java.lang.String - - - - id - false - true - java.lang.String - - true - - - - script - com.liferay.taglib.aui.ScriptTag - JSP - - - position - false - true - java.lang.String - - - sandbox - false - true - boolean - - - - use - false - true - java.lang.String - - - - <aui:option> components.]]> - select - com.liferay.taglib.aui.SelectTag - JSP - - - bean - false - true - java.lang.Object - - - false.]]> - changesContext - false - true - boolean - - - - cssClass - false - true - java.lang.String - - - HashMap<"class-name", "foo"> would render as the attribute data-class-name = "foo";.]]> - data - false - true - java.util.Map - - - false.]]> - disabled - false - true - boolean - - - false.]]> - first - false - true - boolean - - - - helpMessage - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - ignoreRequestValue - false - true - boolean - - - false.]]> - inlineField - false - true - boolean - - - right and left.]]> - inlineLabel - false - true - java.lang.String - - - - label - false - true - java.lang.String - - - false.]]> - last - false - true - boolean - - - ListTypeImpl.java.]]> - listType - false - true - java.lang.String - - - listTypeFieldName - false - true - java.lang.String - - - true.]]> - localizeLabel - false - true - boolean - - - true, the select field expands to allow for multiple selections. The default value is false.]]> - multiple - false - true - boolean - - - label attribute and takes the place of the label.]]> - name - true - true - java.lang.String - - - - onChange - false - true - java.lang.String - - - - onClick - false - true - java.lang.String - - - - prefix - false - true - java.lang.String - - - false.]]> - required - false - true - boolean - - - false.]]> - showEmptyOption - false - true - boolean - - - required attribute is set to true. The default value is false.]]> - showRequiredLabel - false - true - boolean - - - - suffix - false - true - java.lang.String - - - - title - false - true - java.lang.String - - - true.]]> - useNamespace - false - true - boolean - - - value - false - true - java.lang.Object - - - div that wraps the select field.]]> - wrapperCssClass - false - true - java.lang.String - - true - - - - spacer - com.liferay.taglib.aui.SpacerTag - JSP - - - - translation-manager - com.liferay.taglib.aui.TranslationManagerTag - JSP - - - availableLocales - false - true - java.util.Locale[] - - - - defaultLanguageId - false - true - java.lang.String - - - editingLanguageId - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - true. If this is set to false, the translation manager will not work entirely.]]> - initialize - false - true - boolean - - - false.]]> - readOnly - false - true - boolean - - - - - validator - com.liferay.taglib.aui.ValidatorTagImpl - JSP - - - errorMessage - false - true - java.lang.String - - - acceptFiles, alpha, alphanum, date, digits, email, equalTo, iri, max, maxLength, min, minLength, number, required, and url.]]> - name - true - true - java.lang.String - - - - video - com.liferay.taglib.aui.VideoTag - JSP - - boundingBox - false - true - java.lang.String - - - cssClass - false - true - java.lang.String - - - flashPlayerVersion - false - true - java.lang.String - - - height - false - true - java.lang.Object - - - id - false - true - java.lang.String - - - ogvURL - false - true - java.lang.String - - - poster - false - true - java.lang.String - - - swfURL - false - true - java.lang.String - - - url - true - true - java.lang.String - - - width - false - true - java.lang.Object - - true - - - - workflow-status - com.liferay.taglib.aui.WorkflowStatusTag - JSP - - - bean - false - true - java.lang.Object - - - - helpMessage - false - true - java.lang.String - - - - id - false - true - java.lang.String - - - - model - false - true - java.lang.Class - - - true.]]> - showIcon - false - true - boolean - - - true.]]> - showLabel - false - true - boolean - - - 0 (Approved), 1 (Pending), 2 (Draft), 3 (Expired), 4 (Denied), 5 (Inactive), 6 (Incomplete), 7 (Scheduled), and 8 (In-Trash). Any other value defaults to status (Any).]]> - status - false - true - java.lang.Integer - - - - statusMessage - false - true - java.lang.String - - - - version - false - true - java.lang.String - - -
    \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-portlet-ext.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-portlet-ext.tld deleted file mode 100644 index c9a0a34183..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-portlet-ext.tld +++ /dev/null @@ -1,498 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-portlet - http://liferay.com/tld/portlet - - - - - actionURL - com.liferay.taglib.portlet.ActionURLTag - com.liferay.taglib.portlet.ActionURLTei - JSP - - allowEmptyParam - false - true - - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsGroupId - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - name - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - refererGroupId - false - true - - - refererPlid - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - icon-back - com.liferay.taglib.portletext.IconBackTag - JSP - - - icon-options - com.liferay.taglib.portletext.IconOptionsTag - JSP - - - icon-portlet - com.liferay.taglib.portletext.IconPortletTag - JSP - - ariaRole - false - true - - - id - false - true - - - label - false - true - - - portlet - false - true - - - url - false - true - - - - param - com.liferay.taglib.util.ParamTag - empty - - name - true - true - - - value - true - true - - - - preview - com.liferay.taglib.portletext.PreviewTag - JSP - - portletName - true - true - - - queryString - false - true - - - showBorders - false - true - - - width - false - true - - - - - - - renderURL - com.liferay.taglib.portlet.RenderURLTag - com.liferay.taglib.portlet.RenderURLTei - JSP - - allowEmptyParam - false - true - - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsGroupId - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - refererGroupId - false - true - - - refererPlid - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - renderURLParams - com.liferay.taglib.portlet.RenderURLParamsTag - JSP - - portletURL - false - true - - - varImpl - false - true - - - - - - - resourceURL - com.liferay.taglib.portlet.ResourceURLTag - com.liferay.taglib.portlet.ResourceURLTei - JSP - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsGroupId - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - id - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - refererGroupId - false - true - - - refererPlid - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - runtime - com.liferay.taglib.portletext.RuntimeTag - JSP - - defaultPreferences - false - true - - - portletName - false - true - - - portletProviderClassName - false - true - - - portletProviderAction - false - true - - - queryString - false - true - - - settingsScope - false - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-portlet.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-portlet.tld deleted file mode 100644 index a7cd2fdff2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-portlet.tld +++ /dev/null @@ -1,158 +0,0 @@ - - - - - 1.0 - 1.1 - portlet - http://java.sun.com/portlet - - actionURL - com.liferay.taglib.portlet.ActionURLTag - com.liferay.taglib.portlet.ActionURLTei - JSP - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - name - false - true - - - portletMode - false - true - - - secure - false - true - - - var - false - true - - - windowState - false - true - - - - defineObjects - com.liferay.taglib.portlet.DefineObjectsTag - com.liferay.taglib.portlet.DefineObjectsTei - empty - - - namespace - com.liferay.taglib.portlet.NamespaceTag - empty - - - param - com.liferay.taglib.util.ParamTag - empty - - name - true - true - - - value - true - true - - - - property - com.liferay.taglib.util.PropertyTag - empty - - name - true - true - - - value - true - true - - - - renderURL - com.liferay.taglib.portlet.RenderURLTag - com.liferay.taglib.portlet.RenderURLTei - JSP - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - portletMode - false - true - - - secure - false - true - - - var - false - true - - - windowState - false - true - - - - resourceURL - com.liferay.taglib.portlet.ResourceURLTag - com.liferay.taglib.portlet.ResourceURLTei - JSP - - cacheability - false - true - - - escapeXml - false - true - - - id - false - true - - - secure - false - true - - - var - false - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-security.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-security.tld deleted file mode 100644 index f8e6f6dd82..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-security.tld +++ /dev/null @@ -1,106 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-security - http://liferay.com/tld/security - - doAsURL - com.liferay.taglib.security.DoAsURLTag - com.liferay.taglib.security.DoAsURLTei - JSP - - doAsUserId - false - true - - - var - false - true - - - - encrypt - com.liferay.taglib.security.EncryptTag - JSP - - className - false - true - - - protocol - true - true - - - style - false - true - - - target - false - true - - - unencryptedParams - false - true - - - url - true - true - - - - permissionsURL - com.liferay.taglib.security.PermissionsURLTag - com.liferay.taglib.security.PermissionsURLTei - JSP - - modelResource - true - true - - - modelResourceDescription - true - true - - - redirect - false - true - - - resourceGroupId - false - true - - - resourcePrimKey - true - true - - - roleTypes - false - true - - - var - false - true - - - windowState - false - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-theme.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-theme.tld deleted file mode 100644 index 90ac81db71..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-theme.tld +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 1.0 - 1.1 - theme - http://liferay.com/tld/theme - - defineObjects - com.liferay.taglib.theme.DefineObjectsTag - com.liferay.taglib.theme.DefineObjectsTei - empty - - - include - com.liferay.taglib.theme.IncludeTag - JSP - - page - true - true - - - - layout-icon - com.liferay.taglib.theme.LayoutIconTag - JSP - - layout - true - true - - - - meta-tags - com.liferay.taglib.theme.MetaTagsTag - JSP - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - wrap-portlet - com.liferay.taglib.theme.WrapPortletTag - JSP - - page - true - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-ui.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-ui.tld deleted file mode 100644 index 3c3cb0fa5a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-ui.tld +++ /dev/null @@ -1,5573 +0,0 @@ - - - - Provides the Liferay UI component tags, prefixed with liferay-ui:]]>. - 1.0 - liferay-ui - http://liferay.com/tld/ui - - Deprecated as of 7.0.0, replaced by liferay-aui:nav-item]]>. - app-view-display-style - com.liferay.taglib.ui.AppViewDisplayStyleTag - empty - - displayStyle - true - true - - - displayStyles - true - true - - - displayStyleURL - false - true - - - eventName - false - true - - - requestParams - false - true - - - - 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. - app-view-entry - com.liferay.taglib.ui.AppViewEntryTag - empty - - The path to an action JSP page. - actionJsp - false - true - - - The service context of the actionJsp]]>. - actionJspServletContext - false - true - - - The Java class name for any categories added to the entry. - assetCategoryClassName - false - true - - - The Java class primary key for any categories added to the entry. This is a Java long]]>. - assetCategoryClassPK - false - true - - - The Java class name for any tags added to the entry. - assetTagClassName - false - true - - - The Java class primary key for any tags added to the entry. This is a Java long]]>. - assetTagClassPK - false - true - - - The name of the entry's author. - author - false - true - - - A name for the entry type. This is displayed in descriptive view as Type: classTypeName]]>. - classTypeName - false - true - - - The date the entry was created. - createDate - false - true - - - A CSS class for styling this component. - cssClass - false - true - - - Miscellaneous data to be stored via a map. This data is not shared with the browser. The map holds key value pairs of type <String, Object>]]>. - data - false - true - java.util.Map - - - A description of the entry. - description - false - true - - - A date to display the entry. - displayDate - false - true - - - A display style for the component. Options are list]]>, icon]]>, and descriptive]]>. - displayStyle - true - true - - - A date for the entry to expire and be automatically deleted. - expirationDate - false - true - - - Whether the entry is a folder. The default is false]]>. - folder - false - true - boolean - - - The group ID of the entry. This is a Java long]]>. - groupId - false - true - - - A class for the icon to be displayed next to the entry title. The icon also acts as a link to view the entry. - iconCssClass - false - true - - - The version number of the most recently published copy of the entry. - latestApprovedVersion - false - true - - - The author of the most recently published version of the entry. - latestApprovedVersionAuthor - false - true - - - Whether the entry is locked. The default value is false]]>. - locked - false - true - boolean - - - The date of the most recent modification to the entry. - modifiedDate - false - true - - - The date the entry was reviewed. - reviewDate - false - true - - - A checkbox input ID to be used for the entry row checker. - rowCheckerId - false - true - - - A name for the entry row checker. - rowCheckerName - false - true - - - Whether to show a shortcut icon link to the entry. The default value is false]]>. - shortcut - false - true - boolean - - - Whether the entry is selectable. An actual checkbox is used when the display style is icon]]> or descriptive]]>. The default value is false]]>. - showCheckbox - true - true - boolean - - - Whether to show the link title. The default value is true]]>. - showLinkTitle - false - true - boolean - - - The current status of the entry, as represented by an integer. Options are -1: STATUS_ANY]]>, 0: STATUS_APPROVED]]>, 1: ACTION_PUBLISH]]>, 2: STATUS_DRAFT]]>, and 4: STATUS_DENIED]]>. The default value is -1]]>. - status - false - true - int - - - A CSS style to be applied to the div containing the thumbnail for the entry. - thumbnailDivStyle - false - true - - - The source URL for an entry thumbnail image. - thumbnailSrc - false - true - - - A CSS style to be applied to the thumbnail for the entry. - thumbnailStyle - false - true - - - A title for the entry. - title - true - true - - - A URL to view the full entry. - url - false - true - - - The current version of the entry. - version - false - true - - - - Creates a navigation list item component for navigating app view entries. - app-view-navigation-entry - com.liferay.taglib.ui.AppViewNavigationEntryTag - empty - - The path for an action JSP page. - actionJsp - false - true - - - A CSS class for styling this component. - cssClass - false - true - - - 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 <String, Object>]]>. - dataView - false - true - java.util.Map - - - A title for the component. - entryTitle - true - true - - - A CSS class for setting the icon of the component. - iconImage - false - true - - - Deprecated as of 7.0.0, replaced by the attribute iconImage]]>. - iconSrc - false - true - - - Whether the entry is selected. - selected - false - true - boolean - - - A URL to view the entry. - viewURL - true - true - - - - Creates a toolbar for viewing items in app view. - app-view-toolbar - com.liferay.taglib.ui.AppViewToolbarTag - JSP - - Whether to include the option to choose a display style for component items. If the value is true]]>, a list of display style options is rendered. The default value is false]]>. - includeDisplayStyle - false - true - boolean - - - Whether to include an option to select all component items. The default value is false]]>. - includeSelectAll - false - true - boolean - - - The file path for a search JSP page. - searchJsp - false - true - - - - Creates a component for displaying search results of entries in app view. - app-view-search-entry - com.liferay.taglib.ui.AppViewSearchEntryTag - empty - - The file path for an action JSP page. - actionJsp - false - true - - - The service context of the actionJsp]]>. - actionJspServletContext - false - true - - - Deprecated as of 7.0.0, with no replacement. - containerIcon - false - true - - - The name of the container that the entry is in, such as the name of a folder. - containerName - false - true - - - Deprecated as of 7.0.0, with no replacement. - containerSrc - false - true - - - The type of container the entry is in, such as Folder]]>. - containerType - false - true - - - A CSS class for styling this component. - cssClass - false - true - - - A description of the entry. - description - true - true - - - A list of objects containing information such as content, user ID, and titles of the entry file attachments. - fileEntryTuples - false - true - - - Whether the entry is able to be highlighted where it matches the query terms. The default value is false]]>. - highlightEnabled - false - true - boolean - - - Whether the entry is locked. The default value is false]]>. - locked - false - true - boolean - - - 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. - mbMessages - false - true - - - Query terms of the search. - queryTerms - true - true - - - A checkbox input ID to be used for the entry row checker. This is a Java long]]>. - rowCheckerId - false - true - - - A name to be used for the entry row checker. - rowCheckerName - false - true - - - Whether the entry is selectable via a checkbox. The default value is true]]>. - showCheckbox - false - true - boolean - - - The current status of the entry as represented by an integer. Options are -1: STATUS_ANY]]>, 0: STATUS_APPROVED]]>, 1: ACTION_PUBLISH]]>, 2: STATUS_DRAFT]]>, and 4: STATUS_DENIED]]>. - status - false - true - - - The URL for an entry thumbnail image. - thumbnailSrc - false - true - - - A title for the entry. - title - true - true - - - A URL used to view the full entry. - url - true - true - - - The current and past versions of the entry. - versions - false - true - - - - asset-add-button - com.liferay.taglib.ui.AssetAddButtonTag - JSP - - - addDisplayPageParameter - false - true - - - allAssetCategoryIds - false - true - - - allAssetTagNames - false - true - - - classNameIds - false - true - - - classTypeIds - false - true - - - groupIds - false - true - - - redirect - false - true - - - - asset-addon-entry-display - com.liferay.taglib.ui.AssetAddonEntryDisplayTag - JSP - - assetAddonEntries - false - true - - - - asset-addon-entry-selector - com.liferay.taglib.ui.AssetAddonEntrySelectorTag - JSP - - assetAddonEntries - false - true - - - hiddenInput - false - true - - - id - false - true - - - selectedAssetAddonEntries - false - true - - - title - false - true - - - - asset-categories-available - com.liferay.taglib.ui.AssetCategoriesAvailableTag - JSP - - className - true - true - - - classPK - true - true - - - - asset-categories-error - com.liferay.taglib.ui.AssetCategoriesErrorTag - JSP - - - asset-categories-navigation - com.liferay.taglib.ui.AssetCategoriesNavigationTag - JSP - - hidePortletWhenEmpty - false - true - - - vocabularyIds - false - true - - - - asset-categories-selector - com.liferay.taglib.ui.AssetCategoriesSelectorTag - JSP - - className - false - true - - - classPK - false - true - - - classTypePK - false - true - - - contentCallback - false - true - - - curCategoryIds - false - true - - - groupIds - false - true - - - hiddenInput - false - true - - - ignoreRequestValue - false - true - - - - asset-categories-summary - com.liferay.taglib.ui.AssetCategoriesSummaryTag - JSP - - className - true - true - - - classPK - true - true - - - message - false - true - - - paramName - false - true - - - portletURL - false - true - - - - asset-display - com.liferay.taglib.ui.AssetDisplayTag - JSP - - abstractLength - false - true - - - assetEntry - false - true - - - assetRenderer - false - true - - - assetRendererFactory - false - true - - - className - false - true - - - classPK - false - true - - - renderer - false - true - - - showComments - false - true - - - showHeader - false - true - - - showExtraInfo - false - true - - - template - false - true - - - viewURL - false - true - - - - asset-links - com.liferay.taglib.ui.AssetLinksTag - JSP - - assetEntryId - false - true - - - className - false - true - - - classPK - false - true - - - - asset-metadata - com.liferay.taglib.ui.AssetMetadataTag - JSP - - className - true - true - - - classPK - true - true - - - filterByMetadata - false - true - - - metadataFields - true - true - - - - asset-tags-available - com.liferay.taglib.ui.AssetTagsAvailableTag - JSP - - className - true - true - - - classPK - true - true - - - - Creates a liferay-ui:error]]> component to display tag-related error messages. - asset-tags-error - com.liferay.taglib.ui.AssetTagsErrorTag - JSP - - - asset-tags-navigation - com.liferay.taglib.ui.AssetTagsNavigationTag - JSP - - classNameId - false - true - - - displayStyle - false - true - - - hidePortletWhenEmpty - false - true - - - maxAssetTags - false - true - - - showAssetCount - false - true - - - showZeroAssetCount - false - true - - - - Creates a Liferay.AssetTagsSelector]]> component to create and select tags to add to an asset, such as a blog entry, bookmark, or wiki page. - asset-tags-selector - com.liferay.taglib.ui.AssetTagsSelectorTag - JSP - - A function to be called when a tag is added. - addCallback - false - true - - - Whether to allow adding new tags to the list of tags. The default value is true]]>. - allowAddEntry - false - true - boolean - - - Whether to automatically focus the tag input field. The default value is false]]>. - autoFocus - false - true - boolean - - - The Java class of the asset. - className - false - true - - - The Java class primary key of an asset to associate with the tags. This is a Java long]]>. - classPK - false - true - - - A function to get tag suggestions based on the asset's content. - contentCallback - false - true - - - The current selected tags. - curTags - false - true - - - The group IDs of the asset tags. - groupIds - false - true - - - The name of the hidden input for passing in the asset's current tags. - hiddenInput - false - true - - - An ID for the component instance. - id - false - true - - - Whether to ignore the request value of the hidden input. The default value is false]]>. - ignoreRequestValue - false - true - boolean - - - A function to be called when a tag is removed. - removeCallback - false - true - - - - Creates a component to display all the tags associated with an asset, such as a blog entry, wiki page, or message boards message. - asset-tags-summary - com.liferay.taglib.ui.AssetTagsSummaryTag - JSP - - An array of the asset tag names. - assetTagNames - false - true - - - The Java class of the asset. - className - true - true - - - The Java class primary key of an asset. This is a Java long]]>. - classPK - true - true - - - A message to display before the tag labels. A standard example is tags]]>, which renders as Tags:]]>. - message - false - true - - - A parameter name for the tags. The default value is tag]]>. - paramName - false - true - - - The URL of a portlet to display the tags. - portletURL - false - true - - - - breadcrumb - com.liferay.taglib.ui.BreadcrumbTag - JSP - - ddmTemplateGroupId - false - true - - - ddmTemplateKey - false - true - - - showCurrentGroup - false - true - - - showGuestGroup - false - true - - - showLayout - false - true - - - showParentGroups - false - true - - - showPortletBreadcrumb - false - true - - - - Creates a calendar with configurable events. - calendar - com.liferay.taglib.ui.CalendarTag - JSP - - A given set of integers, corresponding to a day of the chosen month, and to mark with a dot. - data - false - true - java.util.Set - - - A day of the month to highlight in the calendar. - day - false - true - int - - - A format for the header. - headerFormat - false - true - java.text.Format - - - A pattern for the calendar header. A possible value is MMM/dd/yyyy]]>. - headerPattern - false - true - - - A month of the year to display at the top of the calendar. - month - true - true - int - - - 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 false]]>. - showAllPotentialWeeks - false - true - boolean - - - A year to display at the top of the calendar. - year - true - true - int - - - - Creates an image CAPTCHA with a corresponding verification input. - captcha - com.liferay.taglib.ui.CaptchaTag - JSP - - The source URL for the image CAPTCHA. - url - true - true - - - - categorization-filter - com.liferay.taglib.ui.CategorizationFilterTag - JSP - - assetType - false - true - - - portletURL - false - true - - - - custom-attribute - com.liferay.taglib.ui.CustomAttributeTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - label - false - true - - - name - true - true - - - - custom-attribute-list - com.liferay.taglib.ui.CustomAttributeListTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - ignoreAttributeNames - false - true - - - label - false - true - - - - custom-attributes-available - com.liferay.taglib.ui.CustomAttributesAvailableTag - JSP - - className - true - true - - - classPK - false - true - - - companyId - false - true - - - ignoreAttributeNames - false - true - - - editable - false - true - - - - ddm-template-renderer - com.liferay.taglib.ui.DDMTemplateRendererTag - JSP - - className - true - true - - - contextObjects - false - true - - - displayStyle - true - true - - - displayStyleGroupId - true - true - - - entries - true - true - - - - ddm-template-selector - com.liferay.taglib.ui.DDMTemplateSelectorTag - JSP - - className - true - true - - - defaultDisplayStyle - false - true - - - displayStyle - true - true - - - displayStyleGroupId - true - true - - - displayStyles - false - true - - - icon - false - true - - - label - false - true - - - refreshURL - false - true - - - showEmptyOption - false - true - - - - diff - com.liferay.taglib.ui.DiffTag - JSP - - diffResults - true - true - - - sourceName - true - true - - - targetName - true - true - - - - diff-html - com.liferay.taglib.ui.DiffHtmlTag - JSP - - diffHtmlResults - true - true - - - - diff-version-comparator - com.liferay.taglib.ui.DiffVersionComparatorTag - JSP - - availableLocales - false - true - - - diffHtmlResults - true - true - - - diffVersionsInfo - false - true - - - languageId - false - true - - - portletURL - true - true - - - resourceURL - true - true - - - sourceVersion - true - true - - - targetVersion - true - true - - - - discussion - com.liferay.taglib.ui.DiscussionTag - JSP - - assetEntryVisible - false - true - - - className - true - true - - - classPK - true - true - - - formAction - true - true - - - formName - false - true - - - hideControls - false - true - - - paginationURL - true - true - - - permissionClassName - false - true - - - permissionClassPK - false - true - - - ratingsEnabled - false - true - - - redirect - false - true - - - Deprecated as of 6.2.0, with no direct replacement - subject - false - true - - - userId - true - true - - - - drop-here-info - com.liferay.taglib.ui.DropHereInfoTag - JSP - - message - true - true - - - - email-notification-settings - com.liferay.taglib.ui.EmailNotificationSettingsTag - JSP - - bodyLabel - false - true - - - emailBody - false - true - - - emailDefinitionTerms - false - true - - - emailEnabled - false - true - - - emailParam - false - true - - - emailSubject - false - true - - - fieldPrefix - false - true - - - fieldPrefixSeparator - false - true - - - helpMessage - false - true - - - showEmailEnabled - false - true - - - showSubject - false - true - - - - Creates an error message to display to the user. - error - com.liferay.taglib.ui.ErrorTag - com.liferay.taglib.ui.ErrorTei - JSP - - A class for the exception. - exception - false - true - - - The name of a field on which to focus the error message. - focusField - false - true - - - A key to place in the SessionErrors]]> object to trigger the error message. - key - false - true - - - Explicit message text or a language key name from which to derive text for the message. - message - false - true - - - rowBreak - false - true - - - Whether to translate the message into the user's language. The default value is true]]>. - translateMessage - false - true - boolean - - - - Creates a liferay-ui:header]]> with a back button; it's for displaying above an error message. - error-header - com.liferay.taglib.ui.ErrorHeaderTag - JSP - - - error-marker - com.liferay.taglib.ui.ErrorMarkerTag - JSP - - key - false - true - - - value - false - true - - - - Creates a flag icon that lets users report inappropriate content. - flags - com.liferay.taglib.ui.FlagsTag - JSP - - The flagged asset's Java class name. - className - true - true - - - The flagged asset's entry ID. - classPK - true - true - - - The flagged asset's title. - contentTitle - true - true - - - Whether to show message text as a label next to the flag icon or as a tooltip. The default value is true]]>. - label - false - true - boolean - - - Text to display next to the flag icon. The default text is Flag]]>. - message - false - true - - - The user ID of the user who flagged the asset. - reportedUserId - true - true - - - - flash - com.liferay.taglib.ui.FlashTag - JSP - - align - false - true - - - allowFullScreen - false - true - - - allowScriptAccess - false - true - - - base - false - true - - - bgcolor - false - true - - - devicefont - false - true - - - flashvars - false - true - - - height - false - true - - - id - false - true - - - loop - false - true - - - menu - false - true - - - movie - true - true - - - play - false - true - - - quality - false - true - - - salign - false - true - - - scale - false - true - - - swliveconnect - false - true - - - version - false - true - - - width - false - true - - - wmode - false - true - - - - 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. - form-navigator - com.liferay.taglib.ui.FormNavigatorTag - JSP - - A URL for the form's cancel button. - backURL - false - true - - - The name of each category in the form. - categoryNames - false - true - - - The name of each section within a category. - categorySections - false - true - - - A type of navigation to be used. Options are steps]]> and panel]]>. The default display style is side navigation. - displayStyle - false - true - - - formModelBean - false - true - - - A name for the form. - formName - false - true - - - HTML to append to the navigator. Examples include alternate form buttons, form instructions, or information about the form. - htmlBottom - false - true - - - HTML to prepend to the navigator. - htmlTop - false - true - - - id - false - true - - - A path to the formSection.jsp]]> file's folder /path/to/jsp/folder/]]>. - jspPath - false - true - - - Whether to show the Submit]]> and Cancel]]> buttons. The default value is true]]>. - showButtons - false - true - boolean - - - - group-search - com.liferay.taglib.ui.GroupSearchTag - JSP - - groupParams - true - true - - - portletURL - true - true - - - rowChecker - false - true - - - - group-search-form - com.liferay.taglib.ui.GroupSearchFormTag - JSP - - - Creates a header that displays its text above a horizontal rule accompanied by a configurable back URL button. - header - com.liferay.taglib.ui.HeaderTag - JSP - - Text to display on mouse over of the back URL. The default value is Back]]>. - backLabel - false - true - - - A URL for navigating back to. - backURL - false - true - - - A CSS class for styling the header component. - cssClass - false - true - - - Whether to escape the header's XML tags. The default value is true]]>. - escapeXml - false - true - boolean - - - Whether to translate the header's title]]> into the localized language. The default value is true]]>. - localizeTitle - false - true - boolean - - - Whether to display the back URL. The default value is true]]>. - showBackURL - false - true - boolean - - - A title to display as the header text. - title - true - true - - - - Creates a fully configurable icon that provides access to current Liferay theme icons. - icon - com.liferay.taglib.ui.IconTag - JSP - - A value for the alt]]> attribute of the embedded img]]> tag. - alt - false - true - - - A role for assistive technologies to interpret for HTML elements that have been used for something other than their intended purpose. For example, the <p>]]> tag could be used for something other than a paragraph. - ariaRole - false - true - - - A CSS class for styling the component. - cssClass - false - true - - - Miscellaneous data to be stored via a map. This data is not shared with the browser. The map holds key value pairs of type <String, Object>]]>. - data - false - true - java.util.Map - - - An icon from a Bootstrap icon CSS Class. Note that any image for the image]]> attribute takes precedence. Icon CSS classes to specify for this attribute can be found at http://marcoceppi.github.io/bootstrap-glyphicons/]]>. - iconCssClass - false - true - - - An ID for the component instance. - id - false - true - - - An image for the icon, from the current theme. The value can be the filename prefix of any image file in the theme's common]]> image folder. This image takes precedence over any icon value set via the iconCssClass]]> attribute. - image - false - true - - - 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 common]]> image folder. - imageHover - false - true - - - Whether to display the message]]> attribute's value as the icon's label. - label - false - true - boolean - - - A language to associate with the icon, to assist search engines and web browsers in finding and rendering the icon appropriately. - lang - false - true - - - A CSS class for styling the icon's URL. - linkCssClass - false - true - - - Whether to translate the icon's message]]> into the user's language. - localizeMessage - false - true - boolean - - - Text to be displayed for the icon on mouse over. - message - false - true - - - An HTTP request method. Possible values are get]]> and post]]>. - method - false - true - - - A function to be called on a user clicking the icon. - onClick - false - true - - - The location of an image file to use in the icon. - src - false - true - - - The location of an image file to use on mouse over of the icon. This value takes precedence over the imageHover]]> attribute. This image takes precedence over icons set with the imageHover]]> attribute. - srcHover - false - true - - - A target window in which to open the URL. The default value is self]]>. Possible values are blank]]>, self]]>, parent]]>, top]]>, and a unique frame's name. - target - false - true - - - Whether to use a tooltip. The default value is true]]>. - toolTip - false - true - boolean - - - A URL to navigate to when the icon is clicked. - url - false - true - - - Whether to open the URL in a dialog window. The default value is false]]>. - useDialog - false - true - boolean - - - - Creates an icon to associate with deactivating an item. - icon-deactivate - com.liferay.taglib.ui.IconDeactivateTag - JSP - - Whether to display a message on the icon's label on mouse over of the icon. The default value is false]]>. - label - false - true - boolean - - - A URL navigated to when the icon is clicked. - url - true - true - - - - Creates a configurable icon to associate with deleting or removing an item. - icon-delete - com.liferay.taglib.ui.IconDeleteTag - JSP - - Text to use in place of the text from the default deletion confirmation message language key are-you-sure-you-want-to-delete-this]]>. If the trash]]> attribute is set to true]]>, no confirmation message is shown. - confirmation - false - true - - - A CSS class for styling the component. - cssClass - false - true - - - An ID for the component instance. - id - false - true - - - An image for the icon, from the current theme. The value can be the filename prefix of any image file in the theme's common]]> image folder. The image takes precedence over any default icon images. - image - false - true - - - Whether to display the message]]> attribute's value as the icon's label. The default value is false]]>. - label - false - true - boolean - - - Text to display on mouse over of the icon. - message - false - true - - - An HTTP request method to invoke. Possible values are get]]> and post]]>. - method - false - true - - - Whether to use the trash icon instead of the remove icon. The default value isfalse]]>. - trash - false - true - boolean - - - A URL navigated to when the icon is clicked. - url - true - true - - - - Creates a help icon that displays a custom message as a tooltip on mouse over of the help icon. - icon-help - com.liferay.taglib.ui.IconHelpTag - JSP - - Text to be displayed on mouse over of the icon. - message - true - true - - - - Creates a list of icons from a list of child components. - icon-list - com.liferay.taglib.ui.IconListTag - JSP - - Whether to render the icon list when there is only one child component. The default value is false]]>. - showWhenSingleIcon - false - true - boolean - - - - Creates an icon menu from a list of child components. - icon-menu - com.liferay.taglib.ui.IconMenuTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - A position from which to pop up the icon menu dialog in relation to the trigger. The default direction is left]]>. Possible values are up]]>, down]]>, left]]> or right]]>. - direction - false - true - - - Whether to disable the icon menu. - disabled - false - true - boolean - - - Whether to extend the icon menu trigger by wrapping it in a button. The default value is true]]>. - extended - false - true - boolean - - - The location of an image file to use in the icon. - icon - false - true - - - An ID for the component instance. - id - false - true - - - Whether to translate the message to the user's language. The default value is true]]>. - localizeMessage - false - true - boolean - - - The number of items to show in the icon menu before scrolling. The default value is 15. - maxDisplayItems - false - true - int - - - Text to display next to the icon menu trigger. The default value is actions]]>. - message - false - true - - - Whether to add the select]]> CSS class to the icon menu. If set to true]]>, the selected icon is added to the icon menu's trigger when the icon is selected. The default value is false]]>. - select - false - true - boolean - - - Whether to extend the icon menu by default. The default value is false]]>. - showExpanded - false - true - boolean - - - Whether to show an arrow, indicating a popup dialog, next to the icon menu's trigger icon. The default value is true]]>. - showArrow - false - true - boolean - - - Whether to show the icon menu when there is only one icon. The default value is false]]>. - showWhenSingleIcon - false - true - boolean - - - A CSS class for styling the trigger for the icon menu. The default value is btn btn-default]]>. - triggerCssClass - false - true - - - Whether the icon menu drop-down caret points to the direction set by the direction]]> attribute. - useIconCaret - false - true - boolean - - - - image-selector - com.liferay.taglib.ui.ImageSelectorTag - JSP - - draggableImage - false - true - - - fileEntryId - true - true - - - maxFileSize - false - true - - - paramName - false - true - - - uploadURL - true - true - - - validExtensions - false - true - - - - input-asset-links - com.liferay.taglib.ui.InputAssetLinksTag - JSP - - assetEntryId - false - true - - - className - false - true - - - classPK - false - true - - - - Creates a configurable input checkbox. - input-checkbox - com.liferay.taglib.ui.InputCheckBoxTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - Whether the checkbox is selected by default. - defaultValue - false - true - boolean - - - Whether the checkbox is disabled. - disabled - false - true - boolean - - - A name for the checkbox's form. - formName - false - true - - - An ID for the component instance. - id - false - true - - - A function to be called on a user clicking the checkbox. - onClick - false - true - - - A variable name for the component. - param - true - true - - - - Creates a date input field that displays a calendar for date selection. - input-date - com.liferay.taglib.ui.InputDateTag - JSP - - Whether the date field gets focus by default. The default value is false]]>. - autoFocus - false - true - boolean - - - A CSS class for styling the component. - cssClass - false - true - - - A variable name to refer to the day of the component. - dayParam - false - true - - - A day value to display in the input field. - dayValue - false - true - int - - - Whether to disable the namespace for the component. The default value is false]]>. - disableNamespace - false - true - boolean - - - Whether to disable the input field. The default value is false]]>. - disabled - false - true - boolean - - - A day to set as the first day of the week. The default value is Calendar.SUNDAY - 2]]>. - firstDayOfWeek - false - true - int - - - A date to set as the first selectable date in the datepicker. - firstEnabledDate - false - true - - - A name for the date input's form. - formName - false - true - - - A date to set as the latest selectable date in the datepicker. - lastEnabledDate - false - true - - - A variable name to refer to the combined month and year of the component. - monthAndYearParam - false - true - - - A variable name to refer to the month of the component. - monthParam - false - true - - - The numerical value for a month to display in the input field. Integer values for the month start with 0]]>. - monthValue - false - true - int - - - A name for the date input. - name - false - true - - - Whether the component's values can be set to null. - nullable - false - true - - - A variable name to refer to the year of the component. - yearParam - false - true - - - A year value to display in the input field. - yearValue - false - true - int - - - - Creates an input field for editing rich text. - input-editor - com.liferay.taglib.ui.InputEditorTag - JSP - - allowBrowseDocuments - false - true - - - autoCreate - false - true - - - configKey - false - true - - - A map of configuration parameters. The map holds key value pairs of type <String, String>]]>. - configParams - false - true - java.util.Map - - - contents - false - true - - - The ID of a language for the input editor's text. - contentsLanguageId - false - true - - - A CSS class for styling the component. - cssClass - false - true - - - data - false - true - - - Deprecated as of 7.0.0, replaced by the attribute editorName]]>. - editorImpl - false - true - - - editorName - false - true - - - inlineEdit - false - true - - - inlineEditSaveURL - false - true - - - A map of configuration parameters. The map holds key value pairs of <String, String>]]>. - fileBrowserParams - false - true - java.util.Map - - - height - false - true - - - Deprecated as of 7.0.0, replaced by the attribute contents]]>. - initMethod - false - true - - - A name for the input editor. The default value is editor]]>. - name - false - true - - - A function to be called when the input editor loses focus. - onBlurMethod - false - true - - - A function to be called on a change in the input editor. - onChangeMethod - false - true - - - A function to be called when the input editor gets focus. - onFocusMethod - false - true - - - A function to be called when the input editor initializes. - onInitMethod - false - true - - - Placeholder text to display in the input editor. - placeholder - false - true - - - Whether the field for the input editor is resizable. The default value is true]]>. - resizable - false - true - boolean - - - Whether to enable editing the HTML source code of the content. The default value is true]]>. - showSource - false - true - - - Whether to skip loading resources necessary for the CKEditor. The default value is false]]>. - skipEditorLoading - false - true - boolean - - - A toolbar for the input editor. The default value is liferay]]>. Possible values are bbcode]]>, creole]]>, editInPlace]]>, email]]>, liferay]]>, liferayArticle]]>, phone]]>, simple]]>, and tablet]]>. - toolbarSet - false - true - - - width - false - true - - - - input-field - com.liferay.taglib.ui.InputFieldTag - JSP - - autoComplete - false - true - - - autoFocus - false - true - - - autoSize - false - true - - - bean - false - true - - - cssClass - false - true - - - dateTogglerCheckboxLabel - false - true - - - defaultLanguageId - false - true - - - defaultValue - false - true - - - disabled - false - true - - - field - true - true - - - fieldParam - false - true - - - formName - false - true - - - format - false - true - - - id - false - true - - - ignoreRequestValue - false - true - - - languageId - false - true - - - model - true - true - - - placeholder - false - true - - - - input-localized - com.liferay.taglib.ui.InputLocalizedTag - JSP - - autoFocus - false - true - - - autoSize - false - true - - - availableLocales - false - true - - - cssClass - false - true - - - defaultLanguageId - false - true - - - disabled - false - true - - - displayWidth - false - true - - - fieldPrefix - false - true - - - fieldPrefixSeparator - false - true - - - formName - false - true - - - id - false - true - - - ignoreRequestValue - false - true - - - languageId - false - true - - - maxLength - false - true - - - name - true - true - - - toolbarSet - false - true - - - type - false - true - - - xml - true - true - - true - - - Creates an input move boxes component comprised of two columns of key value pairs that can be rearranged. - input-move-boxes - com.liferay.taglib.ui.InputMoveBoxesTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - A name for the left box. - leftBoxName - true - true - - - A list of key value pairs for the left box. - leftList - true - true - java.util.List - - - A function to be called on a change in selection in the left list. - leftOnChange - false - true - - - Whether the left list can be reordered. The default value is false]]>. - leftReorder - false - true - boolean - - - A title to display at the top of the right box. - leftTitle - true - true - - - A name for the right box. - rightBoxName - true - true - - - A list of key value pairs for the right box. - rightList - true - true - java.util.List - - - A function to be called on a change in selection in the right list. - rightOnChange - false - true - - - Whether the right list can be reordered. The default value is false]]>. - rightReorder - false - true - boolean - - - A title to display at the top of the right box. - rightTitle - true - true - - - - input-permissions - com.liferay.taglib.ui.InputPermissionsTag - JSP - - formName - false - true - - - modelName - false - true - - - - input-permissions-params - com.liferay.taglib.ui.InputPermissionsParamsTag - JSP - - modelName - true - true - - - - input-repeat - com.liferay.taglib.ui.InputRepeatTag - JSP - - cssClass - false - true - - - event - false - true - - - - input-resource - com.liferay.taglib.ui.InputResourceTag - JSP - - cssClass - false - true - - - id - false - true - - - title - false - true - - - url - true - true - - - - input-scheduler - com.liferay.taglib.ui.InputSchedulerTag - JSP - - - Creates a configurable search box. - input-search - com.liferay.taglib.ui.InputSearchTag - JSP - - Whether the search field gets focus by default. The default value is false]]>. - autoFocus - false - true - boolean - - - A text value for the search button's label. The default value is Search]]>. - buttonLabel - false - true - - - A CSS class for styling the component. - cssClass - false - true - - - An ID for the component instance. The default value is displayTerms.KEYWORDS]]>. - id - false - true - - - A name for the search box. The default value is displayTerms.KEYWORDS]]>. - name - false - true - - - Placeholder text for the search field. The default value is the value of the buttonLabel]]> attribute. - placeholder - false - true - - - Whether to show the search button. The default value is true]]>. - showButton - false - true - boolean - - - A title for the search box. - title - false - true - - - Whether to use a namespace with the search button. The default value is true]]>. - useNamespace - false - true - boolean - - - - Creates a select input component with yes or no options. - input-select - com.liferay.taglib.ui.InputSelectTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - Whether to select yes]]> as the input's default value. - defaultValue - false - true - boolean - - - Whether to disable input. - disabled - false - true - boolean - - - A name for the input select's form. - formName - false - true - - - A variable name for the component. - param - true - true - - - - Creates a configurable text area input field. - input-textarea - com.liferay.taglib.ui.InputTextAreaTag - JSP - - A CSS class for styling the component. - cssClass - false - true - - - Text to display in the text area. - defaultValue - false - true - - - Whether to disable input. The default value is false]]>. - disabled - false - true - boolean - - - A variable name for the component. - param - true - true - - - - Creates a time input field that provides a scrollable dropdown list of hours, in intervals designated by the minuteInterval]]> attribute. - input-time - com.liferay.taglib.ui.InputTimeTag - JSP - - The name of the AM/PM parameter for the time input. An acceptable value is ampm]]>. - amPmParam - true - true - - - A time to AM or PM. Acceptable values are 0]]> for AM and 1]]> for PM. The default value is 0]]>. - amPmValue - false - true - int - - - A CSS class for styling the time input. - cssClass - false - true - - - A date parameter for the time input. An acceptable value is date]]>. - dateParam - false - true - - - A date to associate with the time displayed. - dateValue - false - true - java.util.Date - - - Whether the input field is disabled. - disabled - false - true - boolean - - - The name of the hour parameter for the component. An acceptable value is hour]]>. - hourParam - true - true - - - An hour value for the time displayed. The default value is 12]]>. - hourValue - false - true - int - - - A minute interval displayed in the input. The default value is 30]]>. - minuteInterval - false - true - int - - - The name of the minute parameter for the component. An acceptable value is minute]]>. - minuteParam - true - true - - - A minute value for the time displayed. The default value is 00]]>. - minuteValue - false - true - int - - - A name for the time input. - name - false - true - - - - Creates a configurable timezone drop-down menu. - input-time-zone - com.liferay.taglib.ui.InputTimeZoneTag - JSP - - Whether the field gets focus by default. - autoFocus - false - true - boolean - - - A CSS class for styling the component. - cssClass - false - true - - - Whether to consider daylight savings for the times. The default value is true]]>. - daylight - false - true - boolean - - - Whether the field is disabled. - disabled - false - true - boolean - - - A style number corresponding to the time zone. A value of 0]]> displays the time zone's abbreviated name and a value of 1]]> displays its full name, e.g. "Pacific Standard Time." The default value is 0]]>. - displayStyle - false - true - int - - - A name for the component. - name - true - true - - - Whether the times can be null. - nullable - false - true - boolean - - - The ID of a time zone to associate with the component. For example, setting the value to PST]]> associates the component with the Pacific Standard Time zone. - value - false - true - - - - item-selector-browser - com.liferay.taglib.ui.ItemSelectorBrowserTag - JSP - - displayStyle - false - true - - - idPrefix - true - true - - - searchContainer - true - true - - - tabName - true - true - - - uploadMessage - false - true - - - - journal-article - com.liferay.taglib.ui.JournalArticleTag - JSP - - articleId - false - true - - - articlePage - false - true - - - articleResourcePrimKey - false - true - - - groupId - false - true - - - languageId - false - true - - - portletRequestModel - false - true - - - showAvailableLocales - false - true - - - showTitle - false - true - - - ddmTemplateKey - false - true - - - - journal-content-search - com.liferay.taglib.ui.JournalContentSearchTag - JSP - - showListed - false - true - - - targetPortletId - false - true - - - - language - com.liferay.taglib.ui.LanguageTag - JSP - - ddmTemplateGroupId - false - true - - - ddmTemplateKey - false - true - - - displayCurrentLocale - false - true - - - formAction - false - true - - - formName - false - true - - - languageId - false - true - - - languageIds - false - true - - - name - false - true - - - Whether to use a namespace in the tag. The default value is true]]>. - useNamespace - false - true - boolean - - - - layouts-tree - com.liferay.taglib.ui.LayoutsTreeTag - JSP - - checkContentDisplayPage - false - true - - - defaultStateChecked - false - true - - - draggableTree - false - true - - - expandFirstNode - false - true - - - groupId - false - true - - - incomplete - false - true - - - portletURL - false - true - - - privateLayout - false - true - - - rootNodeName - false - true - - - saveState - false - true - - - selectableTree - false - true - - - selectedLayoutIds - false - true - - - selPlid - false - true - - - treeId - false - true - - - - logo-selector - com.liferay.taglib.ui.LogoSelectorTag - JSP - - currentLogoURL - false - true - - - defaultLogo - false - true - - - defaultLogoURL - false - true - - - editLogoFn - false - true - - - logoDisplaySelector - false - true - - - maxFileSize - false - true - - - showBackground - false - true - - - tempImageFileName - false - true - - - - map - com.liferay.taglib.ui.MapTag - JSP - - apiKey - false - true - - - geolocation - false - true - - - latitude - false - true - - - longitude - false - true - - - name - false - true - - - points - false - true - - - provider - false - true - - - - menu - com.liferay.taglib.ui.MenuTag - JSP - - menu - true - true - - - - menu-item - com.liferay.taglib.ui.MenuItemTag - JSP - - menuItem - true - true - - - - membership-policy-error - com.liferay.taglib.ui.MembershipPolicyErrorTag - JSP - - - Creates a message to display to the user. - message - com.liferay.taglib.ui.MessageTag - JSP - - Arguments for the language key, if the language key is configured to recieve arguments. - arguments - false - true - - - Whether to escape the language key value so that it is safe to use in HTML. - escape - false - true - boolean - - - escapeAttribute - false - true - boolean - - - The name of a language key from which to derive the message to be displayed. - key - true - true - - - Whether to translate the language key value into the user's language. The default value is true]]>. - localizeKey - false - true - boolean - - - Whether to translate the arguments into the user's language. The default value is true]]>. - translateArguments - false - true - boolean - - - unicode - false - true - boolean - - - - my-sites - com.liferay.taglib.ui.MySitesTag - JSP - - classNames - false - true - - - cssClass - false - true - - - includeControlPanel - false - true - - - max - false - true - - - - navigation - com.liferay.taglib.ui.NavigationTag - JSP - - bulletStyle - false - true - - - displayStyleDefinition - false - true - - - headerType - false - true - - - includedLayouts - false - true - - - nestedChildren - false - true - - - preview - false - true - - - rootLayoutLevel - false - true - - - rootLayoutType - false - true - - - - organization-search-form - com.liferay.taglib.ui.OrganizationSearchFormTag - JSP - - - Creates a page iterator for paginating through lists of items. - page-iterator - com.liferay.taglib.ui.PageIteratorTag - JSP - - Which page of items to display (e.g., first, second, third, etc.). - cur - true - true - int - - - A variable name to refer to the cur]]> value of the component. - curParam - true - true - - - The number of items to display per page. - delta - false - true - int - - - Whether the user can choose the number of items displayed per page. The default value is false]]>. - deltaConfigurable - false - true - boolean - - - A variable name to refer to the delta value of the component. - deltaParam - false - true - - - A name for the form. - formName - false - true - - - An ID for the component instance. - id - false - true - - - JavaScript to be called when the first]]>, previous]]>, next]]>, or last]]> links are clicked if the URL property is not set. - jsCall - false - true - - - A maximum number of pages to iterate through. - maxPages - false - true - int - - - A target for the first]]>, previous]]>, next]]>, and last]]> link buttons. - target - false - true - - - The total number of items in the iterator. - total - true - true - int - - - A type of iterator to display. Options are approximate]]>, article]]>, more]]>, and regular]]>. - type - false - true - - - A base URL for the iterator. Parameters are added to and removed from this URL as the user navigates through pages. - url - false - true - - - - Creates a collapsible panel for housing content. - panel - com.liferay.taglib.ui.PanelTag - JSP - - Whether the panel can be collapsed. The default value is true]]>. - collapsible - false - true - boolean - - - A CSS class for styling the component. - cssClass - false - true - - - A default state for the component. Possible values are open]]> and any string other than open. Any string other than open]]> collapses the panel. The default value is open]]>. - defaultState - false - true - - - Whether the panel is extended. The default value is false]]>. - extended - false - true - boolean - - - Text to display as a help tool tip on mouse over of the panel's help icon. - helpMessage - false - true - - - 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 http://marcoceppi.github.io/bootstrap-glyphicons/]]>. - iconCssClass - false - true - - - An ID for the component instance. - id - false - true - - - The ID of the component that contains the panel. If a liferay-ui:panel-container]]> is used as the container for the panel, its ID is used as the value for the parentID]]>. - parentId - false - true - - - Whether to remember the component's state and persist it to the database. The default value is false]]>. - persistState - false - true - boolean - - - A state for the component. Possible values are open]]> and any string other than open. Any string other than open]]> collapses the panel. - state - false - true - - - A title to display at the top of the panel. - title - true - true - - - - Creates a collapsible container to house liferay-ui:panel]]> components. - panel-container - com.liferay.taglib.ui.PanelContainerTag - JSP - - 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 false]]>. - accordion - false - true - boolean - - - A CSS class for styling the component. - cssClass - false - true - - - Whether to extend the interface with additional styling. The default value is false]]>. - extended - false - true - boolean - - - An ID for the component instance. - id - false - true - - - Whether to remember the component's state and persist it to the database. The default value is false]]>. - persistState - false - true - boolean - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - Renders a PNG image with the source given for the image]]> attribute. - png-image - com.liferay.taglib.ui.PngImageTag - JSP - - The height of the image in pixels. A possible value would be 16]]>. px]]> is then appended to the end of the value. - height - true - true - int - - - The location of a PNG image file to use. - image - true - true - - - The height of the image in pixels. A possible value would be 16]]>. px]]> is then appended to the end of the value. - width - true - true - int - - - - progress - com.liferay.taglib.ui.ProgressTag - JSP - - height - false - true - - - id - true - true - - - message - false - true - - - sessionKey - true - true - - - updatePeriod - false - true - - - - ratings - com.liferay.taglib.ui.RatingsTag - JSP - - className - true - true - - - classPK - true - true - - - numberOfStars - false - true - - - ratingsEntry - false - true - - - ratingsStats - false - true - - - round - false - true - - - type - false - true - - - url - false - true - - - - ratings-score - com.liferay.taglib.ui.RatingsScoreTag - JSP - - score - true - true - - - - restore-entry - com.liferay.taglib.ui.RestoreEntryTag - JSP - - overrideMessage - false - true - - - renameMessage - false - true - - - restoreURL - true - true - - - - Creates a clickable link and/or icon to an RSS feed document. - rss - com.liferay.taglib.ui.RSSTag - JSP - - A default maximum number of items to display. The default value is 20]]>. - delta - false - true - int - - - A default style to display. - displayStyle - false - true - - - A default format for the RSS feed. Options are atom_1.0]]>, rss_1.0]]>, and rss_2.0]]>. - feedType - false - true - - - A message to display next to the RSS icon. - message - false - true - - - A name for the RSS feed. - name - false - true - - - A URL from which to retrieve feed information. - resourceURL - false - true - - - The URL for an RSS feed file. - url - false - true - - - - Creates a configuration component for users to define RSS settings, such as how many articles to display. - rss-settings - com.liferay.taglib.ui.RSSSettingsTag - JSP - - A default maximum number of items to display. The default value is 20]]>. - delta - false - true - int - - - A default style to display. - displayStyle - false - true - - - Available RSS display styles from which the user can choose. Options are abstract]]>, full-content]]>, and title]]>. - displayStyles - false - true - - - Whether users are able to subscribe. Default value is false]]>. - enabled - false - true - boolean - - - A default format for the RSS feed. Options are atom_1.0]]>, rss_1.0]]>, and rss_2.0]]>. - feedType - false - true - - - A name for the component. - name - false - true - - - Whether the RSS feed has a name. The default value is false]]>. - nameEnabled - false - true - boolean - - - - Creates a search form, with an additional select input to set the scope of the search. - search - com.liferay.taglib.ui.SearchTag - JSP - - - Creates a grid for displaying a list of objects and their properties. - search-container - com.liferay.taglib.ui.SearchContainerTag - com.liferay.taglib.ui.SearchContainerTei - JSP - - A variable for the search container's pagination. Different pagination variables ensure independent pagination when multiple search containers are on a JSP. - curParam - false - true - - - The number of items to show on each search container page. - delta - false - true - int - - - The delta]]> attribute as configurable by users. - deltaConfigurable - false - true - - - deltaParam - false - true - - - displayTerms - false - true - - - A message displayed when the search container is empty. - emptyResultsMessage - false - true - - - headerNames - false - true - - - hover - false - true - - - id - false - true - - - iteratorURL - false - true - - - orderByCol - false - true - - - orderByColParam - false - true - - - orderByComparator - false - true - - - An order type for the columns, either ascending or descending. Values are asc]]> or desc]]>. - orderByType - false - true - - - orderByTypeParam - false - true - - - Inserts a checkbox column in the search container. Value must be a RowChecker]]> object. - rowChecker - false - true - - - searchContainer - false - true - - - searchTerms - false - true - - - The total number of objects in the search container. - total - false - true - int - - - A variable name for the results of the total]]> attribute. The default is total]]>. - totalVar - false - true - - - A variable name for the SearchContainer]]> object. The default is searchContainer]]>. - var - false - true - - - - search-container-column-button - com.liferay.taglib.ui.SearchContainerColumnButtonTag - JSP - - align - false - true - - - colspan - false - true - - - cssClass - false - true - - - href - true - true - - - index - false - true - - - name - false - true - - - valign - false - true - - - - Creates a date column in a search container. - search-container-column-date - com.liferay.taglib.ui.SearchContainerColumnDateTag - JSP - - A horizontal alignment for the column contents. The default is left]]>. - align - false - true - - - The number of columns to span. The default is 1]]>. - colspan - false - true - int - - - A CSS class for styling the column. - cssClass - false - true - - - A URL for the items in the column. - href - false - true - - - index - false - true - - - A name for the column. - name - false - true - - - Whether to set the column as sortable. The default value is false]]>. - orderable - false - true - boolean - - - An object's property by which to sort the column. - orderableProperty - false - true - - - A property to request from the row object. - property - false - true - - - A vertical alignment for the column contents. The default is middle]]>. - valign - false - true - - - A value for the column. - value - false - true - - - - Creates a column in a search container with the contents of a JSP file. - search-container-column-jsp - com.liferay.taglib.ui.SearchContainerColumnJSPTag - JSP - - A horizontal alignment for the column contents. The default is left]]>. - align - false - true - - - The number of columns to span. The default is 1]]>. - colspan - false - true - int - - - A CSS class for styling the column. - cssClass - false - true - - - index - false - true - - - name - false - true - - - The JSP file's location. - path - true - true - - - valign - false - true - - - - Creates a column in a search container for the workflow status. - search-container-column-status - com.liferay.taglib.ui.SearchContainerColumnStatusTag - JSP - - A horizontal alignment for the column contents. The default is left]]>. - align - false - true - - - The number of columns to span. The default is 1]]>. - colspan - false - true - int - - - A CSS class for styling the column. - cssClass - false - true - - - A URL for the column's contents. - href - false - true - - - index - false - true - - - name - false - true - - - Whether to set the column as sortable. The default value is false]]>. - orderable - false - true - boolean - - - An object's property by which to sort the column. - orderableProperty - false - true - - - An object's property to use for the column. - property - false - true - - - A vertical alignment for the column contents. The default is middle]]>. - valign - false - true - - - A workflow status for the item. - status - false - true - - - statusByUserId - false - true - - - statusDate - false - true - - - - Creates a text column in a search container. - search-container-column-text - com.liferay.taglib.ui.SearchContainerColumnTextTag - com.liferay.taglib.ui.SearchContainerColumnTextTei - JSP - - A horizontal alignment for the column contents. - align - false - true - - - A string buffer variable for constructing a URL in a scriptlet. - buffer - false - true - - - The number of columns to span. The default is 1]]>. - colspan - false - true - int - - - A CSS class for styling the column. - cssClass - false - true - - - href - false - true - - - index - false - true - - - name - false - true - - - Whether to set the column as sortable. The default value is false]]>. - orderable - false - true - boolean - - - An object's property by which to sort the column. - orderableProperty - false - true - - - property - false - true - - - target - false - true - - - title - false - true - - - Whether to automatically translate values. The default value is false]]>. - translate - false - true - boolean - - - A vertical alignment for the column contents. The default is middle]]>. - valign - false - true - - - value - false - true - - - - search-container-column-user - com.liferay.taglib.ui.SearchContainerColumnUserTag - JSP - - align - false - true - - - colspan - false - true - - - cssClass - false - true - - - date - false - true - - - href - false - true - - - index - false - true - - - name - false - true - - - orderable - false - true - - - orderableProperty - false - true - - - property - false - true - - - userId - false - true - - - valign - false - true - - - - The list of objects to display in the search container. - search-container-results - com.liferay.taglib.ui.SearchContainerResultsTag - com.liferay.taglib.ui.SearchContainerResultsTei - JSP - - A list of objects to display in the search container. - results - false - true - - - A variable to use for the results. - resultsVar - false - true - - - Deprecated as of 6.2.0, replaced by the liferay-aui:search-container]]> attribute total]]>. - total - false - true - - - Deprecated as of 6.2.0, replaced by the liferay-aui:search-container]]> attribute totalVar]]>. - totalVar - false - true - - - - Creates rows in the search container for each object returned by liferay-ui:search-container-results]]>. - search-container-row - com.liferay.taglib.ui.SearchContainerRowTag - com.liferay.taglib.ui.SearchContainerRowTei - JSP - - bold - false - true - - - The class name of the objects to display in rows. - className - true - true - - - The returned model instances as HTML escaped. - escapedModel - false - true - - - A variable name to use for the rows' index. - indexVar - false - true - - - A property to use as the primary key for the object type in the className]]> attribute. - keyProperty - false - true - - - A variable name to use for each object as the search container iterates through the objects returned by liferay-ui:search-container-results]]>. - modelVar - false - true - - - A model property to use as the row ID. - rowIdProperty - false - true - - - A variable name to use for the rows. - rowVar - false - true - - - servletContext - false - true - - - stringKey - false - true - - - - Creates parameters for rows in the search container. The liferay-ui:search-container-row]]> tag is required. - search-container-row-parameter - com.liferay.taglib.ui.SearchContainerRowParameterTag - JSP - - A name for the row parameter. - name - true - true - - - A value for the row parameter. - value - true - true - - - - search-form - com.liferay.taglib.ui.SearchFormTag - JSP - - page - true - true - - - searchContainer - false - true - - - servletContext - false - true - - - showAddButton - false - true - - - - Creates a search results page iterator with an optional paginator. - search-iterator - com.liferay.taglib.ui.SearchIteratorTag - JSP - - Whether to add a liferay-ui:search-paginator]]> to the search container. The default value is true]]>. - paginate - false - true - boolean - - - All configurable properties of the search container, such as cur]]> and curParam]]>. These properties are set with searchContainer.getCur()]]> and searchContainer.getCurParam()]]> respectively. - searchContainer - false - true - - - A type of iterator to display. Options are approximate]]>, article]]>, more]]>, and regular]]>. - type - false - true - - - - Creates a page iterator to paginate through search results - search-paginator - com.liferay.taglib.ui.SearchPaginatorTag - JSP - - An ID for the component instance. - id - false - true - - - All configurable porperties of the search container, such as cur]]> and curParam]]>. These properties are set with searchContainer.getCur()]]> and searchContainer.getCurParam()]]> respectively. - searchContainer - true - true - - - A type of iterator to display. Options are approximate]]>, article]]>, more]]>, and regular]]>. - type - false - true - - - - search-speed - com.liferay.taglib.ui.SearchSpeedTag - JSP - - hits - true - true - - - searchContainer - true - true - - - - Creates a search instance that can be toggled between basic and advanced search. - search-toggle - com.liferay.taglib.ui.SearchToggleTag - JSP - - Whether the search input field is automatically focused. The default value is false]]>. - autoFocus - false - true - boolean - - - A label for the search button such as Search]]> or Go]]>. - buttonLabel - false - true - - - Terms to be used and displayed through the search instance. Term examples include keywords]]>, advancedSearch]]>, and description]]>. - displayTerms - true - true - - - An ID for the component instance. - id - true - true - - - - section - com.liferay.taglib.ui.SectionTag - com.liferay.taglib.ui.SectionTei - JSP - - - sites-directory - com.liferay.taglib.ui.SitesDirectoryTag - JSP - - displayStyle - false - true - - - sites - false - true - - - - social-activities - com.liferay.taglib.ui.SocialActivitiesTag - JSP - - activities - false - true - - - className - false - true - - - classPK - false - true - - - displayRSSFeed - false - true - - - feedDelta - false - true - - - feedDisplayStyle - false - true - - - feedEnabled - false - true - - - feedLink - false - true - - - feedLinkMessage - false - true - - - feedTitle - false - true - - - feedType - false - true - - - - social-bookmark - com.liferay.taglib.ui.SocialBookmarkTag - JSP - - contentId - false - true - - - icon - false - true - - - displayStyle - false - true - - - target - false - true - - - title - true - true - - - type - true - true - - - url - true - true - - - - social-bookmarks - com.liferay.taglib.ui.SocialBookmarksTag - JSP - - contentId - false - true - - - displayStyle - false - true - - - target - false - true - - - title - true - true - - - types - false - true - - - url - true - true - - - - social-bookmarks-settings - com.liferay.taglib.ui.SocialBookmarksSettingsTag - JSP - - displayPosition - false - true - - - displayStyle - false - true - - - enabled - false - true - - - types - false - true - - - - Creates a success message to display to the user. - success - com.liferay.taglib.ui.SuccessTag - empty - - A key to be placed in the SessionMessages]]> object to trigger the success message. - key - true - true - - - Explicit message text or the name of a language key from which to derive the message text. - message - true - true - - - Whether to translate the success message into the user's language. The default value is true]]>. - translateMessage - false - true - boolean - - - - table-iterator - com.liferay.taglib.ui.TableIteratorTag - com.liferay.taglib.ui.TableIteratorTei - JSP - - bodyPage - false - true - - - list - true - true - - - listType - true - true - - - rowBreak - false - true - - - rowLength - true - true - - - rowPadding - false - true - - - rowValign - false - true - - - width - false - true - - - - Creates a tabbed UI of section dividers that each house their own content. - tabs - com.liferay.taglib.ui.TabsTag - JSP - - - A label for the back URL. - backLabel - false - true - - - A URL for navigating back to. - backURL - false - true - - - A name for the tab's form. - formName - false - true - - - The names of the tabs. Each name must be separated by a comma with no spaces. - names - true - true - - - A function to be called on a user clicking any of the tabs. - onClick - false - true - - - A variable for the component. - param - false - true - - - A URL to refer to the portlet that contains the component. - portletURL - false - true - - - Whether the page refreshes when a tab is clicked. - refresh - false - true - boolean - - - Tab values that must follow the same order as the names]]> attribute. Each value must be separated by a comma with no spaces. - tabsValues - false - true - - - A design type for the tabs. Possible values are tabs]]> and pills]]>. - type - false - true - - - A URL to which all the tabs are linked when clicked. You can also set each tab's URL individually using url[number]]]> attribute. - url - false - true - - - urls - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url0 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url1 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url2 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url3 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url4 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url5 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url6 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url7 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url8 - false - true - - - Deprecated as of 7.0.0, replaced by the attribute urls]]>. - url9 - false - true - - - An active tab from the value given in the attribute tabsValues]]>. No matter which tab a user selects, the tab given for this value always remains active. - value - false - true - - - - Creates a component that toggles the visibility of the content of the component matching the given id]]>. Default icons are used as the component's default mechanism for showing and hiding the content. - toggle - com.liferay.taglib.ui.ToggleTag - JSP - - Whether to initially show content by default. The default value is true]]>. - defaultShowContent - false - true - boolean - - - 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. - hideImage - false - true - - - Text to display as a link for hiding the content. It overrides the hideImage]]> attribute. Note that the showMessage]]> attribute must also be configured in order for the hide message to render. - hideMessage - false - true - - - The ID of a component instance whose content's visibility to toggle. - id - true - true - - - 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. - showImage - false - true - - - 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 showImage]]> attribute. If you specify a showMessage]]> attribute, you should also specify the hideMessage]]> attribute; a null]]> is otherwise displayed for the text of the hide link. - showMessage - false - true - - - Text to be prefixed to the Toggle()]]> function that is called to toggle visibility of the content. If this is not configured, a random key is generated and prefixed to the Toggle()]]> function. For example, a value of run]]> would result in a function named runToggle()]]>. - stateVar - false - true - - - - toggle-area - com.liferay.taglib.ui.ToggleAreaTag - JSP - - align - false - true - - - defaultShowContent - false - true - - - hideImage - false - true - - - hideMessage - false - true - - - id - false - true - - - showImage - false - true - - - showMessage - false - true - - - stateVar - false - true - - - - toggle-value - com.liferay.taglib.ui.ToggleValueTag - JSP - - defaultValue - false - true - - - id - true - true - - - - toolbar-item - com.liferay.taglib.ui.ToolbarItemTag - JSP - - toolbarItem - true - true - - - var - true - true - - - - Creates a component for users to permanently delete items such as images, articles, etc. from the recycle bin. - trash-empty - com.liferay.taglib.ui.TrashEmptyTag - empty - - A message to display to confirm that the user wants to remove the item(s) from the recycle bin. - confirmMessage - false - true - - - A message to be used for the empty-trash]]> button and link. - emptyMessage - false - true - - - A message to display to give users information about removing items from the recycle bin. - infoMessage - false - true - - - A URL for the empty-trash]]> button/link. - portletURL - true - true - - - The number of items to be removed from the recycle bin. - totalEntries - true - true - int - - - - Creates a message confirming items were moved to the recycle bin and presenting an option to restore them. - trash-undo - com.liferay.taglib.ui.TrashUndoTag - empty - - The URL of the undo link. - portletURL - true - true - - - A redirect URL. - redirect - false - true - - - - quick-access - com.liferay.taglib.ui.QuickAccessTag - JSP - - contentId - false - true - - - - quick-access-entry - com.liferay.taglib.ui.QuickAccessEntryTag - JSP - - label - false - true - - - onClick - false - true - - - url - false - true - - - - upload-progress - com.liferay.taglib.ui.UploadProgressTag - JSP - - height - false - true - - - id - true - true - - - message - false - true - - - redirect - false - true - - - updatePeriod - false - true - - - - user-display - com.liferay.taglib.ui.UserDisplayTag - com.liferay.taglib.ui.UserDisplayTei - JSP - - author - false - true - - - displayStyle - false - true - - - imageCssClass - false - true - - - showUserDetails - false - true - - - showUserName - false - true - - - url - false - true - - - userId - true - true - - - userName - false - true - - - - user-group-search-form - com.liferay.taglib.ui.UserGroupSearchFormTag - JSP - - - user-search - com.liferay.taglib.ui.UserSearchTag - JSP - - portletURL - true - true - - - rowChecker - false - true - - - userParams - true - true - - - - user-search-form - com.liferay.taglib.ui.UserSearchFormTag - JSP - - - webdav - com.liferay.taglib.ui.WebDAVTag - JSP - - path - true - true - - - - write - com.liferay.taglib.ui.WriteTag - JSP - - bean - true - true - - - property - true - true - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-util.tld b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-util.tld deleted file mode 100644 index 73e0fc2916..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/tld/liferay-util.tld +++ /dev/null @@ -1,156 +0,0 @@ - - - - - 1.2 - 1.1 - liferay-util - http://liferay.com/tld/util - - body-bottom - com.liferay.taglib.util.BodyBottomTag - JSP - - outputKey - false - true - - - - body-top - com.liferay.taglib.util.BodyTopTag - JSP - - outputKey - false - true - - - - buffer - com.liferay.taglib.util.BufferTag - com.liferay.taglib.util.BufferTei - JSP - - var - true - true - - - - dynamic-include - com.liferay.taglib.util.DynamicIncludeTag - scriptless - - ascendingPriority - false - true - - - key - true - true - - - - get-url - com.liferay.taglib.util.GetUrlTag - com.liferay.taglib.util.GetUrlTei - JSP - - expires - false - true - - - url - true - true - - - var - false - true - - - - html-bottom - com.liferay.taglib.util.HtmlBottomTag - JSP - - outputKey - false - true - - - position - false - true - - - - html-top - com.liferay.taglib.util.HtmlTopTag - JSP - - outputKey - false - true - - - position - false - true - - - - include - com.liferay.taglib.util.IncludeTag - JSP - - page - true - true - - - portletId - false - true - - - servletContext - false - true - - - strict - false - true - - - useCustomPage - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - whitespace-remover - com.liferay.taglib.util.WhitespaceRemoverTag - JSP - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/web.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/web.xml deleted file mode 100644 index 1aa8cdb8d7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/css/main.css b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/css/main.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/icon.png b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/icon.png deleted file mode 100644 index 807b862cfc..0000000000 Binary files a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/icon.png and /dev/null differ diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/js/main.js b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/js/main.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/view.jsp b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/view.jsp deleted file mode 100644 index a258275a9e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/projects/test-portlet71/docroot/view.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<% -/** - * 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. - */ -%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - - - -This is the Test portlet. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/DeprecatedInvokableServiceInterface/InvokableServiceInterfaceTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/DeprecatedInvokableServiceInterface/InvokableServiceInterfaceTest.java deleted file mode 100644 index 96c6b09ea0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/DeprecatedInvokableServiceInterface/InvokableServiceInterfaceTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 DeprecatedInvokableServiceInterface; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class InvokableServiceInterfaceTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.DeprecatedInvokableServiceInterface"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/InvokableServiceInterfaceImplementeTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIButtonItemTagsAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIButtonItemTagsAutoCorrectTest.java deleted file mode 100644 index cb76306f32..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIButtonItemTagsAutoCorrectTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectJSPTagTestBase; - -import java.io.File; - -import java.util.Collections; -import java.util.List; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AUIButtonItemTagsAutoCorrectTest extends AutoCorrectJSPTagTestBase { - - @Override - public List getCheckPoints() { - return Collections.singletonList("3,"); - } - - @Override - public String getImplClassName() { - return "AUIButtonItemTags"; - } - - @Override - public File getOriginalTestFile() { - return new File("jsptests/aui-button/AUIButtonItemTagTest.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIButtonItemTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIButtonItemTagsTest.java deleted file mode 100644 index 7f17d33d9b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIButtonItemTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AUIButtonItemTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/aui-button/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 2, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("AUIButtonItemTagTest.jsp")) { - if ((problem.getLineNumber() == 3) && (problem.getStartOffset() >= 94) && (problem.getEndOffset() >= 129)) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIColumnTagsAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIColumnTagsAutoCorrectTest.java deleted file mode 100644 index 302e7d7a91..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIColumnTagsAutoCorrectTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectJSPTagTestBase; - -import java.io.File; - -import java.util.Collections; -import java.util.List; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AUIColumnTagsAutoCorrectTest extends AutoCorrectJSPTagTestBase { - - @Override - public List getCheckPoints() { - return Collections.singletonList( - "2,\" first=\"<%= true %>\">"); - } - - @Override - public String getImplClassName() { - return "AUIColumnTags"; - } - - @Override - public File getOriginalTestFile() { - return new File("jsptests/aui-column/AUIColumnTagTest.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIColumnTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIColumnTagsTest.java deleted file mode 100644 index 0fe3908d8f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUIColumnTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AUIColumnTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/aui-column/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 2, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("AUIColumnTagTest.jsp")) { - if ((problem.getLineNumber() == 2) && (problem.getStartOffset() >= 58) && (problem.getEndOffset() >= 461)) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUILayoutTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUILayoutTagsTest.java deleted file mode 100644 index fe384897bf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUILayoutTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AUILayoutTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/aui-layout/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("AUILayoutTagTest.jsp")) { - if (problem.getLineNumber() == 1) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUILiferayTagsAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUILiferayTagsAutoCorrectTest.java deleted file mode 100644 index e4b9da459b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUILiferayTagsAutoCorrectTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectJSPTagTestBase; - -import java.io.File; - -import java.util.Collections; -import java.util.List; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AUILiferayTagsAutoCorrectTest extends AutoCorrectJSPTagTestBase { - - @Override - public List getCheckPoints() { - return Collections.singletonList("1,<%@ taglib uri=\"http://liferay.com/tld/aui\" prefix=\"aui\" %>"); - } - - @Override - public String getImplClassName() { - return "AUILiferayTags"; - } - - @Override - public File getOriginalTestFile() { - return new File("jsptests/aui-liferay/AUILiferayTagTest.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUILiferayTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUILiferayTagsTest.java deleted file mode 100644 index 7369ea799e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AUILiferayTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AUILiferayTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/aui-liferay/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("AUILiferayTagTest.jsp")) { - if ((problem.getLineNumber() == 1) && (problem.getStartOffset() == 16) && (problem.getEndOffset() == 48)) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AllJSPTagProblemsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AllJSPTagProblemsTest.java deleted file mode 100644 index 9ee5375a37..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AllJSPTagProblemsTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; -import java.util.stream.Collectors; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AllJSPTagProblemsTest { - - @Test - public void allProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration fileMigration = _context.getService(sr); - - List upgradeProblems = fileMigration.findUpgradeProblems(new File("jsptests/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()).stream().sorted().collect(Collectors.toList()); - - final int expectedSize = 518; - - final int size = upgradeProblems.size(); - - if (size != expectedSize) { - System.err.println("All problems size is " + size + ", expected size is " + expectedSize); - } - - Assert.assertEquals(expectedSize, size); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AllProblemsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AllProblemsTest.java deleted file mode 100644 index f5cea8f5aa..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AllProblemsTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AllProblemsTest { - - @Test - @Ignore - public void allProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems( - new File("projects/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - int expectedSize = 304; - int size = problems.size(); - - if (size != expectedSize) { - System.err.println("All problems size is " + size + ", expected size is " + expectedSize); - } - - Assert.assertEquals(expectedSize, size); - - for (UpgradeProblem problem : problems) { - if ((problem.getHtml() != null) && problem.getHtml().equals("#legacy")) { - continue; - } - - Assert.assertNotNull("problem.title=" + problem.getTitle() + ", problem.getResource()=" + problem.getResource(), problem.getHtml()); - Assert.assertTrue( - "problem.title=" + problem.getTitle() + ", problem.getResource()=" + problem.getResource(), problem.getHtml().length() > 0); - } - } - - private BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AppViewSearchEntryTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AppViewSearchEntryTagsTest.java deleted file mode 100644 index 1f9a4a9de6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AppViewSearchEntryTagsTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AppViewSearchEntryTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/app-view-search-entry/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 3, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AssetCategoriesNavigationTagsAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AssetCategoriesNavigationTagsAutoCorrectTest.java deleted file mode 100644 index c7d5ec9093..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AssetCategoriesNavigationTagsAutoCorrectTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectJSPTagTestBase; - -import java.io.File; - -import java.util.Collections; -import java.util.List; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetCategoriesNavigationTagsAutoCorrectTest extends AutoCorrectJSPTagTestBase { - - @Override - public List getCheckPoints() { - return Collections.singletonList( - "48,\">" + - ""); - } - - @Override - public String getImplClassName() { - return "AssetCategoriesNavigationTags"; - } - - @Override - public File getOriginalTestFile() { - return new File("jsptests/asset-categories-navigation/AssetCategoriesNavigationTagsTest.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AssetCategoriesNavigationTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AssetCategoriesNavigationTagsTest.java deleted file mode 100644 index 309b03e3b5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AssetCategoriesNavigationTagsTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetCategoriesNavigationTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems( - new File("jsptests/asset-categories-navigation/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("AssetCategoriesNavigationTagsTest.jsp")) { - if ((problem.getLineNumber() == 48) && (problem.getStartOffset() >= 1530) && (problem.getEndOffset() >= 1616)) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AssetPreviewTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AssetPreviewTagsTest.java deleted file mode 100644 index f56502f7f8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/AssetPreviewTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetPreviewTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/asset-preview/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 2, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("AssetPreviewTest.jsp") && (problem.getLineNumber() == 7) && - (problem.getStartOffset() >= 230) && (problem.getEndOffset() >= 310)) { - - found = true; - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/ContactNameExceptionImportAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/ContactNameExceptionImportAutoCorrectTest.java deleted file mode 100644 index 68019c7203..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/ContactNameExceptionImportAutoCorrectTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ContactNameExceptionImportAutoCorrectTest { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "ContactNameExceptionImport.java"); - - tempFolder.deleteOnExit(); - - File originalTestfile = new File("javatests/ContactNameExceptionImport.java"); - - Files.copy(originalTestfile.toPath(), testFile.toPath()); - - List problems = new ArrayList<>(); - FileMigrator migrator = null; - - Collection> mrefs = _context.getServiceReferences(FileMigrator.class, null); - - for (ServiceReference mref : mrefs) { - migrator = _context.getService(mref); - - Class clazz = migrator.getClass(); - - if (clazz.getName().contains("ContactNameExceptionsImport")) { - problems = migrator.analyze(testFile); - - break; - } - } - - Assert.assertEquals("", 3, problems.size()); - - int problemsFixed = ((AutoFileMigrator)migrator).correctProblems(testFile, problems); - - Assert.assertEquals("", 3, problemsFixed); - - File dest = new File(tempFolder, "Updated.java"); - - Assert.assertTrue(testFile.renameTo(dest)); - - problems = migrator.analyze(dest); - - Assert.assertEquals("", 0, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/CustomAUIValidatorsTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/CustomAUIValidatorsTagsTest.java deleted file mode 100644 index c99003c189..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/CustomAUIValidatorsTagsTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import com.liferay.ide.core.util.FileUtil; -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class CustomAUIValidatorsTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/custom-aui-validators/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 10, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - File resource = problem.getResource(); - - if (FileUtil.notExists(resource)) { - continue; - } - - if (problem.getResource().getName().endsWith("CustomAUIValidatorsTest.jsp") && (problem.getLineNumber() == 314) && - (problem.getStartOffset() >= 11387) && (problem.getEndOffset() >= 11393)) { - - found = true; - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DdmTemplateSelectorTagsAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DdmTemplateSelectorTagsAutoCorrectTest.java deleted file mode 100644 index 0492ff2b39..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DdmTemplateSelectorTagsAutoCorrectTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectJSPTagTestBase; - -import java.io.File; - -import java.util.Collections; -import java.util.List; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DdmTemplateSelectorTagsAutoCorrectTest extends AutoCorrectJSPTagTestBase { - - @Override - public List getCheckPoints() { - return Collections.singletonList( - "74,className=\"<%= PortalUtil.getClassNameId(templateHandler.getClassName()) %>\"/>"); - } - - @Override - public String getImplClassName() { - return "DdmTemplateSelectorTags"; - } - - @Override - public File getOriginalTestFile() { - return new File("jsptests/ddm-template-selector/DdmTemplateSelectorTagsTest.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DdmTemplateSelectorTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DdmTemplateSelectorTagsTest.java deleted file mode 100644 index 2ec54eebec..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DdmTemplateSelectorTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DdmTemplateSelectorTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/ddm-template-selector/"),UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("DdmTemplateSelectorTagsTest.jsp")) { - if ((problem.getLineNumber() == 70) && (problem.getStartOffset() >= 2538) && (problem.getEndOffset() >= 2549)) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DeprecatedLiferayPortletIconBackTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DeprecatedLiferayPortletIconBackTagsTest.java deleted file mode 100644 index 9e31e1b670..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DeprecatedLiferayPortletIconBackTagsTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DeprecatedLiferayPortletIconBackTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems( - new File("jsptests/liferay-portlet-icon-back/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("LiferayPortletIconBack.jsp")) { - if (problem.getLineNumber() == 1) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DeprecatedLiferaySecurityEncryptTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DeprecatedLiferaySecurityEncryptTagsTest.java deleted file mode 100644 index d5b81ddb04..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/DeprecatedLiferaySecurityEncryptTagsTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DeprecatedLiferaySecurityEncryptTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems( - new File("jsptests/liferay-security-encrypt/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("LiferaySecurityEncrypt.jsp")) { - if (problem.getLineNumber() == 1) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/EmptyFileCheckingTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/EmptyFileCheckingTest.java deleted file mode 100644 index cd0f4ed3d9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/EmptyFileCheckingTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class EmptyFileCheckingTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("projects/emptyfiles/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 0, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/InitJSPParseTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/InitJSPParseTest.java deleted file mode 100644 index 8ed23b0d4e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/InitJSPParseTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; -import java.util.stream.Collectors; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class InitJSPParseTest { - - @Test - public void initParseErrorCheck() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration fileMigration = _context.getService(sr); - - List upgradeProblems = fileMigration.findUpgradeProblems(new File("jsptests/jukebox-portlet/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()).stream().sorted().collect(Collectors.toList()); - - Assert.assertEquals("", 406, upgradeProblems.size()); - - boolean found = false; - - for (UpgradeProblem problem : upgradeProblems) { - if (problem.getResource().getName().endsWith("view_search.jsp")) { - if (problem.getLineNumber() == 109) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/JSPTagImportsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/JSPTagImportsTest.java deleted file mode 100644 index 962972137e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/JSPTagImportsTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collection; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class JSPTagImportsTest { - - @Test - public void allProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration migration = _context.getService(sr); - - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "jsptaglist.jsp"); - - tempFolder.deleteOnExit(); - - File originalTestfile = new File("jsptests/imports/view.jsp"); - - Files.copy(originalTestfile.toPath(), testFile.toPath()); - - List problems = migration.findUpgradeProblems(testFile, UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 6, problems.size()); - - Collection> refs = _context.getServiceReferences( - AutoFileMigrator.class, "(auto.correct=import)"); - - for (ServiceReference ref : refs) { - AutoFileMigrator autoMigrator = _context.getService(ref); - - autoMigrator.correctProblems(testFile, problems); - } - - File dest = new File(tempFolder, "Updated.jsp"); - - Assert.assertTrue(testFile.renameTo(dest)); - - List problems2 = migration.findUpgradeProblems(dest, UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 0, problems2.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/JournalArticleTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/JournalArticleTagsTest.java deleted file mode 100644 index 0e3e68e411..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/JournalArticleTagsTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class JournalArticleTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/journal-article-tags/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertTrue(problem.getResource().getName().endsWith("JournalArticleTagsTest.jsp")); - - Assert.assertEquals("", 4, problem.getLineNumber()); - - Assert.assertEquals("", "LPS-69321", problem.getTicket()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/LiferayFrontendCardsTreeviewTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/LiferayFrontendCardsTreeviewTagsTest.java deleted file mode 100644 index 0220d9146d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/LiferayFrontendCardsTreeviewTagsTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Ethan Sun - */ -public class LiferayFrontendCardsTreeviewTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/liferayfrontend-cardstreeview"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("LiferayFrontendCardsTreeviewTagsTest.jsp")) { - if (problem.getLineNumber() == 19) { - if (Util.isWindows()) { - Assert.assertEquals("", 805, problem.getStartOffset()); - Assert.assertEquals("", 858, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 787, problem.getStartOffset()); - Assert.assertEquals("", 840, problem.getEndOffset()); - } - - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/LiferayUIFlagsTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/LiferayUIFlagsTagsTest.java deleted file mode 100644 index 090e5715e1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/LiferayUIFlagsTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class LiferayUIFlagsTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/liferay-ui-flags/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("LiferayUIFlagsTagsTest.jsp")) { - if ((problem.getLineNumber() == 3) && (problem.getStartOffset() >= 65) && (problem.getEndOffset() >= 273)) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/LogoSelectorTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/LogoSelectorTagsTest.java deleted file mode 100644 index df810b56df..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/LogoSelectorTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class LogoSelectorTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/logo-selector/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("LogoSelectorTagsTest.jsp") && (problem.getLineNumber() == 11) && - (problem.getStartOffset() >= 595) && (problem.getEndOffset() >= 606)) { - - found = true; - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/MVCPortletClassInPortletXMLAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/MVCPortletClassInPortletXMLAutoCorrectTest.java deleted file mode 100644 index f629fadb66..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/MVCPortletClassInPortletXMLAutoCorrectTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collections; -import java.util.List; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.Filter; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; -import org.osgi.util.tracker.ServiceTracker; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - */ -public class MVCPortletClassInPortletXMLAutoCorrectTest { - - @Before - public void beforeTest() throws Exception { - Filter filter = - _context.createFilter( - "(component.name=com.liferay.ide.upgrade.problems.core.internal.liferay70.MVCPortletClassInPortletXML)"); - - ServiceTracker tracker = new ServiceTracker<>(_context, filter, null); - - tracker.open(); - - ServiceReference[] refs = tracker.getServiceReferences(); - - Assert.assertNotNull(refs); - - Assert.assertEquals("", 1, refs.length); - - _autoMigrator = _context.getService(refs[0]); - } - - @Test - public void testAutoCorrectPortletXmlBoth() throws Exception { - Assert.assertNotNull(_autoMigrator); - - FileMigrator fileMigrator = (FileMigrator)_autoMigrator; - - File testfile = new File("target/test/MVCPortletClassInPortletXMLAutoCorrectTest/portlet.xml"); - - if (testfile.exists()) { - Assert.assertTrue(testfile.delete()); - } - - testfile.getParentFile().mkdirs(); - - Files.copy(new File("projects/test-portlet/docroot/WEB-INF/portlet.xml").toPath(), testfile.toPath()); - - List problems = fileMigrator.analyze(testfile); - - Assert.assertEquals("", 2, problems.size()); - - int corrected = _autoMigrator.correctProblems(testfile, problems); - - Assert.assertEquals("", 2, corrected); - - problems = fileMigrator.analyze(testfile); - - Assert.assertEquals("", 0, problems.size()); - } - - @Test - public void testAutoCorrectPortletXmlSingle() throws Exception { - Assert.assertNotNull(_autoMigrator); - - FileMigrator fileMigrator = (FileMigrator)_autoMigrator; - - File testfile = new File("generated/test/MVCPortletClassInPortletXMLAutoCorrectTest/portlet.xml"); - - if (testfile.exists()) { - Assert.assertTrue(testfile.delete()); - } - - testfile.getParentFile().mkdirs(); - - Files.copy(new File("projects/test-portlet/docroot/WEB-INF/portlet.xml").toPath(), testfile.toPath()); - - List problems = fileMigrator.analyze(testfile); - - Assert.assertEquals("", 2, problems.size()); - - int corrected = _autoMigrator.correctProblems(testfile, Collections.singletonList(problems.get(0))); - - Assert.assertEquals("", 1, corrected); - - problems = fileMigrator.analyze(testfile); - - Assert.assertEquals("", 1, problems.size()); - - corrected = _autoMigrator.correctProblems(testfile, Collections.singletonList(problems.get(0))); - - Assert.assertEquals("", 1, corrected); - - problems = fileMigrator.analyze(testfile); - - Assert.assertEquals("", 0, problems.size()); - } - - private AutoFileMigrator _autoMigrator = null; - private BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/NavigationTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/NavigationTagsTest.java deleted file mode 100644 index 68468955db..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/NavigationTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class NavigationTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/navigation-tags/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("NavigationTagsTest.jsp")) { - if ((problem.getLineNumber() == 3) && (problem.getStartOffset() >= 57) && (problem.getEndOffset() >= 374)) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortalServiceImports71AutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortalServiceImports71AutoCorrectTest.java deleted file mode 100644 index 10b9ab4176..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortalServiceImports71AutoCorrectTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Seiphon Wang - */ -public class PortalServiceImports71AutoCorrectTest { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "PortalServiceImports.java"); - - tempFolder.deleteOnExit(); - - File originalTestfile = new File("javatests/PortalServiceImports.java"); - - Files.copy(originalTestfile.toPath(), testFile.toPath()); - - List problems = null; - FileMigrator migrator = null; - - Collection> mrefs = _context.getServiceReferences(FileMigrator.class, null); - - for (ServiceReference mref : mrefs) { - migrator = _context.getService(mref); - - Class clazz = migrator.getClass(); - - if (clazz.getName().contains("PortalServiceImports71")) { - problems = migrator.analyze(testFile); - - break; - } - } - - Assert.assertEquals("", 2, problems.size()); - - int problemsFixed = ((AutoFileMigrator)migrator).correctProblems(testFile, problems); - - Assert.assertEquals("", 2, problemsFixed); - - File dest = new File(tempFolder, "Updated.java"); - - Assert.assertTrue(testFile.renameTo(dest)); - - problems = migrator.analyze(dest); - - Assert.assertEquals("", 0, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortalServiceImports72AutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortalServiceImports72AutoCorrectTest.java deleted file mode 100644 index ec1ef32985..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortalServiceImports72AutoCorrectTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Seiphon Wang - */ -public class PortalServiceImports72AutoCorrectTest { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "PortalServiceImports.java"); - - tempFolder.deleteOnExit(); - - File originalTestfile = new File("javatests/PortalServiceImports.java"); - - Files.copy(originalTestfile.toPath(), testFile.toPath()); - - List problems = null; - FileMigrator migrator = null; - - Collection> mrefs = _context.getServiceReferences(FileMigrator.class, null); - - for (ServiceReference mref : mrefs) { - migrator = _context.getService(mref); - - Class clazz = migrator.getClass(); - - if (clazz.getName().contains("PortalServiceImports72")) { - problems = migrator.analyze(testFile); - - break; - } - } - - Assert.assertEquals("", 2, problems.size()); - - int problemsFixed = ((AutoFileMigrator)migrator).correctProblems(testFile, problems); - - Assert.assertEquals("", 2, problemsFixed); - - File dest = new File(tempFolder, "Updated.java"); - - Assert.assertTrue(testFile.renameTo(dest)); - - problems = migrator.analyze(dest); - - Assert.assertEquals("", 0, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortalServiceImportsAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortalServiceImportsAutoCorrectTest.java deleted file mode 100644 index e8cd738d41..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortalServiceImportsAutoCorrectTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class PortalServiceImportsAutoCorrectTest { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "PortalServiceImports.java"); - - tempFolder.deleteOnExit(); - - File originalTestfile = new File("javatests/PortalServiceImports.java"); - - Files.copy(originalTestfile.toPath(), testFile.toPath()); - - List problems = null; - FileMigrator migrator = null; - - Collection> mrefs = _context.getServiceReferences(FileMigrator.class, null); - - for (ServiceReference mref : mrefs) { - migrator = _context.getService(mref); - - Class clazz = migrator.getClass(); - - if (clazz.getName().contains("PortalServiceImports70")) { - problems = migrator.analyze(testFile); - - break; - } - } - - Assert.assertEquals("", 2, problems.size()); - - int problemsFixed = ((AutoFileMigrator)migrator).correctProblems(testFile, problems); - - Assert.assertEquals("", 2, problemsFixed); - - File dest = new File(tempFolder, "Updated.java"); - - Assert.assertTrue(testFile.renameTo(dest)); - - problems = migrator.analyze(dest); - - Assert.assertEquals("", 0, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortletIconTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortletIconTagsTest.java deleted file mode 100644 index 23e7980331..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/PortletIconTagsTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class PortletIconTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/portlet-icon/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 13, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/RenamePortalKernelImportAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/RenamePortalKernelImportAutoCorrectTest.java deleted file mode 100644 index e4a83b2a42..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/RenamePortalKernelImportAutoCorrectTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class RenamePortalKernelImportAutoCorrectTest { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "TasksEntryLocalServiceImpl.java"); - - tempFolder.deleteOnExit(); - - File originalTestfile = new File("javatests/TasksEntryLocalServiceImpl.java"); - - Files.copy(originalTestfile.toPath(), testFile.toPath()); - - List problems = null; - FileMigrator migrator = null; - - Collection> mrefs = _context.getServiceReferences(FileMigrator.class, null); - - for (ServiceReference mref : mrefs) { - migrator = _context.getService(mref); - - Class clazz = migrator.getClass(); - - if (clazz.getName().contains("RenamePortalKernelImport")) { - problems = migrator.analyze(testFile); - - break; - } - } - - Assert.assertEquals("", 10, problems.size()); - - int problemsFixed = ((AutoFileMigrator)migrator).correctProblems(testFile, problems); - - Assert.assertEquals("", 10, problemsFixed); - - File dest = new File(tempFolder, "Updated.java"); - - Assert.assertTrue(testFile.renameTo(dest)); - - problems = migrator.analyze(dest); - - Assert.assertEquals("", 0, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/RepositoryServiceUtilTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/RepositoryServiceUtilTest.java deleted file mode 100644 index 79b12dba9f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/RepositoryServiceUtilTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class RepositoryServiceUtilTest { - - @Test - public void repositoryServiceUtilTest() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems( - new File("jsptests/repository-service-util"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("RepositoryServiceUtilTest.jsp")) { - if ((problem.getLineNumber() == 9) && (problem.getStartOffset() >= 104) && (problem.getEndOffset() >= 171)) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/RestoreEntryTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/RestoreEntryTagsTest.java deleted file mode 100644 index d5746602f5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/RestoreEntryTagsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class RestoreEntryTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/restore-entry/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("RestoreEntryTagsTest.jsp")) { - if ((problem.getLineNumber() == 2) && (problem.getStartOffset() >= 12) && (problem.getEndOffset() >= 318)) { - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/TrashEmptyTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/TrashEmptyTagsTest.java deleted file mode 100644 index 192711200d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/TrashEmptyTagsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class TrashEmptyTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems( - new File("jsptests/liferay-ui-trash-empty/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 3, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/TrashUndoTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/TrashUndoTagsTest.java deleted file mode 100644 index 5fe628f6e8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/TrashUndoTagsTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class TrashUndoTagsTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/liferay-ui-trash-undo/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/UpgradePlanProblemsTestConstants.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/UpgradePlanProblemsTestConstants.java deleted file mode 100644 index 10076241d5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/UpgradePlanProblemsTestConstants.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.liferay.ide.upgrade.problems.core.test; - -import java.util.Arrays; -import java.util.List; - -public class UpgradePlanProblemsTestConstants { - - public static List TEST_VERSIONS = Arrays.asList("7.0", "7.1", "7.2", "7.3", "7.4"); -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/Util.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/Util.java deleted file mode 100644 index 4cd87949bb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/core/test/Util.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.core.test; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class Util { - - public static boolean isWindows() { - String osName = System.getProperty("os.name"); - - return osName.toLowerCase().contains("windows"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/APITestBase.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/APITestBase.java deleted file mode 100644 index a736a34098..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/APITestBase.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.ArrayList; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.Filter; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; -import org.osgi.util.tracker.ServiceTracker; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public abstract class APITestBase { - - @Before - public void beforeTest() throws Exception { - Filter filter = getFilter(); - - ServiceTracker fileMigratorTracker = new ServiceTracker<>(context, filter, null); - - fileMigratorTracker.open(); - - fileMigrators = filterForVersion(fileMigratorTracker.getServiceReferences()); - - Assert.assertNotNull(fileMigrators); - -// Assert.assertEquals("", 1, fileMigrators.length); - } - - protected ServiceReference[] filterForVersion(ServiceReference[] serviceReferences) { - return serviceReferences; - } - - public int getExpectedNumber() { - return 1; - } - - protected Filter getFilter() throws Exception { - return context.createFilter("(component.name=" + getComponentName() + ")"); - } - - - public abstract String getComponentName(); - - public abstract File getTestFile(); - - @Test - public void test() throws Exception { - ArrayList problems = new ArrayList<>(); - - for (int i = 0;i < fileMigrators.length; i++) { - FileMigrator fmigrator = context.getService(fileMigrators[i]); - - problems.addAll(fmigrator.analyze(getTestFile())); - - context.ungetService(fileMigrators[i]); - } - - Assert.assertNotNull(problems); - - Assert.assertEquals("", getExpectedNumber(), problems.size()); - } - - protected BundleContext context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - protected ServiceReference[] fileMigrators; - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/APIVersionSupportTestBase.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/APIVersionSupportTestBase.java deleted file mode 100644 index 8a51d25bfc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/APIVersionSupportTestBase.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.util.Arrays; -import java.util.Dictionary; -import java.util.Optional; -import java.util.stream.Collectors; - -import org.osgi.framework.Filter; -import org.osgi.framework.ServiceReference; -import org.osgi.framework.Version; - -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Seiphon Wang - */ -public abstract class APIVersionSupportTestBase extends APITestBase { - - @Override - protected Filter getFilter() throws Exception { - return context.createFilter("(component.name=" + getComponentName() + ")"); - } - - @Override - protected ServiceReference[] filterForVersion(ServiceReference[] serviceReferences) { - return Arrays.stream( - serviceReferences - ).filter( - ref -> { - Dictionary serviceProperties = ref.getProperties(); - - Version version = new Version(getVersion()); - - return Optional.ofNullable( - serviceProperties.get("version") - ).map( - Object::toString - ).map( - Version::valueOf - ).filter( - v -> v.equals(version) - ).isPresent(); - } - ).collect( - Collectors.toList() - ).toArray(serviceReferences); - } - - public abstract String getVersion(); - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ActionCommandImportsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ActionCommandImportsTest.java deleted file mode 100644 index cd47a89979..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ActionCommandImportsTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ActionCommandImportsTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.MVCPortletActionCommandImports"; - } - - @Override - public File getTestFile() { - return new File( - "projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/action" + - "/SayHelloActionCommand.java"); - } - - @Test - public void sayHelloActionCommandFile2() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(sayHelloActionCommandFile2); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 2, problems.size()); - } - - public File sayHelloActionCommandFile2 = new File( - "projects/actioncommand-demo-portlet/docroot/WEB-INF/src/com/liferay/demo/portlet/action" + - "/SayHelloActionCommand2.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetEntryValidatorPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetEntryValidatorPropertiesTest.java deleted file mode 100644 index feb89b1faf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetEntryValidatorPropertiesTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetEntryValidatorPropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.AssetEntryValidatorProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetPublisherPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetPublisherPropertiesTest.java deleted file mode 100644 index fde76b941f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetPublisherPropertiesTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetPublisherPropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.AssetPublisherProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetPublisherUtilInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetPublisherUtilInvocationTest.java deleted file mode 100644 index 1882f1961c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetPublisherUtilInvocationTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetPublisherUtilInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.AssetPublisherUtilInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/AssetPubliserUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetRendererAndWorkflowHandlerRenderInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetRendererAndWorkflowHandlerRenderInvocationTest.java deleted file mode 100644 index feab328e69..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetRendererAndWorkflowHandlerRenderInvocationTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetRendererAndWorkflowHandlerRenderInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 6; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.AssetRendererAndWorkflowHandlerRenderInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/RenderTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetRendererGetSummaryDeclTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetRendererGetSummaryDeclTest.java deleted file mode 100644 index 3896404144..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetRendererGetSummaryDeclTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetRendererGetSummaryDeclTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.AssetRendererGetSummaryDecl"; - } - - @Override - public File getTestFile() { - return new File( - "projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/asset" + - "/KBArticleAssetRenderer.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetRendererGetURLViewDeclTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetRendererGetURLViewDeclTest.java deleted file mode 100644 index ce6dc25e92..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetRendererGetURLViewDeclTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetRendererGetURLViewDeclTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.AssetRendererGetURLViewDecl"; - } - - @Override - public File getTestFile() { - return new File( - "projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/asset" + - "/KBArticleAssetRenderer.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetTagPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetTagPropertiesTest.java deleted file mode 100644 index 5100405a99..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AssetTagPropertiesTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class AssetTagPropertiesTest extends APITestBase { - - @Test - public void assetTageProperties() { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(testFile2); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 4, problems.size()); - } - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.AssetTagProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/MediaWikiImporter.java"); - } - - public File testFile2 = new File("projects/filetests/AssetTagPropertiesTestFile.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AutoCorrectDescriptorTestBase.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AutoCorrectDescriptorTestBase.java deleted file mode 100644 index 34895f9d9c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AutoCorrectDescriptorTestBase.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collection; -import java.util.Dictionary; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; -import org.osgi.framework.Version; -import org.osgi.framework.VersionRange; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Seiphon Wang - */ -public abstract class AutoCorrectDescriptorTestBase { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "test.xml"); - - tempFolder.deleteOnExit(); - - Files.copy(getOriginalTestFile().toPath(), testFile.toPath()); - - FileMigrator descriptorFileMigrator = null; - - Collection> mrefs = context.getServiceReferences(FileMigrator.class, null); - - List> filteredRefs = mrefs.stream( - ).filter( - ref -> { - Dictionary serviceProperties = ref.getProperties(); - - Version version = new Version(getVersion()); - - return Optional.ofNullable( - serviceProperties.get("version") - ).map( - Object::toString - ).map( - Version::valueOf - ).filter( - v -> v.equals(version) - ).isPresent(); - } - ).collect( - Collectors.toList() - ); - - for (ServiceReference mref : filteredRefs) { - FileMigrator fileMigrator = context.getService(mref); - - Class clazz = fileMigrator.getClass(); - - if (clazz.getName().contains(getImplClassName())) { - descriptorFileMigrator = fileMigrator; - - break; - } - } - - Assert.assertNotNull("Expected that a valid descriptorFileMigrator would be found", descriptorFileMigrator); - - List upgradeProblems = descriptorFileMigrator.analyze(testFile); - - Assert.assertEquals("Expected to have found exactly one problem.", 1, upgradeProblems.size()); - - File dest = new File(tempFolder, "Updated.xml"); - - Files.copy(testFile.toPath(), dest.toPath()); - - int problemsFixed = ((AutoFileMigrator)descriptorFileMigrator).correctProblems(dest, upgradeProblems); - - Assert.assertEquals("Expected to have fixed exactly one problem.", 1, problemsFixed); - - upgradeProblems = descriptorFileMigrator.analyze(dest); - - Assert.assertEquals("Expected to not find any problems.", 0, upgradeProblems.size()); - } - - public abstract String getImplClassName(); - - public abstract File getOriginalTestFile(); - - public abstract String getVersion(); - - protected BundleContext context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AutoCorrectJSPTagTestBase.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AutoCorrectJSPTagTestBase.java deleted file mode 100644 index f2ee1e90de..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AutoCorrectJSPTagTestBase.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public abstract class AutoCorrectJSPTagTestBase { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "test.jsp"); - - tempFolder.deleteOnExit(); - - Files.copy(getOriginalTestFile().toPath(), testFile.toPath()); - - List problems = null; - FileMigrator migrator = null; - - Collection> mrefs = context.getServiceReferences(FileMigrator.class, null); - - for (ServiceReference mref : mrefs) { - migrator = context.getService(mref); - - Class clazz = migrator.getClass(); - - if (clazz.getName().contains(getImplClassName())) { - problems = migrator.analyze(testFile); - - break; - } - } - - Assert.assertEquals("", getExpectedNumber(), problems.size()); - - int problemsFixed = ((AutoFileMigrator)migrator).correctProblems(testFile, problems); - - Assert.assertEquals("", getExpectedFixedNumber(), problemsFixed); - - File dest = new File(tempFolder, "Updated.jsp"); - - Assert.assertTrue(testFile.renameTo(dest)); - - problems = migrator.analyze(dest); - - Assert.assertEquals("", 0, problems.size()); - - for (String checkPoint : getCheckPoints()) { - int lineNumber = Integer.parseInt(checkPoint.split(",")[0]); - String lineContent = checkPoint.split(",")[1]; - - try { - String[] lines = _readLines(Files.newInputStream(dest.toPath())); - - Assert.assertTrue(lines[lineNumber - 1].trim().equals(lineContent)); - } - catch (Exception e) { - } - } - } - - public abstract List getCheckPoints(); - - public int getExpectedFixedNumber() { - return 1; - } - - public int getExpectedNumber() { - return 1; - } - - public abstract String getImplClassName(); - - public abstract File getOriginalTestFile(); - - protected BundleContext context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - - private String[] _readLines(InputStream inputStream) { - if (inputStream == null) { - return null; - } - - List lines = new ArrayList<>(); - - try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream))) { - String line; - - while ((line = bufferedReader.readLine()) != null) { - StringBuffer contents = new StringBuffer(line); - - lines.add(contents.toString()); - } - } - catch (Exception e) { - } - - return lines.toArray(new String[lines.size()]); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AutoCorrectLiferayVersionPropertiesTestBase.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AutoCorrectLiferayVersionPropertiesTestBase.java deleted file mode 100644 index eadd467f34..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/AutoCorrectLiferayVersionPropertiesTestBase.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.nio.file.Files; -import java.nio.file.StandardCopyOption; -import java.util.Collection; -import java.util.Dictionary; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.stream.Collectors; - -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; -import org.osgi.framework.Version; -import org.osgi.framework.VersionRange; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Seiphon Wang - */ -public abstract class AutoCorrectLiferayVersionPropertiesTestBase { - - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - - @Test - public void autoCorrectProblems() throws Exception { - File testFile = temporaryFolder.newFile("liferay-plugin-package.properties"); - - File originalFile = getOriginalTestFile(); - - Files.copy(originalFile.toPath(), testFile.toPath(), StandardCopyOption.REPLACE_EXISTING); - - FileMigrator liferayVersionsProperties = null; - - Bundle bundle = FrameworkUtil.getBundle(getClass()); - - BundleContext bundleContext = bundle.getBundleContext(); - - Collection> serviceReferences = - bundleContext.getServiceReferences(FileMigrator.class, null); - - List> filteredReferences = serviceReferences.stream( - ).filter( - ref -> { - Dictionary serviceProperties = ref.getProperties(); - - Version version = new Version(getVersion()); - - return Optional.ofNullable( - serviceProperties.get("version") - ).map( - Object::toString - ).map( - Version::valueOf - ).filter( - v -> v.equals(version) - ).isPresent(); - } - ).collect( - Collectors.toList() - ); - - for (ServiceReference serviceReference : filteredReferences) { - FileMigrator fileMigrator = bundleContext.getService(serviceReference); - - Class clazz = fileMigrator.getClass(); - - if (Objects.equals(clazz.getSimpleName(), getImplClassName())) { - liferayVersionsProperties = fileMigrator; - - break; - } - } - - Assert.assertNotNull("Expected that a valid liferayVersionsProperties would be found", liferayVersionsProperties); - - List upgradeProblems = liferayVersionsProperties.analyze(testFile); - - Assert.assertEquals("Expected to have found exactly one problem.", 1, upgradeProblems.size()); - - int problemsFixed = ((AutoFileMigrator)liferayVersionsProperties).correctProblems(testFile, upgradeProblems); - - Assert.assertEquals("Expected to have fixed exactly one problem.", 1, problemsFixed); - - upgradeProblems = liferayVersionsProperties.analyze(testFile); - - Assert.assertEquals("Expected to not find any problems.", 0, upgradeProblems.size()); - } - - public abstract String getImplClassName(); - - public abstract File getOriginalTestFile(); - - public abstract String getVersion(); -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BBCodePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BBCodePropertiesTest.java deleted file mode 100644 index 1586d309d7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BBCodePropertiesTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class BBCodePropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.BBCodeProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-ext/docroot/WEB-INF/ext-impl/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BackgroundTaskLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BackgroundTaskLegacyAPITest.java deleted file mode 100644 index 55f813f37a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BackgroundTaskLegacyAPITest.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class BackgroundTaskLegacyAPITest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.BackgroundTaskLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File( - "projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay" + - "/DLFileNameBackgroundTaskServiceImpl.java"); - } - - @Test - public void testFull() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 2, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 18, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 688, problem.getStartOffset()); - Assert.assertEquals("", 736, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 671, problem.getStartOffset()); - Assert.assertEquals("", 719, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 19, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 746, problem.getStartOffset()); - Assert.assertEquals("", 801, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 728, problem.getStartOffset()); - Assert.assertEquals("", 783, problem.getEndOffset()); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BreadcrumbPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BreadcrumbPropertiesTest.java deleted file mode 100644 index 115daf5e9d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BreadcrumbPropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class BreadcrumbPropertiesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.BreadcrumbProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BuildAutoUpgradePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BuildAutoUpgradePropertiesTest.java deleted file mode 100644 index 0021f4b1c1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/BuildAutoUpgradePropertiesTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Joye Luo - */ -public class BuildAutoUpgradePropertiesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 1; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.BuildAutoUpgradeProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/service-ext.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/CalendarLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/CalendarLegacyAPITest.java deleted file mode 100644 index 7e009a9f7d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/CalendarLegacyAPITest.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class CalendarLegacyAPITest extends APITestBase { - - @Test - public void calendarLegacyAPITest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 7, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 38, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1886, problem.getStartOffset()); - Assert.assertEquals("", 1946, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1849, problem.getStartOffset()); - Assert.assertEquals("", 1909, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 39, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1956, problem.getStartOffset()); - Assert.assertEquals("", 2011, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1918, problem.getStartOffset()); - Assert.assertEquals("", 1973, problem.getEndOffset()); - } - - problem = problems.get(2); - - Assert.assertEquals("", 40, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2021, problem.getStartOffset()); - Assert.assertEquals("", 2074, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1982, problem.getStartOffset()); - Assert.assertEquals("", 2035, problem.getEndOffset()); - } - - problem = problems.get(3); - - Assert.assertEquals("", 159, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 7006, problem.getStartOffset()); - Assert.assertEquals("", 7143, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 6848, problem.getStartOffset()); - Assert.assertEquals("", 6983, problem.getEndOffset()); - } - - problem = problems.get(4); - - Assert.assertEquals("", 43, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2228, problem.getStartOffset()); - Assert.assertEquals("", 2276, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2186, problem.getStartOffset()); - Assert.assertEquals("", 2234, problem.getEndOffset()); - } - - problem = problems.get(5); - - Assert.assertEquals("", 41, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2084, problem.getStartOffset()); - Assert.assertEquals("", 2152, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2044, problem.getStartOffset()); - Assert.assertEquals("", 2112, problem.getEndOffset()); - } - - problem = problems.get(6); - - Assert.assertEquals("", 42, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2162, problem.getStartOffset()); - Assert.assertEquals("", 2218, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2121, problem.getStartOffset()); - Assert.assertEquals("", 2177, problem.getEndOffset()); - } - } - - @Override - public int getExpectedNumber() { - return 7; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.CalendarLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/CalendarPortlet.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/CategoryEntryforPagesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/CategoryEntryforPagesTest.java deleted file mode 100644 index 46be277075..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/CategoryEntryforPagesTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Andy Wu - */ -public class CategoryEntryforPagesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.CategoryEntryforPages"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/CategoryEntryforUsersTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/CategoryEntryforUsersTest.java deleted file mode 100644 index 6f39803dfd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/CategoryEntryforUsersTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Andy Wu - */ -public class CategoryEntryforUsersTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.CategoryEntryforUsers"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ConfigurationActionRenderMethodTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ConfigurationActionRenderMethodTest.java deleted file mode 100644 index 92ef2ab5a4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ConfigurationActionRenderMethodTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ConfigurationActionRenderMethodTest extends APITestBase { - - @Test - public void editConfigurationActionFile() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(editConfigurationActionFile); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - - Assert.assertEquals("", 1, problems.size()); - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ConfigurationActionRenderMethod"; - } - - @Override - public File getTestFile() { - return new File( - "projects/opensocial-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/opensocial/gadget/action" + - "/ConfigurationActionImpl.java"); - } - - public File editConfigurationActionFile = new File("projects/filetests/EditConfigurationAction.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ContactNameExceptionImportTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ContactNameExceptionImportTest.java deleted file mode 100644 index cd5a2eb8bc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ContactNameExceptionImportTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ContactNameExceptionImportTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ContactNameExceptionsImport"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/ContactNameExceptionImport.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ConvertProcessExtendsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ConvertProcessExtendsTest.java deleted file mode 100644 index 2e106943e9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ConvertProcessExtendsTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ConvertProcessExtendsTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ConvertProcessExtends"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/ConvertDatabase.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ConvertProcessPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ConvertProcessPropertiesTest.java deleted file mode 100644 index 8d7bbe07a7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ConvertProcessPropertiesTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ConvertProcessPropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ConvertProcessProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDLRecordLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDLRecordLegacyAPITest.java deleted file mode 100644 index d24cb1902b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDLRecordLegacyAPITest.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DDLRecordLegacyAPITest extends APITestBase { - - @Test - public void dDLRecordLegacyAPITest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 3, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 30, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1361, problem.getStartOffset()); - Assert.assertEquals("", 1426, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1332, problem.getStartOffset()); - Assert.assertEquals("", 1397, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 132, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 4220, problem.getStartOffset()); - Assert.assertEquals("", 4263, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 4089, problem.getStartOffset()); - Assert.assertEquals("", 4132, problem.getEndOffset()); - } - - problem = problems.get(2); - - Assert.assertEquals("", 145, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 4619, problem.getStartOffset()); - Assert.assertEquals("", 4699, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 4475, problem.getStartOffset()); - Assert.assertEquals("", 4554, problem.getEndOffset()); - } - } - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DDLRecordLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/EditRecordAction.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMLegacyAPITest.java deleted file mode 100644 index cf8e894959..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMLegacyAPITest.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DDMLegacyAPITest extends APITestBase { - - @Test - public void dDMLegacyAPITest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 5, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 36, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1704, problem.getStartOffset()); - Assert.assertEquals("", 1779, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1669, problem.getStartOffset()); - Assert.assertEquals("", 1744, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 134, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertTrue(problem.getStartOffset() >= 4829 && problem.getStartOffset() <= 4832); - Assert.assertTrue(problem.getEndOffset() >= 4886 && problem.getEndOffset() <= 4889); - } - else { - Assert.assertTrue(problem.getStartOffset() >= 4696 && problem.getStartOffset() <= 4699); - Assert.assertTrue(problem.getEndOffset() >= 4753 && problem.getEndOffset() <= 4756); - } - - problem = problems.get(2); - - Assert.assertEquals("", 147, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertTrue(problem.getStartOffset() >= 5177 && problem.getStartOffset() <= 5180); - Assert.assertTrue(problem.getEndOffset() >= 5234 && problem.getEndOffset() <= 5237); - } - else { - Assert.assertTrue(problem.getStartOffset() >= 5031 && problem.getStartOffset() <= 5034); - Assert.assertTrue(problem.getEndOffset() >= 5088 && problem.getEndOffset() <= 5091); - } - - problem = problems.get(3); - - Assert.assertEquals("", 37, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertTrue(problem.getStartOffset() >= 1789 && problem.getStartOffset() <= 1792); - Assert.assertTrue(problem.getEndOffset() >= 1859 && problem.getEndOffset() <= 1862); - } - else { - Assert.assertEquals("", 1753, problem.getStartOffset()); - Assert.assertEquals("", 1823, problem.getEndOffset()); - } - - problem = problems.get(4); - - Assert.assertEquals("", 162, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertTrue(problem.getStartOffset() >= 5573 && problem.getStartOffset() <= 5576); - Assert.assertTrue(problem.getEndOffset() >= 5690 && problem.getEndOffset() <= 5693); - } - else { - Assert.assertTrue( - String.valueOf(problem.getStartOffset()), problem.getStartOffset() >= 5412 && problem.getStartOffset() <= 5415); - Assert.assertTrue( - String.valueOf(problem.getEndOffset()), problem.getEndOffset() >= 5527 && problem.getEndOffset() <= 5530); - } - } - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DDMLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File( - "projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/JournalArticleAssetRendererFactory.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMStructureLocalServiceInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMStructureLocalServiceInvocationTest.java deleted file mode 100644 index a32c2133d6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMStructureLocalServiceInvocationTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DDMStructureLocalServiceInvocationTest extends APITestBase { - - @Test - public void ddmTemplateAnalyzeTest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 1, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 7, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 144, problem.getStartOffset()); - Assert.assertEquals("", 270, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 138, problem.getStartOffset()); - Assert.assertEquals("", 264, problem.getEndOffset()); - } - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DDMStructureLocalServiceAPI"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/DDMStructureLocalServiceAPITest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMStructureUpdateStructureInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMStructureUpdateStructureInvocationTest.java deleted file mode 100644 index 049aedea72..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMStructureUpdateStructureInvocationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DDMStructureUpdateStructureInvocationTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DDMStructureUpdateStructureInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/DDMStructureLocalServiceUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMTemplateLocalServiceUtilInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMTemplateLocalServiceUtilInvocationTest.java deleted file mode 100644 index e3442985bd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMTemplateLocalServiceUtilInvocationTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DDMTemplateLocalServiceUtilInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 6; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DDMTemplateLocalServiceUtilInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/DDMTemplateServiceTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMTemplateServiceUtilInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMTemplateServiceUtilInvocationTest.java deleted file mode 100644 index f272951c54..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMTemplateServiceUtilInvocationTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DDMTemplateServiceUtilInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 8; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DDMTemplateServiceUtilInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/DDMTemplateServiceSoap.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMTemplateUpdateTemplateInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMTemplateUpdateTemplateInvocationTest.java deleted file mode 100644 index 09d6dc7e21..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMTemplateUpdateTemplateInvocationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DDMTemplateUpdateTemplateInvocationTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DDMTemplateUpdateTemplateInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/DDMTemplateLocalServiceUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMXMLUtilInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMXMLUtilInvocationTest.java deleted file mode 100644 index d4421aa5a6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DDMXMLUtilInvocationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DDMXMLUtilInvocationTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DDMXMLUtilInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/UserImporterExporterTestFile.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLAppHelperLocalServiceUtilInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLAppHelperLocalServiceUtilInvocationTest.java deleted file mode 100644 index 2a41a5c009..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLAppHelperLocalServiceUtilInvocationTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DLAppHelperLocalServiceUtilInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DLAppHelperLocalServiceUtilInvocation"; - } - - @Override - public File getTestFile() { - return new File( - "projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLAppHelperLocalServiceUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLAppServiceUtilInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLAppServiceUtilInvocationTest.java deleted file mode 100644 index 73fa26da75..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLAppServiceUtilInvocationTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DLAppServiceUtilInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 11; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DLAppServiceUtilInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLAppServiceUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLFileEntryTypeDDMStructureInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLFileEntryTypeDDMStructureInvocationTest.java deleted file mode 100644 index 64f1400786..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLFileEntryTypeDDMStructureInvocationTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DLFileEntryTypeDDMStructureInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 10; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DLFileEntryTypeDDMStructureInvocation"; - } - - @Override - public File getTestFile() { - return new File( - "projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/DLFileEntryTypeLocalServiceUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLGetEntriesInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLGetEntriesInvocationTest.java deleted file mode 100644 index 1eb6d43227..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLGetEntriesInvocationTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DLGetEntriesInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DLGetEntriesInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/DLGetEntriesTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLProcessorGetTypeTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLProcessorGetTypeTest.java deleted file mode 100644 index f68d0bc715..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DLProcessorGetTypeTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DLProcessorGetTypeTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DLProcessorGetType"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/DLPreviewableProcessor.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedAUIToolTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedAUIToolTagsTest.java deleted file mode 100644 index e8d3a31df1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedAUIToolTagsTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DeprecatedAUIToolTagsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 1; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DeprecatedAUIToolTags"; - } - - @Override - public File getTestFile() { - return new File("jsptests/aui-tool/AUIToolTagTest.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedExpandoCustomFieldTagsAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedExpandoCustomFieldTagsAutoCorrectTest.java deleted file mode 100644 index 3c34181899..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedExpandoCustomFieldTagsAutoCorrectTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DeprecatedExpandoCustomFieldTagsAutoCorrectTest extends AutoCorrectJSPTagTestBase { - - @Override - public List getCheckPoints() { - List checkPoints = new ArrayList<>(); - - checkPoints.add("58,\">"); - - checkPoints.add( - "59,\" classPK=" + - "\"<%= (foo != null) ? foo.getFooId() : 0 %>\" editable=\"<%= true %>\" label=\"<%= true %>\">" + - ""); - - checkPoints.add( - "59,\"" + - "classPK=\"<%= (foo != null) ? foo.getFooId() : 0 %>" + - "\" editable=\"<%= true %>\" label=\"<%= true %>\">" + ""); - - checkPoints.add("60,"); - - return Collections.singletonList( - "58,\">"); - } - - public int getExpectedFixedNumber() { - return 2; - } - - public int getExpectedNumber() { - return 2; - } - - @Override - public String getImplClassName() { - return "DeprecatedExpandoCustomFieldTags"; - } - - @Override - public File getOriginalTestFile() { - return new File("jsptests/liferay-ui-custom/LiferayUICustom.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedExpandoCustomFieldTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedExpandoCustomFieldTagsTest.java deleted file mode 100644 index 2f04fc4931..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedExpandoCustomFieldTagsTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DeprecatedExpandoCustomFieldTagsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DeprecatedExpandoCustomFieldTags"; - } - - @Override - public File getTestFile() { - return new File("jsptests/liferay-ui-custom/LiferayUICustom.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedLayoutTemplateTagsAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedLayoutTemplateTagsAutoCorrectTest.java deleted file mode 100644 index 7b3fdcb8ff..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedLayoutTemplateTagsAutoCorrectTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Seiphon Wang - */ -public class DeprecatedLayoutTemplateTagsAutoCorrectTest { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "liferay-layout-templates.xml"); - - tempFolder.deleteOnExit(); - - File originalTestfile = new File("tests/files/liferay-layout-templates.xml"); - - Files.copy(originalTestfile.toPath(), testFile.toPath()); - - List problems = null; - FileMigrator migrator = null; - - Collection> mrefs = _context.getServiceReferences(FileMigrator.class, null); - - for (ServiceReference mref : mrefs) { - migrator = _context.getService(mref); - - Class clazz = migrator.getClass(); - - if (clazz.getName().contains("DeprecatedLayoutTemplateTags")) { - problems = migrator.analyze(testFile); - - break; - } - } - - Assert.assertEquals("", 1, problems.size()); - - int problemsFixed = ((AutoFileMigrator)migrator).correctProblems(testFile, problems); - - Assert.assertEquals("", 1, problemsFixed); - - problems = migrator.analyze(testFile); - - Assert.assertEquals("", 0, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedLayoutTemplateTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedLayoutTemplateTagsTest.java deleted file mode 100644 index 1a1c78969a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedLayoutTemplateTagsTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Seiphon Wang - */ -public class DeprecatedLayoutTemplateTagsTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DeprecatedLayoutTemplateTags"; - } - - @Override - public File getTestFile() { - return new File("tests/files/liferay-layout-templates.xml"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedLiferayUICaptchaTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedLiferayUICaptchaTagsTest.java deleted file mode 100644 index cc77f275c7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedLiferayUICaptchaTagsTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class DeprecatedLiferayUICaptchaTagsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 1; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DeprecatedLiferayUICaptchaTags"; - } - - @Override - public File getTestFile() { - return new File("jsptests/liferay-ui-captcha/LiferayUICapcha.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedSocialSetsEnabledPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedSocialSetsEnabledPropertiesTest.java deleted file mode 100644 index 6aae4a50b2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DeprecatedSocialSetsEnabledPropertiesTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Haoyi Sun - */ -public class DeprecatedSocialSetsEnabledPropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DeprecatedSocialSetsEnabledProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet/social-activity-portlet/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DescriptorAutoCorrect70Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DescriptorAutoCorrect70Test.java deleted file mode 100644 index 3f5929a150..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DescriptorAutoCorrect70Test.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Seiphon Wang - */ -public class DescriptorAutoCorrect70Test extends AutoCorrectDescriptorTestBase { - - @Override - public String getImplClassName() { - return "Liferay70DescriptorVersion"; - } - - @Override - public File getOriginalTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - - @Override - public String getVersion() { - return "7.0"; - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/Descriptors70Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/Descriptors70Test.java deleted file mode 100644 index 7ea16a512a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/Descriptors70Test.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Seiphon Wang - * @author Gregory Amerson - */ -public class Descriptors70Test extends APIVersionSupportTestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.Liferay70DescriptorVersion"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - - @Override - public String getVersion() { - return "7.0"; - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DynamicDataListsWebImportTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DynamicDataListsWebImportTest.java deleted file mode 100644 index 7580a6f83f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/DynamicDataListsWebImportTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Joye Luo - */ -public class DynamicDataListsWebImportTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.DynamicDataListsWebImport"; - } - - @Override - public File getTestFile() { - return new File("javatests/DynamicDataListsWebImport.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/EmailSignaturePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/EmailSignaturePropertiesTest.java deleted file mode 100644 index fb3a6469fc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/EmailSignaturePropertiesTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class EmailSignaturePropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.EmailSignatureProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/FlagsEntryServiceAddEntryInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/FlagsEntryServiceAddEntryInvocationTest.java deleted file mode 100644 index e3a47145d7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/FlagsEntryServiceAddEntryInvocationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class FlagsEntryServiceAddEntryInvocationTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.FlagsEntryServiceAddEntryInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/FlagsEntryServiceTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/FlagsEntryServiceInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/FlagsEntryServiceInvocationTest.java deleted file mode 100644 index 043ac72b5d..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/FlagsEntryServiceInvocationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class FlagsEntryServiceInvocationTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.FlagsEntryServiceInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/UserImporterExporterTestFile.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerDoGetSummaryDeclTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerDoGetSummaryDeclTest.java deleted file mode 100644 index a34462162a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerDoGetSummaryDeclTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class IndexerDoGetSummaryDeclTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.IndexerDoGetSummaryDecl"; - } - - @Override - public File getTestFile() { - return new File( - "projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/admin/util" + - "/AdminIndexer.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerGetFacetQueryTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerGetFacetQueryTest.java deleted file mode 100644 index 2917113634..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerGetFacetQueryTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class IndexerGetFacetQueryTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.IndexerGetFacetQuery"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/AssetEntriesFacet.java"); - } - - @Test - public void indexerWrapperFile() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(indexerWrapper); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 1, problems.size()); - } - - public File indexerWrapper = new File("projects/filetests/IndexerWrapper.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerThreeMethodsChangeImplementsInterfaceTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerThreeMethodsChangeImplementsInterfaceTest.java deleted file mode 100644 index 3510c640fd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerThreeMethodsChangeImplementsInterfaceTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class IndexerThreeMethodsChangeImplementsInterfaceTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 0; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.IndexerThreeMethodsChange"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/AlbumIndexer.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerThreeMethodsChangeTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerThreeMethodsChangeTest.java deleted file mode 100644 index 07fd040bb3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/IndexerThreeMethodsChangeTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class IndexerThreeMethodsChangeTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.IndexerThreeMethodsChange"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/IndexerWrapper.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/JournalFileUploadsPortletPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/JournalFileUploadsPortletPropertiesTest.java deleted file mode 100644 index 81a734a7fe..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/JournalFileUploadsPortletPropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class JournalFileUploadsPortletPropertiesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.JournalFileUploadsPortletProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet/journal-portlet/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/JournalPortletPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/JournalPortletPropertiesTest.java deleted file mode 100644 index 1aa06f3014..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/JournalPortletPropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class JournalPortletPropertiesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 49; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.JournalPortletProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/portal-impl-6.2.x/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/LanguageDisplayStylePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/LanguageDisplayStylePropertiesTest.java deleted file mode 100644 index 6ee8601e95..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/LanguageDisplayStylePropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class LanguageDisplayStylePropertiesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.LanguageDisplayStyleProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/Liferay70VersionsPropertiesAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/Liferay70VersionsPropertiesAutoCorrectTest.java deleted file mode 100644 index 7fe3fb1401..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/Liferay70VersionsPropertiesAutoCorrectTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -public class Liferay70VersionsPropertiesAutoCorrectTest extends AutoCorrectLiferayVersionPropertiesTestBase { - - @Override - public String getImplClassName() { - return "Liferay70VersionsProperties"; - } - - @Override - public File getOriginalTestFile() { - return new File("jsptests/jukebox-portlet/docroot/WEB-INF/liferay-plugin-package.properties"); - } - - @Override - public String getVersion() { - return "7.0"; - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/Liferay70VersionsPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/Liferay70VersionsPropertiesTest.java deleted file mode 100644 index 1a4a86c2d1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/Liferay70VersionsPropertiesTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Seiphon Wang - */ -public class Liferay70VersionsPropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.Liferay70VersionsProperties"; - } - - @Override - public File getTestFile() { - return new File("jsptests/jukebox-portlet/docroot/WEB-INF/liferay-plugin-package.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/LockLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/LockLegacyAPITest.java deleted file mode 100644 index d9a47b0540..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/LockLegacyAPITest.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class LockLegacyAPITest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.LockLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/LockProtectedAction.java"); - } - - @Test - public void lockLegacyAPITest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 4, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 22, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 893, problem.getStartOffset()); - Assert.assertEquals("", 940, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 872, problem.getStartOffset()); - Assert.assertEquals("", 919, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 46, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1420, problem.getStartOffset()); - Assert.assertEquals("", 1484, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1375, problem.getStartOffset()); - Assert.assertEquals("", 1438, problem.getEndOffset()); - } - - problem = problems.get(2); - - Assert.assertEquals("", 62, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1747, problem.getStartOffset()); - Assert.assertEquals("", 1806, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1686, problem.getStartOffset()); - Assert.assertEquals("", 1745, problem.getEndOffset()); - } - - problem = problems.get(3); - - Assert.assertEquals("", 73, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1971, problem.getStartOffset()); - Assert.assertEquals("", 2044, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1899, problem.getStartOffset()); - Assert.assertEquals("", 1971, problem.getEndOffset()); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MBMessageServiceUtilInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MBMessageServiceUtilInvocationTest.java deleted file mode 100644 index 11c1999320..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MBMessageServiceUtilInvocationTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class MBMessageServiceUtilInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.MBMessageServiceUtilInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/EditDiscussionAction.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MVCPortletClassInPortletXMLTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MVCPortletClassInPortletXMLTest.java deleted file mode 100644 index 822084ca89..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MVCPortletClassInPortletXMLTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Andy Wu - */ -public class MVCPortletClassInPortletXMLTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.MVCPortletClassInPortletXML"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet/docroot/WEB-INF/portlet.xml"); - } - - @Test - public void testPortletXmlFileLineNumbers() throws Exception { - Assert.assertNotNull(fileMigrators[0]); - - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - Assert.assertEquals(7, problems.get(0).getLineNumber()); - Assert.assertEquals(37, problems.get(1).getLineNumber()); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MVCPortletInitParamsChangeClassTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MVCPortletInitParamsChangeClassTest.java deleted file mode 100644 index 7dbe616430..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MVCPortletInitParamsChangeClassTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Andy Wu - */ -public class MVCPortletInitParamsChangeClassTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.MVCPortletInitParamsChangeClass"; - } - - @Override - public File getTestFile() { - return new File( - "projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/com/liferay/knowledgebase/portlet" + - "/BaseKBPortlet.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MVCPortletInitParamsChangeXMLTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MVCPortletInitParamsChangeXMLTest.java deleted file mode 100644 index bf0984bc1c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MVCPortletInitParamsChangeXMLTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Andy Wu - */ -public class MVCPortletInitParamsChangeXMLTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.MVCPortletInitParamsChangeXML"; - } - - @Override - public File getTestFile() { - return new File("projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/portlet.xml"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MarketplaceLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MarketplaceLegacyAPITest.java deleted file mode 100644 index 7430a157db..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MarketplaceLegacyAPITest.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class MarketplaceLegacyAPITest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 6; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.MarketplaceLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File( - "projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MarketplaceMessageListener.java"); - } - - @Test - public void marketplaceLegacyAPITest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 6, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 18, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 681, problem.getStartOffset()); - Assert.assertEquals("", 732, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 664, problem.getStartOffset()); - Assert.assertEquals("", 715, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 60, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2068, problem.getStartOffset()); - Assert.assertEquals("", 2176, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2009, problem.getStartOffset()); - Assert.assertEquals("", 2115, problem.getEndOffset()); - } - - problem = problems.get(2); - - Assert.assertEquals("", 87, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2887, problem.getStartOffset()); - Assert.assertEquals("", 2947, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2801, problem.getStartOffset()); - Assert.assertEquals("", 2861, problem.getEndOffset()); - } - - problem = problems.get(3); - - Assert.assertEquals("", 19, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 742, problem.getStartOffset()); - Assert.assertEquals("", 796, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 724, problem.getStartOffset()); - Assert.assertEquals("", 778, problem.getEndOffset()); - } - - problem = problems.get(4); - - Assert.assertEquals("", 73, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2503, problem.getStartOffset()); - Assert.assertEquals("", 2613, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2431, problem.getStartOffset()); - Assert.assertEquals("", 2539, problem.getEndOffset()); - } - - problem = problems.get(5); - - Assert.assertEquals("", 82, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2764, problem.getStartOffset()); - Assert.assertEquals("", 2875, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2683, problem.getStartOffset()); - Assert.assertEquals("", 2792, problem.getEndOffset()); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MicroblogsLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MicroblogsLegacyAPITest.java deleted file mode 100644 index 0268f96e1b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MicroblogsLegacyAPITest.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class MicroblogsLegacyAPITest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.MicroblogsLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MicroblogsPortlet.java"); - } - - @Test - public void microblogsLegacyAPITest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 4, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 22, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 972, problem.getStartOffset()); - Assert.assertEquals("", 1029, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 951, problem.getStartOffset()); - Assert.assertEquals("", 1008, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 47, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1809, problem.getStartOffset()); - Assert.assertEquals("", 1876, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1763, problem.getStartOffset()); - Assert.assertEquals("", 1830, problem.getEndOffset()); - } - - problem = problems.get(2); - - Assert.assertEquals("", 77, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2879, problem.getStartOffset()); - Assert.assertEquals("", 2997, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2803, problem.getStartOffset()); - Assert.assertEquals("", 2920, problem.getEndOffset()); - } - - problem = problems.get(3); - - Assert.assertEquals("", 81, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 3018, problem.getStartOffset()); - Assert.assertEquals("", 3194, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2938, problem.getStartOffset()); - Assert.assertEquals("", 3112, problem.getEndOffset()); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MobileDeviceRulesLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MobileDeviceRulesLegacyAPITest.java deleted file mode 100644 index ee3f8edc6e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/MobileDeviceRulesLegacyAPITest.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class MobileDeviceRulesLegacyAPITest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 8; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.MobileDeviceRulesLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/EditLayoutsAction.java"); - } - - @Test - public void mobileDeviceRulesLegacyAPITest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 8, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 36, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1554, problem.getStartOffset()); - Assert.assertEquals("", 1625, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1519, problem.getStartOffset()); - Assert.assertEquals("", 1590, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 64, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2804, problem.getStartOffset()); - Assert.assertEquals("", 2900, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2741, problem.getStartOffset()); - Assert.assertEquals("", 2836, problem.getEndOffset()); - } - - problem = problems.get(2); - - Assert.assertEquals("", 37, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1635, problem.getStartOffset()); - Assert.assertEquals("", 1701, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1599, problem.getStartOffset()); - Assert.assertEquals("", 1665, problem.getEndOffset()); - } - - problem = problems.get(3); - - Assert.assertEquals("", 68, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2960, problem.getStartOffset()); - Assert.assertEquals("", 3183, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2893, problem.getStartOffset()); - Assert.assertEquals("", 3112, problem.getEndOffset()); - } - - problem = problems.get(4); - - Assert.assertEquals("", 38, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1711, problem.getStartOffset()); - Assert.assertEquals("", 1793, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1674, problem.getStartOffset()); - Assert.assertEquals("", 1756, problem.getEndOffset()); - } - - problem = problems.get(5); - - Assert.assertEquals("", 50, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2248, problem.getStartOffset()); - Assert.assertEquals("", 2360, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2199, problem.getStartOffset()); - Assert.assertEquals("", 2310, problem.getEndOffset()); - } - - problem = problems.get(6); - - Assert.assertEquals("", 39, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1803, problem.getStartOffset()); - Assert.assertEquals("", 1880, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1765, problem.getStartOffset()); - Assert.assertEquals("", 1842, problem.getEndOffset()); - } - - problem = problems.get(7); - - Assert.assertEquals("", 57, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 2513, problem.getStartOffset()); - Assert.assertEquals("", 2756, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 2457, problem.getStartOffset()); - Assert.assertEquals("", 2696, problem.getEndOffset()); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PHPPortletExtendsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PHPPortletExtendsTest.java deleted file mode 100644 index 99098027fb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PHPPortletExtendsTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class PHPPortletExtendsTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.PHPPortletExtends"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/TestPHPPortlet.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalPropertiesTest.java deleted file mode 100644 index f20ec83a0b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalPropertiesTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class PortalPropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.PortalProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalServiceImports71Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalServiceImports71Test.java deleted file mode 100644 index ff810e2585..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalServiceImports71Test.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Seiphon Wang - */ -public class PortalServiceImports71Test extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.PortalServiceImports71"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/PortalServiceImports.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalServiceImports72Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalServiceImports72Test.java deleted file mode 100644 index 0354f48ba1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalServiceImports72Test.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Seiphon Wang - */ -public class PortalServiceImports72Test extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.PortalServiceImports72"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/PortalServiceImports.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalServiceImportsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalServiceImportsTest.java deleted file mode 100644 index 90d392a91f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalServiceImportsTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class PortalServiceImportsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.PortalServiceImports70"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/PortalServiceImports.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalUtilGetClassNamePortletIdInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalUtilGetClassNamePortletIdInvocationTest.java deleted file mode 100644 index 516dbdfbd9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortalUtilGetClassNamePortletIdInvocationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class PortalUtilGetClassNamePortletIdInvocationTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.PortalUtilGetClassNamePortletIdInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/PortalUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortletConfigGetFormatMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortletConfigGetFormatMethodsTest.java deleted file mode 100644 index ff0d9ba475..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortletConfigGetFormatMethodsTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class PortletConfigGetFormatMethodsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.PortletConfigGetFormatMethods"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/LiferayPortlet.java"); - } - - @Test - public void languageUtilJspFile() { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(languageUtilJspFile); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 5, problems.size()); - } - - @Test - public void unicodeLanguageImplFile() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(unicodeLanguageImplFile); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 23, problems.size()); - } - - public File languageUtilJspFile = new File("jsptests/language-util/edit_task.jsp"); - public File unicodeLanguageImplFile = new File("projects/filetests/UnicodeLanguageImpl.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortletsPackageTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortletsPackageTest.java deleted file mode 100644 index 2c85559972..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/PortletsPackageTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class PortletsPackageTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.PortletsPackage"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/PortletsPackageTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RemovedAbilitySpecifyClassLoadersInScriptingTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RemovedAbilitySpecifyClassLoadersInScriptingTest.java deleted file mode 100644 index 0e6713f77a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RemovedAbilitySpecifyClassLoadersInScriptingTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class RemovedAbilitySpecifyClassLoadersInScriptingTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.RemovedAbilitySpecifyClassLoaders"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/RemovedAbilitySpecifyClassLoadersInScriptingTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RemovedTheWAPFunctionalityTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RemovedTheWAPFunctionalityTest.java deleted file mode 100644 index 9f2649249b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RemovedTheWAPFunctionalityTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class RemovedTheWAPFunctionalityTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 11; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.RemoveWapFunctionality"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/RemovedTheWAPFunctionalityUnitTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RenamePortalKernelImportTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RenamePortalKernelImportTest.java deleted file mode 100644 index 8934641295..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RenamePortalKernelImportTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class RenamePortalKernelImportTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.RenamePortalKernelImports"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/RenamePortalKernelImports.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ReplacedReservedUserEmailAddressExceptionTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ReplacedReservedUserEmailAddressExceptionTest.java deleted file mode 100644 index 7ff505b6eb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ReplacedReservedUserEmailAddressExceptionTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ReplacedReservedUserEmailAddressExceptionTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ReplacedReservedUserEmailAddressException"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/ReplacedReservedUserEmailAddressException.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ReplacedReservedUserScreenNameExceptionTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ReplacedReservedUserScreenNameExceptionTest.java deleted file mode 100644 index 1b4e8145c9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ReplacedReservedUserScreenNameExceptionTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ReplacedReservedUserScreenNameExceptionTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ReplacedReservedUserScreenNameException"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/ReplacedReservedUserScreenNameExceptionTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RepositoryServiceUtilGetRepositoryImplInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RepositoryServiceUtilGetRepositoryImplInvocationTest.java deleted file mode 100644 index c91c498a47..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RepositoryServiceUtilGetRepositoryImplInvocationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class RepositoryServiceUtilGetRepositoryImplInvocationTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.RepositoryServiceUtilGetRepositoryImplInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/RepositoryServiceUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RequiredParamGroupIdTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RequiredParamGroupIdTest.java deleted file mode 100644 index 6869d92f60..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/RequiredParamGroupIdTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class RequiredParamGroupIdTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.RequiredParamGroupId"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/RequiredParamGroupId.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ReservedUserIdExceptionTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ReservedUserIdExceptionTest.java deleted file mode 100644 index 5711cb89b8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ReservedUserIdExceptionTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ReservedUserIdExceptionTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ReservedUserIdExceptionCatch"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/ReservedUserIdException.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ScreenNameValidatorInterfaceTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ScreenNameValidatorInterfaceTest.java deleted file mode 100644 index 490d122870..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ScreenNameValidatorInterfaceTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ScreenNameValidatorInterfaceTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ScreenNameValidatorInterface"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/DefaultScreenNameValidator.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/SearchPermissionCheckerGetPermissionQueryDeclTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/SearchPermissionCheckerGetPermissionQueryDeclTest.java deleted file mode 100644 index 225fdec7ce..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/SearchPermissionCheckerGetPermissionQueryDeclTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class SearchPermissionCheckerGetPermissionQueryDeclTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.SearchPermissionCheckerGetPermissionQueryDecl"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/SearchPermissionCheckerImpl.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/SearchResultInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/SearchResultInvocationTest.java deleted file mode 100644 index 98ecc13aee..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/SearchResultInvocationTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class SearchResultInvocationTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.SearchResultInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/SearchResultTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ShoppingCartLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ShoppingCartLegacyAPITest.java deleted file mode 100644 index 67bcb45f1e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ShoppingCartLegacyAPITest.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ShoppingCartLegacyAPITest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ShoppingCartLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/CartAction.java"); - } - - @Test - public void shoppingCartLegacyAPITest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 4, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 32, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1475, problem.getStartOffset()); - Assert.assertEquals("", 1540, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1444, problem.getStartOffset()); - Assert.assertEquals("", 1509, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 143, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 4691, problem.getStartOffset()); - Assert.assertEquals("", 4858, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 4549, problem.getStartOffset()); - Assert.assertEquals("", 4714, problem.getEndOffset()); - } - - problem = problems.get(2); - - Assert.assertEquals("", 33, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1550, problem.getStartOffset()); - Assert.assertEquals("", 1615, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1518, problem.getStartOffset()); - Assert.assertEquals("", 1583, problem.getEndOffset()); - } - - problem = problems.get(3); - - Assert.assertEquals("", 118, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 3987, problem.getStartOffset()); - Assert.assertEquals("", 4031, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 3870, problem.getStartOffset()); - Assert.assertEquals("", 3914, problem.getEndOffset()); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ShoppingFileUploadsPortletPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ShoppingFileUploadsPortletPropertiesTest.java deleted file mode 100644 index 74b997b0b1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/ShoppingFileUploadsPortletPropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class ShoppingFileUploadsPortletPropertiesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 15; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.ShoppingFileUploadsPortletProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet/shopping-portlet/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/SocialNetworkingLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/SocialNetworkingLegacyAPITest.java deleted file mode 100644 index 4ee441fbf8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/SocialNetworkingLegacyAPITest.java +++ /dev/null @@ -1,179 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class SocialNetworkingLegacyAPITest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.SocialNetworkingLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/GroupModelListener.java"); - } - - @Test - public void testFull() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 2, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 20, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 781, problem.getStartOffset()); - Assert.assertEquals("", 843, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 762, problem.getStartOffset()); - Assert.assertEquals("", 824, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 31, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1086, problem.getStartOffset()); - Assert.assertEquals("", 1149, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1056, problem.getStartOffset()); - Assert.assertEquals("", 1119, problem.getEndOffset()); - } - } - - @Test - public void testFull2() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(testFile2); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 6, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals("", 24, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1005, problem.getStartOffset()); - Assert.assertEquals("", 1070, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 982, problem.getStartOffset()); - Assert.assertEquals("", 1047, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals("", 57, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1892, problem.getStartOffset()); - Assert.assertEquals("", 1955, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1836, problem.getStartOffset()); - Assert.assertEquals("", 1899, problem.getEndOffset()); - } - - problem = problems.get(2); - - Assert.assertEquals("", 128, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 4271, problem.getStartOffset()); - Assert.assertEquals("", 4570, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 4144, problem.getStartOffset()); - Assert.assertEquals("", 4439, problem.getEndOffset()); - } - - problem = problems.get(3); - - Assert.assertEquals("", 135, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 4591, problem.getStartOffset()); - Assert.assertEquals("", 4914, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 4457, problem.getStartOffset()); - Assert.assertEquals("", 4775, problem.getEndOffset()); - } - - problem = problems.get(4); - - Assert.assertEquals("", 25, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1080, problem.getStartOffset()); - Assert.assertEquals("", 1152, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1056, problem.getStartOffset()); - Assert.assertEquals("", 1128, problem.getEndOffset()); - } - - problem = problems.get(5); - - Assert.assertEquals("", 156, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 5378, problem.getStartOffset()); - Assert.assertEquals("", 5504, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 5223, problem.getStartOffset()); - Assert.assertEquals("", 5348, problem.getEndOffset()); - } - } - - public File testFile2 = new File( - "projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/MeetupsPortlet.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/StorageAdapterCreateUpdateMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/StorageAdapterCreateUpdateMethodsTest.java deleted file mode 100644 index 1f5c874a33..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/StorageAdapterCreateUpdateMethodsTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class StorageAdapterCreateUpdateMethodsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.StorageAdapterCreateUpdateMethods"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/StorageAdapterCreateUpdateMethodsTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/UserImporterExporterTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/UserImporterExporterTest.java deleted file mode 100644 index 9415ed016b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/UserImporterExporterTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class UserImporterExporterTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.UserImporterExporter"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/UserImporterExporterTestFile.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/UserServicesThrownExceptionsChangesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/UserServicesThrownExceptionsChangesTest.java deleted file mode 100644 index 7b2c73952a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/UserServicesThrownExceptionsChangesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class UserServicesThrownExceptionsChangesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.UserServicesThrownExceptionsChanges"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/UserServicesThrownExceptionsChangesTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/UsersLastNameRequiredPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/UsersLastNameRequiredPropertiesTest.java deleted file mode 100644 index 14d9f5f1bd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/UsersLastNameRequiredPropertiesTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class UsersLastNameRequiredPropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.UsersLastNameRequiredProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/knowledge-base-portlet-6.2.x/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WebContentArticlesStrucAndTemplTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WebContentArticlesStrucAndTemplTest.java deleted file mode 100644 index 141af9813b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WebContentArticlesStrucAndTemplTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class WebContentArticlesStrucAndTemplTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.WebContentArticlesStrucAndTempl"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/WebContentArticlesStrucAndTemplTestFile.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WebContentLegacyAPITest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WebContentLegacyAPITest.java deleted file mode 100644 index 17a870840f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WebContentLegacyAPITest.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class WebContentLegacyAPITest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.WebContentLegacyAPI"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/src/com/liferay/LegacyAPIsAntPortlet.java"); - } - - @Test - public void webContentLegacyAPITest() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(getTestFile()); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 5, problems.size()); - - UpgradeProblem problem = problems.get(0); - - Assert.assertEquals(20, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 961, problem.getStartOffset()); - Assert.assertEquals("", 1023, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 942, problem.getStartOffset()); - Assert.assertEquals("", 1004, problem.getEndOffset()); - } - - problem = problems.get(1); - - Assert.assertEquals(47, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1917, problem.getStartOffset()); - Assert.assertEquals("", 1950, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1871, problem.getStartOffset()); - Assert.assertEquals("", 1904, problem.getEndOffset()); - } - - problem = problems.get(2); - - Assert.assertEquals(21, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1033, problem.getStartOffset()); - Assert.assertEquals("", 1099, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1013, problem.getStartOffset()); - Assert.assertEquals("", 1079, problem.getEndOffset()); - } - - problem = problems.get(3); - - Assert.assertEquals("", 41, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1637, problem.getStartOffset()); - Assert.assertEquals("", 1695, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1597, problem.getStartOffset()); - Assert.assertEquals("", 1655, problem.getEndOffset()); - } - - problem = problems.get(4); - - Assert.assertEquals(45, problem.getLineNumber()); - - if (Util.isWindows()) { - Assert.assertEquals("", 1830, problem.getStartOffset()); - Assert.assertEquals("", 1873, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1786, problem.getStartOffset()); - Assert.assertEquals("", 1829, problem.getEndOffset()); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WebContentTypeRemovedTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WebContentTypeRemovedTest.java deleted file mode 100644 index 3db8d44a8b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WebContentTypeRemovedTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class WebContentTypeRemovedTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 8; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.WebContentTypeRemoved"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/WebContentTypeRemovedTestFile.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WikiUtilGetEntriesInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WikiUtilGetEntriesInvocationTest.java deleted file mode 100644 index 76bcbc1308..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WikiUtilGetEntriesInvocationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class WikiUtilGetEntriesInvocationTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.WikiUtilGetEntriesInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/WikiUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WikiUtilInvocationTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WikiUtilInvocationTest.java deleted file mode 100644 index 2052449989..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges/WikiUtilInvocationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges; - -import java.io.File; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class WikiUtilInvocationTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.WikiUtilInvocation"; - } - - @Override - public File getTestFile() { - return new File("projects/test-ext/docroot/WEB-INF/ext-impl/src/com/liferay/test/WikiUtilTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedBrowserCachePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedBrowserCachePropertiesTest.java deleted file mode 100644 index b007fc9ca4..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedBrowserCachePropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Charles Wu - */ -public class ChangedBrowserCachePropertiesTest extends APITestBase { - - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.ChangedBrowserCacheProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet71/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedLastPublishDateOptionTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedLastPublishDateOptionTest.java deleted file mode 100644 index 53eb27f6a8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedLastPublishDateOptionTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Haoyi Sun - */ -public class ChangedLastPublishDateOptionTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.ChangedLastPublishDateOption"; - } - - @Override - public File getTestFile() { - return new File("javatests/BlogsPortletDataHandler.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedShowDisableCheckboxBehaviorTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedShowDisableCheckboxBehaviorTest.java deleted file mode 100644 index e50017ff5a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedShowDisableCheckboxBehaviorTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Haoyi Sun - */ -public class ChangedShowDisableCheckboxBehaviorTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.ChangedShowDisableCheckboxBehavior"; - } - - @Override - public File getTestFile() { - return new File("jsptests/input-date/page.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedTagHtmlTopDependencyTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedTagHtmlTopDependencyTest.java deleted file mode 100644 index fc8bacc159..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/ChangedTagHtmlTopDependencyTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Haoyi Sun - */ -public class ChangedTagHtmlTopDependencyTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.ChangedTagHtmlTopDependency"; - } - - @Override - public File getTestFile() { - return new File("jsptests/html-top/init.jsp"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/DecoupledImplementingBaseURLClassesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/DecoupledImplementingBaseURLClassesTest.java deleted file mode 100644 index a5fca7dae9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/DecoupledImplementingBaseURLClassesTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Haoyi Sun - */ -public class DecoupledImplementingBaseURLClassesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.DecoupledImplementingBaseURLClasses"; - } - - @Override - public File getTestFile() { - return new File("javatests/LiferayStrutsPortletURLImpl.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/DescriptorAutoCorrect71Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/DescriptorAutoCorrect71Test.java deleted file mode 100644 index 4a776d79df..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/DescriptorAutoCorrect71Test.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectDescriptorTestBase; - -import java.io.File; - -/** - * @author Seiphon Wang - * @author Gregory Amerson - */ -public class DescriptorAutoCorrect71Test extends AutoCorrectDescriptorTestBase { - - @Override - public String getImplClassName() { - return "Liferay71DescriptorVersion"; - } - - @Override - public File getOriginalTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - - @Override - public String getVersion() { - return "7.1"; - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/Descriptors71Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/Descriptors71Test.java deleted file mode 100644 index 553f9b675e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/Descriptors71Test.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APIVersionSupportTestBase; - -import java.io.File; - -/** - * @author Seiphon Wang - * @author Gregory Amerson - */ -public class Descriptors71Test extends APIVersionSupportTestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.Liferay71DescriptorVersion"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - - @Override - public String getVersion() { - return "7.1"; - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/Liferay71VersionsPropertiesAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/Liferay71VersionsPropertiesAutoCorrectTest.java deleted file mode 100644 index 5651cb6dae..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/Liferay71VersionsPropertiesAutoCorrectTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges71; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectLiferayVersionPropertiesTestBase; - -public class Liferay71VersionsPropertiesAutoCorrectTest extends AutoCorrectLiferayVersionPropertiesTestBase { - - @Override - public String getImplClassName() { - return "Liferay71VersionsProperties"; - } - - @Override - public File getOriginalTestFile() { - return new File("jsptests/jukebox-portlet/docroot/WEB-INF/liferay-plugin-package.properties"); - } - - @Override - public String getVersion() { - return "7.1"; - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/Liferay71VersionsPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/Liferay71VersionsPropertiesTest.java deleted file mode 100644 index c42a85f3c7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/Liferay71VersionsPropertiesTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class Liferay71VersionsPropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.Liferay71VersionsProperties"; - } - - @Override - public File getTestFile() { - return new File("jsptests/jukebox-portlet/docroot/WEB-INF/liferay-plugin-package.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedCaptchaPortalPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedCaptchaPortalPropertiesTest.java deleted file mode 100644 index c940f64486..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedCaptchaPortalPropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Charles Wu - */ -public class MovedCaptchaPortalPropertiesTest extends APITestBase { - - public int getExpectedNumber() { - return 18; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.MovedCaptchaPortalProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet71/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedOpenOfficePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedOpenOfficePropertiesTest.java deleted file mode 100644 index 82d94a111f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedOpenOfficePropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Charles Wu - */ -public class MovedOpenOfficePropertiesTest extends APITestBase { - - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.MovedOpenOfficeProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet71/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedOrganizationTypePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedOrganizationTypePropertiesTest.java deleted file mode 100644 index 7f470a1051..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedOrganizationTypePropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Charles Wu - */ -public class MovedOrganizationTypePropertiesTest extends APITestBase { - - public int getExpectedNumber() { - return 1; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.MovedOrganizationTypeProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet71/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedThreeDLFilePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedThreeDLFilePropertiesTest.java deleted file mode 100644 index 29515f425b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedThreeDLFilePropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Charles Wu - */ -public class MovedThreeDLFilePropertiesTest extends APITestBase { - - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.MovedThreeDLFileProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet71/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedUploadServletRequestPortalPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedUploadServletRequestPortalPropertiesTest.java deleted file mode 100644 index 88c8fc4eb5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedUploadServletRequestPortalPropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Charles Wu - */ -public class MovedUploadServletRequestPortalPropertiesTest extends APITestBase { - - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.MovedUploadServletRequestPortalProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet71/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedUsersFileUploadsPortletPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedUsersFileUploadsPortletPropertiesTest.java deleted file mode 100644 index f32e67ffab..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/MovedUsersFileUploadsPortletPropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Terry Jia - */ -public class MovedUsersFileUploadsPortletPropertiesTest extends APITestBase { - - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.MovedUsersFileUploadsPortletProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet71/docroot/WEB-INF/src/portal.properties"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/RemovedDescriptionHtmlEscapingTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/RemovedDescriptionHtmlEscapingTest.java deleted file mode 100644 index 1ad8f55e6e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/RemovedDescriptionHtmlEscapingTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Haoyi Sun - */ -public class RemovedDescriptionHtmlEscapingTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.RemovedDescriptionHtmlEscaping"; - } - - @Override - public File getTestFile() { - return new File("javatests/PortletHeaderProductNavigationControlMenuEntry.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/RemovedJavaScriptMinificationPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/RemovedJavaScriptMinificationPropertiesTest.java deleted file mode 100644 index 08f354c6aa..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/RemovedJavaScriptMinificationPropertiesTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -/** - * @author Haoyi Sun - */ -public class RemovedJavaScriptMinificationPropertiesTest extends APITestBase { - - public int getExpectedNumber() { - return 7; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.RemovedJavaScriptMinificationProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/test-portlet71/docroot/WEB-INF/src/portal.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedAutoCorrectTest.java deleted file mode 100644 index 7fbee4b023..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedAutoCorrectTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Seiphon Wang - */ -public class SpringExtenderArtifactIdChangedAutoCorrectTest { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "build.gradle"); - - tempFolder.deleteOnExit(); - - File originalTestfile = new File("tests/files/build.gradle"); - - Files.copy(originalTestfile.toPath(), testFile.toPath()); - - List problems = null; - FileMigrator migrator = null; - - Collection> mrefs = _context.getServiceReferences(FileMigrator.class, null); - - for (ServiceReference mref : mrefs) { - migrator = _context.getService(mref); - - Class clazz = migrator.getClass(); - - if (clazz.getName().contains("SpringExtenderArtifactIdChanged")) { - problems = migrator.analyze(testFile); - - break; - } - } - - Assert.assertEquals("Expecting exactly 1 problem found.", 1, problems.size()); - - int problemsFixed = ((AutoFileMigrator)migrator).correctProblems(testFile, problems); - - Assert.assertEquals("Expecting exactly 1 problem fixed.", 1, problemsFixed); - - problems = migrator.analyze(testFile); - - Assert.assertEquals("Expecting no problems found.", 0, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedForMavenProjectAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedForMavenProjectAutoCorrectTest.java deleted file mode 100644 index 4f4f2da716..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedForMavenProjectAutoCorrectTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import java.io.File; -import java.nio.file.Files; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.AutoFileMigrator; -import com.liferay.ide.upgrade.problems.core.FileMigrator; - -/** - * @author Seiphon Wang - */ -public class SpringExtenderArtifactIdChangedForMavenProjectAutoCorrectTest { - - @Test - public void autoCorrectProblems() throws Exception { - File tempFolder = Files.createTempDirectory("autocorrect").toFile(); - - File testFile = new File(tempFolder, "pom.xml"); - - tempFolder.deleteOnExit(); - - File originalTestfile = new File("tests/files/pom.xml"); - - Files.copy(originalTestfile.toPath(), testFile.toPath()); - - List problems = null; - FileMigrator migrator = null; - - Collection> mrefs = _context.getServiceReferences(FileMigrator.class, null); - - for (ServiceReference mref : mrefs) { - migrator = _context.getService(mref); - - Class clazz = migrator.getClass(); - - if (clazz.getName().contains("SpringExtenderArtifactIdChangedForMavenProject")) { - problems = migrator.analyze(testFile); - - break; - } - } - - Assert.assertEquals("", 1, problems.size()); - - int problemsFixed = ((AutoFileMigrator)migrator).correctProblems(testFile, problems); - - Assert.assertEquals("", 1, problemsFixed); - - problems = migrator.analyze(testFile); - - Assert.assertEquals("", 0, problems.size()); - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedForMavenProjectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedForMavenProjectTest.java deleted file mode 100644 index 5d1cf01c9f..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedForMavenProjectTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon - */ -public class SpringExtenderArtifactIdChangedForMavenProjectTest extends APITestBase { - - public int getExpectedNumber() { - return 1; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.SpringExtenderArtifactIdChangedForMavenProject"; - } - - @Override - public File getTestFile() { - return new File("tests/files/pom.xml"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedTest.java deleted file mode 100644 index 04db42c0d2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges71/SpringExtenderArtifactIdChangedTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges71; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon - */ -public class SpringExtenderArtifactIdChangedTest extends APITestBase { - - public int getExpectedNumber() { - return 1; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.SpringExtenderArtifactIdChanged"; - } - - @Override - public File getTestFile() { - return new File("tests/files/build.gradle"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/DescriptorAutoCorrect72Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/DescriptorAutoCorrect72Test.java deleted file mode 100644 index 86ce90cd49..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/DescriptorAutoCorrect72Test.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectDescriptorTestBase; - -import java.io.File; - -/** - * @author Gregory Amerson - */ -public class DescriptorAutoCorrect72Test extends AutoCorrectDescriptorTestBase { - - @Override - public String getImplClassName() { - return "Liferay72DescriptorVersion"; - } - - @Override - public File getOriginalTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - - @Override - public String getVersion() { - return "7.2"; - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/Descriptors72Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/Descriptors72Test.java deleted file mode 100644 index ae93504ba0..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/Descriptors72Test.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import com.liferay.ide.upgrade.problems.test.apichanges.APIVersionSupportTestBase; - -import java.io.File; - -/** - * @author Gregory Amerson - */ -public class Descriptors72Test extends APIVersionSupportTestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.Liferay72DescriptorVersion"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - - @Override - public String getVersion() { - return "7.2"; - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/DroppedSupportOfServiceLoaderConditionTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/DroppedSupportOfServiceLoaderConditionTest.java deleted file mode 100644 index 685288d6a2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/DroppedSupportOfServiceLoaderConditionTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class DroppedSupportOfServiceLoaderConditionTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.DroppedSupportOfServiceLoaderCondition"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/DroppedSupportOfServiceLoaderConditionTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/Liferay72VersionsPropertiesAutoCorrectTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/Liferay72VersionsPropertiesAutoCorrectTest.java deleted file mode 100644 index 4285f393cb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/Liferay72VersionsPropertiesAutoCorrectTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectLiferayVersionPropertiesTestBase; - -public class Liferay72VersionsPropertiesAutoCorrectTest extends AutoCorrectLiferayVersionPropertiesTestBase { - - @Override - public String getImplClassName() { - return "Liferay72VersionsProperties"; - } - - @Override - public File getOriginalTestFile() { - return new File("jsptests/jukebox-portlet/docroot/WEB-INF/liferay-plugin-package.properties"); - } - - @Override - public String getVersion() { - return "7.2"; - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/Liferay72VersionsPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/Liferay72VersionsPropertiesTest.java deleted file mode 100644 index f27739e6f8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/Liferay72VersionsPropertiesTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class Liferay72VersionsPropertiesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.Liferay72VersionsProperties"; - } - - @Override - public File getTestFile() { - return new File("jsptests/jukebox-portlet/docroot/WEB-INF/liferay-plugin-package.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/MovedStagingPropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/MovedStagingPropertiesTest.java deleted file mode 100644 index b5109c29b2..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/MovedStagingPropertiesTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class MovedStagingPropertiesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.MovedStagingProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/copyPortalSettings/portal.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemoveLinkApplicationURLsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemoveLinkApplicationURLsTest.java deleted file mode 100644 index 73624a6a4b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemoveLinkApplicationURLsTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class RemoveLinkApplicationURLsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.RemoveLinkApplicationURLs"; - } - - @Override - public File getTestFile() { - return new File("jsptests/link-application-urls/general.jsp"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemovedHibernateConfigurationConverterTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemovedHibernateConfigurationConverterTest.java deleted file mode 100644 index 87bd69ef6e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemovedHibernateConfigurationConverterTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class RemovedHibernateConfigurationConverterTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.RemovedHibernateConfigurationConverterAndConverter"; - } - - @Override - public File getTestFile() { - return new File("javatests/HibernateConfigurationConverterTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemovedSupportForJSPTemplatesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemovedSupportForJSPTemplatesTest.java deleted file mode 100644 index 69746aceea..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemovedSupportForJSPTemplatesTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class RemovedSupportForJSPTemplatesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.RemovedSupportForJSPTemplates"; - } - - @Override - public File getTestFile() { - return new File("projects/test-ext/docroot/WEB-INF/lib/liferay-look-and-feel.xml"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemovedUnsafeFunctionalInterfaceTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemovedUnsafeFunctionalInterfaceTest.java deleted file mode 100644 index 4127cc1649..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/RemovedUnsafeFunctionalInterfaceTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class RemovedUnsafeFunctionalInterfaceTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.RemovedUnsafeFunctionalInterface"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/ConfigurationDDMFormDeclarationUtilTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/SwitchToUseJDKFunctionAndSupplier.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/SwitchToUseJDKFunctionAndSupplier.java deleted file mode 100644 index 2431db0bfb..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/SwitchToUseJDKFunctionAndSupplier.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class SwitchToUseJDKFunctionAndSupplier extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.SwitchToUseJDKFunctionAndSupplier"; - } - - @Override - public File getTestFile() { - return new File("javatests/ConfigurationDescription.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/SwitchedToUseJDKPredicateTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/SwitchedToUseJDKPredicateTest.java deleted file mode 100644 index 60123d6291..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges72/SwitchedToUseJDKPredicateTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges72; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class SwitchedToUseJDKPredicateTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.SwitchedToUseJDKPredicate"; - } - - @Override - public File getTestFile() { - return new File("javatests/DDMFormValuesFilterImpl.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/AssetVocabularyDefaultHoldsLanguageKeyTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/AssetVocabularyDefaultHoldsLanguageKeyTest.java deleted file mode 100644 index e60da95249..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/AssetVocabularyDefaultHoldsLanguageKeyTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges73; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -import java.io.File; - -public class AssetVocabularyDefaultHoldsLanguageKeyTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.AssetVocabularyDefaultHoldsLanguageKey"; - } - - @Override - public File getTestFile() { - return new File("projects/copyPortalSettings/portal.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/DescriptorAutoCorrect73Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/DescriptorAutoCorrect73Test.java deleted file mode 100644 index fb6381c0bd..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/DescriptorAutoCorrect73Test.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.AutoCorrectDescriptorTestBase; - -/** - * @author Seiphon Wang - */ -public class DescriptorAutoCorrect73Test extends AutoCorrectDescriptorTestBase { - - @Override - public String getImplClassName() { - return "Liferay73DescriptorVersion"; - } - - @Override - public File getOriginalTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - - @Override - public String getVersion() { - return "7.3"; - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/Descriptors73Test.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/Descriptors73Test.java deleted file mode 100644 index d116ff0d9b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/Descriptors73Test.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APIVersionSupportTestBase; - -/** - * @author Seiphon Wang - */ -public class Descriptors73Test extends APIVersionSupportTestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.Liferay73DescriptorVersion"; - } - - @Override - public File getTestFile() { - return new File("projects/legacy-apis-ant-portlet/docroot/WEB-INF/liferay-portlet.xml"); - } - - @Override - public String getVersion() { - return "7.3"; - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/FontAwesomeNoLongerIncludeDefaultTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/FontAwesomeNoLongerIncludeDefaultTest.java deleted file mode 100644 index 4fa00966ef..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/FontAwesomeNoLongerIncludeDefaultTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; -import com.liferay.ide.upgrade.problems.core.test.UpgradePlanProblemsTestConstants; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Ethan Sun - */ -public class FontAwesomeNoLongerIncludeDefaultTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems(new File("jsptests/liferay-ui-icon/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("FontAwesomeNoLongerIncludeDefaultTest.jsp")) { - if (problem.getLineNumber() == 19) { - - if (Util.isWindows()) { - Assert.assertEquals("", 661, problem.getStartOffset()); - Assert.assertEquals("", 673, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 643, problem.getStartOffset()); - Assert.assertEquals("", 655, problem.getEndOffset()); - } - - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/JqueryNoLongerDefaultIncludeTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/JqueryNoLongerDefaultIncludeTest.java deleted file mode 100644 index b9435cecc7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/JqueryNoLongerDefaultIncludeTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges73; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; -import com.liferay.ide.upgrade.problems.core.test.UpgradePlanProblemsTestConstants; -import com.liferay.ide.upgrade.problems.core.test.Util; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -/** - * @author Simon Jiang - */ -public class JqueryNoLongerDefaultIncludeTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems( - new File("jsptests/jqueryNoLongerDefaultInclude/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("jqueryNoLongerDefaultIncludeTest.jsp")) { - if (problem.getLineNumber() == 40) { - if (Util.isWindows()) { - Assert.assertEquals("", 1695, problem.getStartOffset()); - Assert.assertEquals("", 2222, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1656, problem.getStartOffset()); - Assert.assertEquals("", 2171, problem.getEndOffset()); - } - - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/LiferayPollerNoLongerDefaultTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/LiferayPollerNoLongerDefaultTest.java deleted file mode 100644 index 5366bc78c7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/LiferayPollerNoLongerDefaultTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges73; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; -import com.liferay.ide.upgrade.problems.core.test.Util; - -import java.io.File; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -/** - * @author Simon Jiang - */ -public class LiferayPollerNoLongerDefaultTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List versions = Arrays.asList("7.0", "7.1", "7.2", "7.3", "7.4"); - - List problems = m.findUpgradeProblems( - new File("jsptests/liferay-poller-nolonger-default/"), versions, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("liferayPollerNoLongerDefaultTest.jsp")) { - if (problem.getLineNumber() == 193) { - if (Util.isWindows()) { - Assert.assertEquals("", 5128, problem.getStartOffset()); - Assert.assertEquals("", 5649, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 4936, problem.getStartOffset()); - Assert.assertEquals("", 5440, problem.getEndOffset()); - } - - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/MovedBootstrapCachePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/MovedBootstrapCachePropertiesTest.java deleted file mode 100644 index de96933b63..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/MovedBootstrapCachePropertiesTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Ethan Sun - */ -public class MovedBootstrapCachePropertiesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 3; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.MovedBootstrapCacheProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/copyPortalSettings/portal.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemoveAssetTagsSelectorTagTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemoveAssetTagsSelectorTagTest.java deleted file mode 100644 index 86a7c8dfc8..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemoveAssetTagsSelectorTagTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemoveAssetTagsSelectorTagTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.RemoveAssetTagsSelectorTag"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/RemoveAssetTagsSelectorTagUnitTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemoveBlockingCachePropertesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemoveBlockingCachePropertesTest.java deleted file mode 100644 index 685d7f1792..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemoveBlockingCachePropertesTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemoveBlockingCachePropertesTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.RemoveBlockingCacheProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/copyPortalSettings/portal.properties"); - } - - @Override - public int getExpectedNumber() { - return 3; - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedBaseDDMDisplayMethodTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedBaseDDMDisplayMethodTest.java deleted file mode 100644 index 3da305d001..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedBaseDDMDisplayMethodTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Ethan Sun - */ -public class RemovedBaseDDMDisplayMethodTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 17; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.RemovedBaseDDMDisplayMethod"; - } - - @Override - public File getTestFile() { - return new File("projects/classnameid-related-test/BaseDDMDisplayMethodTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedClassNameIdRelatedMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedClassNameIdRelatedMethodsTest.java deleted file mode 100644 index 07376b9397..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedClassNameIdRelatedMethodsTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class RemovedClassNameIdRelatedMethodsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 68; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.RemovedClassNameIdRelatedMethods"; - } - - @Override - public File getTestFile() { - return new File("projects/classnameid-related-test/DDMStructureClassNameIdRelatedTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedCopyLayoutsPropertyTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedCopyLayoutsPropertyTest.java deleted file mode 100644 index 043fe60a48..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedCopyLayoutsPropertyTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemovedCopyLayoutsPropertyTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.RemovedCopyLayoutsProperty"; - } - - @Override - public File getTestFile() { - return new File("projects/copyPortalSettings/portal.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedLayoutParallelRenderPropertyTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedLayoutParallelRenderPropertyTest.java deleted file mode 100644 index a9611f0c11..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedLayoutParallelRenderPropertyTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemovedLayoutParallelRenderPropertyTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 5; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.RemovedLayoutParallelRenderProperty"; - } - - @Override - public File getTestFile() { - return new File("projects/copyPortalSettings/portal.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedLiferayFrontendContextualSidebarTagTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedLiferayFrontendContextualSidebarTagTest.java deleted file mode 100644 index 241e829f5c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedLiferayFrontendContextualSidebarTagTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges73; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigration; -import com.liferay.ide.upgrade.problems.core.test.UpgradePlanProblemsTestConstants; -import com.liferay.ide.upgrade.problems.core.test.Util; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -/** - * @author Seiphon Wang - */ -public class RemovedLiferayFrontendContextualSidebarTagTest { - - @Test - public void findUpgradeProblems() throws Exception { - ServiceReference sr = _context.getServiceReference(FileMigration.class); - - FileMigration m = _context.getService(sr); - - List problems = m.findUpgradeProblems( - new File("jsptests/contextual-sidebar/"), UpgradePlanProblemsTestConstants.TEST_VERSIONS, new NullProgressMonitor()); - - Assert.assertEquals("", 1, problems.size()); - - boolean found = false; - - for (UpgradeProblem problem : problems) { - if (problem.getResource().getName().endsWith("ContextualSidebarTest.jsp")) { - if (problem.getLineNumber() == 33) { - - if (Util.isWindows()) { - Assert.assertEquals("", 1156, problem.getStartOffset()); - Assert.assertEquals("", 1237, problem.getEndOffset()); - } - else { - Assert.assertEquals("", 1124, problem.getStartOffset()); - Assert.assertEquals("", 1204, problem.getEndOffset()); - } - - found = true; - } - } - } - - if (!found) { - Assert.fail(); - } - } - - private final BundleContext _context = FrameworkUtil.getBundle(getClass()).getBundleContext(); -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedSettingCachePropertiesTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedSettingCachePropertiesTest.java deleted file mode 100644 index ff4a9893c9..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges73/RemovedSettingCachePropertiesTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges73; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemovedSettingCachePropertiesTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 6; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.RemovedSettingCacheProperties"; - } - - @Override - public File getTestFile() { - return new File("projects/copyPortalSettings/portal.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/DeprecatedAttributesFromFrontendTaglibClayTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/DeprecatedAttributesFromFrontendTaglibClayTagsTest.java deleted file mode 100644 index ee310acbf1..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/DeprecatedAttributesFromFrontendTaglibClayTagsTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Ethan Sun - */ -public class DeprecatedAttributesFromFrontendTaglibClayTagsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 16; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.DeprecatedClay*"; - } - - @Override - public File getTestFile() { - return new File("jsptests/liferay-ui-clay/LiferayUIClayTagsTest.jsp"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/DeprecatedComponentAndTemplateRenderTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/DeprecatedComponentAndTemplateRenderTagsTest.java deleted file mode 100644 index c3a5f4de3e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/DeprecatedComponentAndTemplateRenderTagsTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class DeprecatedComponentAndTemplateRenderTagsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 2; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.DeprecatedComponentAndTemplateRenderTags"; - } - - @Override - public File getTestFile() { - return new File("jsptests/liferay-soy/soytags.jsp"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RefactorClamdIntegrationAntivirusScannerTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RefactorClamdIntegrationAntivirusScannerTest.java deleted file mode 100644 index 615e49bfcf..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RefactorClamdIntegrationAntivirusScannerTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RefactorClamdIntegrationAntivirusScannerTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RefactorClamdIntegrationAntivirusScanner"; - } - - @Override - public File getTestFile() { - return new File("projects/copyPortalSettings/portal.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveAssetEntriesAssetCategoriesTableTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveAssetEntriesAssetCategoriesTableTest.java deleted file mode 100644 index 6cae939966..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveAssetEntriesAssetCategoriesTableTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class RemoveAssetEntriesAssetCategoriesTableTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 21; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveAssetEntriesAssetCategoriesTable"; - } - - @Override - public File getTestFile() { - return new File("javatests/AssetEntriesAssetCategoriesTableTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveDeprecatedJSPTagsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveDeprecatedJSPTagsTest.java deleted file mode 100644 index 9c9a93097c..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveDeprecatedJSPTagsTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemoveDeprecatedJSPTagsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 12; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveDeprecatedJSPTags"; - } - - @Override - public File getTestFile() { - return new File("jsptests/deprecatedTags/deprecatedTags.jsp"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveFlashSupportTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveFlashSupportTest.java deleted file mode 100644 index 475ed5fba3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveFlashSupportTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemoveFlashSupportTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 1; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemovePortalFlashSupport"; - } - - @Override - public File getTestFile() { - return new File("javatests/ServicePreAction.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveFlashTagSupportTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveFlashTagSupportTest.java deleted file mode 100644 index 975e7b0f45..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveFlashTagSupportTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemoveFlashTagSupportTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 1; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveFlashJSPTags"; - } - - @Override - public File getTestFile() { - return new File("jsptests/removeFlash/flash.jsp"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveJournalArticleContentFieldTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveJournalArticleContentFieldTest.java deleted file mode 100644 index 94e5fd15c3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveJournalArticleContentFieldTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemoveJournalArticleContentFieldTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 21; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveJournalArticleContentField"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/RemoveJournalArticleTest.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveOpenIdConnectServiceHandlerInterfaceTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveOpenIdConnectServiceHandlerInterfaceTest.java deleted file mode 100644 index 27050d2b80..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveOpenIdConnectServiceHandlerInterfaceTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemoveOpenIdConnectServiceHandlerInterfaceTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveOpenIdConnectServiceHandlerInterface"; - } - - @Override - public File getTestFile() { - return new File("javatests/OpenIdConnectFilter.java"); - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveSanitizedServletResponseStaticMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveSanitizedServletResponseStaticMethodsTest.java deleted file mode 100644 index d3c0eb071a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveSanitizedServletResponseStaticMethodsTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemoveSanitizedServletResponseStaticMethodsTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 4; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveSanitizedServletResponseStaticMethods"; - } - - @Override - public File getTestFile() { - return new File("projects/filetests/RemoveSanitizedServletResponseStaticMethodsTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveServerSideClosureTemplatesSupportTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveServerSideClosureTemplatesSupportTest.java deleted file mode 100644 index 6169486a03..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveServerSideClosureTemplatesSupportTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Seiphon Wang - */ -public class RemoveServerSideClosureTemplatesSupportTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 70; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveServerSideClosureTemplatesSupport"; - } - - @Override - public File getTestFile() { - return new File("javatests/ServerSideClosureTemplatesSupport.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveStringBundlerClassTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveStringBundlerClassTest.java deleted file mode 100644 index 29f501ee38..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveStringBundlerClassTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Ethan Sun - */ -public class RemoveStringBundlerClassTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 1; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveStringBundlerClass"; - } - - @Override - public File getTestFile() { - return new File("javatests/PortletRenderer.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveXXssProtectionPropertyTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveXXssProtectionPropertyTest.java deleted file mode 100644 index 95d7893c42..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemoveXXssProtectionPropertyTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemoveXXssProtectionPropertyTest extends APITestBase { - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemoveXXssProtectionProperty"; - } - - @Override - public File getTestFile() { - return new File("projects/copyPortalSettings/portal-ext.properties"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemovedSoyPortletTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemovedSoyPortletTest.java deleted file mode 100644 index 95c0db8fa3..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/apichanges74/RemovedSoyPortletTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.liferay.ide.upgrade.problems.test.apichanges74; - -import java.io.File; - -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -public class RemovedSoyPortletTest extends APITestBase { - - @Override - public int getExpectedNumber() { - return 26; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay74.RemovedSoyPortlet"; - } - - @Override - public File getTestFile() { - return new File("javatests/RemovedSoyPortletTest.java"); - } - -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay70DeprecatedMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay70DeprecatedMethodsTest.java deleted file mode 100644 index 42505878dc..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay70DeprecatedMethodsTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.deprecatedmethods; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class Liferay70DeprecatedMethodsTest extends APITestBase { - - @Test - public void deprecatedMethods61TestFile() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(deprecatedMethods61TestFile); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 4, problems.size()); - } - - @Test - public void deprecatedMethodsNoneVersionTestFile() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(deprecatedMethodsNoneVersionTestFile); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 2, problems.size()); - } - - @Override - public int getExpectedNumber() { - return 55; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay70.Liferay70DeprecatedMethodsMigrator"; - } - - @Override - public File getTestFile() { - return new File("projects/deprecated-methods-test/liferay70-deprecated-methods-test/PortalMockFactory.java"); - } - - public File deprecatedMethods61TestFile = new File( - "projects/deprecated-methods-test/liferay70-deprecated-methods-test/AssetVocabularyServiceSoap.java"); - public File deprecatedMethodsNoneVersionTestFile = new File( - "projects/deprecated-methods-test/liferay70-deprecated-methods-test/WebServerServlet.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay71DeprecatedMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay71DeprecatedMethodsTest.java deleted file mode 100644 index bf7effda62..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay71DeprecatedMethodsTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.deprecatedmethods; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Ethan Sun - */ -public class Liferay71DeprecatedMethodsTest extends APITestBase { - - @Test - public void deprecatedMethods71TestFile() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(deprecatedMethods71TestFile); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 8, problems.size()); - } - - @Override - public int getExpectedNumber() { - return 20; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay71.Liferay71DeprecatedMethodsMigrator"; - } - - @Override - public File getTestFile() { - return new File("projects/deprecated-methods-test/liferay71-deprecated-methods-test/Liferay71DeprecatedMethodsTestCase.java"); - } - - public File deprecatedMethods71TestFile = new File( - "projects/deprecated-methods-test/liferay71-deprecated-methods-test/JournalArticleLocalServiceUtil.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay72DeprecatedMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay72DeprecatedMethodsTest.java deleted file mode 100644 index abdbb857a5..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay72DeprecatedMethodsTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.deprecatedmethods; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Ethan Sun - */ -public class Liferay72DeprecatedMethodsTest extends APITestBase { - - @Test - public void deprecatedMethods72TestFile() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(deprecatedMethods72TestFile); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 6, problems.size()); - } - - @Override - public int getExpectedNumber() { - return 20; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay72.Liferay72DeprecatedMethodsMigrator"; - } - - @Override - public File getTestFile() { - return new File("projects/deprecated-methods-test/liferay72-deprecated-methods-test/Liferay72DeprecatedMethodsTestCase.java"); - } - - public File deprecatedMethods72TestFile = new File( - "projects/deprecated-methods-test/liferay72-deprecated-methods-test/DLAppServiceUtil.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay73DeprecatedMethodsTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay73DeprecatedMethodsTest.java deleted file mode 100644 index 7ebab3d178..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/deprecatedmethods/Liferay73DeprecatedMethodsTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.deprecatedmethods; - -import java.io.File; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.liferay.ide.upgrade.plan.core.UpgradeProblem; -import com.liferay.ide.upgrade.problems.core.FileMigrator; -import com.liferay.ide.upgrade.problems.test.apichanges.APITestBase; - -/** - * @author Ethan Sun - */ -public class Liferay73DeprecatedMethodsTest extends APITestBase { - - @Test - public void deprecatedMethods73TestFile() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(deprecatedMethods73TestFile); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 14, problems.size()); - } - - @Test - public void deprecatedMethodsNoneVersionTestFile() throws Exception { - FileMigrator fmigrator = context.getService(fileMigrators[0]); - - List problems = fmigrator.analyze(deprecatedMethodsNoneVersionTestFile); - - context.ungetService(fileMigrators[0]); - - Assert.assertNotNull(problems); - Assert.assertEquals("", 4, problems.size()); - } - - @Override - public int getExpectedNumber() { - return 17; - } - - @Override - public String getComponentName() { - return "com.liferay.ide.upgrade.problems.core.internal.liferay73.Liferay73DeprecatedMethodsMigrator"; - } - - @Override - public File getTestFile() { - return new File("projects/deprecated-methods-test/liferay73-deprecated-methods-test/Liferay73DeprecatedMethodsTestCase.java"); - } - - public File deprecatedMethods73TestFile = new File( - "projects/deprecated-methods-test/liferay73-deprecated-methods-test/DLUtil.java"); - public File deprecatedMethodsNoneVersionTestFile = new File( - "projects/deprecated-methods-test/liferay73-deprecated-methods-test/SSLSocketFactory.java"); - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/provider/JavaFileJDTTest.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/provider/JavaFileJDTTest.java deleted file mode 100644 index 4ef5bf383a..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/src/com/liferay/ide/upgrade/problems/test/provider/JavaFileJDTTest.java +++ /dev/null @@ -1,605 +0,0 @@ -/** - * 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 com.liferay.ide.upgrade.problems.test.provider; - -import java.io.File; -import java.util.Collection; -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; - -import com.liferay.ide.upgrade.problems.core.FileSearchResult; -import com.liferay.ide.upgrade.problems.core.JavaFile; -import com.liferay.ide.upgrade.problems.core.test.Util; - -/** - * @author Gregory Amerson - * @author Terry Jia - */ -public class JavaFileJDTTest { - - @Test - public void checkGuessMethodInvocation() throws Exception { - File file = new File("tests/files/JavaFileChecker.java"); - - BundleContext context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - - Collection> sr = context.getServiceReferences( - JavaFile.class, "(file.extension=java)"); - - JavaFile javaFileChecker = context.getService(sr.iterator().next()); - - javaFileChecker.setFile(file); - - List results = javaFileChecker.findMethodInvocations( - null, "JavaFileChecker", "staticCall", new String[] {"String", "String", "String"}); - - Assert.assertNotNull(results); - - Assert.assertEquals(results.toString(), 4, results.size()); - - results = javaFileChecker.findMethodInvocations( - "JavaFileChecker", null, "call", new String[] {"String", "String", "String"}); - - Assert.assertNotNull(results); - - Assert.assertEquals(results.toString(), 4, results.size()); - } - - @Test - public void checkMethodInvocation() throws Exception { - File file = new File("tests/files/JavaFileChecker.java"); - - BundleContext context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - - Collection> sr = context.getServiceReferences( - JavaFile.class, "(file.extension=java)"); - - JavaFile javaFileChecker = context.getService(sr.iterator().next()); - - javaFileChecker.setFile(file); - List searchResults = javaFileChecker.findMethodInvocations("Foo", null, "bar", null); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - FileSearchResult searchResult = searchResults.get(0); - - Assert.assertNotNull(searchResult); - - if (Util.isWindows()) { - Assert.assertEquals(searchResults.toString(), 10, searchResult.startLine); - Assert.assertEquals(searchResults.toString(), 11, searchResult.endLine); - Assert.assertEquals(searchResults.toString(), 190, searchResult.startOffset); - Assert.assertEquals(searchResults.toString(), 210, searchResult.endOffset); - } - else { - Assert.assertEquals(searchResults.toString(), 10, searchResult.startLine); - Assert.assertEquals(searchResults.toString(), 11, searchResult.endLine); - Assert.assertEquals(searchResults.toString(), 181, searchResult.startOffset); - Assert.assertEquals(searchResults.toString(), 200, searchResult.endOffset); - } - } - - @Test - public void checkMethodInvocationTypeMatch() throws Exception { - File file = new File("tests/files/JavaFileCheckerTypeMatch.java"); - - BundleContext context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - - Collection> sr = context.getServiceReferences( - JavaFile.class, "(file.extension=java)"); - - JavaFile javaFileChecker = context.getService(sr.iterator().next()); - - javaFileChecker.setFile(file); - - List searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForString", new String[] {"String"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForString", new String[] {"java.lang.String"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForStringFull", new String[] {"String"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForStringFull", new String[] {"java.lang.String"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForStringArray", new String[] {"String[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForStringArray", new String[] {"java.lang.String[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForStringArrayFull", new String[] {"String[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForStringArrayFull", new String[] {"java.lang.String[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForClass", new String[] {"AnyClass"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClass", new String[] {"blade.migrate.liferay70.AnyClass"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClass", new String[] {"anypackage.AnyClass"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 0, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClassArray", new String[] {"AnyClass[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClassArray", new String[] {"blade.migrate.liferay70.AnyClass[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClassArray", new String[] {"anypackage.AnyClass[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 0, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClassFull", new String[] {"AnyClass"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClassFull", new String[] {"anypackage.AnyClass"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 0, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClassFull", new String[] {"blade.migrate.liferay70.AnyClass"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClassArrayFull", new String[] {"AnyClass[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClassArrayFull", new String[] {"blade.migrate.liferay70.AnyClass[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForClassArrayFull", new String[] {"anypackage.AnyClass[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 0, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForObject", new String[] {"Object"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 6, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForObject", new String[] {"java.lang.Object"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 6, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForObjectFull", new String[] {"Object"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 6, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForObjectFull", new String[] {"java.lang.Object"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 6, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForLong", new String[] {"long"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 12, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForLongClass", new String[] {"Long"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForLongClassFull", new String[] {"java.lang.Long"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForLongArray", new String[] {"long[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 1, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForLongArrayClass", new String[] {"Long[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForLongArrayClassFull", new String[] {"java.lang.Long[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForInt", new String[] {"int"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 9, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForIntClass", new String[] {"Integer"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForIntClassFull", new String[] {"java.lang.Integer"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForIntArray", new String[] {"int[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 1, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForIntArrayClass", new String[] {"Integer[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForIntArrayClassFull", new String[] {"java.lang.Integer[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForShort", new String[] {"short"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 6, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForShortClass", new String[] {"Short"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForShortClassFull", new String[] {"java.lang.Short"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForShortArray", new String[] {"short[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 1, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForShortArrayClass", new String[] {"Short[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForShortArrayClassFull", new String[] {"java.lang.Short[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForByte", new String[] {"byte"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForByteClass", new String[] {"Byte"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForByteClassFull", new String[] {"java.lang.Byte"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForByteArray", new String[] {"byte[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 1, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForByteArrayClass", new String[] {"Byte[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForByteArrayClassFull", new String[] {"java.lang.Byte[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForDouble", new String[] {"double"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 6, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForDoubleClass", new String[] {"Double"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForDoubleClassFull", new String[] {"java.lang.Double"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForDoubleArray", new String[] {"double[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 1, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForDoubleArrayClass", new String[] {"Double[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForDoubleArrayClassFull", new String[] {"java.lang.Double[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForFloat", new String[] {"float"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForFloatClass", new String[] {"Float"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForFloatClassFull", new String[] {"java.lang.Float"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForFloatArray", new String[] {"float[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 1, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForFloatArrayClass", new String[] {"Float[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForFloatArrayClassFull", new String[] {"java.lang.Float[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForObjectArray", new String[] {"Object[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 20, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForObjectArrayFull", new String[] {"java.lang.Object[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 20, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForChar", new String[] {"char"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForCharClass", new String[] {"Character"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForCharClassFull", new String[] {"java.lang.Character"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 3, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations("Foo", null, "barForCharArray", new String[] {"char[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 1, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForCharArrayClass", new String[] {"Character[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - - searchResults = javaFileChecker.findMethodInvocations( - "Foo", null, "barForCharArrayClassFull", new String[] {"java.lang.Character[]"}); - - Assert.assertNotNull(searchResults); - - Assert.assertEquals(searchResults.toString(), 2, searchResults.size()); - } - - @Test - public void checkStaticMethodInvocation() throws Exception { - File file = new File("tests/files/JavaFileChecker.java"); - - BundleContext context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - - Collection> sr = context.getServiceReferences( - JavaFile.class, "(file.extension=java)"); - - JavaFile javaFileChecker = context.getService(sr.iterator().next()); - - javaFileChecker.setFile(file); - List searchResults = javaFileChecker.findMethodInvocations(null, "String", "valueOf", null); - - Assert.assertNotNull(searchResults); - - FileSearchResult searchResult = searchResults.get(0); - - Assert.assertNotNull(searchResult); - - if (Util.isWindows()) { - Assert.assertEquals(searchResults.toString(), 14, searchResult.startLine); - Assert.assertEquals(searchResults.toString(), 15, searchResult.endLine); - Assert.assertEquals(searchResults.toString(), 242, searchResult.startOffset); - Assert.assertEquals(searchResults.toString(), 265, searchResult.endOffset); - } - else { - Assert.assertEquals(searchResults.toString(), 14, searchResult.startLine); - Assert.assertEquals(searchResults.toString(), 15, searchResult.endLine); - Assert.assertEquals(searchResults.toString(), 229, searchResult.startOffset); - Assert.assertEquals(searchResults.toString(), 251, searchResult.endOffset); - } - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/JavaFileChecker.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/JavaFileChecker.java deleted file mode 100644 index d80b6257b7..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/JavaFileChecker.java +++ /dev/null @@ -1,50 +0,0 @@ -package blade.migrate.liferay70; - -public class JavaFileChecker { - boolean value = false; - - public static void main(String[] args) { - Foo foo = new Foo(); - - System.out.println( - foo. - bar(value)); - - System.out.println( - String. - valueOf(1)); - - foo.bar("1"); - JavaFileChecker andyTest = new Test(); - String str = null; - andyTest.call(str , str , str); - andyTest.call(str , new String() , str); - andyTest.call(str , new String() , andyTest.getString()); - andyTest.call(str , new String() , strange.getString()); - andyTest.call2(str,str,str); - JavaFileChecker.staticCall(str+"ss", str, str); - JavaFileChecker.staticCall(str , new String() , str); - JavaFileChecker.staticCall(str , new String() , andyTest.getString()); - JavaFileChecker.staticCall(str , new String() , strange.getString()); - } - - Foo foo = new Foo(); - - public void anotherMethod() { - foo.bar("2"); - } - - public void typeTest() { - NotFoo foo = new NotFoo(); - foo.bar(false); - } - - public String getString(){ - return new String(); - } - - - public static void staticCall(String str1 , String str2 , String str3){ - - } -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/JavaFileCheckerTypeMatch.java b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/JavaFileCheckerTypeMatch.java deleted file mode 100644 index 4d4adf9f7e..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/JavaFileCheckerTypeMatch.java +++ /dev/null @@ -1,516 +0,0 @@ -package blade.migrate.liferay70; - -public class JavaFileCheckerTypeMatch { - - public static void main(String[] args) { - Foo foo = new Foo(); - - String s1 = ""; - java.lang.String s2 = ""; - - foo.barForString(s1); - foo.barForString(s2); - - foo.barForStringFull(s1); - foo.barForStringFull(s2); - - String[] sa1 = null; - java.lang.String[] sa2 = null; - - foo.barForStringArray(sa1); - foo.barForStringArray(sa2); - - foo.barForStringArrayFull(sa1); - foo.barForStringArrayFull(sa2); - - AnyClass a1 = null; - blade.migrate.liferay70.AnyClass a2 = null; - - foo.barForClass(a1); - foo.barForClass(a2); - - foo.barForClassFull(a1); - foo.barForClassFull(a2); - - AnyClass[] aa1 = null; - blade.migrate.liferay70.AnyClass[] aa2 = null; - - foo.barForClassArray(aa1); - foo.barForClassArray(aa2); - - foo.barForClassArrayFull(aa1); - foo.barForClassArrayFull(aa2); - - Object o1 = null; - java.lang.Object o2 = null; - - Object[] oa1 = null; - java.lang.Object[] oa2 = null; - - foo.barForObject(o1); - foo.barForObject(o2); - foo.barForObject(a1); - foo.barForObject(a2); - foo.barForObject(s1); - foo.barForObject(s2); - - // Should ignore and couldn't find - foo.barForObject(oa1); - foo.barForObject(oa2); - - // Should ignore and couldn't find - foo.barForObjectFull(oa1); - foo.barForObjectFull(oa2); - - foo.barForObjectFull(o1); - foo.barForObjectFull(o2); - foo.barForObjectFull(a1); - foo.barForObjectFull(a2); - foo.barForObjectFull(s1); - foo.barForObjectFull(s2); - - long l1 = 0; - Long l2 = 0L; - java.lang.Long l3 = 0L; - - long[] la1 = null; - Long[] la2 = null; - java.lang.Long[] la3 = null; - - int i1 = 0; - Integer i2 = 0; - java.lang.Integer i3 = 0; - - int[] ia1 = null; - Integer[] ia2 = null; - java.lang.Integer[] ia3 = null; - - short short1 = 0; - Short short2 = 0; - java.lang.Short short3 = 0; - - short[] shortArray1 = null; - Short[] shortArray2 = null; - java.lang.Short[] shortArray3 = null; - - byte b1 = 0; - Byte b2 = 0; - java.lang.Byte b3 = 0; - - byte[] ba1 = null; - Byte[] ba2 = null; - java.lang.Byte[] ba3 = null; - - foo.barForLong(l1); - foo.barForLong(l2); - foo.barForLong(l3); - - foo.barForLong(i1); - foo.barForLong(i2); - foo.barForLong(i3); - - foo.barForLong(short1); - foo.barForLong(short2); - foo.barForLong(short3); - - foo.barForLong(b1); - foo.barForLong(b2); - foo.barForLong(b3); - - foo.barForLongClass(l1); - foo.barForLongClass(l2); - foo.barForLongClass(l3); - - foo.barForLongClassFull(l1); - foo.barForLongClassFull(l2); - foo.barForLongClassFull(l3); - - foo.barForLongArray(la1); - - foo.barForLongArrayClass(la2); - foo.barForLongArrayClass(la3); - - foo.barForLongArrayClassFull(la2); - foo.barForLongArrayClassFull(la3); - - foo.barForInt(i1); - foo.barForInt(i2); - foo.barForInt(i3); - - foo.barForInt(short1); - foo.barForInt(short2); - foo.barForInt(short3); - - foo.barForInt(b1); - foo.barForInt(b2); - foo.barForInt(b3); - - foo.barForIntClass(i1); - foo.barForIntClass(i2); - foo.barForIntClass(i3); - - foo.barForIntClassFull(i1); - foo.barForIntClassFull(i2); - foo.barForIntClassFull(i3); - - foo.barForIntArray(ia1); - - foo.barForIntArrayClass(ia2); - foo.barForIntArrayClass(ia3); - - foo.barForIntArrayClassFull(ia2); - foo.barForIntArrayClassFull(ia3); - - foo.barForShort(short1); - foo.barForShort(short2); - foo.barForShort(short3); - - foo.barForShort(b1); - foo.barForShort(b2); - foo.barForShort(b3); - - foo.barForShortClass(short1); - foo.barForShortClass(short2); - foo.barForShortClass(short3); - - foo.barForShortClassFull(short1); - foo.barForShortClassFull(short2); - foo.barForShortClassFull(short3); - - foo.barForShortArray(shortArray1); - - foo.barForShortArrayClass(shortArray2); - foo.barForShortArrayClass(shortArray3); - - foo.barForShortArrayClassFull(shortArray2); - foo.barForShortArrayClassFull(shortArray3); - - foo.barForByte(b1); - foo.barForByte(b2); - foo.barForByte(b3); - - foo.barForByteClass(b1); - foo.barForByteClass(b2); - foo.barForByteClass(b3); - - foo.barForByteClassFull(b1); - foo.barForByteClassFull(b2); - foo.barForByteClassFull(b3); - - foo.barForByteArray(ba1); - - foo.barForByteArrayClass(ba2); - foo.barForByteArrayClass(ba3); - - foo.barForByteArrayClassFull(ba2); - foo.barForByteArrayClassFull(ba3); - - double d1 = 0; - Double d2 = 0d; - java.lang.Double d3 = 0d; - - double[] da1 = null; - Double[] da2 = null; - java.lang.Double[] da3 = null; - - float f1 = 0; - Float f2 = 0f; - java.lang.Float f3 = 0f; - - float[] fa1 = null; - Float[] fa2 = null; - java.lang.Float[] fa3 = null; - - foo.barForDouble(d1); - foo.barForDouble(d2); - foo.barForDouble(d3); - - foo.barForDouble(f1); - foo.barForDouble(f2); - foo.barForDouble(f3); - - foo.barForDoubleClass(d1); - foo.barForDoubleClass(d2); - foo.barForDoubleClass(d3); - - foo.barForDoubleClassFull(d1); - foo.barForDoubleClassFull(d2); - foo.barForDoubleClassFull(d3); - - foo.barForDoubleArray(da1); - - foo.barForDoubleArrayClass(da2); - foo.barForDoubleArrayClass(da3); - - foo.barForDoubleArrayClassFull(da2); - foo.barForDoubleArrayClassFull(da3); - - foo.barForFloat(f1); - foo.barForFloat(f2); - foo.barForFloat(f3); - - foo.barForFloatClass(f1); - foo.barForFloatClass(f2); - foo.barForFloatClass(f3); - - foo.barForFloatClassFull(f1); - foo.barForFloatClassFull(f2); - foo.barForFloatClassFull(f3); - - foo.barForFloatArray(fa1); - - foo.barForFloatArrayClass(fa2); - foo.barForFloatArrayClass(fa3); - - foo.barForFloatArrayClassFull(fa2); - foo.barForFloatArrayClassFull(fa3); - - char c1 = 'a'; - Character c2 = 'a'; - java.lang.Character c3 = 'a'; - - char[] ca1 = null; - Character[] ca2 = null; - java.lang.Character[] ca3 = null; - - foo.barForChar(c1); - foo.barForChar(c2); - foo.barForChar(c3); - - foo.barForCharClass(c1); - foo.barForCharClass(c2); - foo.barForCharClass(c3); - - foo.barForCharClassFull(c1); - foo.barForCharClassFull(c2); - foo.barForCharClassFull(c3); - - foo.barForCharArray(ca1); - - foo.barForCharArrayClass(ca2); - foo.barForCharArrayClass(ca3); - - foo.barForCharArrayClassFull(ca2); - foo.barForCharArrayClassFull(ca3); - - foo.barForObjectArray(oa1); - foo.barForObjectArray(oa2); - - foo.barForObjectArray(aa1); - foo.barForObjectArray(aa2); - foo.barForObjectArray(sa1); - foo.barForObjectArray(sa2); - foo.barForObjectArray(la2); - foo.barForObjectArray(la3); - foo.barForObjectArray(ia2); - foo.barForObjectArray(ia3); - foo.barForObjectArray(shortArray2); - foo.barForObjectArray(shortArray3); - foo.barForObjectArray(ba2); - foo.barForObjectArray(ba3); - foo.barForObjectArray(da2); - foo.barForObjectArray(da3); - foo.barForObjectArray(fa2); - foo.barForObjectArray(fa3); - foo.barForObjectArray(ca2); - foo.barForObjectArray(ca3); - - foo.barForObjectArrayFull(oa1); - foo.barForObjectArrayFull(oa2); - - foo.barForObjectArrayFull(aa1); - foo.barForObjectArrayFull(aa2); - foo.barForObjectArrayFull(sa1); - foo.barForObjectArrayFull(sa2); - foo.barForObjectArrayFull(la2); - foo.barForObjectArrayFull(la3); - foo.barForObjectArrayFull(ia2); - foo.barForObjectArrayFull(ia3); - foo.barForObjectArrayFull(shortArray2); - foo.barForObjectArrayFull(shortArray3); - foo.barForObjectArrayFull(ba2); - foo.barForObjectArrayFull(ba3); - foo.barForObjectArrayFull(da2); - foo.barForObjectArrayFull(da3); - foo.barForObjectArrayFull(fa2); - foo.barForObjectArrayFull(fa3); - foo.barForObjectArrayFull(ca2); - foo.barForObjectArrayFull(ca3); - - TFoo tfoo = new TFoo(); - - tfoo.bar(s1); - tfoo.bar(s2); - } - -} - -class Foo { - public Foo() { - } - - void barForString(String s) { - } - - void barForStringFull(java.lang.String s) { - } - - void barForStringArray(String[] s) { - } - - void barForStringArrayFull(java.lang.String[] s) { - } - - void barForClass(AnyClass a) { - } - - void barForClassFull(blade.migrate.liferay70.AnyClass a) { - } - - void barForClassArray(AnyClass[] a) { - } - - void barForClassArrayFull(blade.migrate.liferay70.AnyClass[] a) { - } - - void barForObject(Object o) { - } - - void barForObjectFull(java.lang.Object o) { - } - - void barForLong(long l) { - } - - void barForLongClass(Long l) { - } - - void barForLongClassFull(java.lang.Long l) { - } - - void barForLongArray(long[] l) { - } - - void barForLongArrayClass(Long[] l) { - } - - void barForLongArrayClassFull(java.lang.Long[] l) { - } - - void barForInt(int i) { - } - - void barForIntClass(Integer i) { - } - - void barForIntClassFull(java.lang.Integer i) { - } - - void barForIntArray(int[] i) { - } - - void barForIntArrayClass(Integer[] i) { - } - - void barForIntArrayClassFull(java.lang.Integer[] i) { - } - - void barForShort(short s) { - } - - void barForShortClass(Short s) { - } - - void barForShortClassFull(java.lang.Short s) { - } - - void barForShortArray(short[] s) { - } - - void barForShortArrayClass(Short[] s) { - } - - void barForShortArrayClassFull(java.lang.Short[] s) { - } - - void barForByte(byte b) { - } - - void barForByteClass(Byte b) { - } - - void barForByteClassFull(java.lang.Byte b) { - } - - void barForByteArray(byte[] b) { - } - - void barForByteArrayClass(Byte[] b) { - } - - void barForByteArrayClassFull(java.lang.Byte[] b) { - } - - void barForDouble(double d) { - } - - void barForDoubleClass(Double d) { - } - - void barForDoubleClassFull(java.lang.Double d) { - } - - void barForDoubleArray(double[] d) { - } - - void barForDoubleArrayClass(Double[] d) { - } - - void barForDoubleArrayClassFull(java.lang.Double[] d) { - } - - void barForFloat(float f) { - } - - void barForFloatClass(Float f) { - } - - void barForFloatClassFull(java.lang.Float f) { - } - - void barForFloatArray(float[] f) { - } - - void barForFloatArrayClass(Float[] f) { - } - - void barForFloatArrayClassFull(java.lang.Float[] f) { - } - - void barForObjectArray(Object[] o) { - } - - void barForObjectArrayFull(java.lang.Object[] o) { - } - - void barForChar(char f) { - } - - void barForCharClass(Character f) { - } - - void barForCharClassFull(java.lang.Character f) { - } - - void barForCharArray(char[] f) { - } - - void barForCharArrayClass(Character[] f) { - } - - void barForCharArrayClassFull(java.lang.Character[] f) { - } -} - -class AnyClass { -} diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/build.gradle b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/build.gradle deleted file mode 100644 index c3404bca3b..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/build.gradle +++ /dev/null @@ -1,14 +0,0 @@ -dependencies { - compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bnd.annotation", version: "3.5.0" - compileOnly group: "com.liferay", name: "com.liferay.portal.spring.extender" - compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel" - compileOnly group: "org.osgi", name: "org.osgi.core" - compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations" - compileOnly project(":modules:testsb:testsb-api") -} - -buildService { - apiDir = "../testsb-api/src/main/java" -} - -group = "testsb" \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/liferay-layout-templates.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/liferay-layout-templates.xml deleted file mode 100644 index ab25a973c6..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/liferay-layout-templates.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - /testforLayoutTemplate.tpl - /testforLayoutTemplate.wap.tpl - /testforLayoutTemplate.png - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/pom.xml b/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/pom.xml deleted file mode 100644 index dd94634282..0000000000 --- a/tools/tests/com.liferay.ide.upgrade.problems.core.tests/tests/files/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - testSB-service - 1.0.0 - - testSB - testSB - 1.0.0 - - - - biz.aQute.bnd - biz.aQute.bnd.annotation - 3.5.0 - provided - - - com.liferay - com.liferay.portal.spring.extender - 2.0.0 - provided - - - com.liferay.portal - com.liferay.portal.kernel - 2.6.0 - provided - - - org.osgi - org.osgi.core - 6.0.0 - provided - - - org.osgi - org.osgi.service.component.annotations - 1.3.0 - provided - - - testSB - testSB-api - 1.0.0 - - - - - - com.liferay - com.liferay.portal.tools.service.builder - 1.0.298 - - ../testSB-api/src/main/java - true - true - src/main/resources/META-INF/module-hbm.xml - src/main/java - src/main/resources/META-INF/portlet-model-hints.xml - src/main/resources/META-INF/portlet-model-hints.xml - true - testSB.service.util.ServiceProps - src/main/resources - src/main/resources/META-INF/spring/module-spring.xml - src/main/resources/META-INF/sql - tables.sql - - - - - \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/.classpath b/tools/tests/com.liferay.ide.xml.search.ui.tests/.classpath deleted file mode 100644 index 7f87f1ffe7..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/.project b/tools/tests/com.liferay.ide.xml.search.ui.tests/.project deleted file mode 100644 index 912fdc6260..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/.project +++ /dev/null @@ -1,45 +0,0 @@ - - - com.liferay.ide.xml.search.ui.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - - - 1700017525031 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs b/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index d089a9b734..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 -org.eclipse.jdt.core.compiler.compliance=17 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.m2e.core.prefs b/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/META-INF/MANIFEST.MF b/tools/tests/com.liferay.ide.xml.search.ui.tests/META-INF/MANIFEST.MF deleted file mode 100644 index b5e8db620e..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,27 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-Vendor: %providerName -Bundle-SymbolicName: com.liferay.ide.xml.search.ui.tests -Bundle-Version: 3.10.6.qualifier -Require-Bundle: com.liferay.ide.core, - com.liferay.ide.core.tests, - com.liferay.ide.project.core, - com.liferay.ide.project.core.tests, - com.liferay.ide.server.core.tests, - com.liferay.ide.ui.tests, - com.liferay.ide.xml.search.ui, - org.eclipse.core.resources, - org.eclipse.core.runtime, - org.eclipse.jface.text, - org.eclipse.ui.ide, - org.eclipse.wst.common.project.facet.core, - org.eclipse.wst.sse.core, - org.eclipse.wst.sse.ui, - org.eclipse.wst.validation, - org.eclipse.wst.xml.core, - org.eclipse.wst.xml.search.editor, - org.junit -Bundle-RequiredExecutionEnvironment: JavaSE-17 -Bundle-ActivationPolicy: lazy -Export-Package: com.liferay.ide.xml.search.ui.tests diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/build.properties b/tools/tests/com.liferay.ide.xml.search.ui.tests/build.properties deleted file mode 100644 index a45170a5c0..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = target/classes -bin.includes = META-INF/,\ - .,\ - plugin.properties diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/plugin.properties b/tools/tests/com.liferay.ide.xml.search.ui.tests/plugin.properties deleted file mode 100644 index 271f7ed88b..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/plugin.properties +++ /dev/null @@ -1,2 +0,0 @@ -pluginName=Liferay IDE XML Search UI Tests -providerName=Liferay, Inc. \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/pom.xml b/tools/tests/com.liferay.ide.xml.search.ui.tests/pom.xml deleted file mode 100644 index 403236bc79..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/pom.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - 4.0.0 - - - com.liferay.ide.tools.tests - tools-tests - 3.10.6-SNAPSHOT - - - com.liferay.ide.xml.search.ui.tests - eclipse-test-plugin - - Liferay IDE XML Search UI Tests - - - http://files.liferay.org.es/staged/public-files/liferay-ide/unstable/build/com.liferay.ide-repository/target/repository/ - http://files.liferay.org.es/staged/public-files/liferay-ide/unstable/build/com.liferay.ide.testing-repository/target/repository/ - - - - - - com.googlecode.maven-download-plugin - download-maven-plugin - 1.3.0 - - - download-portal-tomcat-6.2-ga6 - generate-resources - - wget - - - https://releases-cdn.liferay.com/portal/6.2.5-ga6/liferay-portal-tomcat-6.2-ce-ga6-20160112152609836.zip - ${liferay.bundles.dir} - liferay-portal-tomcat-6.2-ce-ga6-20160112152609836.zip - 22d4846a10b17e93c9729e909ccffda8 - true - - - - download-plugins-sdk-6.2-ga6 - generate-resources - - wget - - - https://releases-cdn.liferay.com/portal/6.2.5-ga6/liferay-plugins-sdk-6.2-ce-ga6-20171101150212422.zip - ${liferay.bundles.dir} - liferay-plugins-sdk-6.2-ce-ga6-20171101150212422.zip - f021052bd71d72043c830a1fbe2b2c36 - true - - - - download-ivy-cache-70 - generate-resources - - wget - - - http://us-east-1.linodeobjects.com/devtools-s3.liferay.com/liferay-ide-files/zips/ivy-cache-7.0.zip - ${liferay.bundles.dir} - ivy-cache-7.0.zip - 22625f72b6daa86f68ae0e06fc4c1f12 - true - - - - - - org.eclipse.tycho - tycho-maven-plugin - true - - - org.eclipse.tycho - tycho-surefire-plugin - - - default-test - none - - test - - - - - - org.eclipse.tycho - target-platform-configuration - - - - - eclipse-feature - com.liferay.ide.eclipse.tools - 0.0.0 - - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - com.googlecode.maven-download-plugin - - - download-maven-plugin - - - [1.3.0,) - - - wget - - - - - - - - - - - - - - - - - runtest - - - eclipse-site - p2 - ${eclipse-site} - - - eclipse-project - p2 - ${eclipse-project-update-site} - - - gradle - p2 - ${gradle-site} - - - liferay-ide - p2 - ${liferay-ide-site} - - - liferay-ide-testing - p2 - ${liferay-ide-testing-site} - - - - - - - org.eclipse.tycho - tycho-surefire-plugin - ${tycho-version} - - true - true - org.eclipse.ui.ide.workbench - - **/*Test*.class - - -Xmx1024m -XX:MaxPermSize=512m - - ${liferay.bundles.dir} - ${skipBundleTests} - - ${skipTests} - - - eclipse-feature - org.eclipse.platform - 0.0.0 - - - - - - test - - - - - - - - diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/projects/Liferay-Hook-Xml-Test-hook.zip b/tools/tests/com.liferay.ide.xml.search.ui.tests/projects/Liferay-Hook-Xml-Test-hook.zip deleted file mode 100644 index 6c0a9f33d6..0000000000 Binary files a/tools/tests/com.liferay.ide.xml.search.ui.tests/projects/Liferay-Hook-Xml-Test-hook.zip and /dev/null differ diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/projects/Liferay-Layout-Templates-Xml-Test-layouttpl.zip b/tools/tests/com.liferay.ide.xml.search.ui.tests/projects/Liferay-Layout-Templates-Xml-Test-layouttpl.zip deleted file mode 100644 index 1afe405c38..0000000000 Binary files a/tools/tests/com.liferay.ide.xml.search.ui.tests/projects/Liferay-Layout-Templates-Xml-Test-layouttpl.zip and /dev/null differ diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/projects/Portlet-Xml-Test-portlet.zip b/tools/tests/com.liferay.ide.xml.search.ui.tests/projects/Portlet-Xml-Test-portlet.zip deleted file mode 100644 index d85c62b761..0000000000 Binary files a/tools/tests/com.liferay.ide.xml.search.ui.tests/projects/Portlet-Xml-Test-portlet.zip and /dev/null differ diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/JSPFileValidationTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/JSPFileValidationTests.java deleted file mode 100644 index d26cea4946..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/JSPFileValidationTests.java +++ /dev/null @@ -1,491 +0,0 @@ - -package com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerResolutionByClass; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setAttrValue; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.verifyQuickFix; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import com.liferay.ide.core.util.CoreUtil; -import com.liferay.ide.project.core.ValidationPreferences; -import com.liferay.ide.xml.search.ui.AddResourceKeyMarkerResolution; -import com.liferay.ide.xml.search.ui.XMLSearchConstants; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseInstanceScopeXmlValidationLevel; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseProjectScopeXmlValidationLevel; -import com.liferay.ide.xml.search.ui.validators.LiferayBaseValidator; -import com.liferay.ide.xml.search.ui.validators.LiferayJspValidator; - -import java.text.MessageFormat; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; - -public class JSPFileValidationTests extends XmlSearchTestsBase -{ - - private static IProject project; - private IFile jspFile; - final String markerType = XMLSearchConstants.LIFERAY_JSP_MARKER_ID; - - public IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "portlets", "Portlet-Xml-Test-portlet" ); - deleteOtherProjects( project ); - } - - return project; - } - - public IFile getFile( String fileName ) throws Exception - { - - jspFile = CoreUtil.getDefaultDocrootFolder( getProject() ).getFile( fileName ); - - if( jspFile != null && jspFile.exists() ) - { - return jspFile; - } - - return null; - } - - @Before - public void cleanupMarkers() throws Exception - { - jspFile = getFile( "test-jsp-validation.jsp" ); - assertNotNull( jspFile ); - - ZipFile projectFile = new ZipFile( getProjectZip( getBundleId(), "Portlet-Xml-Test-portlet" ) ); - ZipEntry entry = projectFile.getEntry( "Portlet-Xml-Test-portlet/docroot/test-jsp-validation.jsp" ); - - jspFile.setContents( projectFile.getInputStream( entry ), IResource.FORCE, new NullProgressMonitor() ); - projectFile.close(); - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - void ValidateAttrPropertyNotFound( String elementName, String attrName, String attrValue ) throws Exception - { - setAttrValue( jspFile, elementName, attrName, attrValue ); - buildAndValidate( jspFile ); - String errorMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_PROPERTY_NOT_FOUND, new Object[] { attrValue, - "Language.properties" } ); - boolean findExpectedMarker = checkMarkerByMessage( jspFile, markerType, errorMessage, true ); - if( !findExpectedMarker ) - { - buildAndValidate( jspFile ); - findExpectedMarker = checkMarkerByMessage( jspFile, markerType, errorMessage, true ); - } - assertTrue( findExpectedMarker ); - } - - void ValidateAttrPropertyCorrect( String elementName, String attrName ) throws Exception - { - int random = (int) ( Math.random() * 100 ); - String attrValue = attrName + "Test" + random; - setAttrValue( jspFile, elementName, attrName, attrValue ); - buildAndValidate( jspFile ); - - String markerMessageRegex = - MessageFormat.format( LiferayBaseValidator.MESSAGE_PROPERTY_NOT_FOUND, new Object[] { attrValue, - "Language.properties" } ); - - quickFixChangeValidationLevel( markerMessageRegex ); - buildAndValidate( jspFile ); - verifyQuickFix( jspFile, markerType, markerMessageRegex, AddResourceKeyMarkerResolution.class ); - - } - - void ValidateAttrMethodNotFound( String elementName, String attrName, String attrValue ) throws Exception - { - setAttrValue( jspFile, elementName, attrName, attrValue ); - buildAndValidate( jspFile ); - - final String expectedMessage = "Method " + '"' + attrValue + '"' + " not found."; - assertEquals( true, checkMarkerByMessage( jspFile, markerType, expectedMessage, true ) ); - quickFixChangeValidationLevel( expectedMessage+".*" ); - } - - public void quickFixChangeValidationLevel( String markerMessageRegex ) throws Exception - { - IMarker expectedMarker = findMarkerByMessage( jspFile, markerType, markerMessageRegex + ".*", false ); - String liferayPluginValidationType = - expectedMarker.getAttribute( XMLSearchConstants.LIFERAY_PLUGIN_VALIDATION_TYPE, null ); - - assertNotNull( findMarkerResolutionByClass( expectedMarker, DecreaseInstanceScopeXmlValidationLevel.class ) ); - - verifyQuickFix( jspFile, markerType, markerMessageRegex, DecreaseProjectScopeXmlValidationLevel.class ); - - ValidationPreferences.setProjectScopeValidationLevel( - expectedMarker.getResource().getProject(), liferayPluginValidationType, 2 ); - } - - @Test - public void testMessageKey() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-ui:message"; - String attrName = "key"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testMessage() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-ui:error"; - String attrName = "message"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testLable() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "aui:input"; - String attrName = "label"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testHelpMessage() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "aui:input"; - String attrName = "helpMessage"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testSuffix() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "aui:input"; - String attrName = "suffix"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testATitle() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "aui:a"; - String attrName = "title"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testHeaderTitle() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-ui:header"; - String attrName = "title"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testPanelTitle() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-ui:panel"; - String attrName = "title"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testALable() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "aui:a"; - String attrName = "label"; - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testButtonValue() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "aui:button"; - String attrName = "value"; - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testPlaceholder() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "aui:input"; - String attrName = "placeholder"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testWorkflowstatusStatusMessage() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "aui:workflow-status"; - String attrName = "statusMessage"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testIcondeleteConfirmation() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-ui:icon-delete"; - String attrName = "confirmation"; - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testInputmoveboxesRighgtitle() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-ui:input-move-boxes"; - String attrName = "rightTitle"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testInputmoveboxesLefttitle() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-ui:input-move-boxes"; - String attrName = "leftTitle"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testSocialActivitiesFeedLinkMessage() throws Exception - { - if( shouldSkipBundleTests() )return; - String elementName = "liferay-ui:social-activities"; - String attrName = "feedLinkMessage"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testSearchContainerEmptyResulsMessage() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-ui:search-container"; - String attrName = "emptyResultsMessage"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } - - @Test - public void testActionURLName() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-portlet:actionURL"; - String attrName = "name"; - buildAndValidate( jspFile ); - Thread.sleep( 15000 ); - ValidateAttrMethodNotFound( elementName, attrName, "foo" ); - ValidateAttrMethodNotFound( elementName, attrName, "" ); - - setAttrValue( jspFile, elementName, attrName, "beamMe" ); - buildAndValidate( jspFile ); - - String markerMessage = ".*" + "beamMe" + ".*"; - assertEquals( false, checkMarkerByMessage( jspFile, elementName, markerMessage, false ) ); - } - - @Test - public void testLiferayPortletParam() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "liferay-portlet:param"; - testTagParamValidation( elementName ); - } - - @Test - public void testPortletParam() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "portlet:param"; - testTagParamValidation( elementName ); - } - - @Test - public void testAuiClass() throws Exception - { - if( shouldSkipBundleTests() )return; - - assertEquals( - true, - checkMarkerByMessage( jspFile, markerType, LiferayJspValidator.MESSAGE_CLASS_ATTRIBUTE_NOT_WORK, true ) ); - - } - - public void testTagParamValidation( String elementName ) throws Exception - { - if( shouldSkipBundleTests() )return; - - String nameAttr = "foo"; - String valueAttr = "foo"; - - String markerMessage = "Type " + '"' + valueAttr + '"' + " not found."; - - // name is not action type - setAttrValue( jspFile, elementName, "name", nameAttr ); - setAttrValue( jspFile, elementName, "value", valueAttr ); - buildAndValidate( jspFile ); - assertEquals( false, checkMarkerByMessage( jspFile, markerType, markerMessage, true ) ); - - // name is variable - nameAttr = "<%= ActionRequest.ACTION_NAME %>"; - - setAttrValue( jspFile, elementName, "name", nameAttr ); - buildAndValidate( jspFile ); - assertEquals( true, checkMarkerByMessage( jspFile, markerType, markerMessage, true ) ); - - valueAttr = "com.liferay.ide.tests.Orphan"; - setAttrValue( jspFile, elementName, "value", valueAttr ); - buildAndValidate( jspFile ); - markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { valueAttr, - "com.liferay.util.bridges.mvc.ActionCommand" } ); - - assertEquals( true, checkMarkerByMessage( jspFile, markerType, markerMessage, true ) ); - valueAttr = "com.liferat.ide.tests.PortletActionImpl"; - setAttrValue( jspFile, elementName, "value", valueAttr ); - markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { valueAttr, - "com.liferay.util.bridges.mvc.ActionCommand" } ); - assertEquals( false, checkMarkerByMessage( jspFile, markerType, markerMessage, true ) ); - - // name is action - nameAttr = "javax.portlet.action"; - valueAttr = "foo"; - - setAttrValue( jspFile, elementName, "name", nameAttr ); - setAttrValue( jspFile, elementName, "value", valueAttr ); - markerMessage = "Type " + '"' + valueAttr + '"' + " not found."; - buildAndValidate( jspFile ); - - assertEquals( true, checkMarkerByMessage( jspFile, markerType, markerMessage, true ) ); - valueAttr = "com.liferay.ide.tests.Orphan"; - setAttrValue( jspFile, elementName, "value", valueAttr ); - buildAndValidate( jspFile ); - markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { valueAttr, - "com.liferay.util.bridges.mvc.ActionCommand" } ); - - assertEquals( true, checkMarkerByMessage( jspFile, markerType, markerMessage, true ) ); - valueAttr = "com.liferat.ide.tests.PortletActionImpl"; - setAttrValue( jspFile, elementName, "value", valueAttr ); - markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { valueAttr, - "com.liferay.util.bridges.mvc.ActionCommand" } ); - assertEquals( false, checkMarkerByMessage( jspFile, markerType, markerMessage, true ) ); - } - - @Test - public void testValidatorErrorMessage() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "aui:validator"; - String attrName = "errorMessage"; - - ValidateAttrPropertyNotFound( elementName, attrName, "foo" ); - ValidateAttrPropertyNotFound( elementName, attrName, "" ); - ValidateAttrPropertyCorrect( elementName, attrName ); - } -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayDisplayXmlTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayDisplayXmlTests.java deleted file mode 100644 index b274bbe7af..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayDisplayXmlTests.java +++ /dev/null @@ -1,189 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.containsProposal; -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.containHyperlink; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerResolutionByClass; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getHyperLinksForAttr; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getProposalsForAttr; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getTextHoverForAttr; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setAttrValue; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; -import com.liferay.ide.xml.search.ui.editor.LiferayCustomXmlViewerConfiguration; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseInstanceScopeXmlValidationLevel; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseProjectScopeXmlValidationLevel; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IProject; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.hyperlink.IHyperlink; -import org.junit.AfterClass; -import org.junit.Test; - -/** - * @author Kuo Zhang - * @author Li Lu - */ -public class LiferayDisplayXmlTests extends XmlSearchTestsBase -{ - - protected final static String MARKER_TYPE = XML_REFERENCES_MARKER_TYPE; - private IFile descriptorFile; - private static IProject project; - - protected IFile getDescriptorFile() throws Exception - { - return descriptorFile != null ? descriptorFile : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.LIFERAY_DISPLAY_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "portlets", "Portlet-Xml-Test-portlet" ); - deleteOtherProjects( project ); - } - - return project; - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - @Test - public void testPortletAtIdContentAssist() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final IFile descriptorFile = getDescriptorFile(); - final String elementName = "portlet"; - final String attrName = "id"; - - String attrValue = ""; - setAttrValue( descriptorFile, elementName, attrName, attrValue ); - - final ICompletionProposal[] proposals = getProposalsForAttr( descriptorFile, elementName, attrName ); - assertNotNull( proposals ); - assertEquals( true, proposals.length > 0 ); - - final String expectedProposalString = "Portlet-Xml-Test"; - assertEquals( true, containsProposal( proposals, expectedProposalString, true ) ); - - attrValue = "Portlet-Xml-Test"; - setAttrValue( descriptorFile, elementName, attrName, attrValue ); - buildAndValidate( descriptorFile ); - } - - @Test - public void testPortletAtIdHyperlink() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final IFile descriptorFile = getDescriptorFile(); - final String elementName = "portlet"; - final String attrName = "id"; - - IHyperlink[] hyperlinks = getHyperLinksForAttr( descriptorFile, elementName, attrName ); - final String expectedHyperlinkText = "/Portlet-Xml-Test-portlet/docroot/WEB-INF/portlet.xml"; - - containHyperlink( hyperlinks, expectedHyperlinkText, false ); - } - - // a better way to test text hover ? - - @Test - public void testPortletAtIdTextHover() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final IFile descriptorFile = getDescriptorFile(); - final String elementName = "portlet"; - final String attrName = "id"; - - setAttrValue( descriptorFile, elementName, attrName, "Portlet-Xml-Test" ); - buildAndValidate( descriptorFile ); - - final String[] displayTexts = getTextHoverForAttr( descriptorFile, elementName, attrName ); - assertNotNull( displayTexts ); - assertEquals( true, displayTexts.length > 0 ); - - boolean flag = false; - - for( String text : displayTexts ) - { - if( text.contains( "Portlet name" ) && text.contains( "Display name" ) && - text.contains( "Portlet class" ) && text.contains( "File" ) ) - { - flag = true; - break; - } - } - - assertEquals( true, flag ); - } - - @Test - public void testSourceViewerConfiguration() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final IFile descriptorFile = getDescriptorFile(); - Object sourceViewerConfiguration = - XmlSearchTestsUtils.getSourceViewerConfiguraionFromOpenedEditor( descriptorFile ); - - assertEquals( true, sourceViewerConfiguration instanceof LiferayCustomXmlViewerConfiguration ); - } - - @Test - public void testPortletAtIdQuickFix() throws Exception - { - if( shouldSkipBundleTests() )return; - - final IFile descriptorFile = getDescriptorFile(); - final String elementName = "portlet"; - final String attrName = "id"; - - setAttrValue( descriptorFile, elementName, attrName, "Wrong-Xml-Reference" ); - buildAndValidate( descriptorFile ); - - String markerMessageRegex = ".*" + "Wrong-Xml-Reference" + ".*"; - IMarker expectedMarker = findMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessageRegex, false ); - assertNotNull( findMarkerResolutionByClass( expectedMarker, DecreaseProjectScopeXmlValidationLevel.class ) ); - assertNotNull( findMarkerResolutionByClass( expectedMarker, DecreaseInstanceScopeXmlValidationLevel.class ) ); - } - -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayDisplayXmlValidationTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayDisplayXmlValidationTests.java deleted file mode 100644 index 168b7e817f..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayDisplayXmlValidationTests.java +++ /dev/null @@ -1,137 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkNoMarker; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setAttrValue; -import static org.junit.Assert.assertEquals; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; -import com.liferay.ide.xml.search.ui.validators.LiferayDisplayDescriptorValidator; - -import java.text.MessageFormat; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; - -/** - * @author Li Lu - */ -public class LiferayDisplayXmlValidationTests extends XmlSearchTestsBase -{ - - protected final static String MARKER_TYPE = XML_REFERENCES_MARKER_TYPE; - private IFile descriptorFile; - private static IProject project; - - protected IFile getDescriptorFile() throws Exception - { - return descriptorFile != null ? descriptorFile : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.LIFERAY_DISPLAY_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "portlets", "Portlet-Xml-Test-portlet" ); - deleteOtherProjects( project ); - } - - return project; - } - - @Before - public void cleanupMarkers() throws Exception - { - descriptorFile = getDescriptorFile(); - ZipFile projectFile = new ZipFile( getProjectZip( getBundleId(), "Portlet-Xml-Test-portlet" ) ); - ZipEntry entry = projectFile.getEntry( "Portlet-Xml-Test-portlet/docroot/WEB-INF/liferay-display.xml" ); - - descriptorFile.setContents( projectFile.getInputStream( entry ), IResource.FORCE, new NullProgressMonitor() ); - projectFile.close(); - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - @Test - public void testPortletAtId() throws Exception - { - if( shouldSkipBundleTests() )return; - - final String elementName = "portlet"; - final String attrName = "id"; - - final String wrongAttrValue = "Wrong-Xml-Reference"; - setAttrValue( descriptorFile, elementName, attrName, wrongAttrValue ); - - String markerMessage = - MessageFormat.format( LiferayDisplayDescriptorValidator.MESSAGE_REFERENCE_NOT_FOUND, new Object[] { - wrongAttrValue, "portlet.xml" } ); - - buildAndValidate( descriptorFile ); - assertEquals( true, checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - - final String correctAttrValue = "Portlet-Xml-Test"; - setAttrValue( descriptorFile, elementName, attrName, correctAttrValue ); - buildAndValidate( descriptorFile ); - assertEquals( true, checkNoMarker( descriptorFile, MARKER_TYPE ) ); - } - - @Test - public void testCategoryAtName() throws Exception - { - if( shouldSkipBundleTests() )return; - - final String elementName = "category"; - final String attrName = "name"; - - setAttrValue( descriptorFile, elementName, attrName, " " ); - - String markerMessage = LiferayDisplayDescriptorValidator.MESSAGE_CATEGORY_NAME_CANNOT_BE_EMPTY; - - buildAndValidate( descriptorFile ); - assertEquals( true, checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - - final String correctAttrValue = "category.sample"; - setAttrValue( descriptorFile, elementName, attrName, correctAttrValue ); - buildAndValidate( descriptorFile ); - assertEquals( true, checkNoMarker( descriptorFile, MARKER_TYPE ) ); - } -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayHookXmlTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayHookXmlTests.java deleted file mode 100644 index de20419b08..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayHookXmlTests.java +++ /dev/null @@ -1,323 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.containsProposal; -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.containHyperlink; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerResolutionByClass; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getHyperLinksForElement; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getProposalsForElement; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setElementContent; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; -import com.liferay.ide.xml.search.ui.editor.LiferayCustomXmlViewerConfiguration; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseInstanceScopeXmlValidationLevel; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseProjectScopeXmlValidationLevel; - -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.hyperlink.IHyperlink; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; - -/** - * @author Kuo Zhang - */ -public class LiferayHookXmlTests extends XmlSearchTestsBase -{ - - protected final static String MARKER_TYPE = XML_REFERENCES_MARKER_TYPE; - private IFile descriptorFile; - private static IProject project; - - protected IFile getDescriptorFile() throws Exception - { - return descriptorFile != null ? descriptorFile : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.LIFERAY_HOOK_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "hooks", "Liferay-Hook-Xml-Test-hook" ); - deleteOtherProjects( project ); - } - - return project; - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - @Before - public void cleanupMarkers() throws Exception - { - descriptorFile = getDescriptorFile(); - ZipFile projectFile = new ZipFile( getProjectZip( getBundleId(), "Liferay-Hook-Xml-Test-hook" ) ); - ZipEntry entry = projectFile.getEntry( "Liferay-Hook-Xml-Test-hook/docroot/WEB-INF/liferay-hook.xml" ); - - descriptorFile.setContents( projectFile.getInputStream( entry ), IResource.FORCE, new NullProgressMonitor() ); - projectFile.close(); - } - - public void validateContentAssistForElement( String elementName, String elementContent, String[] expectedProposal ) - throws Exception - { - descriptorFile = getDescriptorFile(); - setElementContent( descriptorFile, elementName, elementContent ); - buildAndValidate( descriptorFile ); - - final ICompletionProposal[] proposals = getProposalsForElement( descriptorFile, elementName ); - assertNotNull( proposals ); - assertEquals( true, proposals.length > 0 ); - - for( String proposal : expectedProposal ) - { - assertTrue( - "can't get proposal " + proposal + " in " + elementName, containsProposal( proposals, proposal, true ) ); - } - } - - public void validateHyperLinksForElement( String elementName, String expectedHyperlinkText ) throws Exception - { - descriptorFile = getDescriptorFile(); - IHyperlink[] hyperLinks = getHyperLinksForElement( descriptorFile, elementName ); - assertTrue( containHyperlink( hyperLinks, expectedHyperlinkText, true ) ); - } - - public void validateQuickFixForElements( String elementName, String elementContent, String markerMessageRegex ) - throws Exception - { - //check all types of elements has quick fix for decrease validation level in current project and all project - descriptorFile = getDescriptorFile(); - setElementContent( descriptorFile, elementName, elementContent ); - buildAndValidate( descriptorFile ); - - IMarker expectedMarker = findMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessageRegex, false ); - assertNotNull( findMarkerResolutionByClass( expectedMarker, DecreaseProjectScopeXmlValidationLevel.class ) ); - assertNotNull( findMarkerResolutionByClass( expectedMarker, DecreaseInstanceScopeXmlValidationLevel.class ) ); - } - - @Test - public void testIndexerClassName() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "indexer-class-name"; - String elementContent = ""; - - String expectedHyperlinkText = "Open 'Indexer - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String[] expectedProposal = { "Indexer - com.liferay.ide.tests" }; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "com.liferay.ide.tests"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - String markerMessageRegex = ".*" + elementContent + ".*"; - validateQuickFixForElements( elementName, elementContent, markerMessageRegex ); - } - - @Test - public void testIndexerPostProcesserImpl() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "indexer-post-processor-impl"; - String elementContent = ""; - - String expectedHyperlinkText = "Open 'IndexerPostProcessorImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String[] expectedProposal = { "IndexerPostProcessorImpl - com.liferay.ide.tests" }; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "com.liferay.ide.tests"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - String markerMessageRegex = ".*" + elementContent + ".*"; - validateQuickFixForElements( elementName, elementContent, markerMessageRegex ); - } - - @Test - public void testLanguageProperties() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "language-properties"; - String elementContent = ""; - - String expectedHyperlinkText = - "Open '/Liferay-Hook-Xml-Test-hook/docroot/WEB-INF/src/content/Language.properties'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String[] expectedProposal = { "content/Language.properties" }; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "content/"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - String markerMessageRegex = ".*" + elementContent + ".*"; - validateQuickFixForElements( elementName, elementContent, markerMessageRegex ); - } - - @Test - public void testPortalProperties() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "portal-properties"; - String elementContent = ""; - - String expectedHyperlinkText = "Open '/Liferay-Hook-Xml-Test-hook/docroot/WEB-INF/src/content/portal.properties'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String[] expectedProposal = { "content/portal.properties" }; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "content/"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - String markerMessageRegex = ".*" + elementContent + ".*"; - validateQuickFixForElements( elementName, elementContent, markerMessageRegex ); - - } - - @Test - public void testCustomJspDir() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "custom-jsp-dir"; - String elementContent = ""; - - String[] expectedProposal = { "/WEB-INF/src" }; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "/WEB-INF"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "/custom_jspsNotExist"; - String markerMessageRegex = ".*" + elementContent + ".*"; - validateQuickFixForElements( elementName, elementContent, markerMessageRegex ); - } - - @Test - public void testServiceType() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "service-type"; - - String expectedHyperlinkText = "Open 'AccountService - com.liferay.portal.service'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - } - - @Test - public void testServiceImpl() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "service-impl"; - String expectedHyperlinkText = "Open 'AccountServiceWrapperImpl - com.liferay.ide.tests'"; - - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - } - - @Test - public void testServletFilterImpl() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "servlet-filter-impl"; - String elementContent = ""; - - String expectedHyperlinkText = "Open 'ServletFilterImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String[] expectedProposal = { "ServletFilterImpl - com.liferay.ide.tests" }; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "com.liferay.ide.tests"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - String markerMessageRegex = ".*" + elementContent + ".*"; - validateQuickFixForElements( elementName, elementContent, markerMessageRegex ); - } - - @Test - public void testStrutsActionImpl() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "struts-action-impl"; - String elementContent = ""; - - String expectedHyperlinkText = "Open 'StrutsActionImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String[] expectedProposal = { "StrutsActionImpl - com.liferay.ide.tests" }; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "com.liferay.ide.tests"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - String markerMessageRegex = ".*" + elementContent + ".*"; - validateQuickFixForElements( elementName, elementContent, markerMessageRegex ); - } - - @Test - public void testSourceViewerConfiguration() throws Exception - { - if( shouldSkipBundleTests() )return; - - final IFile descriptorFile = getDescriptorFile(); - Object sourceViewerConfiguration = - XmlSearchTestsUtils.getSourceViewerConfiguraionFromOpenedEditor( descriptorFile ); - - assertEquals( true, sourceViewerConfiguration instanceof LiferayCustomXmlViewerConfiguration ); - } - -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayHookXmlValidationTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayHookXmlValidationTests.java deleted file mode 100644 index fab668ed8b..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayHookXmlValidationTests.java +++ /dev/null @@ -1,392 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setElementContent; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; -import com.liferay.ide.xml.search.ui.validators.LiferayBaseValidator; -import com.liferay.ide.xml.search.ui.validators.LiferayHookDescriptorValidator; - -import java.text.MessageFormat; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; - -/** - * @author Li Lu - */ -public class LiferayHookXmlValidationTests extends XmlSearchTestsBase -{ - - protected final static String MARKER_TYPE = XML_REFERENCES_MARKER_TYPE; - private IFile descriptorFile; - private static IProject project; - - protected IFile getDescriptorFile() throws Exception - { - return descriptorFile != null ? descriptorFile : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.LIFERAY_HOOK_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "hooks", "Liferay-Hook-Xml-Test-hook" ); - deleteOtherProjects( project ); - } - - return project; - } - - @Before - public void cleanupMarkers() throws Exception - { - descriptorFile = getDescriptorFile(); - ZipFile projectFile = new ZipFile( getProjectZip( getBundleId(), "Liferay-Hook-Xml-Test-hook" ) ); - ZipEntry entry = projectFile.getEntry( "Liferay-Hook-Xml-Test-hook/docroot/WEB-INF/liferay-hook.xml" ); - - descriptorFile.setContents( projectFile.getInputStream( entry ), IResource.FORCE, new NullProgressMonitor() ); - projectFile.close(); - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - public void validateElementsIncorrectValue( String elementName, String elementValue, String markerMessage ) - throws Exception - { - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - } - - public void validateElementcorrectValue( String elementName, String elementValue ) - throws Exception - { - String markerMessageRegex = ".*" + elementValue +".*"; - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - assertFalse( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessageRegex, false ) ); - } - - @Test - public void testPortalProperties() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "portal-properties"; - String elementValue = null; - String markerMessage = null; - - // portal-properties value doesn't end with ".properties" - elementValue = "PortalPropertiesNotEndProperties"; - markerMessage = - MessageFormat.format( - LiferayHookDescriptorValidator.MESSAGE_PROPERTIES_NOT_END_WITH_PROPERTIES, - new Object[] { elementValue } ); - - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // portal properties file doesn't exist - elementValue = "PortalPropertiesNotExist.properties"; - markerMessage = - MessageFormat.format( - LiferayHookDescriptorValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { elementValue } ); - - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // portal properties file exists - elementValue = "PortalPropertiesExist.properties"; - validateElementcorrectValue( elementName, elementValue ); - - // portal properties file is null - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { "" } ); - validateElementsIncorrectValue( elementName, "", markerMessage ); - } - - @Test - public void testLanguageProperties() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "language-properties"; - String elementValue = null; - String markerMessage = null; - - // language-properties value doesn't end with ".properties" - elementValue = "LanguagePropertiesNotEndProperties"; - markerMessage = - MessageFormat.format( - LiferayHookDescriptorValidator.MESSAGE_PROPERTIES_NOT_END_WITH_PROPERTIES, - new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // language properties file doesn't exist - elementValue = "LanguagePropertiesNotExist.properties"; - markerMessage = - MessageFormat.format( - LiferayHookDescriptorValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "content/LanguagePropertiesNotExist.properties"; - markerMessage = - MessageFormat.format( - LiferayHookDescriptorValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // language properties file exists - elementValue = "LanguagePropertiesExist.properties"; - validateElementcorrectValue( elementName, elementValue ); - - elementValue = "content/Language.properties"; - validateElementcorrectValue( elementName, elementValue ); - - // language properties file with "*" doesn't exist - elementValue = "LanguagePropertiesNotExist*.properties"; - markerMessage = - MessageFormat.format( - LiferayHookDescriptorValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // language properties file with "*" exists - elementValue = "LanguagePropertiesExist*.properties"; - validateElementcorrectValue( elementName, elementValue ); - - // set to a "" value - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { "" } ); - validateElementsIncorrectValue( elementName, "", markerMessage ); - } - - @Test - public void testCustomJspDir() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "custom-jsp-dir"; - - String elementValue = "/custom_jspsNotExist"; - String markerMessage = - MessageFormat.format( - LiferayHookDescriptorValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // path incorrect test - elementValue = "/custom_jsps"; - markerMessage = - MessageFormat.format( - LiferayHookDescriptorValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // set to correct jsp dir - elementValue = "/WEB-INF/src"; - validateElementcorrectValue( elementName, elementValue ); - - // set to null - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { "" } ); - validateElementsIncorrectValue( elementName, "", markerMessage ); - } - - @Test - public void testServiceTypeAndServiceImpl() throws Exception - { - if( shouldSkipBundleTests() ) return; - - String elementName = "service-type"; - - // type not exist - String elementValue = "Foo"; - String markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // type is not an interface - elementValue = "com.liferay.ide.tests.Orphan"; - markerMessage = - MessageFormat.format( - LiferayHookDescriptorValidator.MESSAGE_SERVICE_TYPE_NOT_INTERFACE, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // validate type hierarchy - elementValue = "com.liferay.ide.tests.InterfaceTest"; - markerMessage = LiferayHookDescriptorValidator.MESSAGE_SERVICE_TYPE_INVALID; - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - // set to "" - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { "" } ); - validateElementsIncorrectValue( elementName, "", markerMessage ); - - // correct - elementValue = "com.liferay.portal.service.AccountService"; - validateElementcorrectValue( elementName, elementValue ); - - // service-impl test - elementName = "service-impl"; - elementValue = "Foo"; - - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.Orphan"; - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_SERVICE_IMPL_TYPE_INCORRECT, new Object[] { - elementValue, "com.liferay.portal.service.AccountServiceWrapper" } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.AccountServiceWrapperImpl"; - validateElementcorrectValue( elementName, elementValue ); - - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { "" } ); - validateElementsIncorrectValue( elementName, "", markerMessage ); - } - - @Test - public void testIndexerClassName() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "indexer-class-name"; - - String elementValue = "Foo"; - String markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.Orphan"; - markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { elementValue, - "com.liferay.portal.model.BaseModel" } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.Indexer"; - validateElementcorrectValue( elementName, elementValue ); - - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { "" } ); - validateElementsIncorrectValue( elementName, "", markerMessage ); - } - - @Test - public void testIndexerPostProcesserImpl() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "indexer-post-processor-impl"; - - String elementValue = "Foo"; - String markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.Orphan"; - markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { elementValue, - "com.liferay.portal.kernel.search.IndexerPostProcessor" } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.IndexerPostProcessorImpl"; - validateElementcorrectValue( elementName, elementValue ); - - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { "" } ); - validateElementsIncorrectValue( elementName, "", markerMessage ); - } - - @Test - public void testServletFilterImpl() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "servlet-filter-impl"; - - String elementValue = "Foo"; - String markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.Orphan"; - markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { elementValue, - "javax.servlet.Filter" } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.ServletFilterImpl"; - validateElementcorrectValue( elementName, elementValue ); - - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { "" } ); - validateElementsIncorrectValue( elementName, "", markerMessage ); - } - - @Test - public void testStrutsActionImpl() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "struts-action-impl"; - - String elementValue = "Foo"; - String markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { elementValue } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.Orphan"; - markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { elementValue, - "com.liferay.portal.kernel.struts.StrutsAction, com.liferay.portal.kernel.struts.StrutsPortletAction" } ); - validateElementsIncorrectValue( elementName, elementValue, markerMessage ); - - elementValue = "com.liferay.ide.tests.StrutsActionImpl"; - validateElementcorrectValue( elementName, elementValue ); - - markerMessage = - MessageFormat.format( LiferayHookDescriptorValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { "" } ); - validateElementsIncorrectValue( elementName, "", markerMessage ); - } - -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayLayoutTplXmlTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayLayoutTplXmlTests.java deleted file mode 100644 index 9cf243927e..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayLayoutTplXmlTests.java +++ /dev/null @@ -1,160 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.containsProposal; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.containHyperlink; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getHyperLinksForElement; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getProposalsForElement; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setElementContent; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; -import com.liferay.ide.xml.search.ui.editor.LiferayCustomXmlViewerConfiguration; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.hyperlink.IHyperlink; -import org.junit.AfterClass; -import org.junit.Test; - - -/** - * @author Kuo Zhang - */ -public class LiferayLayoutTplXmlTests extends XmlSearchTestsBase -{ - - private IFile descriptor; - private static IProject project; - - private IFile getDescriptorFile() throws Exception - { - return descriptor != null ? descriptor : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.LIFERAY_LAYOUTTPL_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "layouttpl", "Liferay-Layout-Templates-Xml-Test-layouttpl" ); - XmlSearchTestsUtils.deleteOtherProjects( project ); - } - - return project; - } - - @AfterClass - public static void deleteProject() throws Exception - { - project.delete( true, null ); - } - - public void validateHyperLinksForElement( String elementName, String expectedHyperlinkText ) throws Exception - { - descriptor = getDescriptorFile(); - IHyperlink[] hyperLinks = getHyperLinksForElement( descriptor, elementName ); - assertTrue( containHyperlink( hyperLinks, expectedHyperlinkText, true ) ); - } - - public void validateContentAssistForElement( String elementName, String elementContent, String[] expectedProposal ) - throws Exception - { - descriptor = getDescriptorFile(); - setElementContent( descriptor, elementName, elementContent ); - buildAndValidate( descriptor ); - - final ICompletionProposal[] proposals = getProposalsForElement( descriptor, elementName ); - assertNotNull( proposals ); - assertEquals( true, proposals.length > 0 ); - - for( String proposal : expectedProposal ) - { - assertTrue( - "can't get proposal " + proposal + " in " + elementName, containsProposal( proposals, proposal, true ) ); - } - } - - @Test - public void testTemplatePath() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "template-path"; - String expectedHyperlinkText = "Open '/Liferay-Layout-Templates-Xml-Test-layouttpl/docroot/Liferay_Layout_Templates_Xml_Test.tpl'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String[] expectedProposal = { "/Liferay_Layout_Templates_Xml_Test.tpl" }; - String elementContent = ""; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "/Liferay_Layout_Template"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - } - - @Test - public void testThumbnailPath() throws Exception - { - if( shouldSkipBundleTests() )return; - String elementName = "thumbnail-path"; - String expectedHyperlinkText = "Open '/Liferay-Layout-Templates-Xml-Test-layouttpl/docroot/Liferay_Layout_Templates_Xml_Test.png'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String[] expectedProposal = { "/Liferay_Layout_Templates_Xml_Test.png" }; - String elementContent = ""; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "/Liferay_Layout_Template"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - } - - @Test - public void testWapTemplatePath() throws Exception - { - if( shouldSkipBundleTests() )return; - - String elementName = "wap-template-path"; - String expectedHyperlinkText = "Open '/Liferay-Layout-Templates-Xml-Test-layouttpl/docroot/Liferay_Layout_Templates_Xml_Test.wap.tpl'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String[] expectedProposal = { "/Liferay_Layout_Templates_Xml_Test.wap.tpl" }; - String elementContent = ""; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - - elementContent = "/Liferay_Layout_Template"; - validateContentAssistForElement( elementName, elementContent, expectedProposal ); - } - - @Test - public void testSourceViewerConfiguration() throws Exception - { - if( shouldSkipBundleTests() )return; - - final IFile descriptorFile = getDescriptorFile(); - Object sourceViewerConfiguration = - XmlSearchTestsUtils.getSourceViewerConfiguraionFromOpenedEditor( descriptorFile ); - - assertEquals( true, sourceViewerConfiguration instanceof LiferayCustomXmlViewerConfiguration ); - } - -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayPortletXmlTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayPortletXmlTests.java deleted file mode 100644 index 1ac3aea7a6..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayPortletXmlTests.java +++ /dev/null @@ -1,569 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.containsProposal; -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.containHyperlink; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerResolutionByClass; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getHyperLinksForElement; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getProposalsForElement; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setElementContent; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; -import com.liferay.ide.xml.search.ui.editor.LiferayCustomXmlViewerConfiguration; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseInstanceScopeXmlValidationLevel; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseProjectScopeXmlValidationLevel; - -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.hyperlink.IHyperlink; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; - -/** - * @author Kuo Zhang - */ -public class LiferayPortletXmlTests extends XmlSearchTestsBase -{ - - protected final static String MARKER_TYPE = XML_REFERENCES_MARKER_TYPE; - private IFile descriptorFile; - private static IProject project; - - protected IFile getDescriptorFile() throws Exception - { - return descriptorFile != null ? descriptorFile : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.LIFERAY_PORTLET_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "portlets", "Portlet-Xml-Test-portlet" ); - deleteOtherProjects( project ); - } - - return project; - } - - @Before - public void cleanupMarkers() throws Exception - { - descriptorFile = getDescriptorFile(); - ZipFile projectFile = new ZipFile( getProjectZip( getBundleId(), "Portlet-Xml-Test-portlet" ) ); - ZipEntry entry = projectFile.getEntry( "Portlet-Xml-Test-portlet/docroot/WEB-INF/liferay-portlet.xml" ); - - descriptorFile.setContents( projectFile.getInputStream( entry ), IResource.FORCE, new NullProgressMonitor() ); - projectFile.close(); - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - public void validateHyperLinksForElement( String elementName, String expectedHyperlinkText ) throws Exception - { - descriptorFile = getDescriptorFile(); - IHyperlink[] hyperLinks = getHyperLinksForElement( descriptorFile, elementName ); - assertTrue( containHyperlink( hyperLinks, expectedHyperlinkText, true ) ); - } - - public void validateContentAssistForElement( String elementName, String expectedProposal ) throws Exception - { - descriptorFile = getDescriptorFile(); - - final ICompletionProposal[] proposals = getProposalsForElement( descriptorFile, elementName ); - assertNotNull( proposals ); - - assertTrue( containsProposal( proposals, expectedProposal, true ) ); - } - - public void validateQuickFixForElements( String elementName ) throws Exception - { - descriptorFile = getDescriptorFile(); - String elementContent = "quickFixTest"; - String markerMessageRegex = ".*" + elementContent + ".*"; - setElementContent( descriptorFile, elementName, elementContent ); - buildAndValidate( descriptorFile ); - - IMarker expectedMarker = findMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessageRegex, false ); - assertNotNull( findMarkerResolutionByClass( expectedMarker, DecreaseProjectScopeXmlValidationLevel.class ) ); - assertNotNull( findMarkerResolutionByClass( expectedMarker, DecreaseInstanceScopeXmlValidationLevel.class ) ); - } - - @Test - public void testSourceViewerConfiguration() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final IFile descriptorFile = getDescriptorFile(); - Object sourceViewerConfiguration = - XmlSearchTestsUtils.getSourceViewerConfiguraionFromOpenedEditor( descriptorFile ); - - assertEquals( true, sourceViewerConfiguration instanceof LiferayCustomXmlViewerConfiguration ); - } - - @Test - public void testAssetRenderFactory() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "asset-renderer-factory"; - - String expectedHyperlinkText = "Open 'AssetRendererFactoryImp - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "AssetRendererFactoryImp - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testAtomCollectionAdapter() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "atom-collection-adapter"; - - String expectedHyperlinkText = "Open 'AtomCollectionAdapterImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "AtomCollectionAdapterImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testConfigurationActionClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "configuration-action-class"; - - String expectedHyperlinkText = "Open 'ConfigurationActionImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "ConfigurationActionImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testControlPanelEntryClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "control-panel-entry-class"; - - String expectedHyperlinkText = "Open 'ControlPanelEntryImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "ControlPanelEntryImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testCustomAttributesDisplay() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "custom-attributes-display"; - - String expectedHyperlinkText = "Open 'CustomAttributesDisplayImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "CustomAttributesDisplayImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testDDMDisplay() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "ddm-display"; - - String expectedHyperlinkText = "Open 'DDMDisplayImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "DDMDisplayImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testfooterPortletCss() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "footer-portlet-css"; - - String expectedHyperlinkText = "Open '/Portlet-Xml-Test-portlet/docroot/css/main.css'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "/css/main.css"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testFooterPortletJavaScript() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "footer-portlet-javascript"; - - String expectedHyperlinkText = "Open '/Portlet-Xml-Test-portlet/docroot/js/main.js'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "/js/main.js"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testFriendlyURLMapperClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "friendly-url-mapper-class"; - - String expectedHyperlinkText = "Open 'FriendlyURLMapperImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "FriendlyURLMapperImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testHeaderPortletCss() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "header-portlet-css"; - - String expectedHyperlinkText = "Open '/Portlet-Xml-Test-portlet/docroot/css/main.css'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "/css/main.css"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testHeaderPortletJavascript() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "header-portlet-javascript"; - - String expectedHyperlinkText = "Open '/Portlet-Xml-Test-portlet/docroot/js/main.js'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "/js/main.js"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testIcon() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "icon"; - - String expectedHyperlinkText = "Open '/Portlet-Xml-Test-portlet/docroot/icon.png'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "/icon.png"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testIndexerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "indexer-class"; - - String expectedHyperlinkText = "Open 'IndexerImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "IndexerImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testPermissionPropagator() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "permission-propagator"; - - String expectedHyperlinkText = "Open 'PermissionPropagatorImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "PermissionPropagatorImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testPollerProcessorClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "poller-processor-class"; - - String expectedHyperlinkText = "Open 'PollerProcessorImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "PollerProcessorImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testPopMessageListenerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "pop-message-listener-class"; - - String expectedHyperlinkText = "Open 'PopMessageListenerImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "PopMessageListenerImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testPortletDataHandlerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "portlet-data-handler-class"; - - String expectedHyperlinkText = "Open 'PortletDataHandlerImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "PortletDataHandlerImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - } - - @Test - public void testPortletLayoutListenerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "portlet-layout-listener-class"; - - String expectedHyperlinkText = "Open 'PortletLayoutListenerImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "PortletLayoutListenerImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - } - - @Test - public void testSchedulerEventListenerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "scheduler-event-listener-class"; - - String expectedHyperlinkText = "Open 'MessageListenerImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "MessageListenerImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - } - - @Test - public void testSocialActivityInterpreterClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "social-activity-interpreter-class"; - - String expectedHyperlinkText = "Open 'SocialActivityInterpreterImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "SocialActivityInterpreterImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - } - - @Test - public void testSocialRequestInterpreterClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "social-request-interpreter-class"; - - String expectedHyperlinkText = "Open 'SocialRequestInterpreterImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "SocialRequestInterpreterImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testStagedModelDataHandlerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "staged-model-data-handler-class"; - - String expectedHyperlinkText = "Open 'StagedModelDataHandlerImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "StagedModelDataHandlerImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testTemplateHandler() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "template-handler"; - - String expectedHyperlinkText = "Open 'TemplateHandlerImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "TemplateHandlerImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testURLEncoderClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "url-encoder-class"; - - String expectedHyperlinkText = "Open 'URLEncoderImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "URLEncoderImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testUserNotificationHandlerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "user-notification-handler-class"; - - String expectedHyperlinkText = "Open 'UserNotificationHandlerImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "UserNotificationHandlerImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testWebdavStorageClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "webdav-storage-class"; - - String expectedHyperlinkText = "Open 'WebDAVStorageImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "WebDAVStorageImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - - @Test - public void testXmlRpcMethodClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "xml-rpc-method-class"; - - String expectedHyperlinkText = "Open 'XmlrpcMethodImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String expectedProposal = "XmlrpcMethodImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, expectedProposal ); - - validateQuickFixForElements( elementName ); - } - -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayPortletXmlValidationTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayPortletXmlValidationTests.java deleted file mode 100644 index 515b5a7ef3..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/LiferayPortletXmlValidationTests.java +++ /dev/null @@ -1,550 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkNoMarker; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setElementContent; -import static org.junit.Assert.assertTrue; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; -import com.liferay.ide.xml.search.ui.validators.LiferayBaseValidator; -import com.liferay.ide.xml.search.ui.validators.LiferayPortletDescriptorValidator; - -import java.text.MessageFormat; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; - -/** - * @author Li Lu - */ -public class LiferayPortletXmlValidationTests extends XmlSearchTestsBase -{ - - protected final static String MARKER_TYPE = XML_REFERENCES_MARKER_TYPE; - private IFile descriptorFile; - private static IProject project; - - protected IFile getDescriptorFile() throws Exception - { - - return descriptorFile != null ? descriptorFile : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.LIFERAY_PORTLET_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "portlets", "Portlet-Xml-Test-portlet" ); - deleteOtherProjects( project ); - } - - return project; - } - - public void validateElementResourceNotFound( String elementName, String elementValue ) throws Exception - { - final IFile descriptorFile = getDescriptorFile(); - - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - String markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { elementValue } ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - } - - public void validateElementTypeNotFound( String elementName, String elementValue ) throws Exception - { - final IFile descriptorFile = getDescriptorFile(); - - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - String markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { elementValue } ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - } - - public void validateElementTypeHierarchyInocorrect( String elementName, String extendType ) throws Exception - { - String elementValue = "com.liferay.ide.tests.Orphan"; - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - String markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { elementValue, - extendType } ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - } - - public void validateElementReferenceNotFound( String elementName, String elementValue ) throws Exception - { - final IFile descriptorFile = getDescriptorFile(); - - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - String markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_REFERENCE_NOT_FOUND, new Object[] { elementValue, - "portlet.xml" } ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - } - - public void validateElementCorrectValue( String elementName, String correctValue ) throws Exception - { - // IFile descriptorFile = getDescriptorFile(); - setElementContent( descriptorFile, elementName, correctValue ); - - buildAndValidate( descriptorFile ); - - if( !checkNoMarker( descriptorFile, MARKER_TYPE ) ) - { - buildAndValidate( descriptorFile ); - } - - assertTrue( checkNoMarker( descriptorFile, MARKER_TYPE ) ); - } - - @Before - public void cleanupMarkers() throws Exception - { - descriptorFile = getDescriptorFile(); - ZipFile projectFile = new ZipFile( getProjectZip( getBundleId(), "Portlet-Xml-Test-portlet" ) ); - ZipEntry entry = projectFile.getEntry( "Portlet-Xml-Test-portlet/docroot/WEB-INF/liferay-portlet.xml" ); - - descriptorFile.setContents( projectFile.getInputStream( entry ), IResource.FORCE, new NullProgressMonitor() ); - projectFile.close(); - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - @Test - public void testAssetRenderFactory() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "asset-renderer-factory"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portlet.asset.model.AssetRendererFactory" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.AssetRendererFactoryImp" ); - } - - @Test - public void testAtomCollectionAdapter() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "atom-collection-adapter"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.atom.AtomCollectionAdapter" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.AtomCollectionAdapterImpl" ); - } - - @Test - public void testConfigurationActionClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "configuration-action-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.portlet.ConfigurationAction" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.ConfigurationActionImpl" ); - } - - @Test - public void testControlPanelEntryClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "control-panel-entry-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portlet.ControlPanelEntry" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.ControlPanelEntryImpl" ); - } - - @Test - public void testControlPanelEntryWeight() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final IFile descriptorFile = getDescriptorFile(); - final String elementName = "control-panel-entry-weight"; - String elementValue = "control-panel-entry-weight"; - - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - String markerMessage = - MessageFormat.format( - LiferayPortletDescriptorValidator.MESSAGE_ENTRY_WEIGHT_SYNTAX_INVALID, new Object[] { elementValue } ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - - elementValue = "1.5"; - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - assertTrue( checkNoMarker( descriptorFile, MARKER_TYPE ) ); - } - - @Test - public void testCustomAttributesDisplay() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "custom-attributes-display"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( - elementName, "com.liferay.portlet.expando.model.CustomAttributesDisplay" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.CustomAttributesDisplayImpl" ); - } - - @Test - public void testDDMDisplay() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "ddm-display"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portlet.dynamicdatamapping.util.DDMDisplay" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.DDMDisplayImpl" ); - } - - @Test - public void testfooterPortletCss() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "footer-portlet-css"; - - validateElementResourceNotFound( elementName, "foo" ); - validateElementResourceNotFound( elementName, "" ); - validateElementCorrectValue( elementName, "/css/main.css" ); - } - - @Test - public void testFooterPortletJavaScript() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "footer-portlet-javascript"; - - validateElementResourceNotFound( elementName, "foo" ); - validateElementResourceNotFound( elementName, "" ); - validateElementCorrectValue( elementName, "/js/main.js" ); - } - - @Test - public void testFriendlyURLMapperClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "friendly-url-mapper-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.portlet.FriendlyURLMapper" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.FriendlyURLMapperImpl" ); - } - - @Test - public void testHeaderPortletCss() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "header-portlet-css"; - - validateElementResourceNotFound( elementName, "foo" ); - validateElementResourceNotFound( elementName, "" ); - validateElementCorrectValue( elementName, "/css/main.css" ); - } - - @Test - public void testHeaderPortletJavascript() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "header-portlet-javascript"; - - validateElementResourceNotFound( elementName, "foo" ); - validateElementResourceNotFound( elementName, "" ); - validateElementCorrectValue( elementName, "/js/main.js" ); - } - - @Test - public void testIcon() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "icon"; - - validateElementResourceNotFound( elementName, "foo" ); - validateElementResourceNotFound( elementName, "" ); - validateElementCorrectValue( elementName, "/icon.png" ); - } - - @Test - public void testIndexerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "indexer-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.search.Indexer" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.IndexerImpl" ); - } - - @Test - public void testPermissionPropagator() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "permission-propagator"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( - elementName, "com.liferay.portal.security.permission.PermissionPropagator" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.PermissionPropagatorImpl" ); - } - - @Test - public void testPollerProcessorClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "poller-processor-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.poller.PollerProcessor" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.PollerProcessorImpl" ); - } - - @Test - public void testPopMessageListenerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "pop-message-listener-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.pop.MessageListener" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.PopMessageListenerImpl" ); - } - - @Test - public void testPortletDataHandlerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "portlet-data-handler-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.lar.PortletDataHandler" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.PortletDataHandlerImpl" ); - } - - @Test - public void testPortletLayoutListenerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "portlet-layout-listener-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.portlet.PortletLayoutListener" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.PortletLayoutListenerImpl" ); - } - - @Test - public void testPortletName() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "portlet-name"; - - validateElementReferenceNotFound( elementName, "foo" ); - validateElementReferenceNotFound( elementName, "" ); - validateElementCorrectValue( elementName, "Portlet-Xml-Test" ); - } - - @Test - public void testSchedulerEventListenerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "scheduler-event-listener-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.messaging.MessageListener" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.MessageListenerImpl" ); - } - - @Test - public void testSocialActivityInterpreterClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "social-activity-interpreter-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( - elementName, "com.liferay.portlet.social.model.SocialActivityInterpreter" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.SocialActivityInterpreterImpl" ); - } - - @Test - public void testSocialRequestInterpreterClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "social-request-interpreter-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( - elementName, "com.liferay.portlet.social.model.SocialRequestInterpreter" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.SocialRequestInterpreterImpl" ); - } - - @Test - public void testStagedModelDataHandlerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "staged-model-data-handler-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.lar.StagedModelDataHandler" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.StagedModelDataHandlerImpl" ); - } - - @Test - public void testTemplateHandler() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "template-handler"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.template.TemplateHandler" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.TemplateHandlerImpl" ); - } - - @Test - public void testURLEncoderClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "url-encoder-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.servlet.URLEncoder" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.URLEncoderImpl" ); - } - - @Test - public void testUserNotificationHandlerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "user-notification-handler-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( - elementName, "com.liferay.portal.kernel.notifications.UserNotificationHandler" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.UserNotificationHandlerImpl" ); - } - - @Test - public void testWebdavStorageClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "webdav-storage-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.webdav.WebDAVStorage" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.WebDAVStorageImpl" ); - } - - @Test - public void testXmlRpcMethodClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "xml-rpc-method-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "com.liferay.portal.kernel.xmlrpc.Method" ); - validateElementCorrectValue( elementName, "com.liferay.ide.tests.XmlrpcMethodImpl" ); - } - -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/PortletXmlTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/PortletXmlTests.java deleted file mode 100644 index 2e8d2b5915..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/PortletXmlTests.java +++ /dev/null @@ -1,204 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.containsProposal; -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.containHyperlink; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.findMarkerResolutionByClass; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getHyperLinksForElement; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getProposalsForElement; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setElementContent; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; -import com.liferay.ide.xml.search.ui.editor.LiferayCustomXmlViewerConfiguration; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseInstanceScopeXmlValidationLevel; -import com.liferay.ide.xml.search.ui.markerResolutions.DecreaseProjectScopeXmlValidationLevel; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IProject; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.hyperlink.IHyperlink; -import org.junit.AfterClass; -import org.junit.Test; - -/** - * This test can only run in ui thread, and run as "org.eclipse.ui.ide.workbench" application. - * - * @author Kuo Zhang - * @author Li Lu - */ -public class PortletXmlTests extends XmlSearchTestsBase -{ - - protected final static String MARKER_TYPE = XML_REFERENCES_MARKER_TYPE; - private IFile descriptorFile; - private static IProject project; - - protected IFile getDescriptorFile() throws Exception - { - return descriptorFile != null ? descriptorFile : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.PORTLET_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "portlets", "Portlet-Xml-Test-portlet" ); - deleteOtherProjects( project ); - } - - return project; - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - public void validateContentAssistForElement( - String elementName, String elementContent, String expectedProposalString ) throws Exception - { - if( shouldSkipBundleTests() ) return; - descriptorFile = getDescriptorFile(); - setElementContent( descriptorFile, elementName, elementContent ); - buildAndValidate( descriptorFile ); - final ICompletionProposal[] proposals = getProposalsForElement( descriptorFile, elementName ); - - assertNotNull( proposals ); - assertEquals( true, proposals.length > 0 ); - - assertEquals( true, containsProposal( proposals, expectedProposalString, true ) ); - } - - public void validateHyperLinksForElement( String elementName, String expectedHyperlinkText ) throws Exception - { - descriptorFile = getDescriptorFile(); - IHyperlink[] hyperLinks = getHyperLinksForElement( descriptorFile, elementName ); - assertTrue( containHyperlink( hyperLinks, expectedHyperlinkText, true ) ); - } - - public void validateQuickFixForElements( String elementName , String elementContent ) throws Exception - { - descriptorFile = getDescriptorFile(); - String markerMessageRegex = ".*" + elementContent + ".*"; - setElementContent( descriptorFile, elementName, elementContent ); - buildAndValidate( descriptorFile ); - - IMarker expectedMarker = findMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessageRegex, false ); - assertNotNull( findMarkerResolutionByClass( expectedMarker, DecreaseProjectScopeXmlValidationLevel.class ) ); - assertNotNull( findMarkerResolutionByClass( expectedMarker, DecreaseInstanceScopeXmlValidationLevel.class ) ); - } - - @Test - public void testPortletClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "portlet-class"; - String expectedHyperlinkText = "Open 'MVCPortlet - com.liferay.util.bridges.mvc'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String elementContent = ""; - String expectedProposalString = "GenericPortletImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, elementContent, expectedProposalString ); - - elementContent = "GenericPortletI"; - validateContentAssistForElement( elementName, elementContent, expectedProposalString ); - validateQuickFixForElements( elementName, elementContent ); - } - - @Test - public void testListenerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "listener-class"; - - String expectedHyperlinkText = "Open 'PortletURLGenerationListenerImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String elementContent = ""; - String expectedProposalString = "PortletURLGenerationListenerImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, elementContent, expectedProposalString ); - - elementContent = "PortletURL"; - validateContentAssistForElement( elementName, elementContent, expectedProposalString ); - validateQuickFixForElements( elementName, elementContent ); - } - - @Test - public void testFilterClass() throws Exception - { - final String elementName = "filter-class"; - - String expectedHyperlinkText = "Open 'ResourceFilterImpl - com.liferay.ide.tests'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String elementContent = ""; - String expectedProposalString = "ResourceFilterImpl - com.liferay.ide.tests"; - validateContentAssistForElement( elementName, elementContent, expectedProposalString ); - - elementContent = "ResourceFilter"; - validateContentAssistForElement( elementName, elementContent, expectedProposalString ); - validateQuickFixForElements( elementName, elementContent ); - } - - @Test - public void testResourceBundle() throws Exception - { - final String elementName = "resource-bundle"; - String expectedHyperlinkText = "Open '/Portlet-Xml-Test-portlet/docroot/WEB-INF/src/content/Language.properties'"; - validateHyperLinksForElement( elementName, expectedHyperlinkText ); - - String elementContent = ""; - String expectedProposalString = "content.Language"; - validateContentAssistForElement( elementName, elementContent, expectedProposalString ); - - elementContent = "content."; - validateContentAssistForElement( elementName, elementContent, expectedProposalString ); - validateQuickFixForElements( elementName, elementContent ); - } - - @Test - public void testSourceViewerConfiguration() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final IFile descriptorFile = getDescriptorFile(); - Object sourceViewerConfiguration = - XmlSearchTestsUtils.getSourceViewerConfiguraionFromOpenedEditor( descriptorFile ); - - assertEquals( true, sourceViewerConfiguration instanceof LiferayCustomXmlViewerConfiguration ); - } -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/PortletXmlValidationTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/PortletXmlValidationTests.java deleted file mode 100644 index 9bdcd4e7e5..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/PortletXmlValidationTests.java +++ /dev/null @@ -1,221 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkNoMarker; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setElementContent; -import static org.junit.Assert.assertTrue; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; -import com.liferay.ide.xml.search.ui.validators.LiferayBaseValidator; -import com.liferay.ide.xml.search.ui.validators.PortletDescriptorValidator; - -import java.text.MessageFormat; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; - -public class PortletXmlValidationTests extends XmlSearchTestsBase -{ - - protected final static String MARKER_TYPE = XML_REFERENCES_MARKER_TYPE; - private IFile descriptorFile; - private static IProject project; - - protected IFile getDescriptorFile() throws Exception - { - return descriptorFile != null ? descriptorFile : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.PORTLET_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "portlets", "Portlet-Xml-Test-portlet" ); - deleteOtherProjects( project ); - } - - return project; - } - - @Before - public void cleanupMarkers() throws Exception - { - descriptorFile = getDescriptorFile(); - ZipFile projectFile = new ZipFile( getProjectZip( getBundleId(), "Portlet-Xml-Test-portlet" ) ); - ZipEntry entry = projectFile.getEntry( "Portlet-Xml-Test-portlet/docroot/WEB-INF/portlet.xml" ); - - descriptorFile.setContents( projectFile.getInputStream( entry ), IResource.FORCE, new NullProgressMonitor() ); - projectFile.close(); - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - public void validateElementTypeNotFound( String elementName, String elementValue ) throws Exception - { - final IFile descriptorFile = getDescriptorFile(); - - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - String markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_NOT_FOUND, new Object[] { elementValue } ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - } - - public void validateElementTypeHierarchyInocorrect( String elementName, String extendType ) throws Exception - { - String elementValue = "com.liferay.ide.tests.Orphan"; - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - String markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_TYPE_HIERARCHY_INCORRECT, new Object[] { elementValue, - extendType } ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - } - - public void validateElementResourceNotFound( String elementName, String elementValue ) throws Exception - { - final IFile descriptorFile = getDescriptorFile(); - - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - String markerMessage = - MessageFormat.format( LiferayBaseValidator.MESSAGE_RESOURCE_NOT_FOUND, new Object[] { elementValue } ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - } - - public void validateElementcorrectValue( String elementName, String elementValue ) throws Exception - { - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - assertTrue( checkNoMarker( descriptorFile, MARKER_TYPE ) ); - } - - @Test - public void testPortletClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "portlet-class"; - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "javax.portlet.GenericPortlet" ); - validateElementcorrectValue( elementName, "com.liferay.util.bridges.mvc.MVCPortlet" ); - } - - @Test - public void testListenerClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "listener-class"; - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( elementName, "javax.portlet.PortletURLGenerationListener" ); - validateElementcorrectValue( elementName, "com.liferay.ide.tests.PortletURLGenerationListenerImpl" ); - } - - @Test - public void testFilterClass() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "filter-class"; - - validateElementTypeNotFound( elementName, "foo" ); - validateElementTypeNotFound( elementName, "" ); - validateElementTypeHierarchyInocorrect( - elementName, - "javax.portlet.filter.ResourceFilter, javax.portlet.filter.RenderFilter, javax.portlet.filter.ActionFilter, javax.portlet.filter.EventFilter" ); - validateElementcorrectValue( elementName, "com.liferay.ide.tests.ResourceFilterImpl" ); - } - - @Test - public void testResourceBundle() throws Exception - { - if( shouldSkipBundleTests() ) return; - - final String elementName = "resource-bundle"; - String elementValue = null; - String markerMessage = null; - - // resource-bundle value ends with ".properties" - elementValue = "ResourceBundleEndWithProperties.properties"; - markerMessage = - MessageFormat.format( - PortletDescriptorValidator.MESSAGE_RESOURCE_BUNDLE_END_PROPERTIES, new Object[] { elementValue } ); - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - - // resource-bundle doesn't end with ".properties" - elementValue = "ResourceBundleNotEndWithProperties"; - validateElementcorrectValue( elementName, elementValue ); - - // resource-bundle values contains "/" - elementValue = "ResourceBundle/WithSlash"; - markerMessage = - MessageFormat.format( - PortletDescriptorValidator.MESSAGE_RESOURCE_BUNDLE_CONTAIN_PATH_SEPARATOR, - new Object[] { elementValue } ); - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - - // resource-bundle values doesn't contain "/" - validateElementcorrectValue( elementName, "ResourceBundleWithoutSlash" ); - - // resource bundle file doesn't exist - validateElementResourceNotFound( elementName, "" ); - validateElementResourceNotFound( elementName, "ResourceBundleNotExist" ); - validateElementResourceNotFound( elementName, "content.ResourceBundleNotExist" ); - - // resource bundle file exists - validateElementcorrectValue( elementName, "ResourceBundleExist" ); - validateElementcorrectValue( elementName, "content.Language" ); - } - -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/ServiceXmlTests.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/ServiceXmlTests.java deleted file mode 100644 index 1ac7c2fc82..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/ServiceXmlTests.java +++ /dev/null @@ -1,185 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static com.liferay.ide.ui.tests.UITestsUtils.containsProposal; -import static com.liferay.ide.ui.tests.UITestsUtils.deleteOtherProjects; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.buildAndValidate; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkMarkerByMessage; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.checkNoMarker; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.getProposalsForText; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setAttrValue; -import static com.liferay.ide.xml.search.ui.tests.XmlSearchTestsUtils.setElementContent; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import com.liferay.ide.core.ILiferayConstants; -import com.liferay.ide.core.IWebProject; -import com.liferay.ide.core.LiferayCore; - -import java.text.MessageFormat; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; - -/** - * @author Li Lu - */ -public class ServiceXmlTests extends XmlSearchTestsBase -{ - - protected final static String MARKER_TYPE = XML_REFERENCES_MARKER_TYPE; - public static final String SERVICE_XML_SYNTAX_INVALID = "Syntax of \"{0}\" is invalid."; - private IFile descriptorFile; - private static IProject project; - - protected IFile getDescriptorFile() throws Exception - { - return descriptorFile != null ? descriptorFile : LiferayCore.create(IWebProject.class, getProject() ).getDescriptorFile( - ILiferayConstants.SERVICE_XML_FILE ); - } - - private IProject getProject() throws Exception - { - if( project == null ) - { - project = super.getProject( "portlets", "Portlet-Xml-Test-portlet" ); - deleteOtherProjects( project ); - } - - return project; - } - - @Before - public void cleanupMarkers() throws Exception - { - descriptorFile = getDescriptorFile(); - ZipFile projectFile = new ZipFile( getProjectZip( getBundleId(), "Portlet-Xml-Test-portlet" ) ); - ZipEntry entry = projectFile.getEntry( "Portlet-Xml-Test-portlet/docroot/WEB-INF/service.xml" ); - - descriptorFile.setContents( projectFile.getInputStream( entry ), IResource.FORCE, new NullProgressMonitor() ); - projectFile.close(); - } - - @AfterClass - public static void deleteProject() throws Exception - { - try - { - project.close( null ); - project.delete( true, null ); - } - catch( Exception e ) - { - } - } - - @Test - public void testNamespaceValidation() throws Exception - { - if( shouldSkipBundleTests() ) return; - - String elementName = "namespace"; - String elementValue = "namespace1"; - setElementContent( descriptorFile, elementName, elementValue ); - - String markerMessage = MessageFormat.format( SERVICE_XML_SYNTAX_INVALID, new Object[] { elementValue } ); - - buildAndValidate( descriptorFile ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - - elementValue = "namespace"; - setElementContent( descriptorFile, elementName, elementValue ); - buildAndValidate( descriptorFile ); - - assertTrue( checkNoMarker( descriptorFile, MARKER_TYPE ) ); - } - - @Test - public void testPackagePathValidation() throws Exception - { - if( shouldSkipBundleTests() ) return; - - String elementName = "service-builder"; - String attrName = "package-path"; - String invalidAttrValue = "com.liferay test"; - - setAttrValue( descriptorFile, elementName, attrName, invalidAttrValue ); - - String markerMessage = "Invalid Java package name: 'liferay test' is not a valid Java identifier"; - - buildAndValidate( descriptorFile ); - - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - - String defaultAttrValue = "com.example.plugins"; - setAttrValue( descriptorFile, elementName, attrName, defaultAttrValue ); - buildAndValidate( descriptorFile ); - - assertTrue( checkNoMarker( descriptorFile, MARKER_TYPE ) ); - - setAttrValue( descriptorFile, elementName, attrName, "" ); - buildAndValidate( descriptorFile ); - markerMessage = "Invalid Java package name: A package name must not be empty"; - assertTrue( checkMarkerByMessage( descriptorFile, MARKER_TYPE, markerMessage, true ) ); - } - - @Test - public void testServiceXMLTemplates() throws Exception - { - if( shouldSkipBundleTests() ) return; - - descriptorFile = getDescriptorFile(); - ICompletionProposal[] proposals = getProposalsForText( descriptorFile, "entity" ); - final String[] expectedProposalStrings = - { "column", "finder", "order", "reference", "tx-required", "sb-column - a column for an entity", - "sb-columnp-primary - a primary column for an entity", "sb-entity - an entity element", - "sb-entity-sample - a simple entity element", "sb-exceptions - an exceptions element", - "sb-finder - a finder element", "sb-finder-column - a finder column for a finder", - "sb-order - an order element", "sb-order-column - an order column for an order" }; - - for( String expectedProposalString : expectedProposalStrings ) - { - assertTrue( "can't get proposal at :" + expectedProposalString, containsProposal( proposals, expectedProposalString, true ) ); - } - - //test on IDE-1683 - descriptorFile = LiferayCore.create( IWebProject.class, project ).getDescriptorFile( ILiferayConstants.PORTLET_XML_FILE ); - proposals = getProposalsForText( descriptorFile, "portlet" ); - - for( String expectedProposalString : expectedProposalStrings ) - { - assertFalse( "service builder proposal at :" + descriptorFile, containsProposal( proposals, expectedProposalString, true ) ); - } - - descriptorFile = LiferayCore.create( IWebProject.class, project ).getDescriptorFile( ILiferayConstants.LIFERAY_PORTLET_XML_FILE ); - proposals = getProposalsForText( descriptorFile, "portlet" ); - - for( String expectedProposalString : expectedProposalStrings ) - { - assertFalse( "service builder proposal at :" + descriptorFile, containsProposal( proposals, expectedProposalString, true ) ); - } - } -} diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/XmlSearchTestsBase.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/XmlSearchTestsBase.java deleted file mode 100644 index 16aa1ae7b6..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/XmlSearchTestsBase.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import com.liferay.ide.project.core.tests.ProjectCoreBase; - -/** - * @author Kuo Zhang - * @author Terry Jia - */ -public class XmlSearchTestsBase extends ProjectCoreBase -{ - - public static final String XML_REFERENCES_MARKER_TYPE = "org.eclipse.wst.xml.search.editor.validationMarker"; - - private static final String BUNDLE_ID = "com.liferay.ide.xml.search.ui.tests"; - - public static String MESSAGE_TYPE_HIERARCHY_INCORRECT = "Type hierarchy of class \"{0}\" is incorrect"; - - protected String getBundleId() - { - return BUNDLE_ID; - } - -} \ No newline at end of file diff --git a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/XmlSearchTestsUtils.java b/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/XmlSearchTestsUtils.java deleted file mode 100644 index d9d7572817..0000000000 --- a/tools/tests/com.liferay.ide.xml.search.ui.tests/src/com/liferay/ide/xml/search/ui/tests/XmlSearchTestsUtils.java +++ /dev/null @@ -1,503 +0,0 @@ -/******************************************************************************* - * 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 com.liferay.ide.xml.search.ui.tests; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import com.liferay.ide.core.util.ReflectionUtil; -import com.liferay.ide.ui.tests.UITestsUtils; -import com.liferay.ide.xml.search.ui.editor.CompoundRegion; -import com.liferay.ide.xml.search.ui.editor.InfoRegion; -import com.liferay.ide.xml.search.ui.editor.MarkerRegion; -import com.liferay.ide.xml.search.ui.editor.TemporaryRegion; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IResourceDelta; -import org.eclipse.core.resources.IncrementalProjectBuilder; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.jface.text.IRegion; -import org.eclipse.jface.text.ITextHover; -import org.eclipse.jface.text.contentassist.ContentAssistant; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.contentassist.IContentAssistProcessor; -import org.eclipse.jface.text.hyperlink.IHyperlink; -import org.eclipse.jface.text.hyperlink.IHyperlinkDetector; -import org.eclipse.jface.text.source.SourceViewerConfiguration; -import org.eclipse.ui.IMarkerResolution; -import org.eclipse.ui.ide.IDE; -import org.eclipse.ui.texteditor.MarkerAnnotation; -import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder; -import org.eclipse.wst.sse.ui.internal.StructuredTextViewer; -import org.eclipse.wst.validation.internal.ValManager; -import org.eclipse.wst.validation.internal.ValOperation; -import org.eclipse.wst.validation.internal.ValType; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; -import org.w3c.dom.Attr; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * Some methods are modified from eclipse wst sse tests - * - * @author Kuo Zhang - * @author Terry Jia - */ -@SuppressWarnings( "restriction" ) -public class XmlSearchTestsUtils extends UITestsUtils -{ - - private static ValManager valManager = ValManager.getDefault(); - - public static void buildAndValidate( IFile file ) throws Exception - { - valManager.validate( file.getProject(), file, IResourceDelta.CHANGED, ValType.Build, - IncrementalProjectBuilder.FULL_BUILD, new ValOperation(), new NullProgressMonitor() ); - } - public static boolean checkMarkerByMessage( IResource resource, String markerType, - String markerMessage, boolean fullMatch ) throws Exception - { - return findMarkerByMessage( resource, markerType, markerMessage, fullMatch ) != null; - } - - public static boolean checkNoMarker( IResource resource, String markerType ) throws Exception - { - return resource.findMarkers( markerType, false, IResource.DEPTH_ZERO ).length == 0; - } - - // check if the expected hyperlink is in the given proposals - public static boolean containHyperlink( IHyperlink[] hyperlinks, String expectedHyperlinkText, boolean fullMatch ) - { - for( IHyperlink hyperlink : hyperlinks ) - { - if( fullMatch && hyperlink.getHyperlinkText().equals( expectedHyperlinkText ) ) - { - return true; - } - else if( ! fullMatch && hyperlink.getHyperlinkText().contains( expectedHyperlinkText ) ) - { - return true; - } - } - - return false; - } - - public static IMarker findMarkerByMessage( IResource resource, String markerType, - String markerMessage, boolean fullMatch ) throws Exception - { - resource.refreshLocal( IResource.DEPTH_ZERO, new NullProgressMonitor() ); - final IMarker[] markers = resource.findMarkers( markerType, false, IResource.DEPTH_ZERO ); - - for( IMarker marker : markers ) - { - if( fullMatch && marker.getAttribute( IMarker.MESSAGE ).toString().equals( markerMessage ) ) - { - return marker; - } - else if( ! fullMatch && marker.getAttribute( IMarker.MESSAGE ).toString().matches( markerMessage ) ) - { - return marker; - } - } - - return null; - } - - public static IMarkerResolution findMarkerResolutionByClass( IMarker marker, Class clazz ) - { - IMarkerResolution[] markerResolutions = IDE.getMarkerHelpRegistry().getResolutions( marker ); - - for( IMarkerResolution markerResolution : markerResolutions ) - { - if( markerResolution.getClass().equals( clazz ) ) - { - return markerResolution; - } - } - - return null; - } - - public static int getAttrValueOffset( IFile file, String elementName, String attrName ) throws Exception - { - final IDOMModel domModel = getDOMModel( file, false ); - final Node attrNode = domModel.getDocument().getElementsByTagName( elementName ). - item( 0 ).getAttributes().getNamedItem( attrName ); - - int retval = getRegion( attrNode ).getOffset(); - - domModel.releaseFromRead(); - - return retval; - - } - - public static int getElementContentOffset( IFile file, String elementName ) throws Exception - { - final IDOMModel model = getDOMModel( file, false ); - - final Node element = model.getDocument().getElementsByTagName( elementName ).item( 0 ); - - int retval = getRegion( element.getFirstChild() ).getOffset(); - - model.releaseFromRead(); - - return retval; - } - - private static IHyperlink[] getHyperLinks( IFile file, int nodeType, String... nodeNames ) throws Exception - { - List retval = new ArrayList(); - IDOMModel domModel = null; - Node targetNode = null; - - final StructuredTextViewer viewer = getEditor( file ).getTextViewer(); - final SourceViewerConfiguration conf = getSourceViewerConfiguraionFromExtensionPoint( file ); - - if( nodeType == Node.ELEMENT_NODE ) - { - String elementName = nodeNames[0]; - domModel = getDOMModel( file, false ); - - // the actual node is text node of this.element - targetNode = domModel.getDocument().getElementsByTagName( elementName ).item( 0 ).getFirstChild(); - } - else if( nodeType == Node.ATTRIBUTE_NODE ) - { - String elementName = nodeNames[0]; - String attrName = nodeNames[1]; - - domModel = getDOMModel( file, false ); - NodeList elements = domModel.getDocument().getElementsByTagName( elementName ); - targetNode = getElementByAttr( elements, attrName ).getAttributes().getNamedItem( attrName ); - elements = domModel.getDocument().getElementsByTagName( elementName ); - } - else - { - return new IHyperlink[0]; - } - - assertNotNull( targetNode ); - - viewer.refresh(); - final IHyperlinkDetector[] hyperlinkDetectors = conf.getHyperlinkDetectors( viewer ); - final IRegion region = getRegion( targetNode ); - - for( IHyperlinkDetector detector : hyperlinkDetectors ) - { - IHyperlink[] tempHyperlinks = detector.detectHyperlinks( viewer, region, true ); - - if( tempHyperlinks != null && tempHyperlinks.length > 0 ) - { - retval.addAll( Arrays.asList( tempHyperlinks ) ); - } - } - - domModel.releaseFromRead(); - - return retval.toArray( new IHyperlink[0] ); - } - - public static IHyperlink[] getHyperLinksForAttr( IFile file, String elementName, String attrName ) throws Exception - { - return getHyperLinks( file, Node.ATTRIBUTE_NODE, elementName, attrName ); - } - - public static IHyperlink[] getHyperLinksForElement( IFile file, String elementName ) throws Exception - { - return getHyperLinks( file, Node.ELEMENT_NODE, elementName ); - } - - private static ICompletionProposal[] getProposals( IFile file, int nodeType, String... nodeNames ) throws Exception - { - Node targetNode = null; - IDOMModel domModel = null; - - final StructuredTextViewer viewer = getEditor( file ).getTextViewer(); - final SourceViewerConfiguration srcViewConf = getSourceViewerConfiguraionFromExtensionPoint( file ); - viewer.refresh(); - - if( nodeType == Node.ELEMENT_NODE ) - { - String elementName = nodeNames[0]; - - domModel = getDOMModel( file, false ); - targetNode = domModel.getDocument().getElementsByTagName( elementName ).item( 0 ); - } - else if( nodeType == Node.ATTRIBUTE_NODE ) - { - String elementName = nodeNames[0]; - String attrName = nodeNames[1]; - - domModel = getDOMModel( file, false ); - NodeList elements = domModel.getDocument().getElementsByTagName( elementName ); - Element element = getElementByAttr( elements, attrName ); - targetNode = element.getAttributes().getNamedItem( attrName ); - } - if( nodeType == Node.TEXT_NODE ) - { - String elementName = nodeNames[0]; - domModel = getDOMModel( file, false ); - targetNode = domModel.getDocument().getElementsByTagName( elementName ).item( 0 ).getFirstChild(); - } - - int offset = getRegion( targetNode ).getOffset() + getRegion( targetNode ).getLength(); - - final ContentAssistant contentAssistant = (ContentAssistant) srcViewConf.getContentAssistant( viewer ); - // viewer.configure( srcViewConf ); - // viewer.setSelectedRange( offset, 0 ); - - // get the processor - final String partitionTypeID = viewer.getDocument().getPartition( offset ).getType(); - final IContentAssistProcessor processor = contentAssistant.getContentAssistProcessor( partitionTypeID ); - - // get content assist suggestions - final ICompletionProposal[] proposals = processor.computeCompletionProposals( viewer, offset ); - - domModel.releaseFromRead(); - - return proposals; - } - - public static ICompletionProposal[] getProposalsForAttr( IFile file, String elementName ,String attrName ) throws Exception - { - return getProposals( file, Node.ATTRIBUTE_NODE, elementName, attrName ); - } - - public static ICompletionProposal[] getProposalsForElement( IFile file, String elementName ) throws Exception - { - return getProposals( file, Node.ELEMENT_NODE, elementName ); - } - - public static ICompletionProposal[] getProposalsForText( IFile file, String... nodeNames) throws Exception - { - return getProposals( file, Node.TEXT_NODE, nodeNames); - } - - // get the SourceViewerConfiguration from extension point - public static SourceViewerConfiguration getSourceViewerConfiguraionFromExtensionPoint( IFile file ) throws Exception - { - final String contentTypeId = file.getContentDescription().getContentType().getId(); - - // get Source Viewer Configuration from content type - Object viewerConfFromContentType = - ExtendedConfigurationBuilder.getInstance().getConfiguration( - ExtendedConfigurationBuilder.SOURCEVIEWERCONFIGURATION, contentTypeId ); - - // get Source Viewer Configuration from editorId, has a higher priority - final String editorId = IDE.getEditorDescriptor( file ).getId(); - Object viewerConfFromEditor = - ExtendedConfigurationBuilder.getInstance().getConfiguration( - ExtendedConfigurationBuilder.SOURCEVIEWERCONFIGURATION, editorId ); - - if( viewerConfFromEditor != null && viewerConfFromEditor instanceof SourceViewerConfiguration ) - { - return (SourceViewerConfiguration) viewerConfFromEditor; - } - else if( viewerConfFromContentType != null && viewerConfFromContentType instanceof SourceViewerConfiguration ) - { - return (SourceViewerConfiguration) viewerConfFromContentType; - } - - return null; - } - - private static String[] getTextHover( IFile file, int nodeType, String... nodeNames ) throws Exception - { - List retval = new ArrayList(); - IDOMModel domModel = null; - - Node targetNode = null; - - final StructuredTextViewer viewer = getEditor( file ).getTextViewer(); - - if( nodeType == Node.ELEMENT_NODE ) - { - String elementName = nodeNames[0]; - domModel = getDOMModel( file, false ); - - // the actual node is text node of this.element - targetNode = domModel.getDocument().getElementsByTagName( elementName ).item( 0 ).getFirstChild(); - } - else if( nodeType == Node.ATTRIBUTE_NODE ) - { - String elementName = nodeNames[0]; - String attrName = nodeNames[1]; - - domModel = getDOMModel( file, false ); - NodeList elements = domModel.getDocument().getElementsByTagName( elementName ); - Element element = getElementByAttr( elements, attrName ); - targetNode = element.getAttributes().getNamedItem( attrName ); - } - else - { - return null; - } - - int offset = getRegion( targetNode ).getOffset(); - - final Method getTextHoverMethod = - ReflectionUtil.getDeclaredMethod( viewer.getClass(), "getTextHover", true, int.class, int.class ); - getTextHoverMethod.setAccessible( true ); - - final ITextHover hover = (ITextHover)getTextHoverMethod.invoke( viewer, offset ,0 ); - final IRegion region = hover.getHoverRegion( viewer, offset ); - - if( region instanceof CompoundRegion ) - { - List regions = ( (CompoundRegion) region ).getRegions(); - - for( IRegion reg : regions ) - { - if( reg instanceof TemporaryRegion ) - { - String info = ( (TemporaryRegion) reg ).getAnnotation().getText(); - retval.add( info ); - } - if( reg instanceof MarkerRegion ) - { - - MarkerAnnotation annotation = ( (MarkerRegion) reg ).getAnnotation(); - String info = ( annotation.getMarker().getAttribute( IMarker.MESSAGE ) ).toString(); - retval.add( info ); - } - - if( reg instanceof InfoRegion ) - { - retval.add( ( (InfoRegion) reg ).getInfo() ); - } - } - } - - domModel.releaseFromRead(); - - return retval.toArray( new String[0] ); - } - - public static String[] getTextHoverForAttr( IFile file, String elementName, String attrName ) throws Exception - { - return getTextHover( file, Node.ATTRIBUTE_NODE, elementName, attrName ); - } - - public static String[] getTextHoverForElement( IFile file, String elementName ) throws Exception - { - return getTextHover( file, Node.ELEMENT_NODE, elementName ); - } - - // open the editor during test, useless for test, but testers can see what's going on. - public static void openEditor( IFile file ) throws Exception - { - getEditor( file ); - } - - // set the attribute value for the 1st element with the "elementName" - public static void setAttrValue( IFile file, String elementName, String attrName, String attrValue ) throws Exception - { - final IDOMModel domModel = getDOMModel( file, true ); - - assertNotNull( domModel ); - - final IDOMDocument document = domModel.getDocument(); - final NodeList elements = document.getElementsByTagName( elementName ); - - Element element = getElementByAttr( elements, attrName ); - assertNotNull( element ); - Attr attrNode = element.getAttributeNode( attrName ); - - attrNode.setValue( attrValue ); - - domModel.save(); - - domModel.releaseFromEdit(); - - file.refreshLocal( IResource.DEPTH_ZERO, new NullProgressMonitor() ); - } - - public static Element getElementByAttr( NodeList elements, String attrName ) throws Exception - { - Element element = null; - - for( int i = 0; i < elements.getLength(); i++ ) - { - element = (Element) elements.item( i ); - if( element.hasAttribute( attrName ) ) - break; - } - - return element; - } - - // set the content for the 1st element with name of "elementName" - public static void setElementContent( IFile file, String elementName, String content ) throws Exception - { - final IDOMModel domModel = getDOMModel( file, true ); - - assertNotNull( domModel ); - - final IDOMDocument document = domModel.getDocument(); - final NodeList elements = document.getElementsByTagName( elementName ); - - assertEquals( true, elements.getLength() > 0 ); - - final Element element = (Element) elements.item( 0 ); - - final NodeList childNodes = element.getChildNodes(); - - for( int i = 0; i < childNodes.getLength(); i++ ) - { - element.removeChild( childNodes.item( i ) ); - } - - element.appendChild( document.createTextNode( content ) ); - - domModel.save(); - - domModel.releaseFromEdit(); - - file.refreshLocal( IResource.DEPTH_ZERO, new NullProgressMonitor() ); - } - - // find the marker, use the given resolution to fix it and check if the marker is gone. - public static void verifyQuickFix( IFile file, String markerType, String markerMessageRegex, - Class resolutionClazz ) throws Exception - { - IMarker expectedMarker = findMarkerByMessage( file, markerType, markerMessageRegex, false ); - - assertNotNull( expectedMarker ); - - IMarkerResolution expectedMarkerResolution = - findMarkerResolutionByClass( expectedMarker, resolutionClazz ); - assertNotNull( expectedMarkerResolution ); - - expectedMarkerResolution.run( expectedMarker ); - buildAndValidate( file ); - - expectedMarker = findMarkerByMessage( file, markerType, markerMessageRegex, false ); - assertNull( expectedMarker ); - } - -} diff --git a/tools/tests/pom.xml b/tools/tests/pom.xml index 715c38b8a9..e1fc594eb0 100644 --- a/tools/tests/pom.xml +++ b/tools/tests/pom.xml @@ -37,8 +37,6 @@ com.liferay.ide.core.tests com.liferay.ide.server.core.tests com.liferay.ide.project.core.tests - com.liferay.ide.upgrade.problems.core.tests - com.liferay.ide.xml.search.ui.tests com.liferay.ide.ui.tests